From e27af6282bd01993e12139a7efe2c54e3c13b3e1 Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 18 Jan 2024 12:01:21 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Replace=20phpcs=20with=20Pint=20?= =?UTF-8?q?(#3161)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ➕ Add `laravel/pint` to the project ➖ Remove `squizlabs/php_codesniffer` from the project 🔧 Remove deprecated Composer scripts 👷 Replace phpcs with Pint 🎨 Run Pint --------- Co-authored-by: Ben Word --- .github/workflows/main.yml | 4 ++-- app/View/Composers/Post.php | 2 +- composer.json | 7 +------ index.php | 4 +++- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d941e9..26e4ee9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,5 +80,5 @@ jobs: - name: Install Composer dependencies run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest - - name: Execute the PHP lint script - run: composer run-script lint + - name: Run Pint + run: vendor/bin/pint --test diff --git a/app/View/Composers/Post.php b/app/View/Composers/Post.php index 5bcef38..3366b0d 100644 --- a/app/View/Composers/Post.php +++ b/app/View/Composers/Post.php @@ -77,7 +77,7 @@ class Post extends Composer { return wp_link_pages([ 'echo' => 0, - 'before' => '

' . __('Pages:', 'sage'), + 'before' => '

'.__('Pages:', 'sage'), 'after' => '

', ]); } diff --git a/composer.json b/composer.json index ac18326..4706686 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "php": ">=8.1" }, "require-dev": { - "squizlabs/php_codesniffer": "3.8.1" + "laravel/pint": "^1.13" }, "suggest": { "log1x/sage-directives": "A collection of useful Blade directives for WordPress and Sage (^1.0).", @@ -55,11 +55,6 @@ }, "minimum-stability": "dev", "prefer-stable": true, - "scripts": { - "lint": [ - "phpcs --extensions=php --standard=PSR12 app" - ] - }, "extra": { "acorn": { "providers": [ diff --git a/index.php b/index.php index 52854a0..edc07f1 100644 --- a/index.php +++ b/index.php @@ -1 +1,3 @@ -render(); +render();