8000 [HttpKernel] Make TraceableValueResolver $stopwatch mandatory by ogizanagi · Pull Request #27252 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] Make TraceableValueResolver $stopwatch mandatory #27252

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2018
Merged

[HttpKernel] Make TraceableValueResolver $stopwatch mandatory #27252

merged 1 commit into from
May 14, 2018

Conversation

ogizanagi
Copy link
Contributor
Q A
Branch? 4.1
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #26833 (comment)
License MIT
Doc PR N/A

I understand why this was suggested in #26833 (comment), but as stated by @iltar , I don't think it makes sense to register a traceable resolver instantiating a Stopwatch itself, as there is no way to fetch it and wouldn't be a shared instance, probably defeating the feature and registering a useless decorator.
Instead, let's make the stopwatch mandatory and make the service id to use in the pass configurable.

@@ -31,11 +30,13 @@ class ControllerArgumentValueResolverPass implements CompilerPassInterface

private $argumentResolverService;
private $argumentValueResolverTag;
private $traceableResolverStopWatch;
Copy link
Member

Choose a reason for hiding this comment

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

StopWatch => Stopwatch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks 👍

@fabpot
Copy link
Member
fabpot commented May 14, 2018

Thank you @ogizanagi.

@fabpot fabpot merged commit 585ae7c into symfony:4.1 May 14, 2018
fabpot added a commit that referenced this pull request May 14, 2018
…atory (ogizanagi)

This PR was merged into the 4.1 branch.

Discussion
----------

[HttpKernel] Make TraceableValueResolver $stopwatch mandatory

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26833 (comment)   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

I understand why this was suggested in #26833 (comment), but as stated by @iltar , I don't think it makes sense to register a traceable resolver instantiating a Stopwatch itself, as there is no way to fetch it and wouldn't be a shared instance, probably defeating the feature and registering a useless decorator.
Instead, let's make the stopwatch mandatory and make the service id to use in the pass configurable.

Commits
-------

585ae7c [HttpKernel] Make TraceableValueResolver $stopwatch mandatory
@ogizanagi ogizanagi deleted the traceable_value_resolver/mandatory_stopwatch branch May 14, 2018 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0