diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..899780c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +* text=auto + +/tests export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/build.xml export-ignore +/phpunit.xml.dist export-ignore +/README.md export-ignore diff --git a/.gitignore b/.gitignore index e40e8a7..6191e92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -.idea/* -vendor/* -build/* -.DS_Store +/.idea +/vendor +/build cache.properties +composer.lock phpunit.xml diff --git a/.travis.yml b/.travis.yml index ebd071a..5b55642 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,15 @@ language: php + php: + - 5.3.3 - 5.3 - 5.4 -before_script: - - composer install - - cp phpunit.xml.dist phpunit.xml -script: sudo phpunit --coverage-text + - 5.5 + - 5.6 + - hhvm + +install: + - travis_retry composer install --no-interaction --prefer-source + +script: + - phpunit --coverage-text diff --git a/composer.json b/composer.json index acac388..392f453 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,11 @@ "php": ">=5.3.2" }, "autoload": { - "psr-0": { "FunctionParser": "src/" } + "psr-4": { "FunctionParser\\": "src/" } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } } } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 69cc0a0..0000000 --- a/composer.lock +++ /dev/null @@ -1,4 +0,0 @@ -{ - "hash": "7286d3e04ade9dbb208d79341623e6d2", - "packages": [] -} diff --git a/demo/class-method.php b/demo/class-method.php index 1537293..4a238d6 100644 --- a/demo/class-method.php +++ b/demo/class-method.php @@ -3,8 +3,7 @@ namespace Demo; // Include the autoloader -require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . '.composer' - . DIRECTORY_SEPARATOR . 'autoload.php'; +require_once __DIR__.'/../vendor/autoload.php' use FunctionParser\FunctionParser; diff --git a/demo/simple-closure.php b/demo/simple-closure.php index a0de721..00bdcdd 100644 --- a/demo/simple-closure.php +++ b/demo/simple-closure.php @@ -1,17 +1,19 @@ getCode() . PHP_EOL; diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6222204..09d4645 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,36 +1,34 @@ - - - - - ./tests/FunctionParser/UnitTest - ./tests/FunctionParser/IntegrationTest - - - - - - ./src/FunctionParser - - - - - - - - - - + + + ./tests + + + + + ./src + + + + + + + + diff --git a/src/FunctionParser/FunctionParser.php b/src/FunctionParser.php similarity index 100% rename from src/FunctionParser/FunctionParser.php rename to src/FunctionParser.php diff --git a/src/FunctionParser/Token.php b/src/Token.php similarity index 100% rename from src/FunctionParser/Token.php rename to src/Token.php diff --git a/src/FunctionParser/Tokenizer.php b/src/Tokenizer.php similarity index 100% rename from src/FunctionParser/Tokenizer.php rename to src/Tokenizer.php diff --git a/tests/FunctionParser/IntegrationTest/FunctionParserTest.php b/tests/IntegrationTest/FunctionParserTest.php similarity index 100% rename from tests/FunctionParser/IntegrationTest/FunctionParserTest.php rename to tests/IntegrationTest/FunctionParserTest.php diff --git a/tests/FunctionParser/UnitTest/FunctionParserTest.php b/tests/UnitTest/FunctionParserTest.php similarity index 100% rename from tests/FunctionParser/UnitTest/FunctionParserTest.php rename to tests/UnitTest/FunctionParserTest.php diff --git a/tests/FunctionParser/UnitTest/TokenTest.php b/tests/UnitTest/TokenTest.php similarity index 100% rename from tests/FunctionParser/UnitTest/TokenTest.php rename to tests/UnitTest/TokenTest.php diff --git a/tests/FunctionParser/UnitTest/TokenizerTest.php b/tests/UnitTest/TokenizerTest.php similarity index 100% rename from tests/FunctionParser/UnitTest/TokenizerTest.php rename to tests/UnitTest/TokenizerTest.php diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index 5bf8e5d..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,14 +0,0 @@ -