Skip to content

Laravel 13#3

Merged
bcbrewer merged 7 commits into8.xfrom
laravel-13
Apr 13, 2026
Merged

Laravel 13#3
bcbrewer merged 7 commits into8.xfrom
laravel-13

Conversation

@bcbrewer
Copy link
Copy Markdown

Laravel 13 compatibility

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.0 and add laravel/pint + pint.json configuration.
  • 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

  • $key is nullable, but the constructor assigns it unconditionally ($this->key = $key;), which overwrites the default 'cartalyst_sentinel' with null when no key is provided (or when config returns null). This will break put/get/forget because 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
  • $key is nullable, but the constructor assigns it unconditionally ($this->key = $key;), which overwrites the default 'cartalyst_sentinel' with null when no key is provided. That will cause session reads/writes to use a null key. Only override the default when $key is non-null (or coalesce to the default).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/Checkpoints/ThrottleCheckpointTest.php
Comment thread tests/Checkpoints/ThrottleCheckpointTest.php Outdated
Comment thread tests/Checkpoints/ThrottleCheckpointTest.php Outdated
Comment thread src/Throttling/IlluminateThrottleRepository.php
Comment thread src/Sentinel.php Outdated
Comment thread src/Sessions/IlluminateSession.php Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread tests/Sessions/IlluminateSessionTest.php
Comment thread tests/Roles/IlluminateRoleRepositoryTest.php
Comment thread tests/Persistences/EloquentPersistenceTest.php
Comment thread src/Sessions/NativeSession.php Outdated
Comment thread src/Sessions/IlluminateSession.php Outdated
Comment thread tests/Reminders/IlluminateReminderRepositoryTest.php
Comment thread tests/Checkpoints/ThrottleCheckpointTest.php
Comment thread tests/Checkpoints/ActivationCheckpointTest.php
Comment thread tests/Activations/IlluminateActivationRepositoryTest.php
Comment thread tests/Persistences/IlluminatePersistenceRepositoryTest.php
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 $model is null, which overwrites the default EloquentPersistence::class and can break createModel() calls for consumers that omit the model argument. Consider only overriding $this->model when a non-null value is provided (or default the parameter to EloquentPersistence::class).
    src/Users/IlluminateUserRepository.php:62
  • The constructor assigns $this->model = $model; even when $model is null, which overwrites the default EloquentUser::class and can break createModel() for callers relying on the default model. Consider only overriding $this->model when a non-null model is provided (or default the parameter to EloquentUser::class).
    src/Reminders/IlluminateReminderRepository.php:67
  • The constructor currently sets both $this->model and $this->expires to the provided values even when they are null, overwriting the defaults (EloquentReminder::class and the default expiry seconds). This can lead to createModel() 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.

Comment thread tests/Persistences/IlluminatePersistenceRepositoryTest.php
Comment thread src/Persistences/PersistenceRepositoryInterface.php
Comment thread src/Roles/IlluminateRoleRepository.php
@bcbrewer bcbrewer merged commit 757a857 into 8.x Apr 13, 2026
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