From 51cf509e4c519ddb4397f0c84844f17b66328405 Mon Sep 17 00:00:00 2001 From: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:35:52 +0100 Subject: [PATCH 1/2] fix: Remove `fully_qualified_strict_types` again There are currently too many issues for the rule on the project itself https://github.com/nextcloud/coding-standard/issues/17 https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7719 Signed-off-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> --- CHANGELOG.md | 6 +++++- src/Config.php | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e794a2..a71c8bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,15 @@ # Changelog All notable changes to this project will be documented in this file. +## 1.2.1 - 2024-02-01 +### Fix +* fix: Remove `fully_qualified_strict_types` again by @nickvergessen in https://github.com/nextcloud/coding-standard/pull/16 + ## 1.2.0 - 2024-02-01 ### Added - `array_syntax`: Force short syntax for array - `list_syntax`: Same for list -- `fully_qualified_strict_types`: Remove namespace from classname when there is a `use` statement, and add missing backslash for global namespace +- ~~`fully_qualified_strict_types`: Remove namespace from classname when there is a `use` statement, and add missing backslash for global namespace~~ - Removed in 1.2.1 due to issues - `no_leading_import_slash`: Remove leading slash from `use` statement - `nullable_type_declaration_for_default_null_value`: Add missing `?` on type declaration for parameters defaulting to `null`. This will most likely be needed to avoid warnings in PHP 8.4. - `yoda_style`: forbid yoda style comparision. This replaces `null === $a` by `$a === null`. diff --git a/src/Config.php b/src/Config.php index 058fd71..c888eaf 100644 --- a/src/Config.php +++ b/src/Config.php @@ -31,7 +31,6 @@ public function getRules() : array { 'elseif' => true, 'encoding' => true, 'full_opening_tag' => true, - 'fully_qualified_strict_types' => ['leading_backslash_in_global_namespace' => true], 'function_declaration' => [ 'closure_function_spacing' => 'one', ], From 35fd40e24e6db7b9a1b38c32084c60a3497da23f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 1 Feb 2024 14:54:42 +0100 Subject: [PATCH 2/2] fix(docs): Update old file name in readme Signed-off-by: Joas Schilling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62729e3..646b6a9 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ For convenience you may add it to the `scripts` section of your `composer.json`: } ``` -*Note: Don't forget to exclude .php_cs.dist in your build scripts.* +*Note: Don't forget to exclude `.php-cs-fixer.dist.php` and `.php-cs-fixer.cache` in your build scripts.* ## Upgrade from v0.x to v1.0