Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated optimize script for symfony 2.1

  • Loading branch information...
commit c4c3aeebc75af3a7a517182cbe10d61b362fa33c 1 parent 0ac489b
@tucksaun tucksaun authored
Showing with 41 additions and 15 deletions.
  1. +41 −15 optimize.sh
View
56 optimize.sh 100644 → 100755
@@ -11,14 +11,7 @@ git clone http://github.com/symfony/symfony-standard.git .
cat > app/autoload.php <<EOF
<?php
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-
-\$loader = new UniversalClassLoader();
-\$loader->registerNamespaces(array(
- 'Symfony' => __DIR__.'/../vendor/symfony/src',
- 'Acme' => __DIR__.'/../src',
-));
-\$loader->register();
+return require __DIR__.'/../vendor/autoload.php';
EOF
# Remove unneeded vendor bundles
@@ -110,16 +103,49 @@ sed s/Request/ApacheRequest/ web/app.php > tmp
mv tmp web/app.php
# Remove unneeded vendors from dependencies
-cat > deps <<EOF
-[symfony]
- git=http://github.com/symfony/symfony.git
+cat > composer.json <<EOF
+{
+ "name": "symfony/framework-hello-world-edition",
+ "description": "The \"Symfony Hello World Edition\" distribution (to be used for benchmarks)",
+ "autoload": {
+ "psr-0": { "": "src/" }
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/symfony": "@stable",
+ "sensio/distribution-bundle": "@stable"
+ },
+ "replace": {
+ "doctrine/common": "*",
+ "twig/twig": "*"
+ },
+ "scripts": {
+ "post-install-cmd": [
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::buildBootstrap",
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::clearCache",
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::installAssets",
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::installRequirementsFile"
+ ],
+ "post-update-cmd": [
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::buildBootstrap",
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::clearCache",
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::installAssets",
+ "Sensio\\\Bundle\\\DistributionBundle\\\Composer\\\ScriptHandler::installRequirementsFile"
+ ]
+ },
+ "extra": {
+ "symfony-app-dir": "app",
+ "symfony-web-dir": "web"
+ }
+}
+EOF
-[SensioDistributionBundle]
- git=http://github.com/sensio/SensioDistributionBundle.git
- target=/bundles/Sensio/Bundle/DistributionBundle
+cat > composer.lock <<EOF
EOF
+curl -s https://getcomposer.org/installer | php
+
# Install the dependencies:
-./bin/vendors install
+php composer.phar install
# Benchmark!
Please sign in to comment.
Something went wrong with that request. Please try again.