Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved deps management to Composer side

  • Loading branch information...
commit 5302908826d283737bf2fe0a80d8dfdf4b52521d 1 parent 9310531
@everzet everzet authored
View
10 .gitignore
@@ -1,6 +1,4 @@
-/phpunit.xml
-vendor/doctrine-common
-vendor/JMS/SerializerBundle
-vendor/Sensio/Bundle/FrameworkExtraBundle
-vendor/symfony
-Tests/autoload.php
+phpunit.xml
+vendor
+composer.lock
+composer.phar
View
44 Tests/autoload.php.dist
@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the FOSRestBundle package.
- *
- * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-$vendorDir = __DIR__.'/../vendor';
-require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array(
- 'Symfony' => array($vendorDir.'/symfony/src'),
- 'Doctrine' => array($vendorDir.'/doctrine-common/lib'),
- 'JMS' => array($vendorDir),
- 'Sensio' => array($vendorDir),
-));
-$loader->register();
-
-spl_autoload_register(function($class) {
- if (0 === strpos($class, 'FOS\\RestBundle\\')) {
- $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
- if (!stream_resolve_include_path($path)) {
- return false;
- }
- require_once $path;
- return true;
- }
-});
-
-use Doctrine\Common\Annotations\AnnotationRegistry;
-AnnotationRegistry::registerLoader(function($class) {
- if (strpos($class, 'FOS\RestBundle\Controller\Annotations\\') === 0) {
- $path = __DIR__.'/../'.str_replace('\\', '/', substr($class, strlen('FOS\RestBundle\\'))) .'.php';
- require_once $path;
- }
- return class_exists($class, false);
-});
View
16 Tests/bootstrap.php
@@ -1,16 +0,0 @@
-<?php
-
-/*
- * This file is part of the FOSRestBundle package.
- *
- * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-if (file_exists($file = __DIR__.'/autoload.php')) {
- require_once $file;
-} elseif (file_exists($file = __DIR__.'/autoload.php.dist')) {
- require_once $file;
-}
View
3  composer.json
@@ -17,7 +17,8 @@
],
"require": {
"php": ">=5.3.2",
- "jms/serializer-bundle": "1.*"
+ "symfony/symfony": ">=2.0",
+ "jms/serializer-bundle": "*"
},
"suggest": {
"doctrine/common": "master-dev",
View
2  phpunit.xml.dist
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<phpunit bootstrap="./Tests/bootstrap.php" colors="true">
+<phpunit bootstrap="./vendor/.composer/autoload.php" colors="true">
<testsuites>
<testsuite name="FOSRestBundle test suite">
View
37 vendor/vendors.php
@@ -1,37 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-/*
- * This file is part of the FOSRestBundle package.
- *
- * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-set_time_limit(0);
-
-if (isset($argv[1])) {
- $_SERVER['SYMFONY_VERSION'] = $argv[1];
-}
-
-$vendorDir = __DIR__;
-$deps = array(
- array('symfony', 'http://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
- array('doctrine-common', 'http://github.com/doctrine/common.git', 'origin/master'),
- array('JMS/SerializerBundle', 'http://github.com/schmittjoh/JMSSerializerBundle', 'origin/master'),
- array('Sensio/Bundle/FrameworkExtraBundle', 'http://github.com/sensio/SensioFrameworkExtraBundle', '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)));
-}
Please sign in to comment.
Something went wrong with that request. Please try again.