Skip to content
Browse files

Merge pull request #60 from Baachi/composer

Create composer support
  • Loading branch information...
2 parents 02e0e81 + 686df94 commit fd0b1f8562bd0d07c489944f89009eda334b1e6e @mikelohmann mikelohmann committed May 13, 2012
Showing with 26 additions and 65 deletions.
  1. +1 −10 .gitignore
  2. +20 −0 composer.json
  3. +0 −1 lib/vendor/Buzz
  4. +0 −1 lib/vendor/doctrine-common
  5. +0 −1 lib/vendor/doctrine-mongodb
  6. +0 −1 lib/vendor/doctrine-mongodb-odm
  7. +0 −31 lib/vendor/vendors.php
  8. +5 −20 tests/bootstrap.php
View
11 .gitignore
@@ -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
20 composer.json
@@ -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/"
+ }
+ }
+}
1 lib/vendor/Buzz
@@ -1 +0,0 @@
-Subproject commit 424187ec75eccf015296349be43980a95630ac9a
1 lib/vendor/doctrine-common
@@ -1 +0,0 @@
-Subproject commit 18d11e0a54f8c4e726940a3753e3c2949dbf1c02
1 lib/vendor/doctrine-mongodb
@@ -1 +0,0 @@
-Subproject commit e8e1e8e4741c6f7455c485440513d4ccffccb054
1 lib/vendor/doctrine-mongodb-odm
@@ -1 +0,0 @@
-Subproject commit 984df332d5abecab2f20812ececb50f6bf6ea730
View
31 lib/vendor/vendors.php
@@ -1,31 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-/*
- * This file is part of the Doctrine\search package.
- *
- * Copied from: https://github.com/FriendsOfSymfony/FOSTwitterBundle/blob/master/vendor/vendors.php
- */
-set_time_limit(0);
-
-
-$vendorDir = __DIR__;
-$deps = array(
- array('doctrine-mongodb-odm', 'git://github.com/doctrine/mongodb-odm.git', 'origin/master'),
- array('doctrine-mongodb', 'git://github.com/doctrine/mongodb.git', 'origin/master'),
- array('doctrine-common', 'git://github.com/doctrine/common.git', 'origin/master'),
- array('Buzz', 'git://github.com/kriswallsmith/Buzz.git', 'origin/master'),
-);
-
-foreach ($deps as $dep) {
- list($name, $url, $rev) = $dep;
-
- echo "> Installing/Updating $name\n";
-
- $installDir = $vendorDir.'/'.$name;
- if (!is_dir($installDir)) {
- system(sprintf('git clone -q %s %s', escapeshellarg($url), escapeshellarg($installDir)));
- }
-
- system(sprintf('cd %s && git fetch -q origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
-}
View
25 tests/bootstrap.php
@@ -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 fd0b1f8

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