Skip to content
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

Changing echo/print in examples to use (var_)dump #5177

Closed
linaori opened this issue Apr 14, 2015 · 2 comments
Closed

Changing echo/print in examples to use (var_)dump #5177

linaori opened this issue Apr 14, 2015 · 2 comments
Labels
actionable Clear and specific issues ready for anyone to take them. good first issue Ideal for your first contribution! (some Symfony experience may be required) hasPR A Pull Request has already been submitted for this issue.

Comments

@linaori
Copy link
Contributor

linaori commented Apr 14, 2015

I think the code should be looked through and see if usages of echo and print can be limited. I think the best replacement could be a reference to dump() to output data, but a var_dump() could be sufficient too, depending on whether it's framework or a component documentation. An example of using echo can be found on /components/event_dispatcher/introduction.html#event-name-introspection

@wouterj
Copy link
Member

wouterj commented Apr 14, 2015

Actually, why don't we remove the echo and just use // ... do something with the eventname in $name?

@linaori
Copy link
Contributor Author

linaori commented Apr 14, 2015

It's an option, but might not apply to all output-using examples. For this page it might be nicer to indeed use a comment.

@wouterj wouterj added good first issue Ideal for your first contribution! (some Symfony experience may be required) actionable Clear and specific issues ready for anyone to take them. labels May 10, 2015
@wouterj wouterj added the hasPR A Pull Request has already been submitted for this issue. label May 23, 2015
wouterj added a commit that referenced this issue Jun 27, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

[#5388] change echo and print in examples

This is a split of #5388 for the 2.3 branch.

Original description:

 > | Q             | A
 > | ------------- | ---
 > | Doc fix?      | yes
 > | New docs?     | no
 > | Applies to    | all
 > | Fixed tickets | #5177
 >
 > Original PR and discussion in #5285
 >
 > Change echo/print in examples to use:
 >
 > - `var_dump()` in components docs
 > - `dump()` in framework docs

Commits
-------

37db975 5177 use var_dump() in components
9fa1c11 5177 use var_dump() in components
c2acbee 5177 add die() after dump()
78c9b7c 5177 use dump() instead of print in examples
10898c9 5177 use dump() instead of echo in examples
wouterj added a commit that referenced this issue Jun 27, 2015
This PR was merged into the 2.6 branch.

Discussion
----------

[#5388] change echo and print in examples

A split of #5388 for the changes in the 2.6 branch.

Original description:

 > | Q             | A
 > | ------------- | ---
 > | Doc fix?      | yes
 > | New docs?     | no
 > | Applies to    | all
 > | Fixed tickets | #5177
 >
 > Original PR and discussion in #5285
 >
 > Change echo/print in examples to use:
 >
 > - `var_dump()` in components docs
 > - `dump()` in framework docs

Commits
-------

5c63064 5177 fix leftover dump()
ac4e02e 5177 use var_dump() in components
00a522b 5177 use dump() instead of echo in examples
@wouterj wouterj closed this as completed Jun 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. good first issue Ideal for your first contribution! (some Symfony experience may be required) hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

2 participants