From 08077ee4fbe6047bdd1e3d2304548c34b0663df0 Mon Sep 17 00:00:00 2001 From: Bart Jaskulski <bjaskulski@protonmail.com> Date: Fri, 17 Nov 2023 15:45:04 +0100 Subject: [PATCH] feat: enable strict-rules Signed-off-by: Bart Jaskulski <bjaskulski@protonmail.com> --- composer.json | 3 ++- composer.lock | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- rules.neon | 2 ++ 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7655304..f6d8109 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,8 @@ "phpstan/extension-installer": "^1.3", "szepeviktor/phpstan-wordpress": "^1.3", "phpstan/phpstan-deprecation-rules": "^1.1", - "php-stubs/woocommerce-stubs": "^8.3" + "php-stubs/woocommerce-stubs": "^8.3", + "phpstan/phpstan-strict-rules": "^1.5" }, "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock index 1be671a..e004662 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "077a88c1fff60bd9ee2a9ae27e90c362", + "content-hash": "9caa86a611b9593bb0ac0476daa27456", "packages": [ { "name": "php-stubs/woocommerce-stubs", @@ -251,6 +251,55 @@ }, "time": "2023-08-05T09:02:04+00:00" }, + { + "name": "phpstan/phpstan-strict-rules", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-strict-rules.git", + "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/7a50e9662ee9f3942e4aaaf3d603653f60282542", + "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.10.34" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Extra strict and opinionated rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.2" + }, + "time": "2023-10-30T14:35:06+00:00" + }, { "name": "symfony/polyfill-php73", "version": "v1.28.0", diff --git a/rules.neon b/rules.neon index a6b464e..a3de316 100644 --- a/rules.neon +++ b/rules.neon @@ -4,3 +4,5 @@ parameters: - src bootstrapFiles: - ../../php-stubs/woocommerce-stubs/woocommerce-stubs.php + strictRules: + requireParentConstructorCall: false -- GitLab