Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[vendors] removed submodules in order to avoid recursive cloning, add…

…ed php script instead
  • Loading branch information...
commit 90d86c6858d299e851486b1e71cf9b596ea0a7a7 1 parent 2d109e8
Gediminas Morkevicius authored
1  .gitignore
@@ -2,6 +2,7 @@ tests/phpunit.xml
2 2
 tests/temp/*.php
3 3
 build/
4 4
 scripts/
  5
+vendor/
5 6
 .project
6 7
 .settings
7 8
 .build.xml
27  .gitmodules
... ...
@@ -1,27 +0,0 @@
1  
-[submodule "vendor/doctrine-common"]
2  
-	path = vendor/doctrine-common
3  
-	url = git://github.com/doctrine/common.git
4  
-[submodule "vendor/doctrine-dbal"]
5  
-	path = vendor/doctrine-dbal
6  
-	url = git://github.com/doctrine/dbal.git
7  
-[submodule "vendor/doctrine-orm"]
8  
-	path = vendor/doctrine-orm
9  
-	url = git://github.com/doctrine/doctrine2.git
10  
-[submodule "vendor/doctrine-mongodb"]
11  
-	path = vendor/doctrine-mongodb
12  
-	url = git://github.com/doctrine/mongodb.git
13  
-[submodule "vendor/doctrine-mongodb-odm"]
14  
-	path = vendor/doctrine-mongodb-odm
15  
-	url = git://github.com/doctrine/mongodb-odm.git
16  
-[submodule "vendor/Symfony/Component/ClassLoader"]
17  
-	path = vendor/Symfony/Component/ClassLoader
18  
-	url = git://github.com/symfony/ClassLoader.git
19  
-[submodule "vendor/Symfony/Component/Yaml"]
20  
-	path = vendor/Symfony/Component/Yaml
21  
-	url = git://github.com/symfony/Yaml.git
22  
-[submodule "vendor/Symfony/Component/Finder"]
23  
-	path = vendor/Symfony/Component/Finder
24  
-	url = git://github.com/symfony/Finder.git
25  
-[submodule "vendor/Symfony/Component/Console"]
26  
-	path = vendor/Symfony/Component/Console
27  
-	url = git://github.com/symfony/Console.git
2  README.markdown
Source Rendered
@@ -86,7 +86,7 @@ PHPUnit 3.5 or newer is required.
86 86
 To setup and run tests follow these steps:
87 87
 
88 88
 - go to the root directory of extensions
89  
-- run: **git submodule update --init**
  89
+- run: **php bin/vendors.php**
90 90
 - run: **phpunit -c tests**
91 91
 - optional - run mongodb in background to complete all tests
92 92
 
2  bin/clear_temp.php
@@ -10,7 +10,7 @@
10 10
 
11 11
 $classLoaderFile = VENDOR_PATH . '/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
12 12
 if (!file_exists($classLoaderFile)) {
13  
-    die('cannot find vendor, git submodule init && git submodule update');
  13
+    die('cannot find vendor, run: php bin/vendors.php');
14 14
 }
15 15
 
16 16
 require_once $classLoaderFile;
2  bin/purify.php
@@ -9,7 +9,7 @@
9 9
 
10 10
 $classLoaderFile = VENDOR_PATH . '/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
11 11
 if (!file_exists($classLoaderFile)) {
12  
-    die('cannot find vendor, git submodule init && git submodule update');
  12
+    die('cannot find vendor, run: php bin/vendors.php');
13 13
 }
14 14
 
15 15
 require_once $classLoaderFile;
36  bin/vendors.php
... ...
@@ -0,0 +1,36 @@
  1
+#!/usr/bin/env php
  2
+<?php
  3
+
  4
+// dependent libraries for test environment
  5
+
  6
+define('VENDOR_PATH', __DIR__ . '/../vendor');
  7
+
  8
+if (!is_dir(VENDOR_PATH)) {
  9
+    mkdir(VENDOR_PATH, 0775, true);
  10
+}
  11
+
  12
+$deps = array(
  13
+    array('doctrine-orm', 'http://github.com/doctrine/doctrine2.git', 'a4cbb23fc8612587d1886e4c3e7d62d72457a297'),
  14
+    array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', 'eb80a3797e80fbaa024bb0a1ef01c3d81bb68a76'),
  15
+    array('doctrine-common', 'http://github.com/doctrine/common.git', 'aa00010faa764c49d9bdee5d35fa90aea5c682ee'),
  16
+    array('doctrine-mongodb', 'http://github.com/doctrine/mongodb.git', '4109734e249a951f270c531999871bfe9eeed843'),
  17
+    array('doctrine-mongodb-odm', 'http://github.com/doctrine/mongodb-odm.git', '6b91d944e68bbf94702a38351f03c74b7d6a057a'),
  18
+
  19
+    array('Symfony/Component/ClassLoader', 'http://github.com/symfony/ClassLoader.git', '86fed40f30a64d0726ed19060d4b872f2feaaf7d'),
  20
+    array('Symfony/Component/Console', 'http://github.com/symfony/Console.git', 'd8ccb833b19ca7965fd320737a4dec5f152bb7ef'),
  21
+    array('Symfony/Component/Finder', 'http://github.com/symfony/Finder.git', '42709a7857fd46fd67fdb452302f1b0bdcd4eccb'),
  22
+    array('Symfony/Component/Yaml', 'http://github.com/symfony/Yaml.git', '9a5dc42f6611d6c103e6c0dc1c4688994fd68a89'),
  23
+);
  24
+
  25
+foreach ($deps as $dep) {
  26
+    list($name, $url, $rev) = $dep;
  27
+
  28
+    echo "> Installing/Updating $name\n";
  29
+
  30
+    $installDir = VENDOR_PATH.'/'.$name;
  31
+    if (!is_dir($installDir)) {
  32
+        system(sprintf('git clone %s %s', $url, $installDir));
  33
+    }
  34
+
  35
+    system(sprintf('cd %s && git fetch origin && git reset --hard %s', $installDir, $rev));
  36
+}
4  tests/bootstrap.php
@@ -24,7 +24,9 @@
24 24
 define('VENDOR_PATH', realpath(__DIR__ . '/../vendor'));
25 25
 
26 26
 $classLoaderFile = VENDOR_PATH . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
27  
-
  27
+if (!file_exists($classLoaderFile)) {
  28
+    die('cannot find vendor, run: php bin/vendors.php');
  29
+}
28 30
 require_once $classLoaderFile;
29 31
 $loader = new Symfony\Component\ClassLoader\UniversalClassLoader;
30 32
 $loader->registerNamespaces(array(
1  vendor/Symfony/Component/ClassLoader
... ...
@@ -1 +0,0 @@
1  
-Subproject commit 86fed40f30a64d0726ed19060d4b872f2feaaf7d
1  vendor/Symfony/Component/Console
... ...
@@ -1 +0,0 @@
1  
-Subproject commit d8ccb833b19ca7965fd320737a4dec5f152bb7ef
1  vendor/Symfony/Component/Finder
... ...
@@ -1 +0,0 @@
1  
-Subproject commit 42709a7857fd46fd67fdb452302f1b0bdcd4eccb
1  vendor/Symfony/Component/Yaml
... ...
@@ -1 +0,0 @@
1  
-Subproject commit 9a5dc42f6611d6c103e6c0dc1c4688994fd68a89
1  vendor/doctrine-common
... ...
@@ -1 +0,0 @@
1  
-Subproject commit aa00010faa764c49d9bdee5d35fa90aea5c682ee
1  vendor/doctrine-dbal
... ...
@@ -1 +0,0 @@
1  
-Subproject commit eb80a3797e80fbaa024bb0a1ef01c3d81bb68a76
1  vendor/doctrine-mongodb
... ...
@@ -1 +0,0 @@
1  
-Subproject commit 4109734e249a951f270c531999871bfe9eeed843
1  vendor/doctrine-mongodb-odm
... ...
@@ -1 +0,0 @@
1  
-Subproject commit 6b91d944e68bbf94702a38351f03c74b7d6a057a
1  vendor/doctrine-orm
... ...
@@ -1 +0,0 @@
1  
-Subproject commit a4cbb23fc8612587d1886e4c3e7d62d72457a297

0 notes on commit 90d86c6

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