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

Add ControllerTrait::getParameter()#25439

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:masterfromchalasr:abstract_ctrl_get_parameter
Dec 11, 2017

Conversation

@chalasr
Copy link
Member

QA
Branch?4.1
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#25288 (comment)
LicenseMIT
Doc PRn/a

apetitpa reacted with thumbs up emoji
stof
stof previously requested changesDec 11, 2017
return;
}

if (method_exists($this,'expectException')) {
Copy link
Member

Choose a reason for hiding this comment

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

You can remove this check for new code. As Symfony 4 requires PHP 7.1+, it will not need to run tests on PHPUnit 4.8 (which is needed for PHP 5.5 and older). SoexpectException can always be used.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@nicolas-grekas
Copy link
Member

should we add anhasParameter also?

Kocal reacted with thumbs up emoji

@chalasr
Copy link
MemberAuthor

@nicolas-grekasController does not have it (little value in userland?) but no objection for me

*
* @return mixed
*
* @final since version 4.1

Choose a reason for hiding this comment

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

just@final (since always - it didn't exist before)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

fixed

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.

ok without hasParameter, since it doesn't exist on Controller

@chalasrchalasrforce-pushed theabstract_ctrl_get_parameter branch from2262186 to28397e5CompareDecember 11, 2017 16:27
@fabpot
Copy link
Member

Thank you@chalasr.

@fabpotfabpot merged commit28397e5 intosymfony:masterDec 11, 2017
fabpot added a commit that referenced this pull requestDec 11, 2017
This PR was merged into the 4.1-dev branch.Discussion----------Add ControllerTrait::getParameter()| Q             | A| ------------- | ---| Branch?       | 4.1| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#25288 (comment)| License       | MIT| Doc PR        | n/aCommits-------28397e5 Add ControllerTrait::getParameter()
@chalasrchalasr deleted the abstract_ctrl_get_parameter branchDecember 11, 2017 22:20
@fabpotfabpot mentioned this pull requestMay 7, 2018
@curry684
Copy link
Contributor

I just tried using this because oftoday's blog post and it seems quite fundamentally broken?

Theparameter_bag is injected asContainerInterface::class inAbstractController, after whichgetParameter tries toreturn $this->container->get('parameter_bag')->get($name), which obviously always fails with aServiceNotFoundException as it's querying a service instead of the parameters....

@curry684
Copy link
Contributor

Oh it got screwed over later at3051289#diff-ef10778bc68793f8c8f4b71a7ba67790R86 while refactoring,@nicolas-grekas missed 3 characters in typing it hehe.

nicolas-grekas added a commit that referenced this pull requestMay 30, 2018
… (curry684)This PR was submitted for the master branch but it was squashed and merged into the 4.1 branch instead (closes#27415).Discussion----------Insert correct parameter_bag service in AbstractControllerReverts this feature being broken in3051289#diff-ef10778bc68793f8c8f4b71a7ba67790R86 - `getParameter` could never work now as it was querying the container itself instead of the parameter bag.| Q             | A| ------------- | ---| Branch?       | 4.1| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| License       | MITAlso see comments at#25439 (comment)Commits-------37270d7 Insert correct parameter_bag service in AbstractController
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@stofstofstof left review comments

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

6 participants

@chalasr@nicolas-grekas@fabpot@curry684@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp