From 10de2a5e80e089e57a1858598b58c6b850a23465 Mon Sep 17 00:00:00 2001 From: Orkun Date: Wed, 28 Aug 2024 05:17:00 +0300 Subject: [PATCH 01/52] chore: add code coverage --- .github/workflows/coverage-report.yml | 41 + composer.json | 2 +- composer.lock | 2456 ++++++++++++++++--------- coverage.php | 22 + docker-compose.yml | 2 +- docker/php/Dockerfile | 11 + docker/php/xdebug.ini | 6 + phpunit.xml.dist | 3 +- template/composer.mustache | 2 +- 9 files changed, 1642 insertions(+), 903 deletions(-) create mode 100644 .github/workflows/coverage-report.yml create mode 100644 coverage.php create mode 100644 docker/php/Dockerfile create mode 100644 docker/php/xdebug.ini diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml new file mode 100644 index 00000000..663d4b0e --- /dev/null +++ b/.github/workflows/coverage-report.yml @@ -0,0 +1,41 @@ +name: 'coverage-report' +on: + push: + branches: + - main + - coverage # remove before merge to main + +permissions: + contents: write +jobs: + coverage-report: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + coverage: none + tools: composer:v2 + extensions: xdebug + - name: Install Dependencies + run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: php-actions/phpunit@v3 + with: + php_version: "${{ matrix.php_version }}" + bootstrap: vendor/autoload.php + configuration: phpunit.xml.dist + args: --coverage-xml cov/xml + version: "9.3.0" + - name: "Parse Coverage" + run: "php ./coverage.php" + - name: Create Coverage Badges + uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620 + with: + source: cov/json/index.json + output: htmlcov/badges.svg + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc + with: + branch: gh-pages + folder: htmlcov \ No newline at end of file diff --git a/composer.json b/composer.json index 61e80160..bd5e2568 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "8.5.33", + "phpunit/phpunit": "9.3.0", "vlucas/phpdotenv": "^5.6" }, "autoload": { diff --git a/composer.lock b/composer.lock index 2b131405..7b9d721b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,70 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d252675910c39b945743e945daf6ff88", + "content-hash": "873eb84e1743489df43bea751fa09d53", "packages": [ - { - "name": "graham-campbell/result-type", - "version": "v1.1.3", - "source": { - "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" - }, - "type": "library", - "autoload": { - "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "An Implementation Of The Result Type", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" - ], - "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:45:45+00:00" - }, { "name": "guzzlehttp/guzzle", "version": "7.9.2", @@ -393,81 +331,6 @@ ], "time": "2024-07-18T11:15:46+00:00" }, - { - "name": "phpoption/phpoption", - "version": "1.9.3", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:41:07+00:00" - }, { "name": "psr/http-client", "version": "1.0.3", @@ -738,43 +601,87 @@ } ], "time": "2024-04-18T09:32:20+00:00" - }, + } + ], + "packages-dev": [ { - "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "name": "doctrine/deprecations", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "^7.1 || ^8.0" }, - "provide": { - "ext-ctype": "*" + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { - "ext-ctype": "For best performance" + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" }, "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" } }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + }, + "time": "2024-01-30T19:34:25+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" + }, + "type": "library", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -783,246 +690,932 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "constructor", + "instantiate" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, "funding": [ { - "url": "https://symfony.com/sponsor", + "url": "https://www.doctrine-project.org/sponsorship.html", "type": "custom" }, { - "url": "https://github.com/fabpot", - "type": "github" + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2022-12-30T00:15:36+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "name": "graham-campbell/result-type", + "version": "v1.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3" }, - "suggest": { - "ext-mbstring": "For best performance" + "require-dev": { + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" } + ], + "time": "2024-07-20T21:45:45+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.12.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, + "type": "library", "autoload": { "files": [ - "bootstrap.php" + "src/DeepCopy/deep_copy.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "DeepCopy\\": "src/DeepCopy/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2024-06-12T14:39:25+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.1.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-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/v5.1.0" + }, + "time": "2024-07-01T20:03:41+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "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.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.4.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1", + "ext-filter": "*", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.5", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + }, + "time": "2024-05-21T05:55:05+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "153ae662783729388a584b4361f2545e4d841e3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + }, + "time": "2024-02-23T11:10:43+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.3", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:41:07+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.19.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "reference": "67a759e7d8746d501c41536ba40cd9c0a07d6a87", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2 || ^2.0", + "php": "^7.2 || 8.0.* || 8.1.* || 8.2.* || 8.3.*", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0", + "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "dev", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.19.0" + }, + "time": "2024-02-29T11:52:51+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.29.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1" + }, + "time": "2024-05-31T08:52:43+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.32", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", + "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-text-template": "^2.0.4", + "sebastian/code-unit-reverse-lookup": "^2.0.3", + "sebastian/complexity": "^2.0.3", + "sebastian/environment": "^5.1.5", + "sebastian/lines-of-code": "^1.0.4", + "sebastian/version": "^3.0.2", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "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-main": "9.2.x-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 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/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:23:01+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" + "filesystem", + "iterator" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "branch-alias": { + "dev-master": "3.1-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" + "process" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "vlucas/phpdotenv", - "version": "v5.6.1", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.3", - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3", - "symfony/polyfill-ctype": "^1.24", - "symfony/polyfill-mbstring": "^1.24", - "symfony/polyfill-php80": "^1.24" + "php": ">=7.3" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-filter": "*", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator." + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, "branch-alias": { - "dev-master": "5.6-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1030,196 +1623,213 @@ ], "authors": [ { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://github.com/vlucas" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "dotenv", - "env", - "environment" + "template" ], "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { - "url": "https://github.com/GrahamCampbell", + "url": "https://github.com/sebastianbergmann", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" } ], - "time": "2024-07-20T21:52:34+00:00" - } - ], - "packages-dev": [ + "time": "2020-10-26T05:33:50+00:00" + }, { - "name": "doctrine/instantiator", - "version": "1.5.0", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": ">=7.3" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpunit/phpunit": "^9.3" }, "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "constructor", - "instantiate" + "timer" ], "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "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" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.12.0", + "name": "phpunit/phpunit", + "version": "9.3.0", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "05c76e25f90e40af2cf2b1b39e6d49c5e74aa84c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05c76e25f90e40af2cf2b1b39e6d49c5e74aa84c", + "reference": "05c76e25f90e40af2cf2b1b39e6d49c5e74aa84c", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3 <3.2.2" + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": "^7.3 || ^8.0", + "phpspec/prophecy": "^1.11.1", + "phpunit/php-code-coverage": "^9.0", + "phpunit/php-file-iterator": "^3.0.4", + "phpunit/php-invoker": "^3.1", + "phpunit/php-text-template": "^2.0.2", + "phpunit/php-timer": "^5.0.1", + "sebastian/code-unit": "^1.0.5", + "sebastian/comparator": "^4.0.3", + "sebastian/diff": "^4.0.2", + "sebastian/environment": "^5.1.2", + "sebastian/exporter": "^4.0.2", + "sebastian/global-state": "^5.0", + "sebastian/object-enumerator": "^4.0.2", + "sebastian/resource-operations": "^3.0.2", + "sebastian/type": "^2.2.1", + "sebastian/version": "^3.0.1" }, "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpspec/prophecy": "^1.10", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" }, + "bin": [ + "phpunit" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.3-dev" + } + }, "autoload": { "files": [ - "src/DeepCopy/deep_copy.php" + "src/Framework/Assert/Functions.php" ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "description": "Create deep copies (clones) of your objects", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "phpunit", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.3" }, "funding": [ { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2020-08-07T04:24:24+00:00" }, { - "name": "phar-io/manifest", - "version": "2.0.4", + "name": "sebastian/code-unit", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "54750ef60c58e43759730615a392c31c80e23176" + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", - "reference": "54750ef60c58e43759730615a392c31c80e23176", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-libxml": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -1232,53 +1842,52 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de", - "role": "Developer" + "role": "lead" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, "funding": [ { - "url": "https://github.com/theseer", + "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2024-03-03T12:33:53+00:00" + "time": "2020-10-26T13:08:54+00:00" }, { - "name": "phar-io/version", - "version": "3.2.1", + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1289,65 +1898,51 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "email": "sebastian@phpunit.de" } ], - "description": "Library for handling version information and constraints", + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, - "time": "2022-02-21T01:04:05+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "7.0.17", + "name": "sebastian/comparator", + "version": "4.0.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", - "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "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.3 || ^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": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" - }, - "suggest": { - "ext-xdebug": "^2.7.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1362,20 +1957,31 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ - "coverage", - "testing", - "xunit" + "comparator", + "compare", + "equality" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.17" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -1383,32 +1989,33 @@ "type": "github" } ], - "time": "2024-03-02T06:09:37+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "2.0.6", + "name": "sebastian/complexity", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "69deeb8664f611f156a924154985fbd4911eb36b" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b", - "reference": "69deeb8664f611f156a924154985fbd4911eb36b", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", + "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", "shasum": "" }, "require": { - "php": ">=7.1" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1427,15 +2034,11 @@ "role": "lead" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.6" + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" }, "funding": [ { @@ -1443,26 +2046,35 @@ "type": "github" } ], - "time": "2024-03-01T13:39:50+00:00" + "time": "2023-12-22T06:19:30+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "sebastian/diff", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1475,45 +2087,60 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "template" + "diff", + "udiff", + "unidiff", + "unified diff" ], "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/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T06:30:58+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.4", + "name": "sebastian/environment", + "version": "5.1.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb", - "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1528,18 +2155,19 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "timer" + "Xdebug", + "environment", + "hhvm" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.4" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -1547,28 +2175,29 @@ "type": "github" } ], - "time": "2024-03-01T13:42:41+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "4.0.4", + "name": "sebastian/exporter", + "version": "4.0.6", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", - "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": "^7.3 || ^8.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^9.0" + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -1589,16 +2218,33 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ - "tokenizer" + "export", + "exporter" ], "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/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -1606,61 +2252,38 @@ "type": "github" } ], - "abandoned": true, - "time": "2020-08-04T08:28:15+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { - "name": "phpunit/phpunit", - "version": "8.5.33", + "name": "sebastian/global-state", + "version": "5.0.7", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", - "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.3", - "phar-io/version": "^3.0.2", - "php": ">=7.2", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.4", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.5", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.5", - "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" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" - }, - "bin": [ - "phpunit" - ], + "ext-uopz": "*" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1675,61 +2298,51 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "phpunit", - "testing", - "xunit" + "global state" ], "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "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": "2023-02-27T13:04:50+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.3", + "name": "sebastian/lines-of-code", + "version": "1.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", - "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", "shasum": "" }, "require": { - "php": ">=5.6" + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -1744,14 +2357,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "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/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" }, "funding": [ { @@ -1759,34 +2373,34 @@ "type": "github" } ], - "time": "2024-03-01T13:45:45+00:00" + "time": "2023-12-22T06:20:34+00:00" }, { - "name": "sebastian/comparator", - "version": "3.0.5", + "name": "sebastian/object-enumerator", + "version": "4.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", - "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1802,30 +2416,13 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], + "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/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -1833,33 +2430,32 @@ "type": "github" } ], - "time": "2022-09-14T12:31:48+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { - "name": "sebastian/diff", - "version": "3.0.6", + "name": "sebastian/object-reflector", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6", - "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1875,23 +2471,13 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], + "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/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.6" + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -1899,35 +2485,32 @@ "type": "github" } ], - "time": "2024-03-02T06:16:36+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { - "name": "sebastian/environment", - "version": "4.2.5", + "name": "sebastian/recursion-context", + "version": "4.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "56932f6049a0482853056ffd617c91ffcc754205" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205", - "reference": "56932f6049a0482853056ffd617c91ffcc754205", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1943,18 +2526,21 @@ { "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 handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.5" + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -1962,34 +2548,32 @@ "type": "github" } ], - "time": "2024-03-01T13:49:59+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { - "name": "sebastian/exporter", - "version": "3.1.6", + "name": "sebastian/resource-operations", + "version": "3.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1939bc8fd1d39adcfa88c5b35335910869214c56", - "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2005,33 +2589,12 @@ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.6" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -2039,38 +2602,32 @@ "type": "github" } ], - "time": "2024-03-02T06:21:38+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { - "name": "sebastian/global-state", - "version": "3.0.5", + "name": "sebastian/type", + "version": "2.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/91c7c47047a971f02de57ed6f040087ef110c5d9", - "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", "shasum": "" }, "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3" }, "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -2085,17 +2642,15 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.5" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" }, "funding": [ { @@ -2103,34 +2658,29 @@ "type": "github" } ], - "time": "2024-03-02T06:13:16+00:00" + "time": "2021-06-15T12:49:02+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.5", + "name": "sebastian/version", + "version": "3.0.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "ac5b293dba925751b808e02923399fb44ff0d541" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541", - "reference": "ac5b293dba925751b808e02923399fb44ff0d541", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2145,14 +2695,15 @@ "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 that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, "funding": [ { @@ -2160,138 +2711,179 @@ "type": "github" } ], - "time": "2024-03-01T13:54:02+00:00" + "time": "2020-09-28T06:39:44+00:00" }, { - "name": "sebastian/object-reflector", - "version": "1.1.3", + "name": "symfony/polyfill-ctype", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "1d439c229e61f244ff1f211e5c99737f90c67def" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def", - "reference": "1d439c229e61f244ff1f211e5c99737f90c67def", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", + "reference": "0424dff1c58f028c451efff2045f5d92410bd540", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "^6.0" + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.1-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "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": "2024-03-01T13:56:04+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { - "name": "sebastian/recursion-context", - "version": "3.0.2", + "name": "symfony/polyfill-mbstring", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c", - "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, - "require-dev": { - "phpunit/phpunit": "^6.0" + "suggest": { + "ext-mbstring": "For best performance" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "src/" - ] + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "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": "2024-03-01T14:07:30+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { - "name": "sebastian/resource-operations", - "version": "2.0.3", + "name": "symfony/polyfill-php80", + "version": "v1.30.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee", - "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", + "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", "shasum": "" }, "require": { @@ -2299,64 +2891,88 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.0-dev" + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ - "src/" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.3" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "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": "2024-03-01T13:59:09+00:00" + "time": "2024-05-31T15:07:36+00:00" }, { - "name": "sebastian/type", - "version": "1.1.5", + "name": "theseer/tokenizer", + "version": "1.2.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874", - "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { - "php": ">=7.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.2" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "classmap": [ "src/" @@ -2368,52 +2984,69 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/1.1.5" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { - "url": "https://github.com/sebastianbergmann", + "url": "https://github.com/theseer", "type": "github" } ], - "time": "2024-03-01T14:04:07+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "vlucas/phpdotenv", + "version": "v5.6.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { - "php": ">=5.6" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.3", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.3", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "5.6-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Dotenv\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2421,68 +3054,95 @@ ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2024-07-20T21:52:34+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.2.3", + "name": "webmozart/assert", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", + "ext-ctype": "*", "php": "^7.2 || ^8.0" }, + "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": { - "classmap": [ - "src/" - ] + "psr-4": { + "Webmozart\\Assert\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], diff --git a/coverage.php b/coverage.php new file mode 100644 index 00000000..484c6131 --- /dev/null +++ b/coverage.php @@ -0,0 +1,22 @@ + [ + // "lines" => ["pct" => (float)$arr["project"]["directory"]["totals"]["lines"]["@attributes"]["percent"]], + // "methods" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], + // "functions" => ["pct" => (float)$arr["project"]["directory"]["totals"]["functions"]["@attributes"]["percent"]], + // "classes" => ["pct" => (float)$arr["project"]["directory"]["totals"]["classes"]["@attributes"]["percent"]], + // "traits" => ["pct" => (float)$arr["project"]["directory"]["totals"]["traits"]["@attributes"]["percent"]], + "statements" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], + ] +]; +file_put_contents(__DIR__ . "/cov/json/index.json", json_encode($map)); \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index d94eb86e..bfbd8270 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: env_file: - .env phpunit: - image: php:8.1-cli + build: './docker/php' volumes: - ./:/app working_dir: /app diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 00000000..4059ee37 --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,11 @@ +FROM php:8.2-cli + +# Install dependencies and Xdebug +RUN apt-get update && apt-get install -y \ + libicu-dev \ + && docker-php-ext-install intl \ + && pecl install xdebug \ + && docker-php-ext-enable xdebug + +# Configure Xdebug +COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file diff --git a/docker/php/xdebug.ini b/docker/php/xdebug.ini new file mode 100644 index 00000000..1b32702a --- /dev/null +++ b/docker/php/xdebug.ini @@ -0,0 +1,6 @@ +zend_extension=xdebug.so +xdebug.mode=coverage +xdebug.start_with_request=yes +xdebug.discover_client_host=true +xdebug.client_host=host.docker.internal +xdebug.client_port=9003 \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 61400802..888497e0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,8 +13,7 @@ - ./src/Api - ./src/Model + ./src diff --git a/template/composer.mustache b/template/composer.mustache index 1f968f05..02586ed0 100644 --- a/template/composer.mustache +++ b/template/composer.mustache @@ -41,7 +41,7 @@ "ext-openssl": "*" }, "require-dev": { - "phpunit/phpunit": "8.5.33", + "phpunit/phpunit": "9.3.0", "vlucas/phpdotenv": "^5.6" }, "autoload": { From 87e0fac7e8be29b8d2f72557f400504c94ffbe74 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 29 Aug 2024 13:12:53 +0300 Subject: [PATCH 02/52] chore(ci): change test branch name for coverage report workflow --- .github/workflows/coverage-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 663d4b0e..02a0315d 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,7 +3,7 @@ on: push: branches: - main - - coverage # remove before merge to main + - chore/code-coverage # remove before merge to main permissions: contents: write From b4214675dbaab07a7fd72c55f6237879ac908be1 Mon Sep 17 00:00:00 2001 From: Orkun Date: Thu, 29 Aug 2024 13:14:31 +0300 Subject: [PATCH 03/52] chore(coverage): fix php version env --- .github/workflows/coverage-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 02a0315d..66b0df22 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -22,7 +22,7 @@ jobs: run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - uses: php-actions/phpunit@v3 with: - php_version: "${{ matrix.php_version }}" + php_version: 8.2 bootstrap: vendor/autoload.php configuration: phpunit.xml.dist args: --coverage-xml cov/xml From 3bc4ae7a2678b5027af8b425f5ae63b532204e02 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:47:04 +0300 Subject: [PATCH 04/52] chore(coverage): implement coverage report with docker --- .github/workflows/coverage-diff.yml | 31 +++++++++++++++++++++++++++ .github/workflows/coverage-report.yml | 13 ++++------- .gitignore | 3 ++- README.md | 1 + phpunit.xml.dist | 5 +++++ template/README.mustache | 1 + 6 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/coverage-diff.yml diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml new file mode 100644 index 00000000..a58b88ea --- /dev/null +++ b/.github/workflows/coverage-diff.yml @@ -0,0 +1,31 @@ +name: 'coverage-diff' +on: + pull_request: + branches: + - master + - main +jobs: + coverage-diff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + coverage: none + tools: composer:v2 + extensions: xdebug + - name: Install Dependencies + run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: php-actions/phpunit@v3 + with: + php_version: 8.2 + bootstrap: vendor/autoload.php + configuration: phpunit.xml.dist + args: --coverage-xml cov/xml --coverage-html cov/html --coverage-clover cov/xml/clover.xml + version: "9.3.0" + - name: Get Cover + uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac + with: + coverageFile: ./cov/xml/clover.xml + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 66b0df22..adab99f0 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -20,22 +20,17 @@ jobs: extensions: xdebug - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - - uses: php-actions/phpunit@v3 - with: - php_version: 8.2 - bootstrap: vendor/autoload.php - configuration: phpunit.xml.dist - args: --coverage-xml cov/xml - version: "9.3.0" + - name: PHPUnit + run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620 with: source: cov/json/index.json - output: htmlcov/badges.svg + output: cov/html/coverage.svg - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc with: branch: gh-pages - folder: htmlcov \ No newline at end of file + folder: cov/html \ No newline at end of file diff --git a/.gitignore b/.gitignore index 84ff5e8f..f896e19d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ .env release/yarn-error.log release/node_modules -.php-cs-fixer.cache \ No newline at end of file +.php-cs-fixer.cache +cov/ \ No newline at end of file diff --git a/README.md b/README.md index 197331ae..edd8ff33 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@

