From 34e4f68f23125544f2da944f257c6c43f8e70d93 Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Mon, 3 Nov 2025 20:00:26 +0200 Subject: [PATCH 1/2] GH-116: Add Cursor IDE configuration guide and update PHP installation instructions - add Cursor IDE phpcs setup section with screenshots - update PHP installation to use PHP 8.3 specifically - add PHP version unlinking instructions for clean installation Refs: README.md --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d76da99..bd069af 100755 --- a/README.md +++ b/README.md @@ -123,7 +123,9 @@ sudo apt install php-cli php-tokenizer 1. Install Homebrew if you don't have it installed already (see instructions on https://brew.sh/) 2. Install PHP with Homebrew ``` -brew install php +brew install php@8.3 +brew unlink php # Just in case you had already some other PHP version installed. +brew link php@8.3 ``` ### Configuration @@ -162,3 +164,14 @@ Warnings are underlined and you can choose to fix them by right clicking: Choose the "PHP Code Beautifier and Fixer: fix the whole file" ![How to fix 2/2](https://www.upload.ee/image/16969210/2024-08-14_16-04.png) + +#### Cursor + +Search for phpcs under extension and install "PHP Sniffer" from the list. +![Install PHP Sniffer](https://www.upload.ee/image/18763945/01-install-php-sniffer.png) + +Open settings of "PHP Sniffer" +![Open settings of PHP Sniffer](https://www.upload.ee/image/18763949/02-settings-php-sniffer.png) + +Configure "PHP Sniffer" +![Configure PHP Sniffer](https://www.upload.ee/image/18763951/03-configure-php-sniffer.png) From 7609cd88f880ac5387c80e69768c0b53a1116cfa Mon Sep 17 00:00:00 2001 From: Hannes Kirsman Date: Mon, 3 Nov 2025 20:09:29 +0200 Subject: [PATCH 2/2] GH-116: Improve documentation formatting with numbered steps and add code fixing demo - add numbered steps to PhpStorm configuration instructions - add numbered steps to Cursor configuration instructions - add animated GIF demonstrating code formatting in Cursor Refs: README.md --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bd069af..6588058 100755 --- a/README.md +++ b/README.md @@ -153,25 +153,28 @@ PHPCS usage Example in Visual Studio Code: #### PhpStorm -Open settings and look for PHP_Codesniffer. Make sure these settings are the same: +1. Open settings and look for PHP_Codesniffer. Make sure these settings are the same: ![PhpStorm settings PHPCS 1/2](https://www.upload.ee/image/16969201/2024-08-14_15-59.png) -Check the paths and validate: +2. Check the paths and validate: ![PhpStorm settings PHPCS 2/2](https://www.upload.ee/image/16969203/2024-08-14_16-01.png) -Warnings are underlined and you can choose to fix them by right clicking: +3. Warnings are underlined and you can choose to fix them by right clicking: ![How to fix 1/2](https://www.upload.ee/image/16969207/2024-08-14_16-03.png) -Choose the "PHP Code Beautifier and Fixer: fix the whole file" +4. Choose the "PHP Code Beautifier and Fixer: fix the whole file" ![How to fix 2/2](https://www.upload.ee/image/16969210/2024-08-14_16-04.png) #### Cursor -Search for phpcs under extension and install "PHP Sniffer" from the list. +1. Search for phpcs under extension and install "PHP Sniffer" from the list. ![Install PHP Sniffer](https://www.upload.ee/image/18763945/01-install-php-sniffer.png) -Open settings of "PHP Sniffer" +2. Open settings of "PHP Sniffer" ![Open settings of PHP Sniffer](https://www.upload.ee/image/18763949/02-settings-php-sniffer.png) -Configure "PHP Sniffer" +3. Configure "PHP Sniffer" ![Configure PHP Sniffer](https://www.upload.ee/image/18763951/03-configure-php-sniffer.png) + +4. Fix code by right-clicking in editor and choosing "Format Document" +![Fix your code](https://www.upload.ee/image/18763989/Screen_Recording_2025-11-03_at_20.04.44.gif)