leaseweb/automatic-update-bundle

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

启用从 Web 调试工具栏自动更新应用程序。

安装: 313

依赖项: 0

建议者: 0

安全: 0

星标: 10

关注者: 12

分支: 1

开放问题: 0

类型:symfony-bundle

v1.0.3 2014-12-16 22:14 UTC

This package is not auto-updated.

Last update: 2020-10-30 18:52:57 UTC


README

此存储库不再被积极维护。我们鼓励您不要使用此代码。如果您依赖此代码,您可能想要分支存储库以防止系统崩溃,如果我们在将来删除此存储库。

LswAutomaticUpdateBundle

screenshot

Symfony2 包,允许通过 Web 调试工具栏自动更新应用程序。

screenshot

安装

安装分为4个简单步骤。

步骤1:使用 composer 下载 LswAutomaticUpdateBundle

在您的 composer.json 中添加 LswAutomaticUpdateBundle

{
    "require": {
        "leaseweb/automatic-update-bundle": "*",
        ...
    }
}

现在,通过运行以下命令让 composer 下载包

$ php composer.phar update leaseweb/automatic-update-bundle

Composer 会将包安装到您的项目的 vendor/leaseweb 目录中。

步骤2:启用包

在内核中启用包

<?php
// app/AppKernel.php

public function registerBundles()
{
    ...

    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        ...
        $bundles[] = new Lsw\AutomaticUpdateBundle\LswAutomaticUpdateBundle();
    }

}

步骤3:添加支持自动更新的路由

将以下行添加到 app/config/routing_dev.yml

automatic_update:
    resource: "@LswAutomaticUpdateBundle/Resources/config/routing/update.yml"

步骤4:允许访问自动更新操作

将以下行添加到 app/config/security.yml

automatic_update:
    pattern: ^/update/
    security: false

配置

parameters.yml 中,您可以指定以下内容

parameters:
    automatic_update.options:
        secret: "SomeVerySecretPassword"
        dry_run_commands:
            - "svn status -u"
            - "php composer.phar update --dry-run --ansi"
            - "app/console doctrine:schema:update --dump-sql"
        execute_commands:
            - "svn up"
            - "php composer.phar update --ansi"
            - "app/console doctrine:schema:update --force"

注意:您可能需要运行 'apache2-mpm-itk' 以使您的网站能够以普通用户身份运行,而不是以 'www-data' 身份运行,因为这将简化文件权限管理。

许可证

此包在 MIT 许可证下。

Web 调试工具栏中的“循环箭头”图标是 Picas 图标集的一部分(官方网站:http://www.picasicons.com)。该图标受许可保护,只能用于在 Symfony2 Web 调试工具栏中标识 LswAutomaticUpdateBundle。此图标的全部所有权和版权均为 Rok Benedik 所有。