kujaff / sf2scripts

SF2 脚本

该软件包的官方仓库似乎已消失,因此该软件包已被冻结。

安装次数: 9,078

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放性问题: 0

语言:Shell

类型:脚本

1.2.0 2015-05-09 09:38 UTC

This package is auto-updated.

Last update: 2023-04-28 09:04:01 UTC


README

Total Downloads

sf2scripts

Symfony2 脚本

安装

Composer

# composer.json
{
    "require": {
        "kujaff/sf2scripts": "1.2.*",
    }
}

使用

主要脚本为 scripts.sh,您可以直接调用它

./vendor/kujaff/sf2scripts/scripts.sh

参数

-env=[dev|prod|yourEnv]
    symfony2 environment (most os the time dev or prod)
    default : dev

-confirm=[true|false]
    if you are on master branch, confirm parameter indicate if you to confirm script excution

-scripts=script1,script2,console:mySF2Command
    scripts to execute, can call SF2 console command with "console:" prefix
    default : dirs,cache,pull,composerinstall,schema

-webserver-user=www-data
    username of webserver (apache, nginx, etc)
    default : www-data

可用的脚本

每个脚本都接受 -webserver-user 参数。

cache
    Delete everything in app/cache

composerinstall
    Execute composer install, with --no-dev parameter if -env=prod

composerinstall
    Execute composer install, with --no-dev parameter if -env=prod

csfixer
    Execute php-cs-fixer.phar with SF2 php syntax

dirs
    Create app/cache and app/logs, and set credentials (setfacl or chmod 777)

doctrinecache
    Clear doctrine cache

pull
    Execute git pull

schema
    Update database, with SF2 command "doctrine:schema:update --force"