drKintPlugin
1.0.2stable
for sf 1.4sf 1.3sf 1.2 MIT
Basic Symfony integration of Kint (http://code.google.com/p/kint/)
Developers
License
License for drKintPlugin:
Copyright (c) 2011 Driebit BV, Amsterdam, The Netherlands
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
License for Kint software (http://code.google.com/p/kint/)
http://www.opensource.org/licenses/mit-license.php
Releases for sf 1.4
| Version |
License |
API |
Released |
|
1.0.2stable
|
MIT license |
0.3stable
|
09/02/2011 |
|
1.0.1stable
|
MIT license |
0.2stable
|
31/01/2011 |
Releases for sf 1.3
| Version |
License |
API |
Released |
|
1.0.2stable
|
MIT license |
0.3stable
|
09/02/2011 |
|
1.0.1stable
|
MIT license |
0.2stable
|
31/01/2011 |
Releases for sf 1.2
| Version |
License |
API |
Released |
|
1.0.2stable
|
MIT license |
0.3stable
|
09/02/2011 |
|
1.0.1stable
|
MIT license |
0.2stable
|
31/01/2011 |
Changelog for release 1.0.2 - 09/02/2011
Other releases
Release 1.0.2 - 09/02/2011
Release 1.0.1 - 31/01/2011
Fixed a bug in configuration
drKintPlugin
This plugin provides a very basic integration of the Kint debugging tool (see the Kint project's website) in your Symfony project.
Installation and configuration
- Download the plugin and copy it to your project's plugins directory.
- Enable the plugin in your
ProjectConfiguration class (/config/ProjectConfiguration.class.php).
Usage
The trace and variable dump functions as provided by Kint are by default available in your project (as helper functions).
To dump a variable:
Kint::dump($variable1,$variable2);
// or simply
d($variable1,$variable2); //alias of Kint::dump()
There is often a need to halt execution after dumping a particular variable:
dd($variable); // execution will stop after this statement
To print out variable information in simple text use:
s($variable); // stands for "simple"
// or, as before
sd($variable); // this will halt execution after displaying data
See also the Kint project's website for more examples.
Configuration
In your app.yml file, the following settings may be added (the settings below are the defaults):
all:
kint:
enabled: true
max_str_length: 60
max_levels: 5
skin: kint.css
Updating the Kint core files
For Kint to work as part of a Symfony plugin, I had to take the following steps:
- Rename
kint.class.php to Kint.class.php
- Move the helper functions in this file to the file
lib/helper/KintHelper.php
- Change the first argument of the
call_user_func in the helper functions to 'Kint'
- Move initialization of global settings to
config/drKintPluginConfiguration.class.php
Whenever a new version of Kint is released, you should repeat these steps to make Kint work again.