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

[HttpKernel] Renamed the argument resolver tag#18529

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:masterfromlinaori:feature/controller-argument-tag
Apr 15, 2016
Merged

[HttpKernel] Renamed the argument resolver tag#18529

fabpot merged 1 commit intosymfony:masterfromlinaori:feature/controller-argument-tag
Apr 15, 2016

Conversation

@linaori
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?not if merged before 3.1
Deprecations?no
Tests pass?yes
Fixed tickets~
LicenseMIT
Doc PR~

Changed as discussed several times:#18510 (comment),symfony/symfony-docs#6422 (comment).

GromNaN reacted with thumbs up emoji
@stof
Copy link
Member

if this does not require any change in the testsuite, it looks like we are missing some tests...

@linaori
Copy link
ContributorAuthor

@stof this is functionally tested only (implicitly), I can add a compiler pass unit-test though.

@javiereguiluz
Copy link
Member

👍

@linaori
Copy link
ContributorAuthor

Added a test and named the compiler pass properly, it was still having "Controller" which is not part of the tag anymore.

@nicolas-grekas
Copy link
Member

👍

* @author Iltar van der Berg <kjarli@gmail.com>
*/
classControllerArgumentValueResolverPassimplements CompilerPassInterface
classArgumentValueResolverPassimplements CompilerPassInterface
Copy link
Member

Choose a reason for hiding this comment

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

This rename looks wrong to me. Compiler passes is in theSymfony\Bundle\FrameworkBundle\DependencyInjection\Compiler namespace, which gives no hints as to what Argument refers to.

@fabpot
Copy link
Member

👎 I'm all for having shorter names, but they need to be self-descriptive as well. Here, we're not talking about any argument, but only controller arguments.

@javiereguiluz
Copy link
Member

Other alternatives considered:

  • controller.value_resolver
  • controller.argument_value_resolver
  • controller.argument_value
  • controller.argument_resolver

@xabbuh
Copy link
Member

If we were to change this, I would vote forcontroller.argument_value_resolver.

@linaori
Copy link
ContributorAuthor

@xabbuh That's actually the same length as before:

  • controller_argument.value_resolver
  • controller.argument_value_resolver

@xabbuh
Copy link
Member

@iltar That's true. But it still conveys the proper meaning while making the namespace more clear imo. To me all other suggestions lose too much information.

@linaori
Copy link
ContributorAuthor

That's true, in that case I will also name the class the same as before again.

xabbuh reacted with thumbs up emoji

@linaori
Copy link
ContributorAuthor

Rebased to a clean commit, if everyone agrees on the name, I will update my other PRs

@fabpot
Copy link
Member

👍

@xabbuh
Copy link
Member

Why do you mock the DI related classes in the test? Imo you should rather use the real classes and check that the definitions are modified as expected.

@linaori
Copy link
ContributorAuthor

@xabbuh I can do that, this was simply copied from the other tests

);

$definition = new Definition(ArgumentResolver::class, array(null, array()));
$container = $this->getMock(ContainerBuilder::class, array('findTaggedServiceIds'));
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 just create aContainerBuilder instance here (like, for example, done in theFormPassTest andCachePoolPassTest).

Copy link
Member

Choose a reason for hiding this comment

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

and the same for the other test methods as well

@linaori
Copy link
ContributorAuthor

@xabbuh, no more mocking ;)

@fabpot
Copy link
Member

Thank you@iltar.

@fabpotfabpot merged commitcd10057 intosymfony:masterApr 15, 2016
fabpot added a commit that referenced this pull requestApr 15, 2016
This PR was merged into the 3.1-dev branch.Discussion----------[HttpKernel] Renamed the argument resolver tag| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | not if merged before 3.1| Deprecations? | no| Tests pass?   | yes| Fixed tickets | ~| License       | MIT| Doc PR        | ~Changed as discussed several times:#18510 (comment),symfony/symfony-docs#6422 (comment).Commits-------cd10057 Renamed argument resolver tag, added test
@linaorilinaori deleted the feature/controller-argument-tag branchFebruary 8, 2019 13:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@linaori@stof@javiereguiluz@nicolas-grekas@fabpot@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp