Skip to content

Commit c417370

Browse files
committed
Added missing deps for composer and fixed the testsuite
1 parent 2d2c77d commit c417370

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
vendor
2+
composer.phar
3+
composer.lock
4+
phpunit.xml

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
7+
before_script:
8+
- curl -s http://getcomposer.org/installer | php
9+
- php composer.phar install --dev

Tests/bootstrap.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
if (!@include __DIR__ . '/../vendor/.composer/autoload.php') {
4+
die("You must set up the project dependencies, run the following commands:
5+
wget http://getcomposer.org/composer.phar
6+
php composer.phar install
7+
");
8+
}
9+
10+
spl_autoload_register(function($class) {
11+
if (0 === strpos($class, 'Symfony\\Bundle\\MonologBundle')) {
12+
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 3)).'.php';
13+
if (!stream_resolve_include_path($path)) {
14+
return false;
15+
}
16+
require_once $path;
17+
return true;
18+
}
19+
});

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.2",
20-
"symfony/monolog-bridge": "self.version",
20+
"symfony/monolog-bridge": "2.1.*",
21+
"symfony/dependency-injection": "2.1.*",
22+
"symfony/config": "2.1.*",
2123
"monolog/monolog": "1.*"
2224
},
2325
"autoload": {

phpunit.xml.dist

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit colors="true" bootstrap="Tests/bootstrap.php">
4+
<testsuites>
5+
<testsuite name="MonologBundle for the Symfony Framework">
6+
<directory>./Tests</directory>
7+
</testsuite>
8+
</testsuites>
9+
10+
<filter>
11+
<whitelist>
12+
<directory>.</directory>
13+
<exclude>
14+
<directory>./Resources</directory>
15+
<directory>./Tests</directory>
16+
<directory>./vendor</directory>
17+
</exclude>
18+
</whitelist>
19+
</filter>
20+
</phpunit>

0 commit comments

Comments
 (0)