Permalink
Browse files

Removed submodules and added vendors script

  • Loading branch information...
1 parent 5645afb commit 75689a760d168a71d21465627178ff6a3a2a3cf4 @arghav arghav committed Aug 6, 2011
Showing with 322 additions and 181 deletions.
  1. +0 −135 .gitmodules
  2. +2 −2 app/bootstrap.php.cache
  3. +127 −0 bin/vendors
  4. +153 −0 deps
  5. +40 −0 deps.lock
  6. +0 −1 vendor/Zend/Http
  7. +0 −1 vendor/Zend/Tool
  8. +0 −1 vendor/Zend/Uri
  9. +0 −1 vendor/Zend/Validator
  10. +0 −1 vendor/assetic
  11. +0 −1 vendor/behat/behat
  12. +0 −1 vendor/behat/gherkin
  13. +0 −1 vendor/behat/mink
  14. +0 −1 vendor/bundles/Avalanche/Bundle/ImagineBundle
  15. +0 −1 vendor/bundles/Behat/BehatBundle
  16. +0 −1 vendor/bundles/Behat/MinkBundle
  17. +0 −1 vendor/bundles/FOS/RestBundle
  18. +0 −1 vendor/bundles/FOS/UserBundle
  19. +0 −1 vendor/bundles/JMS/SecurityExtraBundle
  20. +0 −1 vendor/bundles/Knp/Bundle/MenuBundle
  21. +0 −1 vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
  22. +0 −1 vendor/bundles/Sensio/Bundle/GeneratorBundle
  23. +0 −1 vendor/bundles/Sonata/AdminBundle
  24. +0 −1 vendor/bundles/Sonata/BluePrintBundle
  25. +0 −1 vendor/bundles/Sonata/jQueryBundle
  26. +0 −1 vendor/bundles/Stof/DoctrineExtensionsBundle
  27. +0 −1 vendor/bundles/Symfony/Bundle/AsseticBundle
  28. +0 −1 vendor/bundles/Symfony/Bundle/DoctrineFixturesBundle
  29. +0 −1 vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle
  30. +0 −1 vendor/bundles/Symfony/Bundle/DoctrineMongoDBBundle
  31. +0 −1 vendor/bundles/WhiteOctober/PagerfantaBundle
  32. +0 −1 vendor/doctrine
  33. +0 −1 vendor/doctrine-common
  34. +0 −1 vendor/doctrine-data-fixtures
  35. +0 −1 vendor/doctrine-dbal
  36. +0 −1 vendor/doctrine-migrations
  37. +0 −1 vendor/doctrine-mongodb
  38. +0 −1 vendor/doctrine-mongodb-odm
  39. +0 −1 vendor/gedmo-doctrine-extensions
  40. +0 −1 vendor/goutte
  41. +0 −1 vendor/imagine
  42. +0 −1 vendor/metadata
  43. +0 −1 vendor/monolog
  44. +0 −1 vendor/pagerfanta
  45. +0 −1 vendor/swiftmailer
  46. +0 −1 vendor/symfony
  47. +0 −1 vendor/twig
  48. +0 −1 vendor/twig-extensions
  49. +0 −1 vendor/zend-registry
View
@@ -1,135 +0,0 @@
-[submodule "vendor/symfony"]
- path = vendor/symfony
- url = http://github.com/symfony/symfony.git
-[submodule "vendor/twig"]
- path = vendor/twig
- url = http://github.com/fabpot/Twig.git
-[submodule "vendor/twig-extensions"]
- path = vendor/twig-extensions
- url = http://github.com/fabpot/Twig-extensions.git
-[submodule "vendor/monolog"]
- path = vendor/monolog
- url = http://github.com/Seldaek/monolog.git
-[submodule "vendor/doctrine-common"]
- path = vendor/doctrine-common
- url = http://github.com/doctrine/common.git
-[submodule "vendor/doctrine-dbal"]
- path = vendor/doctrine-dbal
- url = http://github.com/doctrine/dbal.git
-[submodule "vendor/doctrine"]
- path = vendor/doctrine
- url = http://github.com/doctrine/doctrine2.git
-[submodule "vendor/swiftmailer"]
- path = vendor/swiftmailer
- url = http://github.com/swiftmailer/swiftmailer.git
-[submodule "vendor/assetic"]
- path = vendor/assetic
- url = http://github.com/kriswallsmith/assetic.git
-[submodule "vendor/metadata"]
- path = vendor/metadata
- url = http://github.com/schmittjoh/metadata.git
-[submodule "vendor/bundles/Sensio/Bundle/FrameworkExtraBundle"]
- path = vendor/bundles/Sensio/Bundle/FrameworkExtraBundle
- url = http://github.com/sensio/SensioFrameworkExtraBundle.git
-[submodule "vendor/bundles/JMS/SecurityExtraBundle"]
- path = vendor/bundles/JMS/SecurityExtraBundle
- url = http://github.com/schmittjoh/JMSSecurityExtraBundle.git
-[submodule "vendor/bundles/Sensio/Bundle/GeneratorBundle"]
- path = vendor/bundles/Sensio/Bundle/GeneratorBundle
- url = http://github.com/sensio/SensioGeneratorBundle.git
-[submodule "vendor/bundles/Symfony/Bundle/AsseticBundle"]
- path = vendor/bundles/Symfony/Bundle/AsseticBundle
- url = http://github.com/symfony/AsseticBundle.git
-[submodule "vendor/bundles/Knplabs/Bundle/MenuBundle"]
- path = vendor/bundles/Knplabs/Bundle/MenuBundle
- url = http://github.com/knplabs/MenuBundle.git
-[submodule "vendor/imagine"]
- path = vendor/imagine
- url = http://github.com/avalanche123/Imagine.git
-[submodule "vendor/bundles/Avalanche/Bundle/ImagineBundle"]
- path = vendor/bundles/Avalanche/Bundle/ImagineBundle
- url = http://github.com/avalanche123/AvalancheImagineBundle.git
-[submodule "vendor/behat/behat"]
- path = vendor/behat/behat
- url = http://github.com/Behat/Behat.git
-[submodule "vendor/behat/gherkin"]
- path = vendor/behat/gherkin
- url = http://github.com/Behat/Gherkin.git
-[submodule "vendor/bundles/Behat/BehatBundle"]
- path = vendor/bundles/Behat/BehatBundle
- url = http://github.com/Behat/BehatBundle.git
-[submodule "vendor/behat/mink"]
- path = vendor/behat/mink
- url = http://github.com/Behat/Mink.git
-[submodule "vendor/bundles/Behat/MinkBundle"]
- path = vendor/bundles/Behat/MinkBundle
- url = http://github.com/Behat/MinkBundle.git
-[submodule "vendor/doctrine-data-fixtures"]
- path = vendor/doctrine-data-fixtures
- url = http://github.com/doctrine/data-fixtures.git
-[submodule "vendor/bundles/Symfony/Bundle/DoctrineFixturesBundle"]
- path = vendor/bundles/Symfony/Bundle/DoctrineFixturesBundle
- url = http://github.com/symfony/DoctrineFixturesBundle.git
-[submodule "vendor/doctrine-migrations"]
- path = vendor/doctrine-migrations
- url = http://github.com/doctrine/migrations.git
-[submodule "vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle"]
- path = vendor/bundles/Symfony/Bundle/DoctrineMigrationsBundle
- url = http://github.com/symfony/DoctrineMigrationsBundle.git
-[submodule "vendor/goutte"]
- path = vendor/goutte
- url = http://github.com/fabpot/Goutte.git
-[submodule "vendor/gedmo-doctrine-extensions"]
- path = vendor/gedmo-doctrine-extensions
- url = http://github.com/l3pp4rd/DoctrineExtensions.git
-[submodule "vendor/bundles/Stof/DoctrineExtensionsBundle"]
- path = vendor/bundles/Stof/DoctrineExtensionsBundle
- url = http://github.com/stof/StofDoctrineExtensionsBundle.git
-[submodule "vendor/bundles/Knp/Bundle/MenuBundle"]
- path = vendor/bundles/Knp/Bundle/MenuBundle
- url = git://github.com/knplabs/KnpMenuBundle.git
-[submodule "vendor/Zend/Tool"]
- path = vendor/Zend/Tool
- url = http://github.com/knplabs/zend-tool
-[submodule "vendor/Zend/Validator"]
- path = vendor/Zend/Validator
- url = http://github.com/knplabs/zend-validator.git
-[submodule "vendor/Zend/Uri"]
- path = vendor/Zend/Uri
- url = http://github.com/knplabs/zend-uri.git
-[submodule "vendor/Zend/Http"]
- path = vendor/Zend/Http
- url = http://github.com/knplabs/zend-http.git
-[submodule "vendor/zend-registry"]
- path = vendor/zend-registry
- url = http://github.com/knplabs/zend-registry.git
-[submodule "vendor/bundles/FOS/RestBundle"]
- path = vendor/bundles/FOS/RestBundle
- url = http://github.com/FriendsOfSymfony/FOSRestBundle.git
-[submodule "vendor/pagerfanta"]
- path = vendor/pagerfanta
- url = http://github.com/whiteoctober/Pagerfanta.git
-[submodule "vendor/bundles/WhiteOctober/PagerfantaBundle"]
- path = vendor/bundles/WhiteOctober/PagerfantaBundle
- url = http://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.git
-[submodule "vendor/bundles/Sonata/AdminBundle"]
- path = vendor/bundles/Sonata/AdminBundle
- url = http://github.com/sonata-project/SonataAdminBundle.git
-[submodule "vendor/bundles/Sonata/BluePrintBundle"]
- path = vendor/bundles/Sonata/BluePrintBundle
- url = http://github.com/sonata-project/SonataBluePrintBundle.git
-[submodule "vendor/bundles/Sonata/jQueryBundle"]
- path = vendor/bundles/Sonata/jQueryBundle
- url = http://github.com/sonata-project/SonatajQueryBundle.git
-[submodule "vendor/bundles/FOS/UserBundle"]
- path = vendor/bundles/FOS/UserBundle
- url = http://github.com/FriendsOfSymfony/FOSUserBundle.git
-[submodule "vendor/doctrine-mongodb"]
- path = vendor/doctrine-mongodb
- url = http://github.com/doctrine/mongodb.git
-[submodule "vendor/doctrine-mongodb-odm"]
- path = vendor/doctrine-mongodb-odm
- url = http://github.com/doctrine/mongodb-odm.git
-[submodule "vendor/bundles/Symfony/Bundle/DoctrineMongoDBBundle"]
- path = vendor/bundles/Symfony/Bundle/DoctrineMongoDBBundle
- url = http://github.com/symfony/DoctrineMongoDBBundle.git
View
@@ -456,7 +456,7 @@ abstract class Kernel implements KernelInterface
protected $startTime;
protected $classes;
- const VERSION = '2.0.0-DEV';
+ const VERSION = '2.0.0';
public function __construct($environment, $debug)
@@ -1293,7 +1293,7 @@ abstract class Bundle extends ContainerAware implements BundleInterface
throw new \LogicException(sprintf(
'The extension alias for the default extension of a '.
'bundle must be the underscored version of the '.
- 'bundle name ("%s" vs "%s")',
+ 'bundle name ("%s" instead of "%s")',
$expectedAlias, $extension->getAlias()
));
}
View
@@ -0,0 +1,127 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of the Symfony Standard Edition.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+$rootDir = dirname(__DIR__);
+$vendorDir = $rootDir.'/vendor';
+
+array_shift($argv);
+if (!isset($argv[0])) {
+ exit(<<<EOF
+Symfony2 vendors script management.
+
+Specify a command to run:
+
+ install: install vendors as specified in deps or deps.lock (recommended)
+ update: update vendors to their latest versions (as specified in deps)
+
+
+EOF
+ );
+}
+
+if (!in_array($command = array_shift($argv), array('install', 'update'))) {
+ exit(sprintf("Command \"%s\" does not exist.\n", $command));
+}
+
+/*
+ * Check wether this project is based on the Standard Edition that was
+ * shipped with vendors or not.
+ */
+if (is_dir($vendorDir.'/symfony') && !is_dir($vendorDir.'/symfony/.git') && !in_array('--reinstall', $argv)) {
+ exit(<<<EOF
+Your project seems to be based on a Standard Edition that includes vendors.
+
+Try to run ./bin/vendors install --reinstall
+
+
+EOF
+ );
+}
+
+if (!is_dir($vendorDir)) {
+ mkdir($vendorDir, 0777, true);
+}
+
+// versions
+$versions = array();
+if ('install' === $command && file_exists($rootDir.'/deps.lock')) {
+ foreach (file($rootDir.'/deps.lock', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) as $line) {
+ $parts = array_values(array_filter(explode(' ', $line)));
+ if (2 !== count($parts)) {
+ exit(sprintf('The deps version file is not valid (near "%s")', $line));
+ }
+ $versions[$parts[0]] = $parts[1];
+ }
+}
+
+$newversions = array();
+$deps = parse_ini_file($rootDir.'/deps', true, INI_SCANNER_RAW);
+if (false === $deps) {
+ exit("The deps file is not valid ini syntax. Perhaps missing a trailing newline?\n");
+}
+foreach ($deps as $name => $dep) {
+ $dep = array_map('trim', $dep);
+
+ // revision
+ if (isset($versions[$name])) {
+ $rev = $versions[$name];
+ } else {
+ $rev = isset($dep['version']) ? $dep['version'] : 'origin/HEAD';
+ }
+
+ // install dir
+ $installDir = isset($dep['target']) ? $vendorDir.'/'.$dep['target'] : $vendorDir.'/'.$name;
+ if (in_array('--reinstall', $argv)) {
+ if (PHP_OS == 'WINNT') {
+ system(sprintf('rmdir /S /Q %s', escapeshellarg(realpath($installDir))));
+ } else {
+ system(sprintf('rm -rf %s', escapeshellarg($installDir)));
+ }
+ }
+
+ echo "> Installing/Updating $name\n";
+
+ // url
+ if (!isset($dep['git'])) {
+ exit(sprintf('The "git" value for the "%s" dependency must be set.', $name));
+ }
+ $url = $dep['git'];
+
+ if (!is_dir($installDir)) {
+ system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
+ }
+
+ system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
+
+ if ('update' === $command) {
+ ob_start();
+ system(sprintf('cd %s && git log -n 1 --format=%%H', escapeshellarg($installDir)));
+ $newversions[] = trim($name.' '.ob_get_clean());
+ }
+}
+
+// update?
+if ('update' === $command) {
+ file_put_contents($rootDir.'/deps.lock', implode("\n", $newversions));
+}
+
+// php on windows can't use the shebang line from system()
+$interpreter = PHP_OS == 'WINNT' ? 'php.exe' : '';
+
+// Update the bootstrap files
+system(sprintf('%s %s', $interpreter, escapeshellarg($rootDir.'/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php')));
+
+// Update assets
+system(sprintf('%s %s assets:install %s', $interpreter, escapeshellarg($rootDir.'/app/console'), escapeshellarg($rootDir.'/web/')));
+
+// Remove the cache
+system(sprintf('%s %s cache:clear --no-warmup', $interpreter, escapeshellarg($rootDir.'/app/console')));
Oops, something went wrong.

0 comments on commit 75689a7

Please sign in to comment.