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

Skip to content

[FrameworkBundle] Calls support for debug:container#18416

Merged
fabpot merged 1 commit into
symfony:masterfrom
JhonnyL:calls-support-for-debug-container
Apr 14, 2016
Merged

[FrameworkBundle] Calls support for debug:container#18416
fabpot merged 1 commit into
symfony:masterfrom
JhonnyL:calls-support-for-debug-container

Conversation

@JhonnyL

@JhonnyL JhonnyL commented Apr 2, 2016

Copy link
Copy Markdown
Contributor
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

linaori commented Apr 3, 2016

Copy link
Copy Markdown
Contributor

What does it look like with multiple calls?

@JhonnyL

JhonnyL commented Apr 3, 2016

Copy link
Copy Markdown
Contributor Author

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

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

@linaori

linaori commented Apr 3, 2016

Copy link
Copy Markdown
Contributor

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

JhonnyL commented Apr 4, 2016

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
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

JhonnyL commented Apr 4, 2016

Copy link
Copy Markdown
Contributor Author

Updated PR. Removed useless count check.

@stof

stof commented Apr 7, 2016

Copy link
Copy Markdown
Member

👍
Status: reviewed

@aitboudad

Copy link
Copy Markdown
Contributor

👍


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

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

xabbuh commented Apr 13, 2016

Copy link
Copy Markdown
Member

👍

@fabpot

fabpot commented Apr 14, 2016

Copy link
Copy Markdown
Member

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