added documentation for the new Debug component #2479

Merged
merged 1 commit into from Apr 11, 2013

Conversation

Projects
None yet
4 participants
Owner

fabpot commented Apr 7, 2013

Q A
Doc fix? no
New docs? yes (symfony/symfony#7441)
Applies to 2.3+
Fixed tickets n/a

fabpot added a commit to symfony/symfony that referenced this pull request Apr 7, 2013

merged branch fabpot/debug-component (PR #7441)
This PR was merged into the master branch.

Discussion
----------

[Debug] added the component (closes #6828, closes #6834, closes #7330)

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #6828, #6834, #7330
| License       | MIT
| Doc PR        | symfony/symfony-docs#2479

You can use the individual tools, or register them all:

```php
use Symfony\Component\Debug\Debug;

Debug::enable();
```

Changes in Symfony SE: symfony/symfony-standard#523

Commits
-------

f693128 fixed typos
1ab1146 [Debug] fixed minor bugs
daa3a3c [Debug] changed composer to accept more versions
e455269 [Debug] ensured that the Debug tools can only be registered once
946bfb2 [Debug] made the exception handler independant of HttpFoundation
2b305c2 added a main Debug class to ease integration
2ff0927 [Debug] added the component (closes #6828, closes #6834, closes #7330)
components/debug.rst
+ Debug::enable();
+
+The :method:`Symfony\\Component\\Debug\\Debug::enable` method registers an
+error handler and an exception handler. If the Symfony ClassLoader component
@wouterj

wouterj Apr 7, 2013

Member

add some interlinking to the ClassLoader component docs here.

components/debug.rst
+
+.. note::
+
+ If the Symfony HttpFoundation component is available, the handler uses a
@wouterj

wouterj Apr 7, 2013

Member

interlinking here as well

Member

wouterj commented Apr 7, 2013

you forgot to add this article in the map.rst.inc file.

+The Debug Component
+===================
+
+ The Debug Component provides tools to ease debugging PHP code.
@stof

stof Apr 7, 2013

Member

You should add the note saying it is new in 2.3, extracting code from HttpKernel (see how it is done for PropertyAccess)

components/debug.rst
+Read the following sections for more information about the different available
+tools.
+
+.. note::
@stof

stof Apr 7, 2013

Member

I would use caution rather than note

components/debug.rst
+
+The :class:`Symfony\\Component\\Debug\\ErrorHandler` class catches PHP errors
+and converts them to exceptions (of class
+:class:`Symfony\\Component\\Debug\\Exception\\ErrorException` or
@stof

stof Apr 7, 2013

Member

This is wrong. It should :phpclass:ErrorException`` here

components/debug.rst
+
+ The Debug Component provides tools to ease debugging PHP code.
+
+.. versionadded:: 2.2
@stof

stof Apr 7, 2013

Member

2.2 looks wrong

Owner

fabpot commented Apr 7, 2013

everything should be ok now.

+
+The :method:`Symfony\\Component\\Debug\\Debug::enable` method registers an
+error handler and an exception handler. If the :doc:`ClassLoader component
+</components/class_loader>` is available, a special class loader is also
@wouterj

wouterj Apr 7, 2013

Member

I prefer to have rules on 1 line:

[...] If the
:doc:`ClassLoader component </components/class_loader>` is available,
a special [...]
@fabpot

fabpot Apr 11, 2013

Owner

That's not what we are doing elsewhere. I don't format things by hand but via my text editor.

@wouterj

wouterj Apr 11, 2013

Member

It's something I always say on PRs and it's something that's done in all documents as far as I can see.

@fabpot

fabpot Apr 11, 2013

Owner

ok, I will let you reformat what you think is best.

weaverryan added a commit that referenced this pull request Apr 11, 2013

Merge pull request #2479 from fabpot/debug-component
added documentation for the new Debug component

@weaverryan weaverryan merged commit 8c270f7 into symfony:master Apr 11, 2013

weaverryan added a commit that referenced this pull request Apr 11, 2013

@fabpot fabpot deleted the fabpot:debug-component branch Mar 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment