From aca2b91a9b0e946bd858b461614235bd3525e21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Lo=CC=88sken?= Date: Wed, 12 May 2021 19:13:41 +0200 Subject: [PATCH 1/2] Update php cs fixer 3 --- .gitignore | 4 ++-- .php_cs.dist => .php-cs-fixer.dist.php | 0 composer.json | 2 +- src/MeiliSearchBundle.php | 2 +- src/Searchable.php | 4 ++-- tests/TestCase/SettingsTest.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (100%) diff --git a/.gitignore b/.gitignore index 67ef8e05..c002d25f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ /vendor/ .phpunit.result.cache /var/ -.php_cs.cache -/tests/cache/blog.sqlite \ No newline at end of file +.php-cs-fixer.cache +/tests/cache/blog.sqlite diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 100% rename from .php_cs.dist rename to .php-cs-fixer.dist.php diff --git a/composer.json b/composer.json index f03771ab..e0dcfc6c 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "require-dev": { "doctrine/doctrine-bundle": "^2.3", - "friendsofphp/php-cs-fixer": "^2.18", + "friendsofphp/php-cs-fixer": "^3.0", "jms/serializer-bundle": "^3.0", "nyholm/psr7": "^1.3", "phpunit/phpunit": "^9.5", diff --git a/src/MeiliSearchBundle.php b/src/MeiliSearchBundle.php index 0d1db942..f6ab51c0 100644 --- a/src/MeiliSearchBundle.php +++ b/src/MeiliSearchBundle.php @@ -11,5 +11,5 @@ */ final class MeiliSearchBundle extends Bundle { - const VERSION = '0.2.6'; + public const VERSION = '0.2.6'; } diff --git a/src/Searchable.php b/src/Searchable.php index 5aa97185..1f7c28d8 100644 --- a/src/Searchable.php +++ b/src/Searchable.php @@ -9,6 +9,6 @@ */ final class Searchable { - const NORMALIZATION_FORMAT = 'searchableArray'; - const NORMALIZATION_GROUP = 'searchable'; + public const NORMALIZATION_FORMAT = 'searchableArray'; + public const NORMALIZATION_GROUP = 'searchable'; } diff --git a/tests/TestCase/SettingsTest.php b/tests/TestCase/SettingsTest.php index c43a8963..fc589344 100644 --- a/tests/TestCase/SettingsTest.php +++ b/tests/TestCase/SettingsTest.php @@ -15,7 +15,7 @@ */ class SettingsTest extends BaseTest { - const DEFAULT_RANKING_RULES + public const DEFAULT_RANKING_RULES = [ 'typo', 'words', From 32d8e75683fb2565bcdb415a2f4b833262f4ad38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Lo=CC=88sken?= Date: Wed, 12 May 2021 19:16:31 +0200 Subject: [PATCH 2/2] Remove explicitly defined config file -> it is automatically found --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e0dcfc6c..e90b030e 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ }, "scripts": { "test:unit": "phpunit --colors=always --verbose", - "lint:check": "php-cs-fixer fix -v --config=.php_cs.dist --using-cache=no --dry-run", - "lint:fix": "php-cs-fixer fix -v --config=.php_cs.dist --using-cache=no" + "lint:check": "php-cs-fixer fix -v --using-cache=no --dry-run", + "lint:fix": "php-cs-fixer fix -v --using-cache=no" } }