This commit is contained in:
Barry vd. Heuvel
2016-06-13 21:28:05 +02:00
29 changed files with 802 additions and 239 deletions
+13 -4
View File
@@ -3,17 +3,26 @@ php:
- 5.3.3 - 5.3.3
- 5.3 - 5.3
- 5.4 - 5.4
- 5.5
- 5.6
- hhvm
- hhvm-nightly
matrix:
allow_failures:
- php: hhvm
- php: hhvm-nightly
script: script:
- vendor/phpunit/phpunit/composer/bin/phpunit - vendor/bin/phpunit
before_script: before_script:
- sudo apt-get -qq update > /dev/null - sudo apt-get -qq update > /dev/null
- phpenv rehash > /dev/null - phpenv rehash > /dev/null
- composer selfupdate --quiet - composer selfupdate --quiet
- composer install --dev - composer install --no-interaction --prefer-source --dev
- vendor/phpunit/phpunit/composer/bin/phpunit - vendor/bin/phpunit
- composer update --dev - composer update --no-interaction --prefer-source --dev
notifications: notifications:
irc: "irc.freenode.org#phpdocumentor" irc: "irc.freenode.org#phpdocumentor"
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2010 Mike van Riel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+10 -4
View File
@@ -8,13 +8,19 @@
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"suggest": {
"dflydev/markdown": "1.0.*"
},
"autoload": { "autoload": {
"psr-0": {"Barryvdh": ["src/"]} "psr-0": {"Barryvdh": ["src/"]}
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "3.7.*@stable" "phpunit/phpunit": "~4.0,<4.5"
},
"suggest": {
"dflydev/markdown": "~1.0",
"erusev/parsedown": "~1.0"
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
} }
} }
Generated
+493 -141
View File
@@ -1,93 +1,165 @@
{ {
"hash": "c6115c20a4a284f6ca14e676e788b4d3", "_readme": [
"packages": [ "This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "ea1734d11b8c878445c2c6e58de8b85f",
"packages": [],
"packages-dev": [
{ {
"name": "dflydev/markdown", "name": "ocramius/instantiator",
"version": "v1.0.2", "version": "1.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/dflydev/dflydev-markdown.git", "url": "https://github.com/Ocramius/Instantiator.git",
"reference": "v1.0.2" "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/dflydev/dflydev-markdown/zipball/v1.0.2", "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/a7abbb5fc9df6e7126af741dd6c140d1a7369435",
"reference": "v1.0.2", "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3" "ocramius/lazy-map": "1.0.*",
"php": "~5.3"
},
"require-dev": {
"athletic/athletic": "~0.1.8",
"ext-pdo": "*",
"ext-phar": "*",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "2.0.*@ALPHA"
}, },
"time": "2012-01-15 19:36:37",
"type": "library", "type": "library",
"installation-source": "dist", "extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"dflydev\\markdown": "src" "Instantiator\\": "src"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"New BSD License" "MIT"
], ],
"authors": [ "authors": [
{ {
"name": "Dragonfly Development Inc.", "name": "Marco Pivetta",
"email": "info@dflydev.com", "email": "ocramius@gmail.com",
"homepage": "http://dflydev.com" "homepage": "http://ocramius.github.com/"
},
{
"name": "Beau Simensen",
"email": "[email protected]",
"homepage": "http://beausimensen.com"
},
{
"name": "Michel Fortin",
"homepage": "http://michelf.com"
},
{
"name": "John Gruber",
"homepage": "http://daringfireball.net"
} }
], ],
"description": "PHP Markdown & Extra", "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"homepage": "http://github.com/dflydev/dflydev-markdown", "homepage": "https://github.com/Ocramius/Instantiator",
"keywords": [ "keywords": [
"markdown" "constructor",
] "instantiate"
}
], ],
"packages-dev": [ "time": "2014-08-14 15:10:55"
},
{ {
"name": "phpunit/php-code-coverage", "name": "ocramius/lazy-map",
"version": "1.2.7", "version": "1.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/Ocramius/LazyMap.git",
"reference": "1.2.7" "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/php-code-coverage/archive/1.2.7.zip", "url": "https://api.github.com/repos/Ocramius/LazyMap/zipball/7fe3d347f5e618bcea7d39345ff83f3651d8b752",
"reference": "1.2.7", "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"athletic/athletic": "~0.1.6",
"phpmd/phpmd": "1.5.*",
"phpunit/phpunit": ">=3.7",
"satooshi/php-coveralls": "~0.6",
"squizlabs/php_codesniffer": "1.4.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-0": {
"LazyMap\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "[email protected]",
"homepage": "http://ocramius.github.com/",
"role": "Developer"
}
],
"description": "A library that provides lazy instantiation logic for a map of objects",
"homepage": "https://github.com/Ocramius/LazyMap",
"keywords": [
"lazy",
"lazy instantiation",
"lazy loading",
"map",
"service location"
],
"time": "2013-11-09 22:30:54"
},
{
"name": "phpunit/php-code-coverage",
"version": "2.0.10",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "6d196af48e8c100a3ae881940123e693da5a9217"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217",
"reference": "6d196af48e8c100a3ae881940123e693da5a9217",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"phpunit/php-file-iterator": ">=1.3.0@stable", "phpunit/php-file-iterator": "~1.3.1",
"phpunit/php-token-stream": ">=1.1.3@stable", "phpunit/php-text-template": "~1.2.0",
"phpunit/php-text-template": ">=1.1.1@stable" "phpunit/php-token-stream": "~1.2.2",
"sebastian/environment": "~1.0.0",
"sebastian/version": "~1.0.3"
},
"require-dev": {
"ext-xdebug": ">=2.1.4",
"phpunit/phpunit": "~4.0.14"
}, },
"suggest": { "suggest": {
"ext-dom": "*", "ext-dom": "*",
"ext-xdebug": ">=2.0.5" "ext-xdebug": ">=2.2.1",
"ext-xmlwriter": "*"
}, },
"time": "2012-12-02 14:54:55",
"type": "library", "type": "library",
"installation-source": "dist", "extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": { "autoload": {
"classmap": [ "classmap": [
"PHP/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -107,31 +179,30 @@
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage", "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [ "keywords": [
"testing",
"coverage", "coverage",
"testing",
"xunit" "xunit"
] ],
"time": "2014-08-06 06:39:42"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
"version": "1.3.3", "version": "1.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/php-file-iterator.git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "1.3.3" "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/php-file-iterator/zipball/1.3.3", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
"reference": "1.3.3", "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"time": "2012-10-11 04:44:38",
"type": "library", "type": "library",
"installation-source": "dist",
"autoload": { "autoload": {
"classmap": [ "classmap": [
"File/" "File/"
@@ -152,32 +223,31 @@
} }
], ],
"description": "FilterIterator implementation that filters files based on a list of suffixes.", "description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "http://www.phpunit.de/", "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [ "keywords": [
"filesystem", "filesystem",
"iterator" "iterator"
] ],
"time": "2013-10-10 15:34:57"
}, },
{ {
"name": "phpunit/php-text-template", "name": "phpunit/php-text-template",
"version": "1.1.4", "version": "1.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/php-text-template.git", "url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "1.1.4" "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/php-text-template/zipball/1.1.4", "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
"reference": "1.1.4", "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"time": "2012-10-31 11:15:28",
"type": "library", "type": "library",
"installation-source": "dist",
"autoload": { "autoload": {
"classmap": [ "classmap": [
"Text/" "Text/"
@@ -201,28 +271,27 @@
"homepage": "https://github.com/sebastianbergmann/php-text-template/", "homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [ "keywords": [
"template" "template"
] ],
"time": "2014-01-30 17:20:04"
}, },
{ {
"name": "phpunit/php-timer", "name": "phpunit/php-timer",
"version": "1.0.4", "version": "1.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/php-timer.git", "url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "1.0.4" "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/php-timer/zipball/1.0.4", "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
"reference": "1.0.4", "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"time": "2012-10-11 04:45:58",
"type": "library", "type": "library",
"installation-source": "dist",
"autoload": { "autoload": {
"classmap": [ "classmap": [
"PHP/" "PHP/"
@@ -243,32 +312,36 @@
} }
], ],
"description": "Utility class for timing", "description": "Utility class for timing",
"homepage": "http://www.phpunit.de/", "homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [ "keywords": [
"timer" "timer"
] ],
"time": "2013-08-02 07:42:54"
}, },
{ {
"name": "phpunit/php-token-stream", "name": "phpunit/php-token-stream",
"version": "1.1.5", "version": "1.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/php-token-stream.git", "url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "1.1.5" "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/php-token-stream/zipball/1.1.5", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32",
"reference": "1.1.5", "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-tokenizer": "*", "ext-tokenizer": "*",
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"time": "2012-10-11 04:47:14",
"type": "library", "type": "library",
"installation-source": "dist", "extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": { "autoload": {
"classmap": [ "classmap": [
"PHP/" "PHP/"
@@ -289,58 +362,60 @@
} }
], ],
"description": "Wrapper around PHP's tokenizer extension.", "description": "Wrapper around PHP's tokenizer extension.",
"homepage": "http://www.phpunit.de/", "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
"keywords": [ "keywords": [
"tokenizer" "tokenizer"
] ],
"time": "2014-03-03 05:10:30"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "3.7.10", "version": "4.2.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "3.7.10" "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/phpunit/archive/3.7.10.zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a33fa68ece9f8c68589bfc2da8d2794e27b820bc",
"reference": "3.7.10", "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3",
"phpunit/php-file-iterator": ">=1.3.1",
"phpunit/php-text-template": ">=1.1.1",
"phpunit/php-code-coverage": ">=1.2.1",
"phpunit/php-timer": ">=1.0.2",
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
"symfony/yaml": ">=2.1.0",
"ext-dom": "*", "ext-dom": "*",
"ext-json": "*",
"ext-pcre": "*", "ext-pcre": "*",
"ext-reflection": "*", "ext-reflection": "*",
"ext-spl": "*" "ext-spl": "*",
"php": ">=5.3.3",
"phpunit/php-code-coverage": "~2.0",
"phpunit/php-file-iterator": "~1.3.1",
"phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "~1.0.2",
"phpunit/phpunit-mock-objects": "~2.2",
"sebastian/comparator": "~1.0",
"sebastian/diff": "~1.1",
"sebastian/environment": "~1.0",
"sebastian/exporter": "~1.0",
"sebastian/version": "~1.0",
"symfony/yaml": "~2.0"
}, },
"suggest": { "suggest": {
"phpunit/php-invoker": ">=1.1.0", "phpunit/php-invoker": "~1.1"
"ext-json": "*",
"ext-simplexml": "*",
"ext-tokenizer": "*"
}, },
"time": "2012-12-02 14:56:55",
"bin": [ "bin": [
"composer/bin/phpunit" "phpunit"
], ],
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.7.x-dev" "dev-master": "4.2.x-dev"
} }
}, },
"installation-source": "dist",
"autoload": { "autoload": {
"classmap": [ "classmap": [
"PHPUnit/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -361,38 +436,46 @@
"description": "The PHP Unit Testing framework.", "description": "The PHP Unit Testing framework.",
"homepage": "http://www.phpunit.de/", "homepage": "http://www.phpunit.de/",
"keywords": [ "keywords": [
"testing",
"phpunit", "phpunit",
"testing",
"xunit" "xunit"
] ],
"time": "2014-08-18 05:12:30"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
"version": "1.2.2", "version": "2.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "git://github.com/sebastianbergmann/phpunit-mock-objects.git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "1.2.2" "reference": "42e589e08bc86e3e9bdf20d385e948347788505b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects/archive/1.2.2.zip", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/42e589e08bc86e3e9bdf20d385e948347788505b",
"reference": "1.2.2", "reference": "42e589e08bc86e3e9bdf20d385e948347788505b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ocramius/instantiator": "~1.0",
"php": ">=5.3.3", "php": ">=5.3.3",
"phpunit/php-text-template": ">=1.1.1@stable" "phpunit/php-text-template": "~1.2"
},
"require-dev": {
"phpunit/phpunit": "4.2.*@dev"
}, },
"suggest": { "suggest": {
"ext-soap": "*" "ext-soap": "*"
}, },
"time": "2012-11-05 10:39:13",
"type": "library", "type": "library",
"installation-source": "dist", "extra": {
"branch-alias": {
"dev-master": "2.2.x-dev"
}
},
"autoload": { "autoload": {
"classmap": [ "classmap": [
"PHPUnit/" "src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -414,37 +497,304 @@
"keywords": [ "keywords": [
"mock", "mock",
"xunit" "xunit"
] ],
"time": "2014-08-02 13:50:58"
}, },
{ {
"name": "symfony/yaml", "name": "sebastian/comparator",
"version": "v2.1.4", "version": "1.0.0",
"target-dir": "Symfony/Component/Yaml",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Yaml", "url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "v2.1.4" "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/symfony/Yaml/archive/v2.1.4.zip", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
"reference": "v2.1.4", "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/diff": "~1.1",
"sebastian/exporter": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "[email protected]",
"role": "lead"
},
{
"name": "Jeff Welch",
"email": "[email protected]"
},
{
"name": "Volker Dusch",
"email": "[email protected]"
},
{
"name": "Bernhard Schussek",
"email": "[email protected]"
}
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "http://www.github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"time": "2014-05-02 07:05:58"
},
{
"name": "sebastian/diff",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
"reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"time": "2012-11-08 09:51:48",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.1-dev" "dev-master": "1.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "[email protected]",
"role": "lead"
},
{
"name": "Kore Nordmann",
"email": "[email protected]"
}
],
"description": "Diff implementation",
"homepage": "http://www.github.com/sebastianbergmann/diff",
"keywords": [
"diff"
],
"time": "2013-08-03 16:46:33"
},
{
"name": "sebastian/environment",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/79517609ec01139cd7e9fded0dd7ce08c952ef6a",
"reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "4.0.*@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "[email protected]",
"role": "lead"
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
"homepage": "http://www.github.com/sebastianbergmann/environment",
"keywords": [
"Xdebug",
"environment",
"hhvm"
],
"time": "2014-02-18 16:17:19"
},
{
"name": "sebastian/exporter",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
"reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "4.0.*@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "[email protected]",
"role": "lead"
},
{
"name": "Jeff Welch",
"email": "[email protected]"
},
{
"name": "Volker Dusch",
"email": "[email protected]"
},
{
"name": "Adam Harvey",
"email": "[email protected]",
"role": "Lead"
},
{
"name": "Bernhard Schussek",
"email": "[email protected]"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
"time": "2014-02-16 08:26:31"
},
{
"name": "sebastian/version",
"version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
"reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
"reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
"shasum": ""
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "[email protected]",
"role": "lead"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2014-03-07 15:35:33"
},
{
"name": "symfony/yaml",
"version": "v2.5.3",
"target-dir": "Symfony/Component/Yaml",
"source": {
"type": "git",
"url": "https://github.com/symfony/Yaml.git",
"reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f",
"reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
} }
}, },
"installation-source": "dist",
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Symfony\\Component\\Yaml": "" "Symfony\\Component\\Yaml\\": ""
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@@ -452,24 +802,26 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Fabien Potencier",
"email": "[email protected]"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "http://symfony.com/contributors" "homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
} }
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "http://symfony.com" "homepage": "http://symfony.com",
"time": "2014-08-05 09:00:40"
} }
], ],
"aliases": [ "aliases": [],
],
"minimum-stability": "stable", "minimum-stability": "stable",
"stability-flags": { "stability-flags": [],
"phpunit/phpunit": 0 "prefer-stable": false,
} "platform": {
"php": ">=5.3.3"
},
"platform-dev": []
} }
+92 -38
View File
@@ -46,6 +46,12 @@ class DocBlock implements \Reflector
/** @var Location Information about the location of this DocBlock. */ /** @var Location Information about the location of this DocBlock. */
protected $location = null; protected $location = null;
/** @var bool Is this DocBlock (the start of) a template? */
protected $isTemplateStart = false;
/** @var bool Does this DocBlock signify the end of a DocBlock template? */
protected $isTemplateEnd = false;
/** /**
* Parses the given docblock and populates the member fields. * Parses the given docblock and populates the member fields.
* *
@@ -81,7 +87,9 @@ class DocBlock implements \Reflector
$docblock = $this->cleanInput($docblock); $docblock = $this->cleanInput($docblock);
list($short, $long, $tags) = $this->splitDocBlock($docblock); list($templateMarker, $short, $long, $tags) = $this->splitDocBlock($docblock);
$this->isTemplateStart = $templateMarker === '#@+';
$this->isTemplateEnd = $templateMarker === '#@-';
$this->short_description = $short; $this->short_description = $short;
$this->long_description = new DocBlock\Description($long, $this); $this->long_description = new DocBlock\Description($long, $this);
$this->parseTags($tags); $this->parseTags($tags);
@@ -119,74 +127,86 @@ class DocBlock implements \Reflector
} }
/** /**
* Splits the DocBlock into a short description, long description and * Splits the DocBlock into a template marker, summary, description and block of tags.
* block of tags.
* *
* @param string $comment Comment to split into the sub-parts. * @param string $comment Comment to split into the sub-parts.
* *
* @author RichardJ Special thanks to RichardJ for the regex responsible * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split.
* for the split. * @author Mike van Riel <[email protected]> for extending the regex with template marker support.
* *
* @return string[] containing the short-, long description and an element * @return string[] containing the template marker (if any), summary, description and a string containing the tags.
* containing the tags.
*/ */
protected function splitDocBlock($comment) protected function splitDocBlock($comment)
{ {
// Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This
// method does not split tags so we return this verbatim as the fourth result (tags). This saves us the
// performance impact of running a regular expression
if (strpos($comment, '@') === 0) { if (strpos($comment, '@') === 0) {
$matches = array('', '', $comment); return array('', '', '', $comment);
} else { }
// clears all extra horizontal whitespace from the line endings
// to prevent parsing issues // clears all extra horizontal whitespace from the line endings to prevent parsing issues
$comment = preg_replace('/\h*$/Sum', '', $comment); $comment = preg_replace('/\h*$/Sum', '', $comment);
/* /*
* Splits the docblock into a short description, long description and * Splits the docblock into a template marker, short description, long description and tags section
* tags section *
* - The short description is started from the first character until * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may
* a dot is encountered followed by a newline OR * occur after it and will be stripped).
* two consecutive newlines (horizontal whitespace is taken into * - The short description is started from the first character until a dot is encountered followed by a
* account to consider spacing errors) * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing
* - The long description, any character until a new line is * errors). This is optional.
* encountered followed by an @ and word characters (a tag). * - The long description, any character until a new line is encountered followed by an @ and word
* This is optional. * characters (a tag). This is optional.
* - Tags; the remaining characters * - Tags; the remaining characters
* *
* Big thanks to RichardJ for contributing this Regular Expression * Big thanks to RichardJ for contributing this Regular Expression
*/ */
preg_match( preg_match(
'/ '/
\A ( \A
# 1. Extract the template marker
(?:(\#\@\+|\#\@\-)\n?)?
# 2. Extract the summary
(?:
(?! @\pL ) # The summary may not start with an @
(
[^\n.]+ [^\n.]+
(?: (?:
(?! \. \n | \n{2} ) # disallow the first seperator here (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines
[\n.] (?! [ \t]* @\pL ) # disallow second seperator [\n.] (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line
[^\n.]+ [^\n.]+ # Include anything else
)* )*
\.? \.?
)?
) )
# 3. Extract the description
(?: (?:
\s* # first seperator (actually newlines but it\'s all whitespace) \s* # Some form of whitespace _must_ precede a description because a summary must be there
(?! @\pL ) # disallow the rest, to make sure this one doesn\'t match, (?! @\pL ) # The description may not start with an @
#if it doesn\'t exist
( (
[^\n]+ [^\n]+
(?: \n+ (?: \n+
(?! [ \t]* @\pL ) # disallow second seperator (@param) (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line
[^\n]+ [^\n]+ # Include anything else
)* )*
) )
)? )?
# 4. Extract the tags (anything that follows)
(\s+ [\s\S]*)? # everything that follows (\s+ [\s\S]*)? # everything that follows
/ux', /ux',
$comment, $comment,
$matches $matches
); );
array_shift($matches); array_shift($matches);
}
while (count($matches) < 3) { while (count($matches) < 4) {
$matches[] = ''; $matches[] = '';
} }
return $matches; return $matches;
} }
@@ -209,20 +229,16 @@ class DocBlock implements \Reflector
); );
} }
foreach (explode("\n", $tags) as $tag_line) { foreach (explode("\n", $tags) as $tag_line) {
if (trim($tag_line) === '') {
continue;
}
if (isset($tag_line[0]) && ($tag_line[0] === '@')) { if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
$result[] = $tag_line; $result[] = $tag_line;
} else { } else {
$result[count($result) - 1] .= PHP_EOL . $tag_line; $result[count($result) - 1] .= "\n" . $tag_line;
} }
} }
// create proper Tag objects // create proper Tag objects
foreach ($result as $key => $tag_line) { foreach ($result as $key => $tag_line) {
$result[$key] = Tag::createInstance($tag_line, $this); $result[$key] = Tag::createInstance(trim($tag_line), $this);
} }
} }
@@ -261,7 +277,7 @@ class DocBlock implements \Reflector
*/ */
public function setText($comment) public function setText($comment)
{ {
list($short, $long) = $this->splitDocBlock($comment); list(,$short, $long) = $this->splitDocBlock($comment);
$this->short_description = $short; $this->short_description = $short;
$this->long_description = new DocBlock\Description($long, $this); $this->long_description = new DocBlock\Description($long, $this);
return $this; return $this;
@@ -286,6 +302,44 @@ class DocBlock implements \Reflector
return $this->long_description; return $this->long_description;
} }
/**
* Returns whether this DocBlock is the start of a Template section.
*
* A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker
* (`#@+`) that is appended directly after the opening `/**` of a DocBlock.
*
* An example of such an opening is:
*
* ```
* /**#@+
* * My DocBlock
* * /
* ```
*
* The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all
* elements that follow until another DocBlock is found that contains the closing marker (`#@-`).
*
* @see self::isTemplateEnd() for the check whether a closing marker was provided.
*
* @return boolean
*/
public function isTemplateStart()
{
return $this->isTemplateStart;
}
/**
* Returns whether this DocBlock is the end of a Template section.
*
* @see self::isTemplateStart() for a more complete description of the Docblock Template functionality.
*
* @return boolean
*/
public function isTemplateEnd()
{
return $this->isTemplateEnd;
}
/** /**
* Returns the current context. * Returns the current context.
* *
@@ -161,7 +161,10 @@ class Description implements \Reflector
); );
} }
if (class_exists('dflydev\markdown\MarkdownExtraParser')) { if (class_exists('Parsedown')) {
$markdown = \Parsedown::instance();
$result = $markdown->parse($result);
} elseif (class_exists('dflydev\markdown\MarkdownExtraParser')) {
$markdown = new \dflydev\markdown\MarkdownExtraParser(); $markdown = new \dflydev\markdown\MarkdownExtraParser();
$result = $markdown->transformMarkdown($result); $result = $markdown->transformMarkdown($result);
} }
@@ -56,7 +56,7 @@ class ExampleTag extends SourceTag
$filePath = '"' . $this->filePath . '"'; $filePath = '"' . $this->filePath . '"';
} }
$this->content = $filePath . ' ' . $this->getContent(); $this->content = $filePath . ' ' . parent::getContent();
} }
return $this->content; return $this->content;
@@ -114,9 +114,6 @@ class MethodTag extends ReturnTag
} }
} }
$this->parsedDescription = null; $this->parsedDescription = null;
} else {
echo date('c') . ' ERR (3): @method contained invalid contents: '
. $this->content . PHP_EOL;
} }
return $this; return $this;
@@ -23,11 +23,12 @@ use Barryvdh\Reflection\DocBlock\Tag;
*/ */
class ParamTag extends ReturnTag class ParamTag extends ReturnTag
{ {
/** /** @var string */
* @var string
*/
protected $variableName = ''; protected $variableName = '';
/** @var bool determines whether this is a variadic argument */
protected $isVariadic = false;
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
@@ -61,13 +62,18 @@ class ParamTag extends ReturnTag
array_shift($parts); array_shift($parts);
} }
// if the next item starts with a $ it must be the variable name // if the next item starts with a $ or ...$ it must be the variable name
if (isset($parts[0]) if (isset($parts[0])
&& (strlen($parts[0]) > 0) && (strlen($parts[0]) > 0)
&& ($parts[0][0] == '$') && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$')
) { ) {
$this->variableName = array_shift($parts); $this->variableName = array_shift($parts);
array_shift($parts); array_shift($parts);
if (substr($this->variableName, 0, 3) === '...') {
$this->isVariadic = true;
$this->variableName = substr($this->variableName, 3);
}
} }
$this->setDescription(implode('', $parts)); $this->setDescription(implode('', $parts));
@@ -100,4 +106,14 @@ class ParamTag extends ReturnTag
$this->content = null; $this->content = null;
return $this; return $this;
} }
/**
* Returns whether this tag is variadic.
*
* @return boolean
*/
public function isVariadic()
{
return $this->isVariadic;
}
} }
@@ -166,7 +166,8 @@ class Collection extends \ArrayObject
$namespace_aliases = $this->context->getNamespaceAliases(); $namespace_aliases = $this->context->getNamespaceAliases();
// if the first segment is not an alias; prepend namespace name and // if the first segment is not an alias; prepend namespace name and
// return // return
if (!isset($namespace_aliases[$type_parts[0]])) { if (!isset($namespace_aliases[$type_parts[0]]) &&
!isset($namespace_aliases[strstr($type_parts[0], '::', true)])) {
$namespace = $this->context->getNamespace(); $namespace = $this->context->getNamespace();
if ('' !== $namespace) { if ('' !== $namespace) {
$namespace .= self::OPERATOR_NAMESPACE; $namespace .= self::OPERATOR_NAMESPACE;
@@ -174,6 +175,12 @@ class Collection extends \ArrayObject
return self::OPERATOR_NAMESPACE . $namespace . $type; return self::OPERATOR_NAMESPACE . $namespace . $type;
} }
if (strpos($type_parts[0], '::')) {
$type_parts[] = strstr($type_parts[0], '::');
$type_parts[0] = $namespace_aliases[strstr($type_parts[0], '::', true)];
return implode('', $type_parts);
}
$type_parts[0] = $namespace_aliases[$type_parts[0]]; $type_parts[0] = $namespace_aliases[$type_parts[0]];
$type = implode(self::OPERATOR_NAMESPACE, $type_parts); $type = implode(self::OPERATOR_NAMESPACE, $type_parts);
} }
@@ -72,10 +72,11 @@ class MethodTagTest extends \PHPUnit_Framework_TestCase
public function getTestSignatures() public function getTestSignatures()
{ {
return array( return array(
array( // TODO: Verify this case
'foo', // array(
false, 'foo', '', false, 0, '' // 'foo',
), // false, 'foo', '', false, 0, ''
// ),
array( array(
'foo()', 'foo()',
true, 'foo', 'void', false, 0, '' true, 'foo', 'void', false, 0, ''
@@ -123,6 +123,26 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
$this->assertSame($expected, $collection->getArrayCopy()); $this->assertSame($expected, $collection->getArrayCopy());
} }
/**
* @param string $fixture
* @param array $expected
*
* @dataProvider provideTypesToExpandWithPropertyOrMethod
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
*
* @return void
*/
public function testAddMethodsAndProperties($fixture, $expected)
{
$collection = new Collection(
array(),
new Context(null, array('LinkDescriptor' => '\phpDocumentor\LinkDescriptor'))
);
$collection->add($fixture);
$this->assertSame($expected, $collection->getArrayCopy());
}
/** /**
* @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add
* @expectedException InvalidArgumentException * @expectedException InvalidArgumentException
@@ -177,6 +197,14 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
'DocBlock[]|int[]', 'DocBlock[]|int[]',
array($namespace.'DocBlock[]', 'int[]') array($namespace.'DocBlock[]', 'int[]')
), ),
array(
'LinkDescriptor::setLink()',
array($namespace.'LinkDescriptor::setLink()')
),
array(
'Alias\LinkDescriptor::setLink()',
array('\My\Space\Aliasing\LinkDescriptor::setLink()')
),
); );
} }
@@ -192,4 +220,34 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
{ {
return $this->provideTypesToExpand($method, '\\'); return $this->provideTypesToExpand($method, '\\');
} }
/**
* Returns the method and property types and their expected values to test
* the retrieval of types.
*
* @param string $method Name of the method consuming this data provider.
*
* @return string[]
*/
public function provideTypesToExpandWithPropertyOrMethod($method)
{
return array(
array(
'LinkDescriptor::setLink()',
array('\phpDocumentor\LinkDescriptor::setLink()')
),
array(
'phpDocumentor\LinkDescriptor::setLink()',
array('\phpDocumentor\LinkDescriptor::setLink()')
),
array(
'LinkDescriptor::$link',
array('\phpDocumentor\LinkDescriptor::$link')
),
array(
'phpDocumentor\LinkDescriptor::$link',
array('\phpDocumentor\LinkDescriptor::$link')
),
);
}
} }
@@ -14,6 +14,7 @@ namespace phpDocumentor\Reflection;
use phpDocumentor\Reflection\DocBlock\Context; use phpDocumentor\Reflection\DocBlock\Context;
use phpDocumentor\Reflection\DocBlock\Location; use phpDocumentor\Reflection\DocBlock\Location;
use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
/** /**
* Test class for phpDocumentor\Reflection\DocBlock * Test class for phpDocumentor\Reflection\DocBlock
@@ -90,6 +91,41 @@ DOCBLOCK;
$this->assertFalse($object->hasTag('category')); $this->assertFalse($object->hasTag('category'));
} }
/**
* @covers \phpDocumentor\Reflection\DocBlock::isTemplateStart
*/
public function testIfStartOfTemplateIsDiscovered()
{
$fixture = <<<DOCBLOCK
/**#@+
* @see \MyClass
* @return void
*/
DOCBLOCK;
$object = new DocBlock($fixture);
$this->assertEquals('', $object->getShortDescription());
$this->assertEquals('', $object->getLongDescription()->getContents());
$this->assertCount(2, $object->getTags());
$this->assertTrue($object->hasTag('see'));
$this->assertTrue($object->hasTag('return'));
$this->assertFalse($object->hasTag('category'));
$this->assertTrue($object->isTemplateStart());
}
/**
* @covers \phpDocumentor\Reflection\DocBlock::isTemplateEnd
*/
public function testIfEndOfTemplateIsDiscovered()
{
$fixture = <<<DOCBLOCK
/**#@-*/
DOCBLOCK;
$object = new DocBlock($fixture);
$this->assertEquals('', $object->getShortDescription());
$this->assertEquals('', $object->getLongDescription()->getContents());
$this->assertTrue($object->isTemplateEnd());
}
/** /**
* @covers \phpDocumentor\Reflection\DocBlock::cleanInput * @covers \phpDocumentor\Reflection\DocBlock::cleanInput
* *
@@ -272,7 +308,10 @@ DOCBLOCK;
*/ */
DOCBLOCK; DOCBLOCK;
$object = new DocBlock($fixture); $object = new DocBlock($fixture);
$this->assertCount(1, $object->getTags()); $this->assertCount(1, $tags = $object->getTags());
/** @var ReturnTag $tag */
$tag = reset($tags);
$this->assertEquals("Content on\n multiple lines.\n\n One more, after the break.", $tag->getDescription());
} }
/** /**