From 79ea6140dfcfb9f122a4ad5f6602ac5a50bcf339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Wer=C5=82os?= Date: Sat, 12 Oct 2024 12:43:04 +0200 Subject: [PATCH] Add `tomasvotruba/type-coverage` to dev tools --- .dev-tools/composer.json | 9 ++- .dev-tools/composer.lock | 161 ++++++++++++++++++++++++++++----------- .dev-tools/phpstan.neon | 13 +++- 3 files changed, 132 insertions(+), 51 deletions(-) diff --git a/.dev-tools/composer.json b/.dev-tools/composer.json index c71390b8..84d045a7 100644 --- a/.dev-tools/composer.json +++ b/.dev-tools/composer.json @@ -2,18 +2,19 @@ "type": "project", "require": { "php": "^8.3", - "ergebnis/composer-normalize": "^2.43", - "infection/infection": "^0.29.6", + "ergebnis/composer-normalize": "^2.44", + "infection/infection": "^0.29.7", "kubawerlos/composer-smaller-lock": "^1.0.1", "kubawerlos/php-cs-fixer-config": "^4.0", "mi-schi/phpmd-extension": "^4.3", "phpmd/phpmd": "^2.15", "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.5", + "phpstan/phpstan": "^1.12.6", "phpstan/phpstan-phpunit": "^1.4", "phpstan/phpstan-strict-rules": "^1.6.1", "shipmonk/composer-dependency-analyser": "^1.7", - "squizlabs/php_codesniffer": "^3.10.3" + "squizlabs/php_codesniffer": "^3.10.3", + "tomasvotruba/type-coverage": "^1.0" }, "autoload": { "psr-4": { diff --git a/.dev-tools/composer.lock b/.dev-tools/composer.lock index 2e861dce..f140f9a7 100644 --- a/.dev-tools/composer.lock +++ b/.dev-tools/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eb81ceed6b8c9ff42233e184f4b448a2", + "content-hash": "0f19dad960b4c957946b6f6796ca0fe7", "packages": [ { "name": "colinodell/json5", @@ -114,16 +114,16 @@ }, { "name": "ergebnis/composer-normalize", - "version": "2.43.0", + "version": "2.44.0", "source": { "type": "git", "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "4b46330c84bb8f43fac79f5c5a05162fc7c80d75" + "reference": "bd0c446426bb837ae0cc9f97948167e658bd11d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/4b46330c84bb8f43fac79f5c5a05162fc7c80d75", - "reference": "4b46330c84bb8f43fac79f5c5a05162fc7c80d75" + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/bd0c446426bb837ae0cc9f97948167e658bd11d2", + "reference": "bd0c446426bb837ae0cc9f97948167e658bd11d2" }, "require": { "composer-plugin-api": "^2.0.0", @@ -133,7 +133,7 @@ "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", "localheinz/diff": "^1.1.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "type": "composer-plugin", "extra": { @@ -156,20 +156,20 @@ }, { "name": "ergebnis/json", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json.git", - "reference": "a457f25a5ba7ea11fc94f84d53678c5211abfce0" + "reference": "84051b4e243d6a8e2f8271604b11ffa52d29bc7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json/zipball/a457f25a5ba7ea11fc94f84d53678c5211abfce0", - "reference": "a457f25a5ba7ea11fc94f84d53678c5211abfce0" + "url": "https://api.github.com/repos/ergebnis/json/zipball/84051b4e243d6a8e2f8271604b11ffa52d29bc7a", + "reference": "84051b4e243d6a8e2f8271604b11ffa52d29bc7a" }, "require": { "ext-json": "*", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "type": "library", "extra": { @@ -190,16 +190,16 @@ }, { "name": "ergebnis/json-normalizer", - "version": "4.5.0", + "version": "4.6.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "f0ee9e70739f121b27fac8b743e4a52b23de2152" + "reference": "859fd3cee417f0b10a8e6ffb8dbeb03587106b8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/f0ee9e70739f121b27fac8b743e4a52b23de2152", - "reference": "f0ee9e70739f121b27fac8b743e4a52b23de2152" + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/859fd3cee417f0b10a8e6ffb8dbeb03587106b8b", + "reference": "859fd3cee417f0b10a8e6ffb8dbeb03587106b8b" }, "require": { "ergebnis/json": "^1.2.0", @@ -208,7 +208,7 @@ "ergebnis/json-schema-validator": "^4.2.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "type": "library", "autoload": { @@ -223,22 +223,25 @@ }, { "name": "ergebnis/json-pointer", - "version": "3.4.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-pointer.git", - "reference": "b654757d873050622c2166f55ab25d04685261c5" + "reference": "f6ff71e69305b8ab5e4457e374b35dcd0812609b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/b654757d873050622c2166f55ab25d04685261c5", - "reference": "b654757d873050622c2166f55ab25d04685261c5" + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/f6ff71e69305b8ab5e4457e374b35dcd0812609b", + "reference": "f6ff71e69305b8ab5e4457e374b35dcd0812609b" }, "require": { - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "type": "library", "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, "composer-normalize": { "indent-size": 2, "indent-style": "space" @@ -256,21 +259,21 @@ }, { "name": "ergebnis/json-printer", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-printer.git", - "reference": "549e16fe6de34b8c3aee7b421be12caa552f3ced" + "reference": "d2e51379dc62d73017a779a78fcfba568de39e0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/549e16fe6de34b8c3aee7b421be12caa552f3ced", - "reference": "549e16fe6de34b8c3aee7b421be12caa552f3ced" + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/d2e51379dc62d73017a779a78fcfba568de39e0a", + "reference": "d2e51379dc62d73017a779a78fcfba568de39e0a" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "type": "library", "autoload": { @@ -285,23 +288,23 @@ }, { "name": "ergebnis/json-schema-validator", - "version": "4.2.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/ergebnis/json-schema-validator.git", - "reference": "10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef" + "reference": "73f938f8995c6ad1e37d2c1dfeaa8336861f9db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef", - "reference": "10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef" + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/73f938f8995c6ad1e37d2c1dfeaa8336861f9db8", + "reference": "73f938f8995c6ad1e37d2c1dfeaa8336861f9db8" }, "require": { "ergebnis/json": "^1.2.0", "ergebnis/json-pointer": "^3.4.0", "ext-json": "*", "justinrainbow/json-schema": "^5.2.12", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "type": "library", "extra": { @@ -430,16 +433,16 @@ }, { "name": "infection/infection", - "version": "0.29.6", + "version": "0.29.7", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "a8510c1d472892dda2ae32e2c4b2e795533db810" + "reference": "243d501ab48a028f714993bc0c217f023af7cdbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/a8510c1d472892dda2ae32e2c4b2e795533db810", - "reference": "a8510c1d472892dda2ae32e2c4b2e795533db810" + "url": "https://api.github.com/repos/infection/infection/zipball/243d501ab48a028f714993bc0c217f023af7cdbc", + "reference": "243d501ab48a028f714993bc0c217f023af7cdbc" }, "require": { "colinodell/json5": "^2.2 || ^3.0", @@ -454,7 +457,7 @@ "infection/extension-installer": "^0.1.0", "infection/include-interceptor": "^0.2.5", "infection/mutator": "^0.4", - "justinrainbow/json-schema": "^5.2.10", + "justinrainbow/json-schema": "^5.3", "nikic/php-parser": "^5.0", "ondram/ci-detector": "^4.1.0", "php": "^8.1", @@ -684,18 +687,52 @@ ], "description": "Contains extra phpmd rules from clean code book and the best practices of my experiences." }, + { + "name": "nette/utils", + "version": "v4.0.5", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" + }, + "require": { + "php": "8.0 - 8.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc." + }, { "name": "nikic/php-parser", - "version": "v5.2.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb", - "reference": "23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb" + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b", + "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b" }, "require": { "ext-ctype": "*", @@ -886,16 +923,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.5", + "version": "1.12.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17" + "reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17", - "reference": "7e6c6cb7cecb0a6254009a1a8a7d54ec99812b17" + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc4d2f145a88ea7141ae698effd64d9df46527ae", + "reference": "dc4d2f145a88ea7141ae698effd64d9df46527ae" }, "require": { "php": "^7.2|^8.0" @@ -1840,6 +1877,42 @@ ], "description": "PHP core functions that throw exceptions instead of returning FALSE on error" }, + { + "name": "tomasvotruba/type-coverage", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/TomasVotruba/type-coverage.git", + "reference": "01498b5cef67fa433e2f9f38b696d0ecd5131dca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/01498b5cef67fa433e2f9f38b696d0ecd5131dca", + "reference": "01498b5cef67fa433e2f9f38b696d0ecd5131dca" + }, + "require": { + "nette/utils": "^3.2 || ^4.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.3" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "config/extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "TomasVotruba\\TypeCoverage\\": "src" + } + }, + "license": [ + "MIT" + ], + "description": "Measure type coverage of your project" + }, { "name": "webmozart/assert", "version": "1.11.0", diff --git a/.dev-tools/phpstan.neon b/.dev-tools/phpstan.neon index 8e3f7788..77ba5946 100644 --- a/.dev-tools/phpstan.neon +++ b/.dev-tools/phpstan.neon @@ -1,3 +1,7 @@ + +includes: + - ./vendor/phpstan/phpstan/conf/bleedingEdge.neon + parameters: bootstrapFiles: - ../vendor/autoload.php @@ -10,6 +14,9 @@ parameters: stubFiles: - ./sca.stub treatPhpDocTypesAsCertain: false - -includes: - - ./vendor/phpstan/phpstan/conf/bleedingEdge.neon + type_coverage: + declare: 100 + constant: 0 + param: 100 + property: 100 + return: 100