Conversation
There was a problem hiding this comment.
Pull request overview
Updates the package to be compatible with Laravel 13 by bumping Illuminate dependencies and aligning code/tests with newer PHP/Laravel expectations (explicit nullability, modernized phpdoc, and formatting via Pint).
Changes:
- Bump
illuminate/*dependencies to^13.0and addlaravel/pint+pint.jsonconfiguration. - Update source code type hints to use explicit nullable types (avoiding “implicit nullable” deprecations) and refresh phpdoc/imports.
- Normalize test naming/style and adjust assorted minor formatting/consistency issues.
Reviewed changes
Copilot reviewed 71 out of 74 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Users/IlluminateUserRepositoryTest.php | Adjust Mockery callback null-check style for updated behavior/formatting. |
| tests/Users/EloquentUserTest.php | Formatting updates and minor docblock spacing tweaks. |
| tests/Throttling/IlluminateThrottleRepositoryTest.php | Rename tests to snake_case test_* style. |
| tests/Sessions/NativeSessionTest.php | Minor formatting (new stdClass syntax) + docblock spacing. |
| tests/SentinelTest.php | Docblocks/import shorthand + Mockery chain formatting + test rename(s). |
| tests/Roles/EloquentRoleTest.php | Formatting (new without parentheses). |
| tests/Reminders/IlluminateReminderRepositoryTest.php | Docblock type shorthand updates. |
| tests/Reminders/EloquentReminderTest.php | Formatting (new without parentheses). |
| tests/Persistences/IlluminatePersistenceRepositoryTest.php | Import ordering + formatting (new without parentheses). |
| tests/Persistences/EloquentPersistenceTest.php | Docblock type shorthand + formatting. |
| tests/Permissions/PermissibleTraitTest.php | Formatting (new without parentheses). |
| tests/Native/SentinelBootstrapperTest.php | Formatting (new without parentheses). |
| tests/Hashing/WhirlpoolHasherTest.php | Formatting (new without parentheses). |
| tests/Hashing/Sha256HasherTest.php | Formatting (new without parentheses). |
| tests/Hashing/NativeHasherTest.php | Formatting (new without parentheses). |
| tests/Hashing/BcryptHasherTest.php | Formatting (new without parentheses). |
| tests/Hashing/BaseHashing.php | Import/docblock shorthand + RuntimeException instantiation style. |
| tests/Cookies/NullCookieTest.php | Docblock shorthand + formatting. |
| tests/Cookies/IlluminateCookieTest.php | Formatting (new without parentheses). |
| tests/Checkpoints/ThrottleCheckpointTest.php | Add imports/docblocks + rename tests to snake_case. |
| tests/Checkpoints/ActivationCheckpointTest.php | Add import + docblock type shorthand. |
| tests/Activations/IlluminateActivationRepositoryTest.php | Add import + docblock type shorthand. |
| tests/Activations/EloquentActivationTest.php | Docblock shorthand + formatting. |
| src/Users/UserRepositoryInterface.php | Remove redundant phpdoc + make callback parameter explicitly nullable. |
| src/Users/UserInterface.php | Remove redundant phpdoc return annotations. |
| src/Users/IlluminateUserRepository.php | Explicit nullable params + formatting tweaks + phpdoc cleanup. |
| src/Users/EloquentUser.php | Phpdoc cleanup and minor annotation formatting. |
| src/Throttling/ThrottleRepositoryInterface.php | Explicit nullable user parameter on log() + phpdoc cleanup. |
| src/Throttling/IlluminateThrottleRepository.php | Import shorthand + formatting + updated nullable signature. |
| src/Sessions/SessionInterface.php | Remove redundant @return void doc text (keeps return types). |
| src/Sessions/NativeSession.php | Make key explicitly nullable and adjust phpdoc. |
| src/Sessions/IlluminateSession.php | Add imports + make key explicitly nullable. |
| src/Sentinel.php | Phpdoc cleanup, type shorthand, and minor string concat formatting. |
| src/Roles/RoleableInterface.php | Remove redundant phpdoc return annotations. |
| src/Roles/RoleRepositoryInterface.php | Remove redundant phpdoc. |
| src/Roles/RoleInterface.php | Remove redundant phpdoc. |
| src/Roles/IlluminateRoleRepository.php | Make model parameter explicitly nullable. |
| src/Roles/EloquentRole.php | Phpdoc cleanup + annotation formatting. |
| src/Reminders/ReminderRepositoryInterface.php | Add Model import + make code param explicitly nullable + phpdoc cleanup. |
| src/Reminders/IlluminateReminderRepository.php | Explicit nullable params + formatting tweaks + phpdoc cleanup. |
| src/Persistences/PersistenceRepositoryInterface.php | Remove redundant phpdoc. |
| src/Persistences/PersistenceInterface.php | Collapse empty interface formatting. |
| src/Persistences/PersistableInterface.php | Remove redundant phpdoc return annotations. |
| src/Persistences/IlluminatePersistenceRepository.php | Make model parameter explicitly nullable + phpdoc cleanup. |
| src/Persistences/EloquentPersistence.php | Phpdoc cleanup. |
| src/Permissions/PermissionsTrait.php | Explicit nullable arrays + modern destructuring + formatting tweaks. |
| src/Permissions/PermissionsInterface.php | Remove redundant phpdoc. |
| src/Permissions/PermissibleTrait.php | Docblock type shorthand + phpdoc cleanup. |
| src/Permissions/PermissibleInterface.php | Remove redundant phpdoc. |
| src/Native/SentinelBootstrapper.php | Formatting + type shorthand in return phpdoc. |
| src/Native/Facades/Sentinel.php | Explicit nullable bootstrapper param + formatting tweaks. |
| src/Native/ConfigRepository.php | Path concatenation formatting. |
| src/Laravel/SentinelServiceProvider.php | Path concat formatting + minor alignment tweaks + throws phpdoc. |
| src/Hashing/WhirlpoolHasher.php | String concatenation formatting. |
| src/Hashing/Sha256Hasher.php | String concatenation formatting. |
| src/Hashing/HasherInterface.php | Remove redundant phpdoc params/returns. |
| src/Hashing/Hasher.php | Remove redundant phpdoc. |
| src/Hashing/CallbackHasher.php | Phpdoc type shorthand for closures. |
| src/Hashing/BcryptHasher.php | String concatenation formatting. |
| src/Cookies/NullCookie.php | Collapse no-op methods to single-line bodies. |
| src/Cookies/NativeCookie.php | Make optional params explicitly nullable + phpdoc cleanup. |
| src/Cookies/IlluminateCookie.php | Docblock type shorthand + phpdoc cleanup. |
| src/Cookies/CookieInterface.php | Remove redundant phpdoc. |
| src/Checkpoints/ThrottlingException.php | Phpdoc cleanup. |
| src/Checkpoints/ThrottleCheckpoint.php | Make user parameter explicitly nullable + phpdoc cleanup. |
| src/Checkpoints/NotActivatedException.php | Docblock type shorthand + minor phpdoc tweak. |
| src/Checkpoints/CheckpointInterface.php | Make fail() user param explicitly nullable + phpdoc cleanup. |
| src/Checkpoints/AuthenticatedCheckpoint.php | Make fail() user param explicitly nullable. |
| src/Checkpoints/ActivationCheckpoint.php | Docblock shorthand + throws phpdoc cleanup. |
| src/Activations/IlluminateActivationRepository.php | Make code param explicitly nullable + query formatting. |
| src/Activations/ActivationRepositoryInterface.php | Make code params explicitly nullable + phpdoc cleanup. |
| src/Activations/ActivationInterface.php | Remove redundant phpdoc. |
| pint.json | Add Pint ruleset for consistent formatting/alignment. |
| composer.json | Bump Illuminate deps to ^13.0 and add laravel/pint. |
Comments suppressed due to low confidence (2)
src/Sessions/IlluminateSession.php:53
$keyis nullable, but the constructor assigns it unconditionally ($this->key = $key;), which overwrites the default'cartalyst_sentinel'withnullwhen no key is provided (or when config returns null). This will breakput/get/forgetbecause the session key becomes null. Only override the default when a non-null key is provided (or coalesce to the default).
src/Sessions/NativeSession.php:42$keyis nullable, but the constructor assigns it unconditionally ($this->key = $key;), which overwrites the default'cartalyst_sentinel'withnullwhen no key is provided. That will cause session reads/writes to use a null key. Only override the default when$keyis non-null (or coalesce to the default).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 77 out of 80 changed files in this pull request and generated 18 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 77 out of 80 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (3)
src/Persistences/IlluminatePersistenceRepository.php:74
- The constructor unconditionally assigns
$this->model = $model;even when$modelisnull, which overwrites the defaultEloquentPersistence::classand can breakcreateModel()calls for consumers that omit the model argument. Consider only overriding$this->modelwhen a non-null value is provided (or default the parameter toEloquentPersistence::class).
src/Users/IlluminateUserRepository.php:62 - The constructor assigns
$this->model = $model;even when$modelisnull, which overwrites the defaultEloquentUser::classand can breakcreateModel()for callers relying on the default model. Consider only overriding$this->modelwhen a non-null model is provided (or default the parameter toEloquentUser::class).
src/Reminders/IlluminateReminderRepository.php:67 - The constructor currently sets both
$this->modeland$this->expiresto the provided values even when they arenull, overwriting the defaults (EloquentReminder::classand the default expiry seconds). This can lead tocreateModel()failures and potentially invalid expiry calculations when callers omit these optional arguments. Only override these properties when non-null values are provided (or make the parameters non-nullable with defaults).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Laravel 13 compatibility