Permalink
Browse files

Use composer to install development requirements

  • Loading branch information...
1 parent 4ce47e7 commit c9b1d17e840ae648b04259db214bd43987d46b1f Miha Vrhovnik committed May 24, 2012
Showing with 36 additions and 2 deletions.
  1. +2 −0 .gitignore
  2. +28 −0 Tests/bootstrap.php
  3. +5 −1 composer.json
  4. +1 −1 phpunit.xml.dist
View
@@ -1,2 +1,4 @@
/phpunit.xml
*~
+composer.lock
+/vendor/
View
@@ -0,0 +1,28 @@
+<?php
+/*
+ * Copyright 2011 Johannes M. Schmitt <schmittjoh@gmail.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+$loader = include_once dirname(__DIR__).'/vendor/autoload.php';
+
+Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function($class) use ($loader) {
+ if (0 === strpos(ltrim($class, '/'), 'JMS\SerializerBundle\Annotation')) {
+ if (file_exists($file = dirname(__DIR__).'/'.substr(str_replace('\\', '/', $class), strlen('JMS\SerializerBundle')).'.php')) {
+ require_once $file;
+ }
+ }
+
+ return class_exists($class, false);
+});
View
@@ -16,7 +16,11 @@
"jms/metadata": ">=1.1.0"
},
"require-dev": {
- "symfony/framework-bundle": "2.*"
+ "symfony/framework-bundle": "2.*",
+ "symfony/yaml": "2.*",
+ "symfony/form": "2.*",
+ "symfony/validator": "2.*",
+ "twig/twig": "dev-master"
},
"autoload": {
"psr-0": { "JMS\\SerializerBundle": "" }
View
@@ -9,7 +9,7 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
- bootstrap="./../../../../app/autoload.php"
+ bootstrap="Tests/bootstrap.php"
>
<testsuites>

0 comments on commit c9b1d17

Please sign in to comment.