kujaff/sf2scripts

Scripts for SF2

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 9 078

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:Shell

Type:scripts

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

Scripts for Symfony2

Installation

Composer :

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

Utilisation

Main script is scripts.sh, you can call simply call it :

./vendor/kujaff/sf2scripts/scripts.sh

Parameters :

-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

Availables scripts

Each scripts accept -webserver-user parameter.

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"