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

[Routing] Fixed unexpected 404 NoConfigurationException#31207

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
nicolas-grekas merged 1 commit intosymfony:4.2fromyceruto:fix_routing_42
May 9, 2019

Conversation

@yceruto
Copy link
Member

QA
Branch?4.2
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#31199
LicenseMIT

This is the patch for 4.2+
We need a different patch for 3.4 that is more complex, I think.

}

if ('/' ===$pathinfo && !$this->allow) {
if ('/' ===$pathinfo && !$this->allow && !$this->allowSchemes) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

According to what we have inPhpMatcherTrait:

if ('/' ===$pathinfo && !$allow && !$allowSchemes) {
thrownewNoConfigurationException();
}

nicolas-grekas reacted with thumbs up emoji

/**
* @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException
* @expectedExceptionMessage No routes found for "/".
Copy link
MemberAuthor

@ycerutoycerutoApr 23, 2019
edited
Loading

Choose a reason for hiding this comment

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

Making sure it is aResourceNotFoundException and not aNoConfigurationException which has no message.

nicolas-grekas reacted with thumbs up emoji
if ($hasRequiredScheme &&$requiredMethods && !\in_array($method,$requiredMethods)) {
$this->allow =array_merge($this->allow,$requiredMethods);

continue;
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

thiscontinue outside theif ($hasRequiredScheme) was preventing to collect the$this->allowSchemes bellow

nicolas-grekas reacted with thumbs up emoji
@yceruto
Copy link
MemberAuthor

(Travis failures are unrelated)

@nicolas-grekasnicolas-grekasforce-pushed thefix_routing_42 branch 2 times, most recently from0693bb9 to64579e8CompareMay 5, 2019 15:49
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

LGTM for 4.2 thanks.
For 3.4, what's your advice?

@yceruto
Copy link
MemberAuthor

For 3.4 we need to collectallowSchemes in a different way (also different places) because the code as of 4.2 has been completely refactored. I still haven't found the right way to do it.

@yceruto
Copy link
MemberAuthor

@nicolas-grekas I just rebased to make tests pass, but I lost your changes, I'm sorry :( please, feel free to push them again, thanks!

@nicolas-grekas
Copy link
Member

For 3.4 we need to collect allowSchemes in a different way

Or we can forget about it - 4.2 has new features that allow making the difference - 3.4 doesn't. Makes sense?

I added back my changes.

@nicolas-grekas
Copy link
Member

Thank you@yceruto.

@nicolas-grekasnicolas-grekas merged commitaa71a42 intosymfony:4.2May 9, 2019
nicolas-grekas added a commit that referenced this pull requestMay 9, 2019
…ceruto)This PR was merged into the 4.2 branch.Discussion----------[Routing] Fixed unexpected 404 NoConfigurationException| Q             | A| ------------- | ---| Branch?       | 4.2| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31199| License       | MITThis is the patch for 4.2+We need a different patch for 3.4 that is more complex, I think.Commits-------aa71a42 [Routing] Fixed unexpected 404 NoConfigurationException
@ycerutoyceruto deleted the fix_routing_42 branchMay 9, 2019 12:06
@yceruto
Copy link
MemberAuthor

For 3.4 we need to collect allowSchemes in a different way

Or we can forget about it - 4.2 has new features that allow making the difference - 3.4 doesn't. Makes sense?

It's fine to me, thanks for merging.

This was referencedMay 22, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

3 participants

@yceruto@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp