Skip to content

Add PHP strict type#3032

Merged
samuelwei merged 17 commits intodevelopfrom
php-strict-type
Apr 9, 2026
Merged

Add PHP strict type#3032
samuelwei merged 17 commits intodevelopfrom
php-strict-type

Conversation

@samuelwei
Copy link
Copy Markdown
Collaborator

@samuelwei samuelwei commented Apr 8, 2026

Type

  • Bugfix
  • Feature
  • Documentation
  • Refactoring (e.g. Style updates, Test implementation, etc.)
  • Other (please describe):

Checklist

  • Code updated to current develop branch head
  • Passes CI checks
  • Is a part of an issue
  • Tests added for the bugfix or newly implemented feature, describe below why if not
  • Changelog is updated
  • Documentation of code and features exists

Changes

  • Add PHP strict type
  • Fixes type related and detected bugs

Other information

Should prevent undetected type issues in the future. Added pint rule to enforce header on all files.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

Important

Review skipped

Too many files!

This PR contains 300 files, which is 150 over the limit of 150.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5d55ea6b-9f99-42da-9e6b-422516d65961

📥 Commits

Reviewing files that changed from the base of the PR and between 393bb5c and e41c962.

📒 Files selected for processing (300)
  • app/Auth/ExternalUser.php
  • app/Auth/LDAP/LDAPController.php
  • app/Auth/LDAP/LDAPProvider.php
  • app/Auth/LDAP/LDAPServiceProvider.php
  • app/Auth/LDAP/LDAPUser.php
  • app/Auth/LDAP/LDAPUserObject.php
  • app/Auth/Local/LocalProvider.php
  • app/Auth/MissingAttributeException.php
  • app/Auth/OIDC/AccessTokenHashChecker.php
  • app/Auth/OIDC/EventsChecker.php
  • app/Auth/OIDC/OIDCController.php
  • app/Auth/OIDC/OIDCProvider.php
  • app/Auth/OIDC/OIDCServiceProvider.php
  • app/Auth/OIDC/OIDCUser.php
  • app/Auth/OIDC/OpenIDConnectAlgorithmSubset.php
  • app/Auth/OIDC/OpenIDConnectClient.php
  • app/Auth/OIDC/OpenIDConnectClientException.php
  • app/Auth/OIDC/OpenIDConnectCodeMissingException.php
  • app/Auth/OIDC/OpenIDConnectNetworkException.php
  • app/Auth/OIDC/OpenIDConnectProviderException.php
  • app/Auth/OIDC/OpenIDConnectValidationException.php
  • app/Auth/Shibboleth/ShibbolethController.php
  • app/Auth/Shibboleth/ShibbolethProvider.php
  • app/Auth/Shibboleth/ShibbolethServiceProvider.php
  • app/Auth/Shibboleth/ShibbolethSessionDuplicateException.php
  • app/Auth/Shibboleth/ShibbolethSessionMiddleware.php
  • app/Auth/Shibboleth/ShibbolethUser.php
  • app/Auth/Shibboleth/SoapServerHandler.php
  • app/Console/Commands/CacheLocalesCommand.php
  • app/Console/Commands/CheckDatabaseConnectionCommand.php
  • app/Console/Commands/CleanupAttendanceCommand.php
  • app/Console/Commands/CleanupRecordingsCommand.php
  • app/Console/Commands/CleanupRoomsCommand.php
  • app/Console/Commands/CleanupStatisticsCommand.php
  • app/Console/Commands/ClearMetricsCommand.php
  • app/Console/Commands/CreateSuperuserCommand.php
  • app/Console/Commands/DeleteObsoletePersonalizedLinksCommand.php
  • app/Console/Commands/DeleteUnverifiedNewUsersCommand.php
  • app/Console/Commands/ExportLocalesCommand.php
  • app/Console/Commands/ImportDatabaseCommand.php
  • app/Console/Commands/ImportGreenlight2Command.php
  • app/Console/Commands/ImportGreenlight3Command.php
  • app/Console/Commands/ImportLocalesCommand.php
  • app/Console/Commands/ImportRecordingsCommand.php
  • app/Console/Commands/PollServerCommand.php
  • app/Console/Commands/ProvisionCommand.php
  • app/Console/Commands/TestEmailConfig.php
  • app/Console/Commands/UpgradeDatabaseCommand.php
  • app/Console/Commands/UploadLocalesCommand.php
  • app/Console/Kernel.php
  • app/Enums/CustomErrorMessages.php
  • app/Enums/CustomStatusCodes.php
  • app/Enums/LinkButtonStyle.php
  • app/Enums/LinkTarget.php
  • app/Enums/RecordingAccess.php
  • app/Enums/RoomAuthTokenType.php
  • app/Enums/RoomLobby.php
  • app/Enums/RoomSortingType.php
  • app/Enums/RoomUserRole.php
  • app/Enums/RoomVisibility.php
  • app/Enums/ServerHealth.php
  • app/Enums/ServerStatus.php
  • app/Enums/TimePeriod.php
  • app/Events/RoomEnded.php
  • app/Events/RoomStarted.php
  • app/Exceptions/Handler.php
  • app/Exceptions/RecordingExtractionFailed.php
  • app/Exceptions/RoomIdGenerationFailed.php
  • app/Exports/AttendanceExport.php
  • app/Faker/TextProvider.php
  • app/Http/Controllers/ApplicationController.php
  • app/Http/Controllers/Controller.php
  • app/Http/Controllers/MeetingController.php
  • app/Http/Controllers/MetricsController.php
  • app/Http/Controllers/RecordingController.php
  • app/Http/Controllers/RecordingFormatController.php
  • app/Http/Controllers/RoomFileController.php
  • app/Http/Controllers/api/v1/ApplicationController.php
  • app/Http/Controllers/api/v1/LocaleController.php
  • app/Http/Controllers/api/v1/MeetingController.php
  • app/Http/Controllers/api/v1/PermissionController.php
  • app/Http/Controllers/api/v1/RecordingController.php
  • app/Http/Controllers/api/v1/RoleController.php
  • app/Http/Controllers/api/v1/RoomController.php
  • app/Http/Controllers/api/v1/RoomFileController.php
  • app/Http/Controllers/api/v1/RoomMemberController.php
  • app/Http/Controllers/api/v1/RoomPersonalizedLinkController.php
  • app/Http/Controllers/api/v1/RoomStreamingController.php
  • app/Http/Controllers/api/v1/RoomTypeController.php
  • app/Http/Controllers/api/v1/RoomTypeStreamingController.php
  • app/Http/Controllers/api/v1/ServerController.php
  • app/Http/Controllers/api/v1/ServerPoolController.php
  • app/Http/Controllers/api/v1/SessionController.php
  • app/Http/Controllers/api/v1/SettingsController.php
  • app/Http/Controllers/api/v1/StreamingController.php
  • app/Http/Controllers/api/v1/UserController.php
  • app/Http/Controllers/api/v1/auth/ForgotPasswordController.php
  • app/Http/Controllers/api/v1/auth/LoginController.php
  • app/Http/Controllers/api/v1/auth/RegisterController.php
  • app/Http/Controllers/api/v1/auth/ResetPasswordController.php
  • app/Http/Controllers/api/v1/auth/VerificationController.php
  • app/Http/Kernel.php
  • app/Http/Middleware/Authenticate.php
  • app/Http/Middleware/EncryptCookies.php
  • app/Http/Middleware/EnsureModelNotStale.php
  • app/Http/Middleware/LogContext.php
  • app/Http/Middleware/LoggedInUser.php
  • app/Http/Middleware/PreventRequestForgery.php
  • app/Http/Middleware/PreventRequestsDuringMaintenance.php
  • app/Http/Middleware/RedirectIfAuthenticated.php
  • app/Http/Middleware/RequestMetricsMiddleware.php
  • app/Http/Middleware/RobotsHeader.php
  • app/Http/Middleware/RoomAuthenticate.php
  • app/Http/Middleware/RouteEnableIfConfig.php
  • app/Http/Middleware/SetApplicationLocale.php
  • app/Http/Middleware/StoreSessionData.php
  • app/Http/Middleware/TrimStrings.php
  • app/Http/Middleware/TrustHosts.php
  • app/Http/Middleware/TrustProxies.php
  • app/Http/Requests/AddRoomMemberRequest.php
  • app/Http/Requests/BulkDestroyRequest.php
  • app/Http/Requests/BulkImportRequest.php
  • app/Http/Requests/BulkUpdateRequest.php
  • app/Http/Requests/ChangeEmailRequest.php
  • app/Http/Requests/ChangeLocaleRequest.php
  • app/Http/Requests/ChangePasswordRequest.php
  • app/Http/Requests/CreateRoomRequest.php
  • app/Http/Requests/JoinMeetingRequest.php
  • app/Http/Requests/NewUserRequest.php
  • app/Http/Requests/RoleRequest.php
  • app/Http/Requests/RoomAuthRequest.php
  • app/Http/Requests/RoomPersonalizedLinkRequest.php
  • app/Http/Requests/RoomTypeDestroyRequest.php
  • app/Http/Requests/RoomTypeRequest.php
  • app/Http/Requests/ServerConnectionCheckRequest.php
  • app/Http/Requests/ServerPoolRequest.php
  • app/Http/Requests/ServerRequest.php
  • app/Http/Requests/ShowRoomsRequest.php
  • app/Http/Requests/StartMeetingRequest.php
  • app/Http/Requests/StoreRoomFileRequest.php
  • app/Http/Requests/TransferOwnershipRequest.php
  • app/Http/Requests/UpdateRecordingRequest.php
  • app/Http/Requests/UpdateRoomDescriptionRequest.php
  • app/Http/Requests/UpdateRoomFileRequest.php
  • app/Http/Requests/UpdateRoomMemberRequest.php
  • app/Http/Requests/UpdateRoomSettingsRequest.php
  • app/Http/Requests/UpdateRoomStreamingConfigRequest.php
  • app/Http/Requests/UpdateRoomTypeStreamingSettingsRequest.php
  • app/Http/Requests/UpdateSettingsRequest.php
  • app/Http/Requests/UpdateStreamingSettingsRequest.php
  • app/Http/Requests/UserRequest.php
  • app/Http/Requests/VerifyEmailRequest.php
  • app/Http/Resources/AttendeeResource.php
  • app/Http/Resources/AttendeeSessionResource.php
  • app/Http/Resources/ConfigResource.php
  • app/Http/Resources/LastMeetingResource.php
  • app/Http/Resources/MeetingResource.php
  • app/Http/Resources/MeetingStatResource.php
  • app/Http/Resources/MeetingWithRoomAndServerResource.php
  • app/Http/Resources/PermissionResource.php
  • app/Http/Resources/PermissionResourceCollection.php
  • app/Http/Resources/PrivateRoomFileResource.php
  • app/Http/Resources/RecordingFormatResource.php
  • app/Http/Resources/RecordingResource.php
  • app/Http/Resources/RoleResource.php
  • app/Http/Resources/RoleResourceCollection.php
  • app/Http/Resources/RoomAuthTokenResource.php
  • app/Http/Resources/RoomFileResource.php
  • app/Http/Resources/RoomPersonalizedLinkResource.php
  • app/Http/Resources/RoomResource.php
  • app/Http/Resources/RoomSettingsResource.php
  • app/Http/Resources/RoomStreamingConfigResource.php
  • app/Http/Resources/RoomStreamingResource.php
  • app/Http/Resources/RoomTypeResource.php
  • app/Http/Resources/RoomTypeResourceCollection.php
  • app/Http/Resources/RoomTypeStreamingSettingsResource.php
  • app/Http/Resources/RoomUserResource.php
  • app/Http/Resources/ServerPoolResource.php
  • app/Http/Resources/ServerResource.php
  • app/Http/Resources/SessionResource.php
  • app/Http/Resources/SettingsResource.php
  • app/Http/Resources/StreamingSettingsResource.php
  • app/Http/Resources/UserResource.php
  • app/Http/Resources/UserSearchResource.php
  • app/Jobs/PollServerJob.php
  • app/Jobs/ProcessRecording.php
  • app/Listeners/ConfigureStreamingOnRoomStart.php
  • app/Listeners/FailedLoginAttempt.php
  • app/Listeners/ResetStreamingOnRoomStop.php
  • app/Models/IncludedPermissionPermission.php
  • app/Models/Meeting.php
  • app/Models/MeetingAttendee.php
  • app/Models/MeetingStat.php
  • app/Models/Permission.php
  • app/Models/PermissionRole.php
  • app/Models/Recording.php
  • app/Models/RecordingFormat.php
  • app/Models/Role.php
  • app/Models/RoleUser.php
  • app/Models/Room.php
  • app/Models/RoomAuthToken.php
  • app/Models/RoomFile.php
  • app/Models/RoomPersonalizedLink.php
  • app/Models/RoomStreaming.php
  • app/Models/RoomType.php
  • app/Models/RoomTypeStreamingSettings.php
  • app/Models/RoomUser.php
  • app/Models/Server.php
  • app/Models/ServerPool.php
  • app/Models/ServerStat.php
  • app/Models/Session.php
  • app/Models/SessionData.php
  • app/Models/User.php
  • app/Models/VerifyEmail.php
  • app/Notifications/EmailChanged.php
  • app/Notifications/PasswordChanged.php
  • app/Notifications/PasswordReset.php
  • app/Notifications/RoomExpires.php
  • app/Notifications/TestEmail.php
  • app/Notifications/UserWelcome.php
  • app/Notifications/VerifyEmail.php
  • app/Observers/IncludedPermissionPermissionObserver.php
  • app/Observers/PermissionRoleObserver.php
  • app/Observers/RoleUserObserver.php
  • app/Observers/RoomObserver.php
  • app/Observers/RoomPersonalizedLinkObserver.php
  • app/Observers/ServerObserver.php
  • app/Observers/ServerPoolObserver.php
  • app/Observers/UserObserver.php
  • app/Plugins/Contracts/ServerLoadCalculationPluginContract.php
  • app/Plugins/Defaults/ServerLoadCalculationPlugin.php
  • app/Plugins/PluginServiceProvider.php
  • app/Policies/MeetingPolicy.php
  • app/Policies/RolePolicy.php
  • app/Policies/RoomPolicy.php
  • app/Policies/RoomTypePolicy.php
  • app/Policies/ServerPolicy.php
  • app/Policies/ServerPoolPolicy.php
  • app/Policies/UserPolicy.php
  • app/Prometheus/CollectorRegistry.php
  • app/Prometheus/Collectors/AntiVirusCollector.php
  • app/Prometheus/Collectors/AuthCollector.php
  • app/Prometheus/Collectors/Collector.php
  • app/Prometheus/Collectors/FileCollector.php
  • app/Prometheus/Collectors/HorizonCollector.php
  • app/Prometheus/Collectors/MeetingCollector.php
  • app/Prometheus/Collectors/RecordingCollector.php
  • app/Prometheus/Collectors/RequestCollector.php
  • app/Prometheus/Collectors/RoomCollector.php
  • app/Prometheus/Collectors/ServerCollector.php
  • app/Prometheus/Collectors/SessionCollector.php
  • app/Prometheus/Collectors/StorageCollector.php
  • app/Prometheus/Collectors/UserCollector.php
  • app/Prometheus/Counter.php
  • app/Prometheus/Gauge.php
  • app/Prometheus/Histogram.php
  • app/Prometheus/Summary.php
  • app/Providers/AppServiceProvider.php
  • app/Providers/AuthServiceProvider.php
  • app/Providers/BroadcastServiceProvider.php
  • app/Providers/EventServiceProvider.php
  • app/Providers/FakerServiceProvider.php
  • app/Providers/HorizonServiceProvider.php
  • app/Providers/MetricsServiceProvider.php
  • app/Providers/RouteServiceProvider.php
  • app/Providers/TelescopeServiceProvider.php
  • app/Providers/TranslationServiceProvider.php
  • app/Pulse/Users.php
  • app/Rules/Antivirus.php
  • app/Rules/CustomCreateMeetingParameters.php
  • app/Rules/CustomJoinMeetingParameters.php
  • app/Rules/Password.php
  • app/Rules/ValidName.php
  • app/Rules/ValidRoomType.php
  • app/Services/AuthenticationService.php
  • app/Services/BigBlueButton/LaravelHTTPClient.php
  • app/Services/EmailVerification/EmailVerificationService.php
  • app/Services/EmailVerification/NewVerifyEmailToken.php
  • app/Services/LoadBalancingService.php
  • app/Services/LocaleService.php
  • app/Services/MeetingService.php
  • app/Services/ProvisioningService.php
  • app/Services/RoomFileService.php
  • app/Services/RoomService.php
  • app/Services/ServerService.php
  • app/Services/StreamingService.php
  • app/Services/StreamingServiceFactory.php
  • app/Settings/BannerSettings.php
  • app/Settings/BigBlueButtonSettings.php
  • app/Settings/GeneralSettings.php
  • app/Settings/RecordingSettings.php
  • app/Settings/RoomSettings.php
  • app/Settings/StreamingSettings.php
  • app/Settings/ThemeSettings.php
  • app/Settings/UserSettings.php
  • app/Support/CSPPolicy.php
  • app/Support/LaravelViteNonceGenerator.php
  • app/Traits/AddsModelNameTrait.php
  • bootstrap/app.php
  • config/antivirus.php

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch php-strict-type

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cypress
Copy link
Copy Markdown

