-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes travis integration, makes tests easier to run
- Loading branch information
1 parent
63bfca3
commit ff29b3d
Showing
5 changed files
with
38 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
phpunit.xml | ||
composer.lock | ||
vendor/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
|
||
before_script: | ||
- curl -s http://getcomposer.org/installer | php | ||
- php composer.phar install --dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,12 @@ | ||
<?php | ||
|
||
spl_autoload_register(function($class) { | ||
if (0 !== strpos($class, 'JMS\I18nRoutingBundle')) { | ||
return; | ||
} | ||
|
||
if (is_file($path = dirname(__DIR__).str_replace('\\', '/', substr($class, strlen('JMS\I18nRoutingBundle'))).'.php')) { | ||
require_once $path; | ||
} | ||
}); | ||
use Doctrine\Common\Annotations\AnnotationRegistry; | ||
|
||
if (isset($_SERVER['autoload_file'])) { | ||
require_once $_SERVER['autoload_file']; | ||
|
||
return; | ||
} | ||
|
||
// this file searches for the autoload file of your project, and includes it | ||
$dir = __DIR__; | ||
$lastDir = null; | ||
while (($dir = dirname($dir)) && $dir !== $lastDir) { | ||
$lastDir = $dir; | ||
|
||
if (file_exists($file = $dir.'/app/autoload.php')) { | ||
require_once $file; | ||
return; | ||
call_user_func(function() { | ||
if ( ! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) { | ||
throw new \RuntimeException('Could not find vendor/autoload.php. Did you run "composer install --dev"?'); | ||
} | ||
} | ||
|
||
throw new RuntimeException('Could not locate the project\'s autoload.php. If your bundle is not inside a project, you need to replace this bootstrap file.'); | ||
$loader = require $autoloadFile; | ||
AnnotationRegistry::registerLoader(array($loader, 'loadClass')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters