Skip to content

Global dump #4883

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
Jan 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions components/var_dumper/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ current PHP SAPI:
You'll also learn how to change the format or redirect the output to
wherever you want.

.. tip::

In order to have the ``dump()`` function always available when running
any PHP code, you can install it globally on your computer:

#. Run ``composer global require symfony/var-dumper``;
#. Add ``auto_prepend_file = ${HOME}/.composer/vendor/autoload.php``
to your ``php.ini`` file;
Copy link
Member

Choose a reason for hiding this comment

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

Does PHP interpret environment variables in the php.ini file? What happens when the file doesn't exist?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Should we add a warning then? Otherwise, people could get these errors when they execute PHP scripts with different users.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the error message is good enough to not clutter the doc, what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure. Will each and every beginner really understand that a global Composer installation is only global in regard of their user account? We should keep in mind that the web server might not be the same account as the one the developer is using.

#. From time to time, run ``composer global update`` to have the latest
Copy link
Member

Choose a reason for hiding this comment

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

@javiereguiluz and I concluded to put this after the list (not as a list item). If you agree, could you please do that? (I hope it's the last fix, as you've had to push way to many times for a simple tip like this)

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer it with a 3d item (I talked last with @javiereguiluz offline, so I win ;-) )

Copy link
Member

Choose a reason for hiding this comment

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

Okay, you won. 👍 then :)

bug fixes.

DebugBundle and Twig Integration
--------------------------------

Expand Down