Use composer PSR-4 autoloader

This commit is contained in:
Dmitry Patsura 2015-09-16 22:00:44 +09:00 committed by Nikita Popov
parent 5118e21c6e
commit e3a9356178
4 changed files with 10 additions and 2 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
vendor/
composer.lock
grammar/kmyacc.exe
grammar/y.output

View File

@ -10,6 +10,8 @@ php:
- nightly - nightly
- hhvm - hhvm
install: composer install
matrix: matrix:
allow_failures: allow_failures:
- php: nightly - php: nightly

View File

@ -14,7 +14,9 @@
"ext-tokenizer": "*" "ext-tokenizer": "*"
}, },
"autoload": { "autoload": {
"files": ["lib/bootstrap.php"] "psr-4": {
"PhpParser\\": "lib/PhpParser"
}
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {

View File

@ -2,7 +2,7 @@
namespace PhpParser; namespace PhpParser;
require __DIR__ . '/../lib/bootstrap.php'; require __DIR__ . '/../vendor/autoload.php';
function canonicalize($str) { function canonicalize($str) {
// trim from both sides // trim from both sides