cypress bot commented Apr 8, 2026

PILOS    Run #2925

Run Properties:  status check passed Passed #2925  •  git commit e41c962407: Add PHP strict type
Project PILOS
Branch Review php-strict-type
Run status status check passed Passed #2925
Run duration 07m 57s
Commit git commit e41c962407: Add PHP strict type
Committer Samuel Weirich
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 622
View all changes introduced in this branch ↗︎

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.70%. Comparing base (393bb5c) to head (e41c962).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3032      +/-   ##
=============================================
+ Coverage      96.28%   96.70%   +0.42%     
- Complexity      1912     1913       +1     
=============================================
  Files            266      445     +179     
  Lines           6600    12915    +6315     
  Branches           0     2078    +2078     
=============================================
+ Hits            6355    12490    +6135     
- Misses           245      425     +180     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@pizkaz pizkaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GL2 uses integer IDs for user, room and shared access.

* GreenlightUser constructor.
*/
public function __construct($id, $provider, $name, $username, $social_uid, $email, $password_digest)
public function __construct(string $id, string $provider, string $name, ?string $username, ?string $social_uid, string $email, ?string $password_digest)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user.id is an integer in GL2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

room.id is an integer in GL2

@@ -13,7 +15,7 @@ class GreenlightSharedAccess
/**
* GreenlightSharedAccess constructor.
*/
public function __construct($id, $room_id, $user_id)
public function __construct(string $id, string $room_id, string $user_id)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these IDs are integer in GL2 but uuid in GL3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

room.id is integer in GL2 but uuid in GL3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no room.deleted field in GL3. My bad, this is a result of copy&paste.

@pizkaz
Copy link
Copy Markdown
Contributor

pizkaz commented Apr 9, 2026

See pizkaz@3153dec

@samuelwei samuelwei merged commit a2467b0 into develop Apr 9, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants