Last active
August 29, 2015 14:22
-
-
Save jhKISS/1f186ea9a0b02ec9c4d3 to your computer and use it in GitHub Desktop.
Symfony2 Standard Composer Configuration => https://github.com/jhKISS/hugeHzFiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 2015-05-29 | |
# Symfony 2.3 LTS Standard Installation with Modifications | |
# Requirements | |
# 1. Start this script in the parent folder of $rootPathName. | |
# 2. Choose the value of $rootPathName with PSR in mind. | |
# 3. The composer.json.template should be modified to fit to the current usage. | |
# 4. Composer is globally installed. | |
# 5. The MySQL Database of the new Web Application and the right MySQL User sre created. | |
# Variables | |
rootPathName='' | |
versionLtsString='2.3.*' | |
# Execution | |
installF() { | |
composer create-project symfony/framework-standard-edition ./$rootPathName/ "$versionLtsString" | |
cd $rootPathName; | |
mv composer.json composer.json.bak | |
cp ../composer.json . | |
composer update | |
} | |
main() { | |
installF || exit 1 | |
} | |
main | |
exit 0 | |
#EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VENDOR='' | |
BUNDLE='' | |
DECRIPTION='' | |
NAME='', | |
MAIL='', | |
URLAUTHOR='', | |
URLBUNDLE='' | |
PROJECTROOT='' | |
composer create-project symfony/framework-standard-edition $PROJECTROOT/$BUNDLEBundle "2.3.*" | |
{ | |
"name" : "$VENDOR/$BUNDLE", | |
"license" : "CC-BY-SA-4.0", | |
"type" : "project", | |
"description" : "$DESCRIPTION", | |
"autoload" : { | |
"psr-0" : { | |
"" : [ | |
"app", | |
"src", | |
"vendor", | |
"vendor/composer" | |
], | |
"AppBundle" : [ | |
"src/AppBundle", | |
"vendor/composer" | |
], | |
"@VENDOR/$BUNDLEBundle" : [ | |
"src", | |
"vendor/composer" | |
] | |
}, | |
"psr-4" : { | |
"" : [ | |
"app", | |
"src", | |
"vendor", | |
"vendor/composer" | |
], | |
"AppBundle" : [ | |
"src/AppBundle", | |
"vendor/composer" | |
], | |
"$VENDOR/$BUNDLEBundle" : [ | |
"src", | |
"vendor/composer" | |
] | |
} | |
}, | |
"require" : { | |
"php" : ">=5.3.3", | |
"symfony/symfony" : "2.3.*", | |
"doctrine/orm" : "~2.2,>=2.2.3,<2.5", | |
"doctrine/dbal" : "<2.5", | |
"doctrine/doctrine-bundle" : "~1.2", | |
"twig/extensions" : "1.0.*", | |
"symfony/assetic-bundle" : "~2.3", | |
"symfony/swiftmailer-bundle" : "~2.3", | |
"symfony/monolog-bundle" : "~2.4", | |
"sensio/distribution-bundle" : "~2.3", | |
"sensio/framework-extra-bundle" : "~3.0,>=3.0.2", | |
"sensio/generator-bundle" : "~2.3", | |
"friendsofsymfony/user-bundle": "2.0.*@dev", | |
"incenteev/composer-parameter-handler" : "~2.0" | |
}, | |
"scripts" : { | |
"post-install-cmd" : [ | |
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" | |
], | |
"post-update-cmd" : [ | |
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", | |
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" | |
] | |
}, | |
"config" : { | |
"bin-dir" : "bin", | |
"vendor-dir" : "vendor" | |
}, | |
"minimum-stability" : "stable", | |
"extra" : { | |
"symfony-app-dir" : "app", | |
"symfony-web-dir" : "web", | |
"incenteev-parameters" : { | |
"file" : "app/config/parameters.yml" | |
}, | |
"branch-alias" : { | |
"dev-master" : "2.3-dev" | |
} | |
}, | |
"keywords" : [ | |
"$KEYWORDS" | |
], | |
"authors" : [{ | |
"name" : "$NAME", | |
"email" : "$MAIL", | |
"homepage" : "$URLAUTHOR", | |
"role" : "developer" | |
}], | |
"homepage" : "$URLBUNDLE" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment