leek / git-debug-bundle
此包已被废弃,不再维护。未建议替代包。
为 Symfony2 调试工具栏添加有用的 Git 信息
0.1.5
2012-01-31 19:39 UTC
Requires
- php: >=5.3.2
- symfony/web-profiler-bundle: >=2.0.0
This package is not auto-updated.
Last update: 2022-02-01 12:20:07 UTC
README
向 Symfony2 调试工具栏添加有用的 Git 信息。
Symfony 2.1 中工具栏中的当前分支
菜单中的分支列表
菜单中的标签列表
安装 (仅限 Symfony 2.0.x)
1. 将以下内容添加到您的 deps
文件中
[LeekGitDebugBundle] git=git://github.com/leek/GitDebugBundle.git target=bundles/Leek/GitDebugBundle version=origin/2.0
2. 运行 vendors 安装脚本
php bin/vendors install
3. 将 Leek
命名空间添加到 app/autoload.php
<?php // ... $loader->registerNamespaces(array( // ... 'Leek' => __DIR__.'/../vendor/bundles',
4. 在 app/appKernel.php
中配置该包仅在某些开发或测试环境中加载
<?php // ... if (in_array($this->getEnvironment(), array('dev', 'test'))) { // ... $bundles[] = new Leek\GitDebugBundle\LeekGitDebugBundle();
这样就完成了!现在您应该在调试工具栏上看到当前的 Git 分支。
注意: 还提供了一个
composer.json
文件,如果您喜欢使用 Composer,则require
键为:leek/git-debug-bundle