Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Symfony 2.0.x with composer

View buildBootstrap.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/sh
 
cd `dirname $0`
if [ -d "../vendor/symfony/symfony" ]; then
cd "../"
fi
 
ROOT=`pwd`
 
cd vendor/symfony && ln -s symfony/src
cd "$ROOT"
php vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php . || exit 1
php app/console assets:install web/ || exit 1
php app/console cache:clear --no-warmup || exit 1
rm vendor/symfony/src || exit 1
View buildBootstrap.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
{
"name": "symfony/framework-standard-edition",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.2",
"symfony/symfony": "v2.0.12",
"doctrine/orm": "2.1.6",
"doctrine/doctrine-migrations-bundle": "dev-master",
"twig/extensions": "dev-master",
"symfony/assetic-bundle": "2.0.x-dev",
"symfony/swiftmailer-bundle": "v2.0.12",
"symfony/monolog-bundle": "v2.0.12",
"swiftmailer/swiftmailer": "4.1.5",
"sensio/distribution-bundle": "2.0.x-dev",
"sensio/framework-extra-bundle": "2.0.x-dev",
"sensio/generator-bundle": "2.0.x-dev",
"jms/security-extra-bundle": "1.1.0",
"jms/di-extra-bundle": "1.0.1"
},
"scripts": {
"post-install-cmd": [
],
"post-update-cmd": [
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web"
}
}
View buildBootstrap.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Index: app/config/config.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/config/config.yml (date 1335352203000)
+++ app/config/config.yml (revision )
@@ -12,8 +12,8 @@
csrf_protection: true
validation: { enable_annotations: true }
templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
- default_locale: %locale%
session:
+ default_locale: %locale%
auto_start: true
# Twig Configuration
@@ -55,4 +55,3 @@
host: %mailer_host%
username: %mailer_user%
password: %mailer_password%
- spool: { type: memory }
Index: app/config/security.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/config/security.yml (date 1335352203000)
+++ app/config/security.yml (revision )
@@ -12,10 +12,9 @@
providers:
in_memory:
- memory:
- users:
- user: { password: userpass, roles: [ 'ROLE_USER' ] }
- admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
+ users:
+ user: { password: userpass, roles: [ 'ROLE_USER' ] }
+ admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
firewalls:
dev:
Index: app/AppKernel.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/AppKernel.php (date 1335352203000)
+++ app/AppKernel.php (revision )
@@ -14,7 +14,7 @@
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
- new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
+ new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new JMS\AopBundle\JMSAopBundle(),
new JMS\DiExtraBundle\JMSDiExtraBundle($this),
Owner
snc commented

Usage

I hope this snippets can help you if you want to use composer and Symfony2 v2.0.x

1) Clone symfony-standard

Yes, we want the master branch!

git clone http://github.com/symfony/symfony-standard.git
cd symfony-standard
rm -rf .git

2) Replace composer.json

Simply replace the composer.json with the one from the gist.

3) Save the buildBootstrap.sh

The buildBootstrap.sh script runs the tasks from the old bin/vendors script. Simply save the file from the gist.

4) Install vendor libraries

php composer.phar update

5) Apply patch

This step fixes some BC issues. You have to save the diff.patch from the gist.

patch -p0 < diff.patch

6) Create bootstrap.php.cache etc.

sh buildBootstrap.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.