1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 13:28:35 +01:00

34 Commits

Author SHA1 Message Date
James Johnston
13993afffe Introduce DebugBarVarDumper for HTML variable dumping (#344)
The Symfony VarDumper component includes an HtmlDumper that dumps
variables in a rich HTML format that allows for expanding and collapsing
individual tree nodes in the dumped variable.  This makes it much more
practical to navigate large/deep variables that have been dumped.

DebugBarVarDumper provides a Debug Bar-friendly wrapper around the
VarDumper component.  It’s intended as a better alternative to
DataFormatter::formatVar.  It provides for:

* Debug Bar-friendly styles for the VarDumper HTML.

* Implements AssetProvider for returning VarDumper static assets
  (requires users of JavascriptRenderer to support inline assets).

* Simplifies VarCloner and HtmlDumper function calls for cloning and
  dumping variables in a Debug Bar environment.  VarDumper was
  originally written/targeted to be a replacement for var_dump, so the
  default behavior of HtmlDumper echoing static assets and variable
  dumps directly to the page output isn’t really appropriate.
  Furthermore, we must contend with several different Symfony versions
  going back to v2.6.0.  This class provides a friendly wrapper.

I have tested this with these Symfony versions:

* v2.6.0
* v2.7.0
* v2.8.0
* v3.0.0
* v3.1.0
* v3.2.0
* v3.3.0

All seem to work fine, with graceful degradation as needed.

Furthermore, the class is ready to take advantage of new features that I
added and are upcoming in Symfony v3.4:

* setMinDepth: https://github.com/symfony/symfony/pull/23515
  This feature will be valuable for the upcoming BacktraceCollector.
2017-07-19 15:29:53 +02:00
James Johnston
e6f0b5a48d Enable AssetProvider to support inline assets (#338)
Add new inline_css, inline_js, and inline_head keys on the
AssetProvider::getAssets() function.  This allows us to support
collectors that require static assets that are not actually saved to a
file.

Then, update all the asset functions in JavascriptRenderer to support
these new keys.

An initial use case for this is supporting the HtmlDumper in Symfony’s
VarDumper.  HtmlDumper only provides the styles and scripts in inline
HTML form.  The static assets can be customized based on some
configuration properties available on the HtmlDumper class.  One can
actually view the CSS/JS as a long PHP string/heredoc embedded in the
HtmlDumper.php source code.  They are only accessible via the
getDumpHeader function, which returns the CSS/JS in a combined HTML
string.
2017-07-15 11:08:32 +02:00
James Johnston
cbdeba00d0 Add option to not immediately show AJAX requests (#315)
By default, the debug bar will immediately show new AJAX requests. If
your page makes a lot of requests in the background (e.g. tracking),
this constant switching of the active data set can be disruptive to the
debug bar user.

This commit adds an option for disabling this behavior by calling
setAjaxHandlerAutoShow(false) on the JavascriptRenderer, like this:

    $renderer = $debugbar->getJavascriptRenderer();
    $renderer->setAjaxHandlerAutoShow(false);

When this behavior is disabled, AJAX requests are still available in the
drop-down list, but won’t become active until the user explicitly
selects them.
2017-03-05 08:17:18 +01:00
Steve Pavarno
cea4d73dd3 Update docs for PDOConnector (#305)
see #299
2016-11-28 19:59:25 +01:00
Graham Campbell
0194f85bcf Whitespace cleanup 2014-07-26 12:00:45 +01:00
Dmitry Teslitsky
8d12ad1393 Fix type 2014-05-23 17:36:16 +03:00
maximebf
03af69f8d1 updated docs 2014-03-22 16:12:18 -04:00
maximebf
d076e51b3a renamed DataFormater to DataFormatter (oups!) 2014-03-04 14:18:45 -03:00
maximebf
f1cb4dd80b updated docs and changelog 2014-03-04 14:09:50 -03:00
maximebf
3089d2f750 refactoring and improvements to resizing and responsivity
debugbar header is now split in left and right containers for better responsivity
changed the way the indicators position is handled (not a property of the indicator anymore)
moved resize-handle out of body
when closed, the debugbar will always restore to opened state
2014-02-14 12:42:43 -03:00
Graham Campbell
0071105c25 CS fixes 2014-01-16 21:41:41 +00:00
maximebf
3e2a0245e9 typo 2013-10-24 17:24:14 -04:00
nicoder
b5ca8e5ca2 fix typo 2013-10-01 06:10:14 +02:00
maximebf
a13cf14e56 updated docs style 2013-09-28 12:02:40 -04:00
maximebf
8972b82a9a added support for sending the request id in headers and retreiving the data using the open handler 2013-09-23 10:41:54 -04:00
maximebf
821bf57f2d added new storage adapters 2013-09-20 15:46:52 -04:00
maximebf
6330bca1c7 updated docs [ci skip] 2013-09-19 18:05:12 -04:00
maximebf
db8bf5c6a1 added stacked data 2013-09-15 12:56:08 -04:00
maximebf
7fa6b33cc5 added support for sending data through HTTP headers (fixed #18) 2013-09-15 11:29:33 -04:00
Maxime Bouroumeau-Fuseau
279f1bf63f Update bridge_collectors.md 2013-09-10 14:37:17 +02:00
Pascal Borreli
68dfa87ef6 Fixed typos 2013-08-16 00:52:32 +01:00
Maxime Bouroumeau-Fuseau
c7f4e7615c Merge pull request #6 from mikealmond/hotfix/docs-update
Update the base collectors doc to show how to collect multiple PDO connections
2013-08-15 05:12:20 -07:00
Mike Almond
04a2332c69 Update the base collectors doc to show how to collect multiple PDO connections
Updating the docs to reflect the changes in the `PDOCollector` class

Reference maximebf/php-debugbar#5
2013-08-15 08:03:41 -04:00
maximebf
ff4561fef2 updated docs 2013-08-14 22:14:09 +10:00
maximebf
8daa6f8f5a updated docs 2013-08-14 21:37:56 +10:00
maximebf
d40979d6b0 added JavascriptRenderer::getAssets() 2013-08-14 16:54:27 +10:00
maximebf
c11336485b updated docs 2013-08-13 17:29:44 +10:00
maximebf
cb6c767c80 removed dependency on jquery-drag 2013-08-13 16:49:31 +10:00
maximebf
dda267ebd1 updated docs and README 2013-08-13 12:29:40 +10:00
maximebf
4196d76fa4 updated doc 2013-08-12 12:02:32 +10:00
maximebf
7e759ac3df updated doc 2013-08-08 15:46:33 +10:00
maximebf
6d6a63c2af updated docs 2013-06-19 13:15:46 +09:00
maximebf
024b0a04b0 updated docs 2013-06-19 12:05:16 +09:00
maximebf
836050cea5 huge refactoring, comments and docs 2013-06-13 18:49:55 +08:00