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] Add the possibility to define a prefix for all routes of a controller#24031

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
fabpot merged 1 commit intosymfony:3.4fromfabpot:routes-prefix
Sep 1, 2017

Conversation

fabpot
Copy link
Member

QA
Branch?3.4
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketssensiolabs/SensioFrameworkExtraBundle#283
LicenseMIT
Doc PRnot yet

This PR adds the possibility to define a name on a@Route annotation set on a controller class. The name is then used as a prefix for all routes defined in the controller.

apetitpa, gharlan, andreybolonin, and rvanlaak reacted with thumbs up emoji
@@ -240,7 +241,7 @@ public function testInvokableClassWithMethodRouteLoad()

$this->assertNull($route, '->load ignores class route');

$route = $routeCollection->get($methodRouteData['name']);
$route = $routeCollection->get($classRouteData['name'].$methodRouteData['name']);
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Technically, that's a BC break, but I don't think this matters much as someone defining a class with an__invoke method would probably not define a name on the class@Route annotation (I don't see the point).

apetitpa reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you're right, because it would have to map to the__invoke method, even if@Route() was used for the service definition.

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneAug 31, 2017
Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

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

Relates to#19612 somehow.

@fabpotfabpot merged commit00d959c intosymfony:3.4Sep 1, 2017
fabpot added a commit that referenced this pull requestSep 1, 2017
…ll routes of a controller (fabpot)This PR was merged into the 3.4 branch.Discussion----------[Routing] Add the possibility to define a prefix for all routes of a controller| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | sensiolabs/SensioFrameworkExtraBundle#283| License       | MIT| Doc PR        | not yetThis PR adds the possibility to define a name on a `@Route` annotation set on a controller class. The name is then used as a prefix for all routes defined in the controller.Commits-------00d959c [Routing] added the possibility to define a prefix for all routes of a controller
@fabpotfabpot deleted the routes-prefix branchSeptember 11, 2017 18:18
This was referencedOct 18, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@linaorilinaorilinaori left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
3.4
Development

Successfully merging this pull request may close these issues.

5 participants
@fabpot@nicolas-grekas@linaori@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp