From 88140093541212dbad40644801a7bdff6d49f520 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 10 Nov 2021 09:44:10 +0100 Subject: [PATCH 1/5] Prepare readme for v1.0 Signed-off-by: Christoph Wurst --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1438e84..62729e3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Add the package to your dev dependencies composer require --dev nextcloud/coding-standard ``` -and create a `.php_cs.dist` like +and create a `.php-cs-fixer.dist.php` like ```php Date: Mon, 17 Oct 2022 15:53:58 +0200 Subject: [PATCH 2/5] Order imports alphabetically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- src/Config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Config.php b/src/Config.php index ed9d0ef..c3ee446 100644 --- a/src/Config.php +++ b/src/Config.php @@ -46,6 +46,7 @@ public function getRules() : array { 'no_trailing_whitespace' => true, 'no_trailing_whitespace_in_comment' => true, 'no_unused_imports' => true, + 'ordered_imports' => true, 'single_blank_line_at_eof' => true, 'single_class_element_per_statement' => true, 'single_import_per_statement' => true, From 57f50fcbaafaf94139399470dbba3ae8d8303e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <91878298+come-nc@users.noreply.github.com> Date: Mon, 17 Oct 2022 16:04:17 +0200 Subject: [PATCH 3/5] Update src/Config.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> --- src/Config.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Config.php b/src/Config.php index c3ee446..fb37bf2 100644 --- a/src/Config.php +++ b/src/Config.php @@ -46,7 +46,10 @@ public function getRules() : array { 'no_trailing_whitespace' => true, 'no_trailing_whitespace_in_comment' => true, 'no_unused_imports' => true, - 'ordered_imports' => true, + 'ordered_imports' => [ + 'imports_order' => ['class', 'function', 'const'], + 'sort_algorithm' => 'alpha' + ], 'single_blank_line_at_eof' => true, 'single_class_element_per_statement' => true, 'single_import_per_statement' => true, From d6aa4cd26e00d77dccaea19ff85db875d652350a Mon Sep 17 00:00:00 2001 From: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Date: Thu, 13 Apr 2023 11:12:42 +0200 Subject: [PATCH 4/5] fix(rules): Replace deprecated braces rules Signed-off-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> --- src/Config.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Config.php b/src/Config.php index fb37bf2..c6b229a 100644 --- a/src/Config.php +++ b/src/Config.php @@ -23,10 +23,9 @@ public function getRules() : array { ], 'blank_line_after_namespace' => true, 'blank_line_after_opening_tag' => true, - 'braces' => [ - 'position_after_anonymous_constructs' => 'same', - 'position_after_control_structures' => 'same', - 'position_after_functions_and_oop_constructs' => 'same', + 'curly_braces_position' => [ + 'classes_opening_brace' => 'same_line', + 'functions_opening_brace' => 'same_line', ], 'elseif' => true, 'encoding' => true, From facd4c6ea2dd82e88349230b7423e7cfab25373a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 13 Apr 2023 11:23:14 +0200 Subject: [PATCH 5/5] fix(deps)!: Bump minimum required friendsofphp/php-cs-fixer to 3.9 Signed-off-by: Joas Schilling --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ebfef6e..2591fc6 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "require": { "php": "^7.3|^8.0", - "friendsofphp/php-cs-fixer": "^3.2" + "friendsofphp/php-cs-fixer": "^3.9" }, "license": "MIT", "authors": [