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

force UrlComparerTrait::_normalize to use GET method#180

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

Open
Erwane wants to merge1 commit intoCakePHP-Bootstrap:4.0.1-alpha
base:4.0.1-alpha
Choose a base branch
Loading
fromErwane:179-url-comparer-get-only

Conversation

@Erwane
Copy link
Collaborator

No description provided.

@ErwaneErwane changed the titleforce UrlComparerTrait::_normalize to use GET method#179 - force UrlComparerTrait::_normalize to use GET methodJul 9, 2019
@ErwaneErwane changed the title#179 - force UrlComparerTrait::_normalize to use GET methodforce UrlComparerTrait::_normalize to use GET methodJul 9, 2019
@Erwane
Copy link
CollaboratorAuthor

for issue#179

@Holt59
Copy link
Collaborator

Thanks for the PR. Isn't this going to break the opposite case, i.e., if you have a POST URL and you are on a GET one?

@Erwane
Copy link
CollaboratorAuthor

There is no reason a POST only route need UrlComparerTrait for navlinks i thinks.

Maybe in case of ajax url indata-url attribute ...

Another option is to parse RouteCollection and check url only for route allow current method ?

@Holt59
Copy link
Collaborator

I agree with you regarding POST only links in a navigation bar but I would like theUrlComparatorTrait to not be navbar-specific.

Honestly, I don't know why CakePHP has such behaviour...ServerRequest is probably not the right tool for this job, but I have a hard time getting something clean... Comparing CakePHP urls is getting me crazy, this trait was meant to be a small utility tool but it is now probably the most complicated part of the whole helper set.

@Erwane
Copy link
CollaboratorAuthor

Hi.
What we need to advance on this PR ?

@Holt59
Copy link
Collaborator

@Erwane A possibility would be to let user specify the method used to compare, with a default to no-method in theUrlComparerTrait (current behavior), but a default toGET in the navbar helper.

This would be retro-compatible, and more flexible for future changes.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Erwane@Holt59

[8]ページ先頭

©2009-2025 Movatter.jp