leek/git-debug-bundle

此包已被废弃,不再维护。未建议替代包。

为 Symfony2 调试工具栏添加有用的 Git 信息

安装次数: 17,157

依赖者: 1

建议者: 0

安全性: 0

星标: 23

关注者: 3

分支: 6

公开问题: 1

类型:symfony-bundle

0.1.5 2012-01-31 19:39 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:20:07 UTC


README

向 Symfony2 调试工具栏添加有用的 Git 信息。

Symfony 2.1 中工具栏中的当前分支

Example Toolbar

菜单中的分支列表

Example Menu #1

菜单中的标签列表

Example Menu #2

安装 (仅限 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