[PR #3728] [MERGED] Addition of PHPCS for formatting #6252

Closed
opened 2026-02-05 10:27:47 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3728
Author: @ssddanbrown
Created: 9/18/2022
Status: Merged
Merged: 9/18/2022
Merged by: @ssddanbrown

Base: developmentHead: php_formatting


📝 Commits (3)

  • 8a749c6 Added and ran PHPCS
  • ecbc734 Added php lint gh action, updated composer scripts
  • ac27b5a Updated readme for phpcs usage, aligned gh action workflows

📊 Changes

27 files changed (+182 additions, -52 deletions)

View changed files

📝 .github/workflows/analyse-php.yml (+8 -10)
.github/workflows/lint-php.yml (+19 -0)
📝 .github/workflows/test-migrations.yml (+3 -2)
📝 .github/workflows/test-php.yml (+5 -4)
📝 app/Actions/Webhook.php (+2 -2)
📝 app/Actions/WebhookTrackedEvent.php (+2 -2)
📝 app/Auth/Access/LdapService.php (+1 -1)
📝 app/Auth/Access/Oidc/OidcService.php (+0 -4)
📝 app/Config/dompdf.php (+1 -0)
📝 app/Config/snappy.php (+1 -0)
📝 app/Entities/Tools/PageEditActivity.php (+1 -1)
📝 app/Http/Controllers/Auth/ForgotPasswordController.php (+0 -1)
📝 app/Http/Controllers/Auth/LoginController.php (+7 -4)
📝 app/Http/Controllers/Auth/RegisterController.php (+0 -1)
📝 app/Http/Controllers/Auth/ResetPasswordController.php (+0 -1)
📝 app/Http/Controllers/BookController.php (+1 -1)
📝 app/Http/Controllers/BookSortController.php (+1 -1)
📝 app/Http/Controllers/PageRevisionController.php (+1 -1)
📝 app/Uploads/ImageService.php (+1 -1)
📝 composer.json (+5 -0)

...and 7 more files

📄 Description

Would be nice to auto-apply via cli rather than apply styleci patches.
Trying to get a close config to existing formatting.

Todo

  • Add action to run phpcs.
  • Add composer-based cmd shortcut?
  • Updated readme or dev docs with details
    • Include note about -s to show rule name, and mention of phpcbf, and maybe mention of git-hook usage.
  • Detach StyleCI

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3728 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 9/18/2022 **Status:** ✅ Merged **Merged:** 9/18/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `php_formatting` --- ### 📝 Commits (3) - [`8a749c6`](https://github.com/BookStackApp/BookStack/commit/8a749c6acf930614a119b277170bcf7c1c1db9f9) Added and ran PHPCS - [`ecbc734`](https://github.com/BookStackApp/BookStack/commit/ecbc7344fc3af00501cabb5405fd31f6b6c8c951) Added php lint gh action, updated composer scripts - [`ac27b5a`](https://github.com/BookStackApp/BookStack/commit/ac27b5aebbdbee23f739fb7a2018516997aac335) Updated readme for phpcs usage, aligned gh action workflows ### 📊 Changes **27 files changed** (+182 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/analyse-php.yml` (+8 -10) ➕ `.github/workflows/lint-php.yml` (+19 -0) 📝 `.github/workflows/test-migrations.yml` (+3 -2) 📝 `.github/workflows/test-php.yml` (+5 -4) 📝 `app/Actions/Webhook.php` (+2 -2) 📝 `app/Actions/WebhookTrackedEvent.php` (+2 -2) 📝 `app/Auth/Access/LdapService.php` (+1 -1) 📝 `app/Auth/Access/Oidc/OidcService.php` (+0 -4) 📝 `app/Config/dompdf.php` (+1 -0) 📝 `app/Config/snappy.php` (+1 -0) 📝 `app/Entities/Tools/PageEditActivity.php` (+1 -1) 📝 `app/Http/Controllers/Auth/ForgotPasswordController.php` (+0 -1) 📝 `app/Http/Controllers/Auth/LoginController.php` (+7 -4) 📝 `app/Http/Controllers/Auth/RegisterController.php` (+0 -1) 📝 `app/Http/Controllers/Auth/ResetPasswordController.php` (+0 -1) 📝 `app/Http/Controllers/BookController.php` (+1 -1) 📝 `app/Http/Controllers/BookSortController.php` (+1 -1) 📝 `app/Http/Controllers/PageRevisionController.php` (+1 -1) 📝 `app/Uploads/ImageService.php` (+1 -1) 📝 `composer.json` (+5 -0) _...and 7 more files_ </details> ### 📄 Description Would be nice to auto-apply via cli rather than apply styleci patches. Trying to get a close config to existing formatting. ### Todo - [x] Add action to run phpcs. - [x] Add composer-based cmd shortcut? - [x] Updated readme or dev docs with details - Include note about `-s` to show rule name, and mention of phpcbf, and maybe mention of git-hook usage. - [x] Detach StyleCI --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:27:47 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6252