[PR #5785] [MERGED] PHPstan level 3 #6568

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/5785
Author: @ssddanbrown
Created: 9/2/2025
Status: Merged
Merged: 9/3/2025
Merged by: @ssddanbrown

Base: developmentHead: phpstan_level2


📝 Commits (5)

  • 1e34954 Maintenance: Continued work towards PHPstan level 2
  • cee23de Maintenance: Reached PHPstan level 2
  • e05ec7d Maintenance: Addressed a range of phpstan level 3 issues
  • 318b486 Maintenance: Finished changes to meet phpstan level 3
  • 7d1c316 Maintenance: Updated larastan target level, fixed issues from tests

📊 Changes

78 files changed (+341 additions, -345 deletions)

View changed files

📝 app/Access/ExternalBaseUserProvider.php (+3 -21)
📝 app/Access/Guards/AsyncExternalBaseSessionGuard.php (+6 -14)
📝 app/Access/Guards/ExternalBaseSessionGuard.php (+26 -85)
📝 app/Access/Guards/LdapSessionGuard.php (+1 -5)
📝 app/Access/LoginService.php (+5 -5)
📝 app/Access/Saml2Service.php (+1 -1)
📝 app/Access/SocialDriverManager.php (+1 -1)
📝 app/Activity/Models/Comment.php (+4 -3)
📝 app/Activity/WatchLevels.php (+2 -2)
📝 app/App/Model.php (+1 -1)
📝 app/App/Providers/AuthServiceProvider.php (+2 -2)
📝 app/App/Providers/EventServiceProvider.php (+1 -1)
📝 app/App/SluggableInterface.php (+1 -4)
📝 app/Console/Commands/UpdateUrlCommand.php (+1 -1)
📝 app/Entities/Controllers/PageRevisionController.php (+1 -1)
📝 app/Entities/Controllers/RecycleBinApiController.php (+14 -6)
📝 app/Entities/Models/Book.php (+4 -2)
📝 app/Entities/Models/Bookshelf.php (+3 -2)
📝 app/Entities/Models/Chapter.php (+4 -4)
📝 app/Entities/Models/CoverImageInterface.php (+1 -1)

...and 58 more files

📄 Description

Work to get to PHPstan level 3 from 1.

Also:

  • Updated html description code to be behind a proper interface.
  • Set new convention for mode traits/interfaces.

🔄 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/5785 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 9/2/2025 **Status:** ✅ Merged **Merged:** 9/3/2025 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `phpstan_level2` --- ### 📝 Commits (5) - [`1e34954`](https://github.com/BookStackApp/BookStack/commit/1e34954554d672446693bcc74bf7f9aae1936802) Maintenance: Continued work towards PHPstan level 2 - [`cee23de`](https://github.com/BookStackApp/BookStack/commit/cee23de6c5350101e16e1aead59e0219e9e2771e) Maintenance: Reached PHPstan level 2 - [`e05ec7d`](https://github.com/BookStackApp/BookStack/commit/e05ec7da361027126e538bbe5908d0bfdf1ede4a) Maintenance: Addressed a range of phpstan level 3 issues - [`318b486`](https://github.com/BookStackApp/BookStack/commit/318b486e0b7601a00dc02bd1adcef22066bfef5d) Maintenance: Finished changes to meet phpstan level 3 - [`7d1c316`](https://github.com/BookStackApp/BookStack/commit/7d1c31620213599fdc07ce5cda776d91f5642afc) Maintenance: Updated larastan target level, fixed issues from tests ### 📊 Changes **78 files changed** (+341 additions, -345 deletions) <details> <summary>View changed files</summary> 📝 `app/Access/ExternalBaseUserProvider.php` (+3 -21) 📝 `app/Access/Guards/AsyncExternalBaseSessionGuard.php` (+6 -14) 📝 `app/Access/Guards/ExternalBaseSessionGuard.php` (+26 -85) 📝 `app/Access/Guards/LdapSessionGuard.php` (+1 -5) 📝 `app/Access/LoginService.php` (+5 -5) 📝 `app/Access/Saml2Service.php` (+1 -1) 📝 `app/Access/SocialDriverManager.php` (+1 -1) 📝 `app/Activity/Models/Comment.php` (+4 -3) 📝 `app/Activity/WatchLevels.php` (+2 -2) 📝 `app/App/Model.php` (+1 -1) 📝 `app/App/Providers/AuthServiceProvider.php` (+2 -2) 📝 `app/App/Providers/EventServiceProvider.php` (+1 -1) 📝 `app/App/SluggableInterface.php` (+1 -4) 📝 `app/Console/Commands/UpdateUrlCommand.php` (+1 -1) 📝 `app/Entities/Controllers/PageRevisionController.php` (+1 -1) 📝 `app/Entities/Controllers/RecycleBinApiController.php` (+14 -6) 📝 `app/Entities/Models/Book.php` (+4 -2) 📝 `app/Entities/Models/Bookshelf.php` (+3 -2) 📝 `app/Entities/Models/Chapter.php` (+4 -4) 📝 `app/Entities/Models/CoverImageInterface.php` (+1 -1) _...and 58 more files_ </details> ### 📄 Description Work to get to PHPstan level 3 from 1. Also: - Updated html description code to be behind a proper interface. - Set new convention for mode traits/interfaces. --- <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:35: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#6568