1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 05:18:32 +01:00

43 Commits

Author SHA1 Message Date
Thiago Guimarães
4048ff47ed Bug fix repead params sql (#387)
* Bug fix repead params sql

* Fix array

* Fix array
2018-05-19 19:41:13 +02:00
Noah Heck
3f311533b5 Traced statement interpolation fixes (#381)
* Prevent back reference issues in TracedStatement

* Prevent substring replacement

If a previously replaced value in the query string contains the placeholder
for a future replacement, the string inside was being replaced
Also, PHP allows the bindParameter syntax to omit the leading ':', so we
test to make sure it's there and add it if not
2018-04-16 21:36:29 +02:00
Thiago Guimarães
3e3dad6f9a Bugfix getSqlWithParams ReplacementParamsQuery (#351)
* Bugfix getSqlWithParams ReplacementParamsQuery

* backward compatibility
2017-08-14 10:46:50 +02:00
James Johnston
35fa8abe90 Use new HtmlVariableListWidget with collectors (#346)
Introduce a new HtmlVariableListWidget that is similar to
VariableListWidget but for variables with HTML contents.

Update the collectors that use the existing VariableListWidget to use
DebugBarVarDumper to dump the variables using the VarDumper HtmlDumper.
Because many debug bar users may not yet support inline static assets,
default to use the old VariableListWidget for now.

Updated collectors:

* ConfigCollector
* RequestDataCollector
2017-07-21 13:35:58 +02:00
James Johnston
54214dadb6 Update MessagesCollector to support HTML var dumping (#345)
Use the new DebugBarVarDumper class to support dumping variables in
interactive collapsible HTML; the new useHtmlVarDumper() function will
enable this.

Since this will require users to handle the new inline assets provided
by the JavascriptRenderer, make this dumping format optional and default
to the old behavior for now.
2017-07-21 13:35:32 +02:00
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
Mike Darwish
b1f5e65c3b Added support for negative numbers in DataFormatter::formatBytes() 2016-03-17 11:31:17 -04:00
Big_Shark
6266264bcc Added propel2 collector and tests 2015-08-26 00:38:57 +07:00
Barry vd. Heuvel
957c873543 Merge pull request #179 from maximebf/vardumper
User VarDumper component as DataFormatter
2014-11-29 13:18:24 +01:00
Barry vd. Heuvel
a01819af85 User VarDumper component
Use the VarDumper component instead of the kintLite method.
2014-11-29 12:35:43 +01:00
Andreas Lutro
196a11203b allow disabling of specific vendor assets 2014-11-23 09:22:39 +01:00
Barry vd. Heuvel
0447abd246 Extend TimeData widget/collector
Add params + collector name. Make params expend on click.
2014-10-30 16:40:31 +01:00
Graham Campbell
cda9eee5ea Fixed the tests 2014-10-27 16:08:39 +00:00
Barry vd. Heuvel
306c9920b3 Fix tests with assertTag
assertTag is deprecated and throws an deprecated message, failing the tests.
Replaced it with a simple Contains assertion.
2014-08-15 14:22:06 +02:00
maximebf
4a660ced6f moved the call to jquery.noConflict() to the head rather than when calling render() (fixed #127) 2014-07-26 15:36:58 +02:00
Graham Campbell
0194f85bcf Whitespace cleanup 2014-07-26 12:00:45 +01:00
maximebf
323415ca3f added syntax highlighting (fixed #99) 2014-03-22 22:29:09 -04:00
maximebf
6e521e3990 added AssetProvider interface and JavascriptRenderer::addAssets() 2014-03-22 15:54:52 -04:00
maximebf
d076e51b3a renamed DataFormater to DataFormatter (oups!) 2014-03-04 14:18:45 -03:00
maximebf
cae98bc37a added DataFormater and now using kint to format variables (fixed #93 and #95) 2014-03-04 13:56:20 -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
89ad71ab18 Test tweak 2014-01-17 19:58:09 +00:00
Graham Campbell
0071105c25 CS fixes 2014-01-16 21:41:41 +00:00
GuimDev
20051093ad Small change for responsive CSS
Update full_init.html, javascript : rename function and variable.
2013-12-27 09:33:05 +01:00
Maxime Fabre
b8bd80b367 Update tests 2013-12-17 12:53:18 +01:00
maximebf
85fc816102 fixed failing test 2013-10-07 10:49:52 -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
3c5e8cca50 added getDataAsHeaders() 2013-09-20 13:42:12 -04:00
maximebf
1b7e7fdbc8 jQuery.noConflict() is now called by default (fixed #29)
Will not be called if the js vendors are not included.
Can be enabled/disabled using JavascriptRenderer::setEnableJqueryNoConflict()
2013-09-19 16:31:50 -04:00
maximebf
7e81754ef6 Added abstraction for HTTP features (fixed #28) 2013-09-19 16:31:00 -04:00
maximebf
861ddc302e removed usage of session_status() 2013-09-15 13:06:20 -04:00
maximebf
db8bf5c6a1 added stacked data 2013-09-15 12:56:08 -04:00
maximebf
90248ebb3c fixed unit tests with ajax handler 2013-09-15 11:40:37 -04:00
Pascal Borreli
68dfa87ef6 Fixed typos 2013-08-16 00:52:32 +01:00
maximebf
8fde2e9a0f added tests 2013-08-14 22:22:07 +10:00
maximebf
c5a145ad14 added tests 2013-08-14 22:12:33 +10:00
maximebf
fb1605e93c added unit tests 2013-08-14 21:37:24 +10:00
maximebf
214c62bd85 MessagesCollector is now compatible with PSR Log
added psr as requirement
2013-06-18 14:39:48 +09:00
maximebf
836050cea5 huge refactoring, comments and docs 2013-06-13 18:49:55 +08:00
maximebf
b543d2a3d4 first commit 2013-06-08 01:32:10 +07:00