Skip to content
Browse files

Use autogenerated autoloader

  • Loading branch information...
1 parent d8f4194 commit 67a70f98f73cc5c7f2af016f0518b247c33279ca @edorian committed Jan 14, 2012
Showing with 5 additions and 17 deletions.
  1. +2 −1 composer.json
  2. +3 −1 source/bootstrap.php
  3. +0 −15 source/sf_autoload.php
View
3 composer.json
@@ -1,6 +1,7 @@
{
"require": {
"symfony/class-loader": "2.1.*",
- "symfony/http-foundation": "2.1.*"
+ "symfony/http-foundation": "2.1.*",
+ "symfony/routing": "2.1.*"
}
}
View
4 source/bootstrap.php
@@ -1,3 +1,5 @@
<?php
-require __DIR__ . '/sf_autoload.php';
+// It feels quite strange to use that autoload scaffoling that is not in version control..
+// I wonder how deployments of this work.. well packing up a working build includes this so all is fine :)
+require_once __DIR__.'/../vendor/.composer/autoload.php';
View
15 source/sf_autoload.php
@@ -1,15 +0,0 @@
-<?php
-
-// Isn't here a less painful way to do this? It so archance and wasteful... Well here we go:
-// Using the scaffolding in vendor/.composer/autoload.php doesn't seem like an option
-
-// Magic global stuff!
-require_once __DIR__.'/../vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-$loader = new UniversalClassLoader();
-$loader->register();
-
-// Do i need to this every time I add something to vendor?
-$loader->registerNamespace('Symfony\\Component\\HttpFoundation', __DIR__.'/../vendor/symfony/http-foundation');
-
-

0 comments on commit 67a70f9

Please sign in to comment.
Something went wrong with that request. Please try again.