Skip to content

Commit d7ac5da

Browse files
Use PSR-0 autoloading
1 parent ca1ec87 commit d7ac5da

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
}
1111
],
1212
"autoload": {
13-
"files": ["expect.php"]
13+
"files": ["expect.php"],
14+
"psr-0": {
15+
"Bossa\\PhpSpec\\Expect\\": ""
16+
}
1417
},
1518
"require": {
1619
"phpspec/phpspec": "~2.0"

expect.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
<?php
22

3-
if (is_dir($vendor = __DIR__ . '/../vendor')) {
4-
require_once($vendor . '/autoload.php');
5-
} elseif (is_dir($vendor = __DIR__ . '/../../../vendor')) {
6-
require_once($vendor . '/autoload.php');
7-
} elseif (is_dir($vendor = __DIR__ . '/vendor')) {
8-
require_once($vendor . '/autoload.php');
9-
} else {
10-
die(
11-
'You must set up the project dependencies, run the following commands:' . PHP_EOL .
12-
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
13-
'php composer.phar install' . PHP_EOL
14-
);
15-
}
16-
173
use Bossa\PhpSpec\Expect\Subject;
184
use Bossa\PhpSpec\Expect\Wrapper;
195
use PhpSpec\Exception\ExceptionFactory;
@@ -43,9 +29,6 @@
4329
use PhpSpec\Wrapper\Unwrapper;
4430
use Symfony\Component\EventDispatcher\EventDispatcher;
4531

46-
require_once 'Bossa/PhpSpec/Expect/Subject.php';
47-
require_once 'Bossa/PhpSpec/Expect/Wrapper.php';
48-
4932
if (!function_exists('expect')) {
5033
function expect($sus)
5134
{

0 commit comments

Comments
 (0)