Skip to content

Commit

Permalink
Use PSR-4 and autoload-dev
Browse files Browse the repository at this point in the history
- PSR-4 is the successor of PSR-0. PSR-0 is deprecated now.
  The provided autoloader does not respect the underscore rule from PSR-0 anyway.
- `autoload-dev` is a feature of Composer to dump additional namespaces in the autoloader
  when dev dependencies are being installed. This way there is no need to have a separate bootstrap file for PHPUnit.
  • Loading branch information
hkdobrev authored and willdurand committed Oct 1, 2015
1 parent b9da621 commit d93e7f4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Unit Tests

Setup the test suite using Composer:

$ composer install --dev
$ composer install

Run it using PHPUnit:

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"php": ">=5.3.0"
},
"autoload": {
"psr-0": { "EmailReplyParser": "src/" }
"psr-4": { "EmailReplyParser\\": "src/EmailReplyParser" }
},
"autoload-dev": {
"psr-4": { "EmailReplyParser\\Tests\\": "tests/EmailReplyParser/Tests" }
},
"extra": {
"branch-alias": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="EmailReplyParser Test Suite">
Expand Down
4 changes: 0 additions & 4 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit d93e7f4

Please sign in to comment.