Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplify UriSigner when working with HttpFoundation's Request#35284

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

Toflar
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
Tickets
LicenseMIT
Doc PR

I'm using theUriSigner in my own projects from time to time and I've always wondered why I have to manually generate the URI from theRequest instance in such a way that it is correctly validated.
Let's add a newcheckRequest(Request $request) method to provide better DX.

ro0NL, alexander-schranz, vudaltsov, m-vo, and andreybolonin reacted with thumbs up emoji
@Toflar
Copy link
ContributorAuthor

Failing tests look unrelated.

Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

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

with two minor comments

@@ -39,7 +41,7 @@ public function __construct(string $secret, string $parameter = '_hash')
*
* @return string The signed URI
*/
public function sign(string $uri)
public function sign(string $uri): string
Copy link
Member

Choose a reason for hiding this comment

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

Should be reverted

@@ -59,7 +61,7 @@ public function sign(string $uri)
*
* @return bool True if the URI is signed correctly, false otherwise
*/
public function check(string $uri)
public function check(string $uri): bool
Copy link
Member

Choose a reason for hiding this comment

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

Should be reverted

@Toflar
Copy link
ContributorAuthor

Done. Thought they were missing accidentally during the upgrade to 5.0.

@fabpotfabpotforce-pushed thesimplify-urisigner-check-for-request branch from7363ceb to4887b4bCompareJanuary 10, 2020 09:29
@fabpot
Copy link
Member

Thank you@Toflar.

@fabpotfabpot merged commit4887b4b intosymfony:masterJan 10, 2020
@ToflarToflar deleted the simplify-urisigner-check-for-request branchJanuary 10, 2020 09:29
@fabpotfabpot mentioned this pull requestMay 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Toflar@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp