Skip to content

Fix: Prevent laravel/sanctum from going beyond version 4.2.4#5591

Open
ollieread wants to merge 1 commit intopterodactyl:1.0-developfrom
ollieread:laravel-sanctum-fix
Open

Fix: Prevent laravel/sanctum from going beyond version 4.2.4#5591
ollieread wants to merge 1 commit intopterodactyl:1.0-developfrom
ollieread:laravel-sanctum-fix

Conversation

@ollieread
Copy link

If anyone runs any form of composer update they'll get laravel/sanctum version 4.3.1, but 4.3.0 introduced a breaking change that will cause errors in Pterodactyl installs.

In \Pterodactyl\Extensions\Laravel\Sanctum\NewAccessToken you're relying on the underlying class' (\Laravel\Sanctum\NewAccessToken) lack of typing on the accessToken property. In Laravel Sanctum 4.3.0 the laravel/sanctum#586 PR changes were released, which refactors the underlying class to use property promotion, and specifies a type.

https://github.com/laravel/sanctum/blob/224864063d51d6adddc8c061ccf61eafa0e8f7ce/src/NewAccessToken.php#L10-L18

@ollieread ollieread changed the title Prevents laravel/sanctum from going beyond version 4.2.4 Fix: Prevent laravel/sanctum from going beyond version 4.2.4 Feb 24, 2026
@WeeskyBDW
Copy link

Woudn't be "easier" to fix the issue ? Or you prefer not ?

@ollieread
Copy link
Author

Woudn't be "easier" to fix the issue ? Or you prefer not ?

@WeeskyBDW the issue is that Pterodactyl has a bit of a hack around this part and fixing the cause of it would require most likely a chunk of work. Locking the version like this is the quickest way to not break everyone's api keys if they get a later version of sanctum.

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