Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tacone/silex-propel-webprofiler
Extending the Silex-WebProfiler to display Propel queries
https://github.com/tacone/silex-propel-webprofiler
Last synced: 7 days ago
JSON representation
Extending the Silex-WebProfiler to display Propel queries
- Host: GitHub
- URL: https://github.com/tacone/silex-propel-webprofiler
- Owner: tacone
- License: mit
- Created: 2013-05-20T21:03:32.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-13T22:24:41.000Z (almost 11 years ago)
- Last Synced: 2024-03-29T15:03:26.447Z (8 months ago)
- Language: PHP
- Size: 151 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Silex-Propel-WebProfiler
========================A Silex Service Provider that lists the DB queries generated by [Propel 1.6.x](http://propelorm.org/ ) in the [Silex Web Profiler](https://github.com/sensiolabs/Silex-WebProfiler) in pretty much the same way the *Symfony Profiler* does in *Symfony Standard Edition*.
## Installation
Add it to your `composer.json`:
```bash
require "tacone/silex-propel-web-profiler": "0.*"
```Update composer:
```bash
php composer.phar update
```Then register it **after Propel and the Silex Web Profiler**:
```php
$app->register(new PropelWebProfilerServiceProvider());
```Point your browser to `/index_dev.php` and you should see Propel in your debug bar.
### Sample registration of all of them:
```php
$app->register(new Propel\Silex\PropelServiceProvider(), array(
'propel.config_file' => __DIR__ . '/../resources/generated/propel-config/propel-conf.php',
'propel.model_path' => __DIR__ . '/',
));if ($app['debug'] && isset($app['cache.path'])) {
$app->register(new ServiceControllerServiceProvider());
$app->register(new WebProfilerServiceProvider(), array(
'profiler.cache_dir' => $app['cache.path'].'/profiler',
));
$app->register(new PropelWebProfilerServiceProvider());
}
```## Notes:
Despite doing my best I could not understand how to fully extract the Propel configuration. Because of that, many `?` will show in the configuration section of the Propel panel. That's perfectly fine. If you know how to get the data, feel free to send me a Pull Request.
*Also note that using the Web Profiler makes Silex very slow.*
## For the lazy
I mantain a fork of the popular Silex Kitchen Sink Edition, with Propel and the Profiler pre-installed [here](https://github.com/tacone/Silex-Propel-WebProfiler).