CI badge CI badge +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 888497e0..788ac530 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -16,4 +16,9 @@ ./src + + + + + diff --git a/template/README.mustache b/template/README.mustache index 3154a0e0..273d05dd 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -10,6 +10,7 @@

CI badge CI badge +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require From 4f38f59da539add32618d5fc73158a64af6d8e35 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:50:26 +0300 Subject: [PATCH 05/52] chore(coverage): add docker-compose install step --- .github/workflows/coverage-report.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index adab99f0..9e23c41c 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -20,6 +20,9 @@ jobs: extensions: xdebug - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 + with: + version: '2.14.2' - name: PHPUnit run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: "Parse Coverage" From 9414784fa099da01578f4bbd22f36092db80c652 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:53:24 +0300 Subject: [PATCH 06/52] chore(coverage): add env creation step --- .github/workflows/coverage-report.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 9e23c41c..09bf0ff8 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -23,6 +23,8 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' + - name: "Create Empty env File for Docker" + run: touch .env - name: PHPUnit run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: "Parse Coverage" From dec411d9c1add4aa721e51c000a785d8f68136a5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 12:57:30 +0300 Subject: [PATCH 07/52] chore(template): use parentschema instead of parent for invalid properties --- src/Model/RawDeviceAttributesResult.php | 2 +- template/model_generic.mustache | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Model/RawDeviceAttributesResult.php b/src/Model/RawDeviceAttributesResult.php index 233734d2..1e560cb3 100644 --- a/src/Model/RawDeviceAttributesResult.php +++ b/src/Model/RawDeviceAttributesResult.php @@ -174,7 +174,7 @@ public function getModelName(): string */ public function listInvalidProperties(): array { - return parent::listInvalidProperties(); + return []; } /** diff --git a/template/model_generic.mustache b/template/model_generic.mustache index 0b480bf6..a0786595 100644 --- a/template/model_generic.mustache +++ b/template/model_generic.mustache @@ -158,12 +158,12 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa */ public function listInvalidProperties(): array { - {{#parent}} + {{#parentSchema}} $invalidProperties = parent::listInvalidProperties(); - {{/parent}} - {{^parent}} + {{/parentSchema}} + {{^parentSchema}} $invalidProperties = []; - {{/parent}} + {{/parentSchema}} {{#vars}} {{#required}} From bf03dd22e0b4ffac05c21a83ebb6acc9fdc9a509 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:03:38 +0300 Subject: [PATCH 08/52] chore(coverage): add permissions for cov directory --- .github/workflows/coverage-report.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 09bf0ff8..1934236e 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -23,6 +23,10 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' + - name: Set Permissions for Coverage Directory + run: | + mkdir -p cov/json cov/xml cov/html + chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit From dce75b6f1d45efa658bffd9a57dc480a6ba563e8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:13:03 +0300 Subject: [PATCH 09/52] chore(coverage-diff): use docker --- .github/workflows/coverage-diff.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index a58b88ea..3783586e 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -4,6 +4,7 @@ on: branches: - master - main + - chore/code-coverage # remove this after merged to main jobs: coverage-diff: runs-on: ubuntu-latest @@ -17,13 +18,17 @@ jobs: extensions: xdebug - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - - uses: php-actions/phpunit@v3 + - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: - php_version: 8.2 - bootstrap: vendor/autoload.php - configuration: phpunit.xml.dist - args: --coverage-xml cov/xml --coverage-html cov/html --coverage-clover cov/xml/clover.xml - version: "9.3.0" + version: '2.14.2' + - name: Set Permissions for Coverage Directory + run: | + mkdir -p cov/json cov/xml cov/html + chmod -R 777 cov + - name: "Create Empty env File for Docker" + run: touch .env + - name: PHPUnit + run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - name: Get Cover uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac with: From 0ad5e2440857c4b2546dd3dc607d24faad04d533 Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:14:35 +0300 Subject: [PATCH 10/52] chore(coverage-diff): test coverage diff --- .github/workflows/coverage-diff.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 3783586e..9847300d 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -5,6 +5,9 @@ on: - master - main - chore/code-coverage # remove this after merged to main + push: # remove before merge to main + branches: + - chore/code-coverage jobs: coverage-diff: runs-on: ubuntu-latest From c9c75d26a95aa3f4b1b12df6d362ba3dae8a5f1d Mon Sep 17 00:00:00 2001 From: Orkun Date: Fri, 30 Aug 2024 13:18:36 +0300 Subject: [PATCH 11/52] chore(coverage): cleanup branches --- .github/workflows/coverage-diff.yml | 5 ----- .github/workflows/coverage-report.yml | 1 - 2 files changed, 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 9847300d..cf7de75f 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -2,12 +2,7 @@ name: 'coverage-diff' on: pull_request: branches: - - master - main - - chore/code-coverage # remove this after merged to main - push: # remove before merge to main - branches: - - chore/code-coverage jobs: coverage-diff: runs-on: ubuntu-latest diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 1934236e..3b8dc092 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - chore/code-coverage # remove before merge to main permissions: contents: write From 4876354026c220fe15781b96ed0d752f29846402 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:22:22 +0300 Subject: [PATCH 12/52] docs(readme): update coverage badge link --- README.md | 2 +- template/README.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index edd8ff33..7e639589 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

