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

typehint array shape for generateSignature()'s $extraParams #178

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ class EmailVerifier
}
```

- `VerifyEmailHelperInterface::generateSignature(extraParams: [])` added the array
shape expected for the `extraParams` argument.

```diff
- @param array $extraParams
+ @param array<string, int|string> $extraParams
```


## VerifyEmailSignatureComponents

- Providing an `int` to the constructor parameter `$generatedAt` is now required
Expand Down
12 changes: 6 additions & 6 deletions src/VerifyEmailHelperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ interface VerifyEmailHelperInterface
/**
* Get a signed Url that can be emailed to a user.
*
* @param string $routeName name of route that will be used to verify users
* @param string $userId unique user identifier
* @param string $userEmail the email that is being verified
* @param array $extraParams any additional parameters (route wildcards or query parameters)
* that will be used when generating the route for
* signed URL
* @param string $routeName name of route that will be used to verify users
* @param string $userId unique user identifier
* @param string $userEmail the email that is being verified
* @param array<string, int|string> $extraParams any additional parameters (route wildcards or query parameters)
* that will be used when generating the route for
* signed URL
*/
public function generateSignature(string $routeName, string $userId, string $userEmail, array $extraParams = []): VerifyEmailSignatureComponents;

Expand Down
Loading