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

[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

Merged
fabpot merged 1 commit intosymfony:masterfromchalasr:better-describe-aliases
Jan 4, 2017

Conversation

@chalasr
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#20954
LicenseMIT
Doc PRn/a

Before
before-txt

After
after-txt

XML output

Before
before-xml

After
after-xml

JSON output

Before
before-json

After
after-json

Markdown output

Before
before-md

After
after-md

ogizanagi, theofidry, jvasseur, and javiereguiluz reacted with thumbs up emoji
@chalasrchalasr changed the title[FrameworkBundle] Display original definition for aliases in debug:co…[FrameworkBundle] Display original definition for aliases in debug:containerJan 2, 2017
Copy link
Contributor

@theofidrytheofidry left a 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);
Copy link
Contributor

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>

Copy link
MemberAuthor

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"

:/

Copy link
Contributor

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?

Copy link
MemberAuthor

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 :)

@chalasrchalasrforce-pushed thebetter-describe-aliases branch 3 times, most recently from985af21 toc919eabCompareJanuary 2, 2017 12:44
@nicolas-grekasnicolas-grekas added this to the3.3 milestoneJan 2, 2017
Copy link
Member

@dunglasdunglas left a 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
Copy link
Member

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
Copy link
Member

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
*
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@chalasrchalasrforce-pushed thebetter-describe-aliases branch 4 times, most recently from6d89444 to8d78b8aCompareJanuary 3, 2017 11:39
@chalasr
Copy link
MemberAuthor

@dunglas Phpdoc fixed and test added. Thank you for the review.
Builds failures are unrelated.

@chalasrchalasrforce-pushed thebetter-describe-aliases branch 3 times, most recently from285bee8 to86b7ec2CompareJanuary 4, 2017 10:45
@chalasr
Copy link
MemberAuthor

Tests are green

@chalasrchalasrforce-pushed thebetter-describe-aliases branch from86b7ec2 tocd4b15eCompareJanuary 4, 2017 13:20
@fabpot
Copy link
Member

Thank you@chalasr.

@fabpotfabpot merged commitcd4b15e intosymfony:masterJan 4, 2017
fabpot added a commit that referenced this pull requestJan 4, 2017
…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/aBefore![before-txt](http://image.prntscr.com/image/b0cb59f23ddb43669ba0aba093f454af.png)After![after-txt](http://image.prntscr.com/image/adf234957acf444292e45bded8efb9d8.png)<details><summary>XML output</summary>Before![before-xml](http://image.prntscr.com/image/66212d92db654f88b8196b211046bcf2.png)After![after-xml](http://image.prntscr.com/image/3f6b5f9f1ea54a31aea36de5928b6ae9.png)</details><details><summary>JSON output</summary>Before![before-json](http://image.prntscr.com/image/a7ffc4bcda61486f90af85c90e3d6caa.png)After![after-json](http://image.prntscr.com/image/15d0f37e78354dcf8e3015b94fcbdaed.png)</details><details><summary>Markdown output</summary>Before![before-md](http://image.prntscr.com/image/be5289840ac64a5e80f11748f481686c.png)After![after-md](http://image.prntscr.com/image/cba4217863f647e9974e1715812eda01.png)</details>Commits-------cd4b15e [FrameworkBundle] Display original definition for aliases in debug:container
@chalasrchalasr deleted the better-describe-aliases branchJanuary 4, 2017 13:27
@fabpotfabpot mentioned this pull requestMay 1, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasdunglas requested changes

+1 more reviewer

@theofidrytheofidrytheofidry approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

6 participants

@chalasr@fabpot@dunglas@theofidry@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp