Browse Source

Update to Symfony2.0.0

Jordi Boggiano 13 years ago
parent
commit
26d044d290
4 changed files with 50 additions and 25 deletions
  1. 15 8
      app/autoload.php
  2. 15 3
      deps
  3. 15 14
      deps.lock
  4. 5 0
      src/Packagist/WebBundle/Form/PackageType.php

+ 15 - 8
app/autoload.php

@@ -1,34 +1,41 @@
 <?php
 
 use Symfony\Component\ClassLoader\UniversalClassLoader;
+use Doctrine\Common\Annotations\AnnotationRegistry;
 
 $loader = new UniversalClassLoader();
 $loader->registerNamespaces(array(
     'Symfony'          => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
     'Sensio'           => __DIR__.'/../vendor/bundles',
     'JMS'              => __DIR__.'/../vendor/bundles',
-    'FOS'              => __DIR__.'/../vendor/bundles',
     'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
     'Doctrine\\DBAL'   => __DIR__.'/../vendor/doctrine-dbal/lib',
     'Doctrine'         => __DIR__.'/../vendor/doctrine/lib',
     'Monolog'          => __DIR__.'/../vendor/monolog/src',
     'Assetic'          => __DIR__.'/../vendor/assetic/src',
     'Metadata'         => __DIR__.'/../vendor/metadata/src',
+    'FOS'              => __DIR__.'/../vendor/bundles',
     'Packagist'        => __DIR__.'/../src',
 ));
 $loader->registerPrefixes(array(
     'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
     'Twig_'            => __DIR__.'/../vendor/twig/lib',
 ));
-$loader->registerPrefixFallbacks(array(
-    __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs',
-));
+
+// intl
+if (!function_exists('intl_get_error_code')) {
+    require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
+
+    $loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
+}
+
 $loader->registerNamespaceFallbacks(array(
     __DIR__.'/../src',
 ));
 $loader->register();
 
-// Swiftmailer needs a special autoloader to allow
-// the lazy loading of the init file (which is expensive)
-require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
-Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');
+AnnotationRegistry::registerLoader(function($class) use ($loader) {
+    $loader->loadClass($class);
+    return class_exists($class, false);
+});
+AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');

+ 15 - 3
deps

@@ -1,34 +1,41 @@
 [symfony]
     git=http://github.com/symfony/symfony.git
+    version=v2.0.0
 
 [twig]
     git=http://github.com/fabpot/Twig.git
+    version=v1.1.1
 
 [monolog]
     git=http://github.com/Seldaek/monolog.git
+    version=1.0.0
 
 [doctrine-common]
     git=http://github.com/doctrine/common.git
-    version=origin/3.0.x
+    version=2.1.0
 
 [doctrine-dbal]
     git=http://github.com/doctrine/dbal.git
+    version=2.1.0
 
 [doctrine]
     git=http://github.com/doctrine/doctrine2.git
+    version=2.1.0
 
 [swiftmailer]
     git=http://github.com/swiftmailer/swiftmailer.git
-    version=origin/4.1
+    version=v4.1.0
 
 [assetic]
     git=http://github.com/kriswallsmith/assetic.git
+    version=v1.0.1
 
 [twig-extensions]
     git=http://github.com/fabpot/Twig-extensions.git
 
 [metadata]
     git=http://github.com/schmittjoh/metadata.git
+    version=1.0.0
 
 [SensioFrameworkExtraBundle]
     git=http://github.com/sensio/SensioFrameworkExtraBundle.git
@@ -42,10 +49,15 @@
     git=http://github.com/sensio/SensioDistributionBundle.git
     target=/bundles/Sensio/Bundle/DistributionBundle
 
+[SensioGeneratorBundle]
+    git=http://github.com/sensio/SensioGeneratorBundle.git
+    target=/bundles/Sensio/Bundle/GeneratorBundle
+
 [AsseticBundle]
     git=http://github.com/symfony/AsseticBundle.git
     target=/bundles/Symfony/Bundle/AsseticBundle
-    
+    version=v1.0.0RC2
+
 [FOSUserBundle]
     git=git://github.com/FriendsOfSymfony/FOSUserBundle.git
     target=/bundles/FOS/UserBundle

+ 15 - 14
deps.lock

@@ -1,15 +1,16 @@
-symfony a724774fc003cc5df8e23f88812f25042088344b
-twig 661e9c7ad2820e881c93474f2fbcbe2661fd1970
-monolog 66c1cc05a8e00fb5d4dbf540dba12b5727564d33
-doctrine-common 0ba250a785178d7cdb579ce82151731c04849abf
-doctrine-dbal b59ccaf3b24b93846f227253d44084094a3d8b61
-doctrine 0f68355ce094d81d9f7727eb385ae1dfe2e08c8d
-swiftmailer 3304927fe86466534a4a3e14a4741bda64a0eaef
-assetic 50d4b959d713f7544dc98e36bc181631aca034a0
+symfony c3ebdbf9cceddb82cd2089aaef8c7b992e536363
+twig 94ac20f1553d945c2c224d19d9d28e85ec14372b
+monolog 433b98d4218c181bae01865901aac045585e8a1a
+doctrine-common 40f1bf16e84ddc5291a6a63aa00b9879c40e3500
+doctrine-dbal 0127ee98a4301f2f6e3463c824adc3a3687f901f
+doctrine dfdb7353065407afc997956e23f3a44ec3effd72
+swiftmailer c53c8c1ab88c78c463ba65086d93d00193957e94
+assetic 3333d371c4511abcdec7bad86e15ac2be3b10f03
 twig-extensions 6b0cc16934b6e62ef07c8d2e59f9f13ff3193d3d
-metadata aa04872c6f0e2b32128b62dd075e8cf97a8d93da
-SensioFrameworkExtraBundle 414c0812bf941811791f8a1efd4ccd25e9562406
-JMSSecurityExtraBundle f9fbc5da0d464a3764ef7bf6d7988fbb7b883d6a
-SensioDistributionBundle 868d8db9ca3ae41d5d6e74f3db708eb5970bc478
-AsseticBundle f6ec47d9399459ab7b602fb3737243a0f1fa2f29
-FOSUserBundle 965bcbc6ede30893d4a13bc3614109eff784f4ba
+metadata 8717ad2a5689480765d9ffafe925cd8a2457e582
+SensioFrameworkExtraBundle bced40d4d123f5171f888d6e56bb638b8c2a5e57
+JMSSecurityExtraBundle 936892c9735f76037393639f1410773715bf403c
+SensioDistributionBundle 029151792beac272548fe9df183e15b9be521870
+SensioGeneratorBundle 84c41ef39046ba652c0201c29816a0ff7b23e1f5
+AsseticBundle 9c1b7269a4517d1ae94af2dc0d6d6fc4b31e6c10
+FOSUserBundle 7e6ac80a6bc23d3b1533abf8878d01f67cee44a7

+ 5 - 0
src/Packagist/WebBundle/Form/PackageType.php

@@ -31,4 +31,9 @@ class PackageType extends AbstractType
             'data_class' => 'Packagist\WebBundle\Entity\Package',
         );
     }
+
+    public function getName()
+    {
+        return 'package';
+    }
 }