CI badge CI badge -Unit Test Coverage +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require diff --git a/template/README.mustache b/template/README.mustache index 273d05dd..8f724c3b 100644 --- a/template/README.mustache +++ b/template/README.mustache @@ -10,7 +10,7 @@

CI badge CI badge -Unit Test Coverage +Unit Test Coverage CI badge Latest Stable Version on Packagist PHP Version Require From 444e1ebd01996ae9bbeb956cab9f93b7181f41ec Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:26:59 +0300 Subject: [PATCH 13/52] chore(ci): use sha instead of version for 3rd party actions --- .github/workflows/coverage-diff.yml | 2 +- .github/workflows/coverage-report.yml | 2 +- .github/workflows/functional.yml | 2 +- .github/workflows/test.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index cf7de75f..21c764f0 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: 8.2 coverage: none diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 3b8dc092..f77569f9 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: 8.2 coverage: none diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 433e9d5c..9dc31240 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -22,7 +22,7 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: "${{ matrix.php_version }}" coverage: none diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b46db6b..0d84fd91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,14 +17,14 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: "${{ matrix.php_version }}" coverage: none tools: composer:v2 - name: Install Dependencies run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist - - uses: php-actions/phpunit@v3 + - uses: php-actions/phpunit@aed47a6852905dbd05b7c1a47c526b38fcc4bc17 with: php_version: "${{ matrix.php_version }}" bootstrap: vendor/autoload.php From 5549a026596e8eb063d562fcd86f15c17c7b942a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:29:54 +0300 Subject: [PATCH 14/52] chore(ci): try to run coverage result --- .github/workflows/coverage-diff.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 21c764f0..5aa732c6 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -3,6 +3,8 @@ on: pull_request: branches: - main + - chore/code-coverage # remove this before merge to main + - develop # remove this before merge to main jobs: coverage-diff: runs-on: ubuntu-latest From a5cdb1f4beaa0e5e5d727dd7476b23e62a5c68e9 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:53:38 +0300 Subject: [PATCH 15/52] chore(coverage-diff): implement custom coverage diff --- .github/workflows/coverage-diff.yml | 57 +++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 5aa732c6..5c580610 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -27,10 +27,53 @@ jobs: chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - - name: PHPUnit - run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml - - name: Get Cover - uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac - with: - coverageFile: ./cov/xml/clover.xml - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: PHPUnit for PR + run: docker-compose run phpunit --coverage-clover=cov/xml/clover-pr.xml + - name: Checkout base branch + run: git checkout ${{ github.event.pull_request.base.ref }} + - name: PHPUnit for Base + run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml + + - name: Calculate coverage for PR branch + id: pr_coverage + run: | + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) + COVERAGE_PR=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) + echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV + + - name: Calculate coverage for base branch + id: base_coverage + run: | + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) + COVERAGE_BASE=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) + echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV + + - name: Compare coverage + run: | + COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | bc) + echo "Coverage PR: $COVERAGE_PR%" + echo "Coverage Base: $COVERAGE_BASE%" + echo "Coverage Diff: $COVERAGE_DIFF%" + + if [ $(echo "$COVERAGE_DIFF > 0" | bc) -eq 1 ]; then + COVERAGE_MESSAGE=":green_circle: Coverage increased by $COVERAGE_DIFF%" + elif [ $(echo "$COVERAGE_DIFF < 0" | bc) -eq 1 ]; then + COVERAGE_MESSAGE=":red_circle: Coverage decreased by ${COVERAGE_DIFF#-}%" + else + COVERAGE_MESSAGE=":yellow_circle: Coverage remained the same." + fi + + echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV + + - name: Post coverage comment to PR + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ + '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') + + curl -s -H "Authorization: token $GITHUB_TOKEN" \ + -X POST -d "$PR_COMMENT" \ + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" From 5f72fc04dc71f195ac3744a07c09aadd6c062385 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 10:57:38 +0300 Subject: [PATCH 16/52] chore(coverage-diff): update checkout step --- .github/workflows/coverage-diff.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 5c580610..809cacf0 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -29,8 +29,9 @@ jobs: run: touch .env - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover-pr.xml - - name: Checkout base branch - run: git checkout ${{ github.event.pull_request.base.ref }} + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.base.ref }} - name: PHPUnit for Base run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml From 91909591d1afe0ce8d06c980c647ec2fe433913a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:00:37 +0300 Subject: [PATCH 17/52] chore(coverage-diff): install requirements for base branch phpunit --- .github/workflows/coverage-diff.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 809cacf0..c963f2a7 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -32,6 +32,24 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} + + - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 + with: + php-version: 8.2 + coverage: none + tools: composer:v2 + extensions: xdebug + - name: Install Dependencies + run: composer install -q --profile --ignore-platform-reqs --no-interaction --no-ansi --no-scripts --no-suggest --prefer-dist + - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 + with: + version: '2.14.2' + - name: Set Permissions for Coverage Directory + run: | + mkdir -p cov/json cov/xml cov/html + chmod -R 777 cov + - name: "Create Empty env File for Docker" + run: touch .env - name: PHPUnit for Base run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml From 2e1fc628f8939067610b43cc295b56492e03c42a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:05:39 +0300 Subject: [PATCH 18/52] chore(coverage-diff): update paths for diff check --- .github/workflows/coverage-diff.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index c963f2a7..029d7fad 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -56,16 +56,16 @@ jobs: - name: Calculate coverage for PR branch id: pr_coverage run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-pr.xml | paste -sd+ | bc) + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) COVERAGE_PR=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - name: Calculate coverage for base branch id: base_coverage run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' clover-base.xml | paste -sd+ | bc) + COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) + TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) COVERAGE_BASE=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV From 8a753f7bcf489a7b8aa42ef1ba3221d4a50ad801 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:40:23 +0300 Subject: [PATCH 19/52] chore(coverage-diff): fix coverage message template --- .github/workflows/coverage-diff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 029d7fad..d60e2802 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -91,7 +91,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') + '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n'$COVERAGE_MESSAGE'"}') curl -s -H "Authorization: token $GITHUB_TOKEN" \ -X POST -d "$PR_COMMENT" \ From 1802475eece9a0a2c731bbb2919c52088ec1bedc Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 11:50:42 +0300 Subject: [PATCH 20/52] chore(coverage-diff): use awk instead grep for calculating diff --- .github/workflows/coverage-diff.yml | 53 +++++++++++++++++++---------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index d60e2802..c4832872 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -28,7 +28,24 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for PR - run: docker-compose run phpunit --coverage-clover=cov/xml/clover-pr.xml + run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + - name: Calculate coverage for PR branch + id: pr_coverage + run: | + COVERAGE_PR=$(awk -F'"' ' + / 0) { + print (covered_statements / total_statements) * 100; + } else { + print 0; + } + }' cov/xml/clover.xml) + echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} @@ -51,34 +68,34 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for Base - run: docker-compose run phpunit --coverage-clover=cov/xml/clover-base.xml - - - name: Calculate coverage for PR branch - id: pr_coverage - run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-pr.xml | paste -sd+ | bc) - COVERAGE_PR=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) - echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - + run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - name: Calculate coverage for base branch id: base_coverage run: | - COVERED_STATEMENTS=$(grep -oP 'coveredstatements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) - TOTAL_STATEMENTS=$(grep -oP 'statements="\K[0-9]+' cov/xml/clover-base.xml | paste -sd+ | bc) - COVERAGE_BASE=$(echo "scale=2; $COVERED_STATEMENTS/$TOTAL_STATEMENTS*100" | bc) + COVERAGE_BASE=$(awk -F'"' ' + / 0) { + print (covered_statements / total_statements) * 100; + } else { + print 0; + } + }' cov/xml/clover.xml) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - name: Compare coverage run: | - COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | bc) + COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | awk '{printf "%.2f", $0}') echo "Coverage PR: $COVERAGE_PR%" echo "Coverage Base: $COVERAGE_BASE%" echo "Coverage Diff: $COVERAGE_DIFF%" - if [ $(echo "$COVERAGE_DIFF > 0" | bc) -eq 1 ]; then + if (( $(echo "$COVERAGE_DIFF > 0" | awk '{print ($0 > 0)}') )); then COVERAGE_MESSAGE=":green_circle: Coverage increased by $COVERAGE_DIFF%" - elif [ $(echo "$COVERAGE_DIFF < 0" | bc) -eq 1 ]; then + elif (( $(echo "$COVERAGE_DIFF < 0" | awk '{print ($0 < 0)}') )); then COVERAGE_MESSAGE=":red_circle: Coverage decreased by ${COVERAGE_DIFF#-}%" else COVERAGE_MESSAGE=":yellow_circle: Coverage remained the same." @@ -91,7 +108,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n'$COVERAGE_MESSAGE'"}') + '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') curl -s -H "Authorization: token $GITHUB_TOKEN" \ -X POST -d "$PR_COMMENT" \ From 2bd23e187594579d8dbbe4b6c79828af963abef7 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 12:16:03 +0300 Subject: [PATCH 21/52] chore(coverage-diff): update base calculation and message body --- .github/workflows/coverage-diff.yml | 37 ++++++++++++++++++----------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index c4832872..29197844 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -72,18 +72,22 @@ jobs: - name: Calculate coverage for base branch id: base_coverage run: | - COVERAGE_BASE=$(awk -F'"' ' + COVERAGE_BASE=$(if [ -f cov/xml/clover.xml ]; then + awk -F'"' ' / 0) { + print (covered_statements / total_statements) * 100; + } else { + print 0; } - END { - if (total_statements > 0) { - print (covered_statements / total_statements) * 100; - } else { - print 0; - } - }' cov/xml/clover.xml) + }' cov/xml/clover.xml + else + echo 0 + fi) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - name: Compare coverage @@ -106,10 +110,15 @@ jobs: - name: Post coverage comment to PR env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERAGE_PR: ${{ env.COVERAGE_PR }} + COVERAGE_BASE: ${{ env.COVERAGE_BASE }} + COVERAGE_MESSAGE: ${{ env.COVERAGE_MESSAGE }} run: | - PR_COMMENT=$(jq -n --arg message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: '$COVERAGE_PR'%\n**Base Coverage**: '$COVERAGE_BASE'%\n\n$COVERAGE_MESSAGE"}') - + PR_COMMENT=$(jq -n --arg pr_coverage "$COVERAGE_PR" \ + --arg base_coverage "$COVERAGE_BASE" \ + --arg coverage_message "$COVERAGE_MESSAGE" \ + '{"body": "### Code Coverage Report\n\n**PR Coverage**: \($pr_coverage)%\n**Base Coverage**: \($base_coverage)%\n\n\($coverage_message)"}') + curl -s -H "Authorization: token $GITHUB_TOKEN" \ -X POST -d "$PR_COMMENT" \ - "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" + "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \ No newline at end of file From 79eb7e0a72ec85db1460c9b9e24b14a4ea19acb0 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 12:21:21 +0300 Subject: [PATCH 22/52] chore(coverage-diff): update diff calculation --- .github/workflows/coverage-diff.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 29197844..e58b4646 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -27,23 +27,29 @@ jobs: chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env + - name: Clear previous coverage data + run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - name: Calculate coverage for PR branch id: pr_coverage run: | COVERAGE_PR=$(awk -F'"' ' - / 0) { - print (covered_statements / total_statements) * 100; - } else { - print 0; - } - }' cov/xml/clover.xml) + coverage = (covered_statements / total_statements) * 100; + if (coverage > 100) { + coverage = 100; + } + print coverage; + } else { + print 0; + } + }' clover-pr.xml) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - uses: actions/checkout@v4 From c7d0a4d6d27a61c16d9a0acb8e25c64e0b0b27e8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 12:23:55 +0300 Subject: [PATCH 23/52] chore(coverage-diff): fix path for clover destinations --- .github/workflows/coverage-diff.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index e58b4646..cdbc2aac 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -28,7 +28,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: Clear previous coverage data - run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml + run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml cov/xml/clover.xml - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - name: Calculate coverage for PR branch @@ -49,7 +49,7 @@ jobs: } else { print 0; } - }' clover-pr.xml) + }' cov/xml/clover.xml) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - uses: actions/checkout@v4 From 3e2b8324be199dfd554c8a82d21fe2408219ab5b Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:13:59 +0300 Subject: [PATCH 24/52] chore(coverage-diff): update diff with markdown result --- .github/workflows/coverage-diff.yml | 64 +++++++--------------------- coverage.php | 65 +++++++++++++++++++++++++---- phpunit.xml.dist | 17 ++++---- src/Sealed/Sealed.php | 5 ++- test/FingerprintApiTest.php | 1 + 5 files changed, 87 insertions(+), 65 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index cdbc2aac..2208cc05 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -31,25 +31,11 @@ jobs: run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml cov/xml/clover.xml - name: PHPUnit for PR run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - - name: Calculate coverage for PR branch + - name: Create coverage report for PR id: pr_coverage run: | - COVERAGE_PR=$(awk -F'"' ' - / 0) { - coverage = (covered_statements / total_statements) * 100; - if (coverage > 100) { - coverage = 100; - } - print coverage; - } else { - print 0; - } - }' cov/xml/clover.xml) + php ./coverage.php + COVERAGE_PR=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - uses: actions/checkout@v4 @@ -75,28 +61,15 @@ jobs: run: touch .env - name: PHPUnit for Base run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml - - name: Calculate coverage for base branch + - name: Create coverage report for Base id: base_coverage run: | - COVERAGE_BASE=$(if [ -f cov/xml/clover.xml ]; then - awk -F'"' ' - / 0) { - print (covered_statements / total_statements) * 100; - } else { - print 0; - } - }' cov/xml/clover.xml - else - echo 0 - fi) + php ./coverage.php + COVERAGE_BASE=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - + - name: Compare coverage + id: compare_coverage run: | COVERAGE_DIFF=$(echo "$COVERAGE_PR - $COVERAGE_BASE" | awk '{printf "%.2f", $0}') echo "Coverage PR: $COVERAGE_PR%" @@ -113,18 +86,13 @@ jobs: echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV - - name: Post coverage comment to PR - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERAGE_PR: ${{ env.COVERAGE_PR }} - COVERAGE_BASE: ${{ env.COVERAGE_BASE }} - COVERAGE_MESSAGE: ${{ env.COVERAGE_MESSAGE }} + - name: Add coverage message to markdown run: | - PR_COMMENT=$(jq -n --arg pr_coverage "$COVERAGE_PR" \ - --arg base_coverage "$COVERAGE_BASE" \ - --arg coverage_message "$COVERAGE_MESSAGE" \ - '{"body": "### Code Coverage Report\n\n**PR Coverage**: \($pr_coverage)%\n**Base Coverage**: \($base_coverage)%\n\n\($coverage_message)"}') + echo "$COVERAGE_MESSAGE" | cat - cov/markdown/coverage_report.md > temp && mv temp cov/markdown/coverage_report.md - curl -s -H "Authorization: token $GITHUB_TOKEN" \ - -X POST -d "$PR_COMMENT" \ - "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \ No newline at end of file + - name: Add comment with coverage report + uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 + with: + message: | + ${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }} + $(cat cov/markdown/coverage_report.md) \ No newline at end of file diff --git a/coverage.php b/coverage.php index 484c6131..66c58b01 100644 --- a/coverage.php +++ b/coverage.php @@ -1,22 +1,69 @@ [ - // "lines" => ["pct" => (float)$arr["project"]["directory"]["totals"]["lines"]["@attributes"]["percent"]], - // "methods" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], - // "functions" => ["pct" => (float)$arr["project"]["directory"]["totals"]["functions"]["@attributes"]["percent"]], - // "classes" => ["pct" => (float)$arr["project"]["directory"]["totals"]["classes"]["@attributes"]["percent"]], - // "traits" => ["pct" => (float)$arr["project"]["directory"]["totals"]["traits"]["@attributes"]["percent"]], - "statements" => ["pct" => (float)$arr["project"]["directory"]["totals"]["methods"]["@attributes"]["percent"]], + "statements" => ["pct" => $percentage], ] ]; -file_put_contents(__DIR__ . "/cov/json/index.json", json_encode($map)); \ No newline at end of file +file_put_contents($outputPath . "index.json", json_encode($map)); + +// Generate Markdown report +$markdown = "# Code Coverage Report\n\n"; +$markdown .= "## Overall Coverage\n\n"; +$markdown .= "| Lines | Covered | Coverage |\n"; +$markdown .= "|--------|---------|----------|\n"; +$markdown .= sprintf( + "| %d | %d | %.2f%% |\n", + $elements, + $covered, + $percentage +); + +$markdown .= "\n## Files Coverage\n\n"; +$markdown .= "| File | Methods | Conditionals | Statements | Total Coverage |\n"; +$markdown .= "|------|-------------------|-------------------------|------------------------|----------------|\n"; + +foreach ($arr["project"]["file"] as $file) { + $filePath = $file["@attributes"]["name"]; + $fileMetrics = $file["metrics"]["@attributes"]; + + $methodsPct = $fileMetrics["methods"] > 0 ? ($fileMetrics["coveredmethods"] / $fileMetrics["methods"]) * 100 : 0; + $conditionalsPct = $fileMetrics["conditionals"] > 0 ? ($fileMetrics["coveredconditionals"] / $fileMetrics["conditionals"]) * 100 : 0; + $statementsPct = $fileMetrics["statements"] > 0 ? ($fileMetrics["coveredstatements"] / $fileMetrics["statements"]) * 100 : 0; + + $fileElements = (int)$fileMetrics["elements"]; + $fileCoveredElements = (int)$fileMetrics["coveredelements"]; + $totalCoveragePct = $fileElements > 0 ? ($fileCoveredElements / $fileElements) * 100 : 0; + + $markdown .= sprintf( + "| %s | %.2f%% | %.2f%% | %.2f%% | %.2f%% |\n", + basename($filePath), + $methodsPct, + $conditionalsPct, + $statementsPct, + $totalCoveragePct + ); +} + +file_put_contents($markdownPath . "coverage_report.md", $markdown); \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 788ac530..d0d03c54 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,24 +1,27 @@ + ./test - - - ./src - - - + + + ./src/Api/FingerprintApi.php + ./src/Sealed/Sealed.php + ./src/Webhook/WebhookVerifier.php + ./src/ObjectSerializer.php + - + \ No newline at end of file diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 89cb06b2..33c0290d 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -105,7 +105,10 @@ private static function decryptAes256Gcm($sealedData, $decryptionKey): string */ private static function decompress($data): string { - $inflated = gzinflate($data); + if (false === $data || strlen($data) === 0) { + throw new DecompressionException(); + } + $inflated = @gzinflate($data); // Ignore warnings, because we check the decompressed data's validity and throw error if necessary if (false === $inflated) { throw new DecompressionException(); diff --git a/test/FingerprintApiTest.php b/test/FingerprintApiTest.php index e498b7d7..22dac165 100644 --- a/test/FingerprintApiTest.php +++ b/test/FingerprintApiTest.php @@ -269,6 +269,7 @@ public function testGetUnknownFieldFromEvent() public function testGetBrokenFormatEvent() { + $event = null; try { list($event, $response) = $this->fingerprint_api->getEvent(self::MOCK_REQUEST_ID_WITH_BROKEN); } catch (SerializationException $exception) { From 4561bdf5f32548159b22c89db9962da4241c2d0a Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:15:32 +0300 Subject: [PATCH 25/52] refactor: supress warnings for sealed --- src/Sealed/Sealed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sealed/Sealed.php b/src/Sealed/Sealed.php index 33c0290d..687910b3 100644 --- a/src/Sealed/Sealed.php +++ b/src/Sealed/Sealed.php @@ -105,7 +105,7 @@ private static function decryptAes256Gcm($sealedData, $decryptionKey): string */ private static function decompress($data): string { - if (false === $data || strlen($data) === 0) { + if (false === $data || 0 === strlen($data)) { throw new DecompressionException(); } $inflated = @gzinflate($data); // Ignore warnings, because we check the decompressed data's validity and throw error if necessary From e6d46e072c8773d15a89dbd92e9becb6615dc088 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:22:30 +0300 Subject: [PATCH 26/52] chore(coverage-diff): update diff base coverage calc and hide files section --- .github/workflows/coverage-diff.yml | 12 ++++++++++-- coverage.php | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 2208cc05..87530a4f 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -64,8 +64,16 @@ jobs: - name: Create coverage report for Base id: base_coverage run: | - php ./coverage.php - COVERAGE_BASE=$(jq -r '.total.statements.pct' cov/json/index.json) + COVERAGE_BASE=0 + + if [ -f "./coverage.php" ]; then + php ./coverage.php + fi + + if [ -f "cov/json/index.json" ]; then + COVERAGE_BASE=$(jq -r '.total.statements.pct' cov/json/index.json) + fi + echo "COVERAGE_BASE=$COVERAGE_BASE" >> $GITHUB_ENV - name: Compare coverage diff --git a/coverage.php b/coverage.php index 66c58b01..69b86d02 100644 --- a/coverage.php +++ b/coverage.php @@ -40,7 +40,8 @@ $percentage ); -$markdown .= "\n## Files Coverage\n\n"; +$markdown .= "\n

