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 route generation with fragment defined as defaults#20001

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

@akovalyov
Copy link
Contributor

@akovalyovakovalyov commentedSep 21, 2016
edited
Loading

QA
Branch?"master"
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

As stated inhttps://symfony.com/blog/new-in-symfony-3-2-routing-improvements, it should support_fragment option as part of_defaults of route definition.

$fragment =$defaults['_fragment'];
}

if (array_key_exists('_fragment',$extra)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You changed behaviour here for the case when_fragment isnull.isset() will return false, whilearray_key_exists() will return true for a key withnull value.

akovalyov reacted with thumbs up emoji
@akovalyovakovalyovforce-pushed thebugfix/router-fragment-as-defaults branch from9d445a0 to40d9306CompareSeptember 21, 2016 10:24
@akovalyov
Copy link
ContributorAuthor

@jakzal reverted original behaviour.

publicfunctiontestFragmentsCanBeDefinedAsDefaults()
{
$routes =$this->getRoutes('test',newRoute('/testing',array('_fragment' =>'fragment')));
$url =$this->getGenerator($routes)->generate('test',array(),true);
Copy link
Member

Choose a reason for hiding this comment

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

The third argument must not be a boolean. Please passUrlGeneratorInterface::ABSOLUTE_PATH here (see#20009 which fixes the other tests).

akovalyov reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Resolved.

@akovalyovakovalyovforce-pushed thebugfix/router-fragment-as-defaults branch from40d9306 to3c36596CompareSeptember 21, 2016 14:49
@xabbuh
Copy link
Member

👍

Status: Reviewed

@fabpot
Copy link
Member

Thank you@akovalyov.

@fabpotfabpot merged commit3c36596 intosymfony:masterSep 21, 2016
fabpot added a commit that referenced this pull requestSep 21, 2016
…defaults (akovalyov)This PR was merged into the 3.2-dev branch.Discussion----------[Routing] Fixed route generation with fragment defined as defaults| Q             | A| ------------- | ---| Branch?       | "master"| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| License       | MITAs stated inhttps://symfony.com/blog/new-in-symfony-3-2-routing-improvements, it should support `_fragment` option as part of `_defaults` of route definition.Commits-------3c36596 [Routing] Fixed route generation with fragment defined as defaults
@akovalyovakovalyov deleted the bugfix/router-fragment-as-defaults branchSeptember 21, 2016 20:19
@akovalyov
Copy link
ContributorAuthor

@fabpot my pleasure!

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

Reviewers

@xabbuhxabbuhxabbuh left review comments

+1 more reviewer

@jakzaljakzaljakzal left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@akovalyov@xabbuh@fabpot@jakzal@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp