Permalink
Browse files

Create composer support

  • Loading branch information...
1 parent de8e031 commit 2922c8ec9de0835ac9e9d7d47f4052743c41956f @Baachi Baachi committed May 11, 2012
Showing with 26 additions and 30 deletions.
  1. +1 −10 .gitignore
  2. +20 −0 composer.json
  3. +5 −20 tests/bootstrap.php
View
@@ -1,11 +1,2 @@
-.settings/
-.buildpath
-.project
-.gitmodules
-.idea
phpunit.xml
-run.php
-lib/vendor/doctrine-common
-lib/vendor/Buzz
-lib/vendor/doctrine-mongodb-odm
-lib/vendor/doctrine-mongodb
+vendor/
View
@@ -0,0 +1,20 @@
+{
+ "name": "doctrine/search",
+ "description": "Search",
+ "keywords": ["search", "lucene"],
+ "homepage": "https://github.com/doctrine/search",
+ "type": "library",
+ "licence": "LGPL",
+
+ "require": {
+ "php": ">=5.3.2",
+ "kriswallsmith/buzz": "dev-master",
+ "doctrine/common": "dev-master",
+ "doctrine/mongodb-odm": "dev-master"
+ },
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Search": "lib/"
+ }
+ }
+}
View
@@ -1,27 +1,12 @@
<?php
-//require_once __DIR__ . '/../lib/vendor/Buzz/lib/Buzz/ClassLoader.php';
-require_once __DIR__ . '/../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
+$loader = require_once __DIR__.'/../vendor/autoload.php';
+
+$loader->add('Unit\\Doctrine\\Search', __DIR__);
+$loader->add('Doctrine\\ODM\\MongoDB\\Tests', __DIR__.'/../vendor/doctrine/mongodb-odm/tests');
// use statements
-use Doctrine\Common\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
-//use Buzz\ClassLoader as BuzzAutoloader;
-$loader = new ClassLoader('Buzz', __DIR__ . '/../lib/vendor/Buzz/lib');
-$loader->register();
-$loader = new ClassLoader('Doctrine\\Common', __DIR__ . '/../lib/vendor/doctrine-common/lib');
-$loader->register();
-$loader = new ClassLoader('Doctrine\\Search', __DIR__ . '/../lib');
-$loader->register();
-$loader = new ClassLoader('Unit\\Doctrine\\Search', __DIR__ . '/');
-$loader->register();
-$loader = new ClassLoader('Doctrine\\ODM\\MongoDB\\Tests', __DIR__ . '/../lib/vendor/doctrine-mongodb-odm/tests');
-$loader->register();
-$loader = new ClassLoader('Doctrine\\ODM\\MongoDB', __DIR__ . '/../lib/vendor/doctrine-mongodb-odm/lib');
-$loader->register();
-$loader = new ClassLoader('Doctrine\\MongoDB', __DIR__ . '/../lib/vendor/doctrine-mongodb/lib');
-$loader->register();
AnnotationRegistry::registerFile(__DIR__ . '/../lib/Doctrine/Search/Mapping/Annotations/DoctrineAnnotations.php');
-AnnotationRegistry::registerFile(__DIR__ . '/../lib/vendor/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DoctrineAnnotations.php');
-//BuzzAutoloader::register();
+AnnotationRegistry::registerFile(__DIR__ . '/../vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DoctrineAnnotations.php');

0 comments on commit 2922c8e

Please sign in to comment.