\n"; +$markdown .= "Files Coverage\n\n"; $markdown .= "| File | Methods | Conditionals | Statements | Total Coverage |\n"; $markdown .= "|------|-------------------|-------------------------|------------------------|----------------|\n"; @@ -66,4 +67,6 @@ ); } +$markdown .= "\n
\n"; + file_put_contents($markdownPath . "coverage_report.md", $markdown); \ No newline at end of file From ca3cc8cadca4c002fb630ff5406f910c47c2846b Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:29:43 +0300 Subject: [PATCH 27/52] chore(coverage-diff): use markdown report as artifact --- .github/workflows/coverage-diff.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 87530a4f..bb25c5a4 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -37,6 +37,12 @@ jobs: php ./coverage.php COVERAGE_PR=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV + - name: Upload coverage report markdown + if: always() + uses: actions/upload-artifact@v3 + with: + name: coverage-report-md + path: cov/markdown/coverage_report.md - uses: actions/checkout@v4 with: @@ -94,6 +100,12 @@ jobs: echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV + - name: Download coverage report markdown + uses: actions/download-artifact@v3 + with: + name: coverage-report-md + path: cov/markdown/ + - name: Add coverage message to markdown run: | echo "$COVERAGE_MESSAGE" | cat - cov/markdown/coverage_report.md > temp && mv temp cov/markdown/coverage_report.md From b9eb25949f10f7e1b62c202cb1b4295c86fe8fcb Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:34:03 +0300 Subject: [PATCH 28/52] chore(coverage-diff): update combining markdown and comment format --- .github/workflows/coverage-diff.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index bb25c5a4..a4538c06 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -106,13 +106,15 @@ jobs: name: coverage-report-md path: cov/markdown/ - - name: Add coverage message to markdown + - name: Combine Coverage Message and Report + id: combine_message run: | - echo "$COVERAGE_MESSAGE" | cat - cov/markdown/coverage_report.md > temp && mv temp cov/markdown/coverage_report.md + echo "${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }}" > coverage_message.txt + cat cov/markdown/coverage_report.md >> coverage_message.txt + combined_message=$(cat coverage_message.txt) + echo "combined_message=$combined_message" >> $GITHUB_ENV - name: Add comment with coverage report uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 with: - message: | - ${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }} - $(cat cov/markdown/coverage_report.md) \ No newline at end of file + message: ${{ env.combined_message }} \ No newline at end of file From f6b87e34d931b1481d31f1ccf12da4eee413bbe0 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:41:33 +0300 Subject: [PATCH 29/52] chore(coverage-diff): combine message with coverage message --- .github/workflows/coverage-diff.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index a4538c06..0e86c274 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -107,14 +107,15 @@ jobs: path: cov/markdown/ - name: Combine Coverage Message and Report - id: combine_message run: | - echo "${{ steps.compare_coverage.outputs.COVERAGE_MESSAGE }}" > coverage_message.txt + echo "${COVERAGE_MESSAGE}" > coverage_message.txt cat cov/markdown/coverage_report.md >> coverage_message.txt combined_message=$(cat coverage_message.txt) - echo "combined_message=$combined_message" >> $GITHUB_ENV + echo "combined_message<> $GITHUB_ENV + echo "$combined_message" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV - name: Add comment with coverage report uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 with: - message: ${{ env.combined_message }} \ No newline at end of file + message: "${{ env.combined_message }}" \ No newline at end of file From 5b021e3c75f75d3c6db832ff35b6403ba083823c Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:54:11 +0300 Subject: [PATCH 30/52] chore(coverage-diff): include all php files for coverage --- phpunit.xml.dist | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d0d03c54..9ca94afb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -15,10 +15,7 @@ - ./src/Api/FingerprintApi.php - ./src/Sealed/Sealed.php - ./src/Webhook/WebhookVerifier.php - ./src/ObjectSerializer.php + ./src From 0bfb1b16e8dbf6d6b1bd3bf4b3e976d928ab9b72 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 16:59:49 +0300 Subject: [PATCH 31/52] chore(coverage-diff): remove conditionals from markdown report --- coverage.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/coverage.php b/coverage.php index 69b86d02..4c386339 100644 --- a/coverage.php +++ b/coverage.php @@ -42,15 +42,14 @@ $markdown .= "\n
\n"; $markdown .= "Files Coverage\n\n"; -$markdown .= "| File | Methods | Conditionals | Statements | Total Coverage |\n"; -$markdown .= "|------|-------------------|-------------------------|------------------------|----------------|\n"; +$markdown .= "| File | Methods | Statements | Total Coverage |\n"; +$markdown .= "|------|-------------------|------------------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { $filePath = $file["@attributes"]["name"]; $fileMetrics = $file["metrics"]["@attributes"]; $methodsPct = $fileMetrics["methods"] > 0 ? ($fileMetrics["coveredmethods"] / $fileMetrics["methods"]) * 100 : 0; - $conditionalsPct = $fileMetrics["conditionals"] > 0 ? ($fileMetrics["coveredconditionals"] / $fileMetrics["conditionals"]) * 100 : 0; $statementsPct = $fileMetrics["statements"] > 0 ? ($fileMetrics["coveredstatements"] / $fileMetrics["statements"]) * 100 : 0; $fileElements = (int)$fileMetrics["elements"]; @@ -58,10 +57,9 @@ $totalCoveragePct = $fileElements > 0 ? ($fileCoveredElements / $fileElements) * 100 : 0; $markdown .= sprintf( - "| %s | %.2f%% | %.2f%% | %.2f%% | %.2f%% |\n", + "| %s | %.2f%% | %.2f%% | %.2f%% |\n", basename($filePath), $methodsPct, - $conditionalsPct, $statementsPct, $totalCoveragePct ); From 71953b67ba0db0243a4c7b0d26d75e2c0f4ea809 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 17:13:59 +0300 Subject: [PATCH 32/52] docs(contributing): add coverage report section --- contributing.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/contributing.md b/contributing.md index 75717c83..32d3c62a 100644 --- a/contributing.md +++ b/contributing.md @@ -17,6 +17,21 @@ You can just run `sh ./scripts/generate.sh` script and it will do all the work. To download fresh OpenAPI schema run `sh ./scripts/sync.sh` +## Creating Coverage Report + +To generate a code coverage report in markdown format, follow these steps: + +1. Run PHPUnit with the `--coverage-clover` option to generate a coverage report in Clover XML format: + ```shell + docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + ``` +2. After generating the Clover XML file, run the coverage.php script to convert it into a markdown report: + ```shell + docker-compose run php php coverage.php + ``` + +The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. + ### Testing the local source code of the SDK Use the `run_checks.php` file to make API requests using the local version of the SDK. From 7d8fed3c0de1428c563a7b543987c154488c79db Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 20:34:54 +0300 Subject: [PATCH 33/52] docs(contributing): add coverage report html section --- contributing.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 32d3c62a..438b86cb 100644 --- a/contributing.md +++ b/contributing.md @@ -17,7 +17,7 @@ You can just run `sh ./scripts/generate.sh` script and it will do all the work. To download fresh OpenAPI schema run `sh ./scripts/sync.sh` -## Creating Coverage Report +## Creating Coverage Report (Markdown) To generate a code coverage report in markdown format, follow these steps: @@ -32,6 +32,17 @@ To generate a code coverage report in markdown format, follow these steps: The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. +## Creating Coverage Report (HTML) + +To generate a code coverage report in HTML format, just run this command: + +Run PHPUnit with the `--coverage-html` option to generate a coverage report in Clover HTML format: +```shell +docker-compose run phpunit --coverage-html=cov/html +``` + +The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. + ### Testing the local source code of the SDK Use the `run_checks.php` file to make API requests using the local version of the SDK. From b5239ef38a2b3469dba2059a66e336ae165c4cd5 Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 20:38:38 +0300 Subject: [PATCH 34/52] docs(contributing): fix typos in coverage html section --- contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 438b86cb..1c0d5bb0 100644 --- a/contributing.md +++ b/contributing.md @@ -41,7 +41,7 @@ Run PHPUnit with the `--coverage-html` option to generate a coverage report in C docker-compose run phpunit --coverage-html=cov/html ``` -The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. +The html report will be saved in the cov/html directory. You can open this folder to review the coverage details. ### Testing the local source code of the SDK From f670f216666210a981798084ffa5fe9d58c5ceb0 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:15:02 +0300 Subject: [PATCH 35/52] chore(coverage-diff): use relative path for coverage files --- coverage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coverage.php b/coverage.php index 4c386339..c59a9c90 100644 --- a/coverage.php +++ b/coverage.php @@ -46,7 +46,7 @@ $markdown .= "|------|-------------------|------------------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { - $filePath = $file["@attributes"]["name"]; + $filePath = 'src/' . explode('src/', $file["@attributes"]['name'])[1]; $fileMetrics = $file["metrics"]["@attributes"]; $methodsPct = $fileMetrics["methods"] > 0 ? ($fileMetrics["coveredmethods"] / $fileMetrics["methods"]) * 100 : 0; @@ -58,7 +58,7 @@ $markdown .= sprintf( "| %s | %.2f%% | %.2f%% | %.2f%% |\n", - basename($filePath), + $filePath, $methodsPct, $statementsPct, $totalCoveragePct From 6fcaae0a17578e3b3aaa9800b9591f5a9be6866e Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:30:12 +0300 Subject: [PATCH 36/52] chore(coverage-diff): use gitkeep instead of using 777 perms --- .github/workflows/coverage-diff.yml | 8 -------- .github/workflows/coverage-report.yml | 4 ---- .gitignore | 3 ++- cov/.gitkeep | 0 cov/html/.gitkeep | 0 cov/json/.gitkeep | 0 cov/markdown/.gitkeep | 0 cov/xml/.gitkeep | 0 coverage.php | 8 -------- 9 files changed, 2 insertions(+), 21 deletions(-) create mode 100644 cov/.gitkeep create mode 100644 cov/html/.gitkeep create mode 100644 cov/json/.gitkeep create mode 100644 cov/markdown/.gitkeep create mode 100644 cov/xml/.gitkeep diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 0e86c274..28bb4be7 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -21,10 +21,6 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' - - name: Set Permissions for Coverage Directory - run: | - mkdir -p cov/json cov/xml cov/html - chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: Clear previous coverage data @@ -59,10 +55,6 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' - - name: Set Permissions for Coverage Directory - run: | - mkdir -p cov/json cov/xml cov/html - chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for Base diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index f77569f9..246a1e6f 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -22,10 +22,6 @@ jobs: - uses: KengoTODA/actions-setup-docker-compose@4677f0d86d41e623c9c6e11e1d910976da297bc0 with: version: '2.14.2' - - name: Set Permissions for Coverage Directory - run: | - mkdir -p cov/json cov/xml cov/html - chmod -R 777 cov - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit diff --git a/.gitignore b/.gitignore index f896e19d..94d68667 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ release/yarn-error.log release/node_modules .php-cs-fixer.cache -cov/ \ No newline at end of file +cov/**/*.* +!cov/**/.gitkeep \ No newline at end of file diff --git a/cov/.gitkeep b/cov/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/html/.gitkeep b/cov/html/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/json/.gitkeep b/cov/json/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/markdown/.gitkeep b/cov/markdown/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/cov/xml/.gitkeep b/cov/xml/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/coverage.php b/coverage.php index c59a9c90..495e2573 100644 --- a/coverage.php +++ b/coverage.php @@ -3,14 +3,6 @@ $outputPath = __DIR__ . "/cov/json/"; $markdownPath = __DIR__ . "/cov/markdown/"; -if (!file_exists($outputPath)) { - mkdir($outputPath, 0777, true); -} - -if (!file_exists($markdownPath)) { - mkdir($markdownPath, 0777, true); -} - $contents = file_get_contents(__DIR__ . "/cov/xml/clover.xml"); $xml = simplexml_load_string($contents); $arr = json_decode(json_encode($xml), true); From 3d81684e717237b812493020f830f9aeaea8c537 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:38:08 +0300 Subject: [PATCH 37/52] chore(coverage): coverage inside phpunit xml file --- .github/workflows/coverage-diff.yml | 4 ++-- .github/workflows/coverage-report.yml | 2 +- contributing.md | 14 +++++++------- phpunit.xml.dist | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 28bb4be7..e0376c40 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -26,7 +26,7 @@ jobs: - name: Clear previous coverage data run: rm -f cov/xml/clover-pr.xml cov/xml/clover-base.xml cov/xml/clover.xml - name: PHPUnit for PR - run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + run: docker-compose run phpunit - name: Create coverage report for PR id: pr_coverage run: | @@ -58,7 +58,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit for Base - run: docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + run: docker-compose run phpunit - name: Create coverage report for Base id: base_coverage run: | diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 246a1e6f..71aaba13 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -25,7 +25,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit - run: docker-compose run phpunit --coverage-xml cov/xml --coverage-html cov/html --coverage-clover=cov/xml/clover.xml + run: docker-compose run phpunit - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges diff --git a/contributing.md b/contributing.md index 1c0d5bb0..c7b1094e 100644 --- a/contributing.md +++ b/contributing.md @@ -21,27 +21,27 @@ To download fresh OpenAPI schema run `sh ./scripts/sync.sh` To generate a code coverage report in markdown format, follow these steps: -1. Run PHPUnit with the `--coverage-clover` option to generate a coverage report in Clover XML format: +1. Run PHPUnit to generate a coverage report in Clover XML format: ```shell - docker-compose run phpunit --coverage-clover=cov/xml/clover.xml + docker-compose run phpunit ``` -2. After generating the Clover XML file, run the coverage.php script to convert it into a markdown report: +2. After PHPUnit generates the Clover XML file in `cov/xml/clover.xml`, run the coverage.php script to convert it into a markdown report: ```shell docker-compose run php php coverage.php ``` -The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. +The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. ## Creating Coverage Report (HTML) To generate a code coverage report in HTML format, just run this command: -Run PHPUnit with the `--coverage-html` option to generate a coverage report in Clover HTML format: +Run PHPUnit to generate a coverage report in HTML format: ```shell -docker-compose run phpunit --coverage-html=cov/html +docker-compose run phpunit ``` -The html report will be saved in the cov/html directory. You can open this folder to review the coverage details. +The html report will be saved in the `cov/html` directory. You can open this folder to review the coverage details. ### Testing the local source code of the SDK diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9ca94afb..5f9a36d1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,7 +18,9 @@ ./src + + \ No newline at end of file From 0c5e9acab4768e23aa1a890f1a2589912c1f37c8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:42:47 +0300 Subject: [PATCH 38/52] chore(coverage): update folder permissions --- cov/.gitkeep | 0 cov/html/.gitkeep | 0 cov/json/.gitkeep | 0 cov/markdown/.gitkeep | 0 cov/xml/.gitkeep | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 cov/.gitkeep mode change 100644 => 100755 cov/html/.gitkeep mode change 100644 => 100755 cov/json/.gitkeep mode change 100644 => 100755 cov/markdown/.gitkeep mode change 100644 => 100755 cov/xml/.gitkeep diff --git a/cov/.gitkeep b/cov/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/html/.gitkeep b/cov/html/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/json/.gitkeep b/cov/json/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/markdown/.gitkeep b/cov/markdown/.gitkeep old mode 100644 new mode 100755 diff --git a/cov/xml/.gitkeep b/cov/xml/.gitkeep old mode 100644 new mode 100755 From e48c72a05325ca0d903b2f407e37796be6db9105 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 11:47:10 +0300 Subject: [PATCH 39/52] chore(coverage-diff): remove git clean --- .github/workflows/coverage-diff.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index e0376c40..517705c1 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + clean: false - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: php-version: 8.2 @@ -43,6 +45,7 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.ref }} + clean: false - uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 with: From b33758afc4e8a4a0d51d7dbafea202bcac9fecb7 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 12:35:33 +0300 Subject: [PATCH 40/52] chore(coverage): update folder permissions --- cov/.gitkeep | 0 cov/html/.gitkeep | 0 cov/json/.gitkeep | 0 cov/markdown/.gitkeep | 0 cov/xml/.gitkeep | 0 5 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 cov/.gitkeep mode change 100755 => 100644 cov/html/.gitkeep mode change 100755 => 100644 cov/json/.gitkeep mode change 100755 => 100644 cov/markdown/.gitkeep mode change 100755 => 100644 cov/xml/.gitkeep diff --git a/cov/.gitkeep b/cov/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/html/.gitkeep b/cov/html/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/json/.gitkeep b/cov/json/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/markdown/.gitkeep b/cov/markdown/.gitkeep old mode 100755 new mode 100644 diff --git a/cov/xml/.gitkeep b/cov/xml/.gitkeep old mode 100755 new mode 100644 From 8daa0562c6b4cb3685488b32ae2d8a6fb0b88414 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 13:49:19 +0300 Subject: [PATCH 41/52] chore(coverage-diff): prettify overall coverage table --- coverage.php | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/coverage.php b/coverage.php index 495e2573..01c794c5 100644 --- a/coverage.php +++ b/coverage.php @@ -7,35 +7,60 @@ $xml = simplexml_load_string($contents); $arr = json_decode(json_encode($xml), true); -// Calculate total coverage -$elements = (int)$arr["project"]["metrics"]["@attributes"]["elements"]; -$covered = (int)$arr["project"]["metrics"]["@attributes"]["coveredelements"]; -$percentage = ($covered / $elements) * 100; +$metrics = $arr["project"]["metrics"]["@attributes"]; + +// Calculate coverage metrics +$statementsCovered = (int)$metrics["coveredstatements"]; +$statementsTotal = (int)$metrics["statements"]; +$statementsPct = $statementsTotal > 0 ? ($statementsCovered / $statementsTotal) * 100 : 0; + +$functionsCovered = (int)$metrics["coveredmethods"]; +$functionsTotal = (int)$metrics["methods"]; +$functionsPct = $functionsTotal > 0 ? ($functionsCovered / $functionsTotal) * 100 : 0; + +// Function to return color based on percentage +function getCoverageStatus($percentage) { + if ($percentage >= 80) { + return ":green_circle:"; + } elseif ($percentage >= 50) { + return ":yellow_circle:"; + } else { + return ":red_circle:"; + } +} // Generate JSON report $map = [ "total" => [ - "statements" => ["pct" => $percentage], + "statements" => ["pct" => $statementsPct], ] ]; file_put_contents($outputPath . "index.json", json_encode($map)); // Generate Markdown report $markdown = "# Code Coverage Report\n\n"; -$markdown .= "## Overall Coverage\n\n"; -$markdown .= "| Lines | Covered | Coverage |\n"; -$markdown .= "|--------|---------|----------|\n"; +$markdown .= "## Coverage Report\n\n"; +$markdown .= "| St. | Category | Percentage | Covered / Total |\n"; +$markdown .= "|-----|----------------|------------|-----------------|\n"; +$markdown .= sprintf( + "| %s | Statements | %.2f%% | %d / %d |\n", + getCoverageStatus($statementsPct), + $statementsPct, + $statementsCovered, + $statementsTotal +); $markdown .= sprintf( - "| %d | %d | %.2f%% |\n", - $elements, - $covered, - $percentage + "| %s | Functions | %.2f%% | %d / %d |\n", + getCoverageStatus($functionsPct), + $functionsPct, + $functionsCovered, + $functionsTotal ); $markdown .= "\n
\n"; $markdown .= "Files Coverage\n\n"; $markdown .= "| File | Methods | Statements | Total Coverage |\n"; -$markdown .= "|------|-------------------|------------------------|----------------|\n"; +$markdown .= "|------|---------|------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { $filePath = 'src/' . explode('src/', $file["@attributes"]['name'])[1]; From 630f3abc57bac2e3660e64b1d91e1f81ce52027d Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 13:52:33 +0300 Subject: [PATCH 42/52] chore(coverage-diff): prettify files coverage table --- coverage.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/coverage.php b/coverage.php index 01c794c5..1e9ec0c0 100644 --- a/coverage.php +++ b/coverage.php @@ -59,8 +59,8 @@ function getCoverageStatus($percentage) { $markdown .= "\n
\n"; $markdown .= "Files Coverage\n\n"; -$markdown .= "| File | Methods | Statements | Total Coverage |\n"; -$markdown .= "|------|---------|------------|----------------|\n"; +$markdown .= "| St. | File | Methods | Statements | Total Coverage |\n"; +$markdown .= "|-----|------|---------|------------|----------------|\n"; foreach ($arr["project"]["file"] as $file) { $filePath = 'src/' . explode('src/', $file["@attributes"]['name'])[1]; @@ -74,7 +74,8 @@ function getCoverageStatus($percentage) { $totalCoveragePct = $fileElements > 0 ? ($fileCoveredElements / $fileElements) * 100 : 0; $markdown .= sprintf( - "| %s | %.2f%% | %.2f%% | %.2f%% |\n", + "| %s | %s | %.2f%% | %.2f%% | %.2f%% |\n", + getCoverageStatus($totalCoveragePct), $filePath, $methodsPct, $statementsPct, From 78ec4331d231768a2bc222a41ca9330dbcdd61f8 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:02:04 +0300 Subject: [PATCH 43/52] docs(contributing): add docker section alternative to run php locally --- contributing.md | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/contributing.md b/contributing.md index c7b1094e..0b2720dc 100644 --- a/contributing.md +++ b/contributing.md @@ -17,31 +17,24 @@ You can just run `sh ./scripts/generate.sh` script and it will do all the work. To download fresh OpenAPI schema run `sh ./scripts/sync.sh` -## Creating Coverage Report (Markdown) +## Creating Coverage Report (Markdown and HTML) -To generate a code coverage report in markdown format, follow these steps: +To generate a code coverage report, follow these steps: -1. Run PHPUnit to generate a coverage report in Clover XML format: +1. Run PHPUnit to generate a coverage report: ```shell docker-compose run phpunit ``` -2. After PHPUnit generates the Clover XML file in `cov/xml/clover.xml`, run the coverage.php script to convert it into a markdown report: - ```shell - docker-compose run php php coverage.php - ``` - -The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. -## Creating Coverage Report (HTML) + - The Clover XML report will be saved in `cov/xml/clover.xml`. + - The HTML report will be saved in the `cov/html` directory. -To generate a code coverage report in HTML format, just run this command: - -Run PHPUnit to generate a coverage report in HTML format: -```shell -docker-compose run phpunit -``` +2. To convert the Clover XML report into a markdown report, run the coverage.php script: + ```shell + docker-compose run php php coverage.php + ``` -The html report will be saved in the `cov/html` directory. You can open this folder to review the coverage details. +The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. ### Testing the local source code of the SDK @@ -53,10 +46,26 @@ Use the `run_checks.php` file to make API requests using the local version of th 4. Create an `.env` file in the root folder according to [.env.example](.env.example) with your API key and test variables. 5. Finally, run `php run_checks.php`. +### Testing the local source code of the SDK (Docker) + +As an alternative to running the SDK tests locally, you can use Docker: + +1. Ensure that Docker is installed and running on your machine. +2. Create an `.env` file in the root folder according to [.env.example](.env.example) with your API key and test variables. +3. Run the following command to install dependencies using Docker: + ```shell + docker-compose run composer install + ``` +4. Run the following command to execute the SDK tests using Docker: + ```shell + docker-compose run php php run_checks.php + ``` + ### Configuration -Project configuration is described in `config.json` file. To read about available parameters run the command below: +Project configuration is described in the `config.json` file. To read about available parameters run the command below: ```shell java -jar ./bin/swagger-codegen-cli.jar config-help -l php ``` + From c3ef2adc9266e787efeb505a55b917ee1294000b Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:26:12 +0300 Subject: [PATCH 44/52] chore: test coverage report --- .github/workflows/coverage-report.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 71aaba13..80c4efcd 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,6 +3,8 @@ on: push: branches: - main + - chore/code-coverage # remove before merge to main + - develop # remove before merge to main permissions: contents: write From 282e40d34cda9d681a2659c6e930f03fc2441f91 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:45:52 +0300 Subject: [PATCH 45/52] chore(coverage-report): update docker user and group --- .github/workflows/coverage-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 80c4efcd..034df4f3 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -27,7 +27,7 @@ jobs: - name: "Create Empty env File for Docker" run: touch .env - name: PHPUnit - run: docker-compose run phpunit + run: docker-compose run --user "$(id -u):$(id -g)" phpunit - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges From 51747bde0bc0905057f895fd95347ac2f96b9935 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:55:15 +0300 Subject: [PATCH 46/52] chore(coverage-badge): format value for badge --- coverage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coverage.php b/coverage.php index 1e9ec0c0..4a4b4c6d 100644 --- a/coverage.php +++ b/coverage.php @@ -32,7 +32,7 @@ function getCoverageStatus($percentage) { // Generate JSON report $map = [ "total" => [ - "statements" => ["pct" => $statementsPct], + "statements" => ["pct" => number_format($statementsPct, 2)], ] ]; file_put_contents($outputPath . "index.json", json_encode($map)); From 19caf40626a1536d05931040d2b8c045f1742977 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 14:59:20 +0300 Subject: [PATCH 47/52] chore(coverage-report): add no jekyll to the exclude list for clean --- .github/workflows/coverage-report.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 034df4f3..36022ddf 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -39,4 +39,6 @@ jobs: uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc with: branch: gh-pages - folder: cov/html \ No newline at end of file + folder: cov/html + clean-exclude: | + .nojekyll \ No newline at end of file From 9f4bd046d3a5b6d9576604bcae4320dfc36c92dc Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:05:31 +0300 Subject: [PATCH 48/52] chore: update sha versions of 3rd party action versions --- .github/workflows/coverage-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 36022ddf..72e430f8 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -31,12 +31,12 @@ jobs: - name: "Parse Coverage" run: "php ./coverage.php" - name: Create Coverage Badges - uses: jaywcjlove/coverage-badges-cli@e07f25709cd25486855c1ba1b26da53576ff3620 + uses: jaywcjlove/coverage-badges-cli@df58615045079f1c827de7867044bbab3ec22b43 with: source: cov/json/index.json output: cov/html/coverage.svg - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@8817a56e5bfec6e2b08345c81f4d422db53a2cdc + uses: JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c with: branch: gh-pages folder: cov/html From 63332def030bbd303c608f88d124ee04a86720d9 Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:19:59 +0300 Subject: [PATCH 49/52] refactor: rename coverage.php to more explaining name and add comment what it does --- .github/workflows/coverage-diff.yml | 6 +++--- .github/workflows/coverage-report.yml | 2 +- contributing.md | 4 ++-- coverage.php => generate_coverage_report.php | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) rename coverage.php => generate_coverage_report.php (95%) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 517705c1..4d428f6c 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -32,7 +32,7 @@ jobs: - name: Create coverage report for PR id: pr_coverage run: | - php ./coverage.php + php ./generate_coverage_report.php COVERAGE_PR=$(jq -r '.total.statements.pct' cov/json/index.json) echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - name: Upload coverage report markdown @@ -67,8 +67,8 @@ jobs: run: | COVERAGE_BASE=0 - if [ -f "./coverage.php" ]; then - php ./coverage.php + if [ -f "./generate_coverage_report.php" ]; then + php ./generate_coverage_report.php fi if [ -f "cov/json/index.json" ]; then diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 72e430f8..9a64d3a2 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -29,7 +29,7 @@ jobs: - name: PHPUnit run: docker-compose run --user "$(id -u):$(id -g)" phpunit - name: "Parse Coverage" - run: "php ./coverage.php" + run: "php ./generate_coverage_report.php" - name: Create Coverage Badges uses: jaywcjlove/coverage-badges-cli@df58615045079f1c827de7867044bbab3ec22b43 with: diff --git a/contributing.md b/contributing.md index 0b2720dc..826d7ea3 100644 --- a/contributing.md +++ b/contributing.md @@ -29,9 +29,9 @@ To generate a code coverage report, follow these steps: - The Clover XML report will be saved in `cov/xml/clover.xml`. - The HTML report will be saved in the `cov/html` directory. -2. To convert the Clover XML report into a markdown report, run the coverage.php script: +2. To convert the Clover XML report into a markdown report, run the generate_coverage_report.php script: ```shell - docker-compose run php php coverage.php + docker-compose run php php generate_coverage_report.php ``` The markdown report will be saved in the `cov/markdown/coverage_report.md` file. You can open this file to review the coverage details. diff --git a/coverage.php b/generate_coverage_report.php similarity index 95% rename from coverage.php rename to generate_coverage_report.php index 4a4b4c6d..98ad057b 100644 --- a/coverage.php +++ b/generate_coverage_report.php @@ -1,5 +1,7 @@ Date: Tue, 3 Sep 2024 15:26:13 +0300 Subject: [PATCH 50/52] chore: cleanup branches for coverage actions --- .github/workflows/coverage-diff.yml | 5 +---- .github/workflows/coverage-report.yml | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index 4d428f6c..d5323917 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -1,10 +1,7 @@ name: 'coverage-diff' on: pull_request: - branches: - - main - - chore/code-coverage # remove this before merge to main - - develop # remove this before merge to main + jobs: coverage-diff: runs-on: ubuntu-latest diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 9a64d3a2..2ed93a63 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,8 +3,6 @@ on: push: branches: - main - - chore/code-coverage # remove before merge to main - - develop # remove before merge to main permissions: contents: write From 8c60356de7902f4d98f4b9c03bbe6ecf8bd3cb8c Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:30:49 +0300 Subject: [PATCH 51/52] chore: use v4 instead of v3 for github builtin actions --- .github/workflows/coverage-diff.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index d5323917..f62e2fa3 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -34,7 +34,7 @@ jobs: echo "COVERAGE_PR=$COVERAGE_PR" >> $GITHUB_ENV - name: Upload coverage report markdown if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-report-md path: cov/markdown/coverage_report.md @@ -93,7 +93,7 @@ jobs: echo "COVERAGE_MESSAGE=$COVERAGE_MESSAGE" >> $GITHUB_ENV - name: Download coverage report markdown - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: coverage-report-md path: cov/markdown/ From 9170f82569afa1b52e316f18d1c960f9da7fcccf Mon Sep 17 00:00:00 2001 From: Orkun Date: Tue, 3 Sep 2024 15:33:42 +0300 Subject: [PATCH 52/52] chore: add jub summary for coverage diff --- .github/workflows/coverage-diff.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage-diff.yml b/.github/workflows/coverage-diff.yml index f62e2fa3..6c6662c9 100644 --- a/.github/workflows/coverage-diff.yml +++ b/.github/workflows/coverage-diff.yml @@ -110,4 +110,9 @@ jobs: - name: Add comment with coverage report uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 with: - message: "${{ env.combined_message }}" \ No newline at end of file + message: "${{ env.combined_message }}" + - name: Add coverage report to the job summary + run: | + { + echo "${{ env.combined_message }}" + } >> $GITHUB_STEP_SUMMARY \ No newline at end of file