Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching method to contract for createToken() #498

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

gammamatrix
Copy link
Contributor

@gammamatrix gammamatrix commented Feb 10, 2024

Errors

The contract does not include the third parameter DateTimeInterface $expiresAt.

Contract:

public function createToken(string $name, array $abilities = ['*']);

Trait:

public function createToken(string $name, array $abilities = ['*'], DateTimeInterface $expiresAt = null)

From PHPStan:

Error: Method Laravel\Sanctum\Contracts\HasApiTokens::createToken() invoked with 3 parameters, 1-2 required.

Should this pull request be made against 3.x instead?

@gammamatrix gammamatrix changed the base branch from master to 3.x February 10, 2024 17:29
@gammamatrix gammamatrix changed the base branch from 3.x to master February 10, 2024 17:30
gammamatrix added a commit to gammamatrix/playground-auth that referenced this pull request Feb 10, 2024
@taylorotwell
Copy link
Member

Likely because contract couldn't be updated on a patch release.

@taylorotwell taylorotwell merged commit 7b3027e into laravel:master Feb 11, 2024
6 checks passed
@gammamatrix gammamatrix deleted the patch-1 branch February 27, 2024 19:49
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