sitetheory / profiler-storage-bundle
Sitetheory ProfilerStorageBundle
0.1.8
2019-05-13 19:51 UTC
Requires
- php: >=5.5.9
- symfony/dependency-injection: >=2.7 <4.0
- symfony/framework-bundle: >=2.7 <4.0
- symfony/yaml: >=2.7 <4.0
Requires (Dev)
- phpunit/phpunit: ~5.5|~5.6|~7.0|~7.1
Suggests
- symfony/web-profiler-bundle: To use the data collector.
README
Sitetheory为Symfony 2.8+提供的Profiler Storage Bundle
包信息
代码审查
Travis CI
Scrutinizer
概述
我们将维护以下Profiler绑定,以供未来使用
- MemCache
- MongoDB
- MySQL
- PDO
- Redis
- SQLite
安装
Composer
将此包添加到您的Composer包中,并按照以下配置进行操作。
composer require sitetheory/profiler-storage-bundle
如果您使用MongoDB,还需要添加MongoDB驱动。请参阅官方仓库中的说明: github.com/mongodb/mongo-php-library。
配置
启用Bundle
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Sitetheory\Bundle\ProfilerStorageBundle\SitetheoryProfilerStorageBundle() ); // ... } // ... }
将以下内容添加到您的 config.yml
中,以控制Profiler Storage的位置
Mongo
sitetheory_profiler_storage: profiler: defaultStorage: false class: Sitetheory\Bundle\ProfilerStorageBundle\Profiler\MongoDbProfilerStorage dsn: "mongodb://%user%:%password%@%host%:%port%/%name%/profiler" ttl: 3600
MySQL
sitetheory_profiler_storage: profiler: defaultStorage: false class: Sitetheory\Bundle\ProfilerStorageBundle\Profiler\MysqlProfilerStorage dsn: "mysql:host=%host%;port=%port%;dbname=%name%" username: "%user%" password: "%password%" ttl: 3600