Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use composer for travis-ci

  • Loading branch information...
commit 4e6446b1fe2d4a71dea579ceefc5a6c1530bc30a 1 parent 9a09c03
@lsmith77 lsmith77 authored
View
4 .gitignore
@@ -3,3 +3,7 @@
vendor/imagine
vendor/symfony
vendor/twig
+
+composer.phar
+vendor/
+composer.lock
View
8 .travis.yml
@@ -4,11 +4,9 @@ php:
- 5.3
- 5.4
-env:
- - SYMFONY_VERSION=v2.0.6
- - SYMFONY_VERSION=origin/master
-
-before_script: php vendor/vendors.php
+before_script:
+ - wget -nc http://getcomposer.org/composer.phar
+ - php composer.phar install
script: phpunit --coverage-text
View
27 Tests/autoload.php.dist
@@ -1,27 +0,0 @@
-<?php
-
-$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'),
- 'Imagine' => array($vendorDir.'/imagine/lib'),
-));
-$loader->registerPrefixes(array(
- 'Twig_' => $vendorDir.'/twig/lib',
-));
-$loader->register();
-
-spl_autoload_register(function($class) {
- if (0 === strpos($class, 'Liip\\ImagineBundle\\')) {
- $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
- if (!stream_resolve_include_path($path)) {
- return false;
- }
- require_once $path;
- return true;
- }
-});
View
9 Tests/bootstrap.php
@@ -1,7 +1,8 @@
<?php
-if (file_exists($file = __DIR__.'/autoload.php')) {
- require_once $file;
-} elseif (file_exists($file = __DIR__.'/autoload.php.dist')) {
- require_once $file;
+$file = __DIR__.'/../vendor/autoload.php';
+if (!file_exists($file)) {
+ throw new RuntimeException('Install dependencies to run test suite.');
}
+
+$autoload = require_once $file;
View
28 vendor/vendors.php
@@ -1,28 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-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('imagine', 'http://github.com/avalanche123/Imagine', 'v0.2.6'),
- array('twig', 'http://github.com/fabpot/Twig', '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.