From e3a93561780f750489aa3a1cf99d23dcfa44520f Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Wed, 16 Sep 2015 22:00:44 +0900 Subject: [PATCH] Use composer PSR-4 autoloader --- .gitignore | 4 ++++ .travis.yml | 2 ++ composer.json | 4 +++- test/bootstrap.php | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..8c7db2a6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +grammar/kmyacc.exe +grammar/y.output diff --git a/.travis.yml b/.travis.yml index 479c55f8..05db2988 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ php: - nightly - hhvm +install: composer install + matrix: allow_failures: - php: nightly diff --git a/composer.json b/composer.json index 6c4e60c5..9bccb390 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,9 @@ "ext-tokenizer": "*" }, "autoload": { - "files": ["lib/bootstrap.php"] + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } }, "extra": { "branch-alias": { diff --git a/test/bootstrap.php b/test/bootstrap.php index 6f764991..1afd200a 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -2,7 +2,7 @@ namespace PhpParser; -require __DIR__ . '/../lib/bootstrap.php'; +require __DIR__ . '/../vendor/autoload.php'; function canonicalize($str) { // trim from both sides