Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Display original definition for aliases in debug:container#21129
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
theofidry left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Cool!
| $serviceId =$options['id']; | ||
| do { | ||
| $serviceId = (string)$builder->getAlias($serviceId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
would it be possible to write data for each alias as well? So that if you havealias1 -> alias2 -> service you see something along the lines of:
- alias1 is an alias for alias2- alias2 is an alias for service- <service description>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It would be indeed better but it doesn't look possible, AFAIK there's no way to handle chained aliases, it direct gives the original id.
Givenalias1 is an alias oforiginal and,alias2 is an alias ofalias1, runningdebug:container alias2 currently gives
This service is an alias for the service "original",
and not
This service is an alias for the service "alias1"
:/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Hm ok, but then why is this looping necessary then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I just realized this, it is useless :)
985af21 toc919eabCompare
dunglas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you also add a functional test for this change?
| * * name: name of described service | ||
| * | ||
| * @param Definition|Alias|object $service | ||
| * @param array $options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The PHPDoc must be updated (new arg)
| * Describes a service alias. | ||
| * | ||
| * @param Alias $alias | ||
| * @param array $options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Same here
| /** | ||
| * @param mixed $service | ||
| * @param string $id | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Same here.
6d89444 to8d78b8aComparechalasr commentedJan 3, 2017
@dunglas Phpdoc fixed and test added. Thank you for the review. |
285bee8 to86b7ec2Comparechalasr commentedJan 4, 2017
Tests are green |
86b7ec2 tocd4b15eComparefabpot commentedJan 4, 2017
Thank you@chalasr. |
…ses in debug:container (chalasr)This PR was merged into the 3.3-dev branch.Discussion----------[FrameworkBundle] Display original definition for aliases in debug:container| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#20954| License | MIT| Doc PR | n/aBeforeAfter<details><summary>XML output</summary>BeforeAfter</details><details><summary>JSON output</summary>BeforeAfter</details><details><summary>Markdown output</summary>BeforeAfter</details>Commits-------cd4b15e [FrameworkBundle] Display original definition for aliases in debug:container
Before

After

XML output
Before

After

JSON output
Before

After

Markdown output
Before

After
