Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] Calls support for debug:container #18416

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
Apr 14, 2016

Conversation

JhonnyL
Copy link
Contributor

@JhonnyL JhonnyL commented Apr 2, 2016

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets
License MIT
Doc PR
  • Show methods to be called after service initialization in debug:container command

@linaori
Copy link
Contributor

linaori commented Apr 3, 2016

What does it look like with multiple calls?

@JhonnyL
Copy link
Contributor Author

JhonnyL commented Apr 3, 2016

It will look like this.

screen shot 2016-04-03 at 12 20 47

screen shot 2016-04-03 at 13 16 29

screen shot 2016-04-03 at 13 20 08

screen shot 2016-04-03 at 13 16 43

@javiereguiluz
Copy link
Member

I think this would be a nice addition 👍 Thanks @JhonnyL

@linaori
Copy link
Contributor

linaori commented Apr 3, 2016

Would it be possible to show arguments of the setters as well? I think that
would be an even greater addition

On Sun, 3 Apr 2016 13:30 Javier Eguiluz, [email protected] wrote:

I think this would be a nice addition [image: 👍] Thanks @JhonnyL
https://github.com/JhonnyL


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#18416 (comment)

@JhonnyL
Copy link
Contributor Author

JhonnyL commented Apr 4, 2016

It is possible. Still the command doesn't even show arguments for the debugged service itself. I would hope we can have this merged first and then save arguments support for service and calls etc. to another PR.

We would also need to consider if it's worth it e.g. private services as arguments will make output look really ugly and bloated.

$calls = $definition->getMethodCalls();
if (count($calls) > 0) {
foreach ($calls as $callData) {
$output .= "\n".'- Call: `'.$callData[0].'`';
Copy link
Member

Choose a reason for hiding this comment

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

In markdown, should be instead use a sublist ?

- Calls:
    - `setParameter`
    - `getParameter`

Copy link
Member

Choose a reason for hiding this comment

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

OK, the current proposal is consistent with the display of tags, so this is fine

@JhonnyL JhonnyL force-pushed the calls-support-for-debug-container branch from f609224 to b2d1038 Compare April 4, 2016 09:35
@JhonnyL
Copy link
Contributor Author

JhonnyL commented Apr 4, 2016

Updated PR. Removed useless count check.

@stof
Copy link
Member

stof commented Apr 7, 2016

👍
Status: reviewed

@aitboudad
Copy link
Contributor

👍

@@ -214,6 +214,11 @@ protected function describeContainerDefinition(Definition $definition, array $op
}
}

$calls = $definition->getMethodCalls();
foreach ($calls as $callData) {
$output .= "\n".'- Call: `'.$callData[0].'`';
Copy link
Member

Choose a reason for hiding this comment

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

Imo this should be "Calls" do be consistent with the other descriptors.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we already using the same thing for Tag and Autowiring Type and if we use Calls we should list them in the same row, did you see how it looks ?

Copy link
Member

Choose a reason for hiding this comment

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

Oh you are right. This indeed looks right the way it is.

@xabbuh
Copy link
Member

xabbuh commented Apr 13, 2016

👍

@fabpot
Copy link
Member

fabpot commented Apr 14, 2016

Thank you @JhonnyL.

@fabpot fabpot merged commit b2d1038 into symfony:master Apr 14, 2016
fabpot added a commit that referenced this pull request Apr 14, 2016
…honnyL)

This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Calls support for debug:container

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets |
| License       | MIT
| Doc PR        |

* Show methods to be called after service initialization in `debug:container` command

Commits
-------

b2d1038 [FrameworkBundle] Calls support for debug:container
@fabpot fabpot mentioned this pull request May 13, 2016
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.

8 participants