Permalink
Browse files

Removing the Symfony ClassLoader in favor of Composer - closes #9

  • Loading branch information...
1 parent d53d713 commit bf6f7b10a35326f7f78b7e176d46416c00ee6f78 @justinrainbow committed May 7, 2012
Showing with 17 additions and 25 deletions.
  1. +1 −2 .gitignore
  2. +0 −3 .gitmodules
  3. +3 −1 .travis.yml
  4. +1 −5 README.md
  5. +1 −0 src/JsonSchema/Constraints/Constraint.php
  6. +11 −13 tests/bootstrap.php
  7. +0 −1 vendor/symfony/Component/ClassLoader
View
@@ -1,3 +1,2 @@
/composer.lock
-/vendor/*
-!/vendor/symfony
+/vendor
View
@@ -1,3 +0,0 @@
-[submodule "vendor/symfony/Component/ClassLoader"]
- path = vendor/symfony/Component/ClassLoader
- url = https://github.com/symfony/ClassLoader.git
View
@@ -4,4 +4,6 @@ php:
- 5.3
- 5.4
-before_script: git submodule update --init
+before_script:
+ - wget --quiet http://getcomposer.org/composer.phar
+ - php composer.phar install --install-suggests
View
@@ -12,11 +12,7 @@ See [json-schema](http://json-schema.org/) for more details.
### Dependencies
-#### via `submodules` (*will use the Symfony ClassLoader Component*)
-
- $ git submodule update --init
-
-#### via [`composer`](https://github.com/composer/composer) (*will use the Composer ClassLoader*)
+#### [`Composer`](https://github.com/composer/composer) (*will use the Composer ClassLoader*)
$ wget http://getcomposer.org/composer.phar
$ php composer.phar install
@@ -108,6 +108,7 @@ protected function checkArray($value, $schema = null, $path = null, $i = null)
* @param mixed $schema
* @param mixed $path
* @param mixed $i
+ * @param mixed $patternProperties
*/
protected function checkObject($value, $schema = null, $path = null, $i = null, $patternProperties = null)
{
View
@@ -1,17 +1,15 @@
<?php
-if (is_readable(__DIR__.'/../vendor/.composer/autoload.php')) {
- //composer
- $loader = require_once(__DIR__.'/../vendor/.composer/autoload.php');
- $loader->add('JsonSchema\Tests', __DIR__);
- $loader->register();
+if (!is_readable(__DIR__.'/../vendor/autoload.php')) {
+ echo <<<EOT
+You must run `composer.phar install` to install the dependencies
+before running the test suite.
-} elseif (is_readable(__DIR__.'/../vendor/symfony/Component/ClassLoader/UniversalClassLoader.php')) {
- //submodule
- require_once __DIR__.'/../vendor/symfony/Component/ClassLoader/UniversalClassLoader.php';
+EOT;
+ exit(1);
+}
- $loader = new Symfony\Component\ClassLoader\UniversalClassLoader();
- $loader->registerNamespace('JsonSchema', __DIR__.'/../src');
- $loader->registerNamespace('JsonSchema\Tests', __DIR__);
- $loader->register();
-}
+//composer
+$loader = require_once(__DIR__.'/../vendor/autoload.php');
+$loader->add('JsonSchema\Tests', __DIR__);
+$loader->register();
Submodule ClassLoader deleted from 1c23c3

0 comments on commit bf6f7b1

Please sign in to comment.