diff --git a/.gitignore b/.gitignore index 2aba7e5..b431ae8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /vendor -/humbuglog.txt +/infection.log /.idea +.phpunit.result.cache \ No newline at end of file diff --git a/README.md b/README.md index 9590baa..15bea6b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ That's it. This is a tiny example: - $nf = new NodeFactory('utf-8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); function getItems use ($nf)() { @@ -110,7 +110,8 @@ by default. The NodeFactory class is the pivot of NoTeePHP. - $nf = new NodeFactory('utf-8'); // using the right encoding is security relevant + // using the right encoding is security relevant + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); ### Node creation @@ -129,24 +130,53 @@ The NodeFactory class is the pivot of NoTeePHP. ### Events -You can register events globally. Lets imagine you want to add an xsrf-token to every form: +If you need to modify the node tree in some cases, you can can register a subscriber to the node factory: - $nf->onTag('form', function(array $attributes, array $children) use ($nf) { - $children[] = $nf->input(['type' => 'hidden', 'name' => 'xsrf-token', 'value' => '12345']); - return [$attributes, $children]; - }); - -The following events are available: - -- onTag -- onAttr -- onClass + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); + + class CsrfTokenAdder implements SubscriberInterface + { + public function notify(NodeFactory $nodeFactory, DefaultNode $node): DefaultNode + { + if ($node->getTagName() !== 'form') return; + $attributes = $node->getAttributes(); + $method = strtolower($attributes['method'] ?? 'get'); + $children = $node->getChildren(); + if (!isSecure($method)) { + $children[] = $nodeFactory->input(['type' => 'hidden', 'name' => 'csrf_token', 'value' => getCsrfToken()]) + } + return new DefaultNode( + $node->getTagName(), + $node->getEscaper(), + $attributes, + $children + ); + } + } + + $nf->subscribe(new CsrfTokenAdder()); ### Debugging If you need to know, where a specific node is coming from, enable debug mode for the NodeFactory: - $nf = new NodeFactory('utf-8', true); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator(), true); Now every for every generated html node, an attribute "data-source" will contain the source file and line of the node. You should disable debug mode in production. + +### Short Syntax + +You can also use a shorter syntax that relies on global state. As global state is ugly and not recommended in normal +cases, this feature is not enabled by default. To enable it, you need to manually include the file `global.php`. + + global $noTeePHP; // this global variable is require for including global.php + $noTeePHP = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); + require '{pathToVendorDir}/mschop/NoTeePHP/global.php'; + +Now you can create nodes by simply calling function (which is shorter to write): + + _div( + ['id' => 'some-id'], + _a(['href' => 'https://packagist.org/mschop/NoTeePHP', 'Link to the best lib on the world']) + ) \ No newline at end of file diff --git a/composer.json b/composer.json index 505a6a9..8a48fa7 100644 --- a/composer.json +++ b/composer.json @@ -4,13 +4,13 @@ "keywords": ["html", "template", "dom", "query", "api"], "license": "MIT", "require": { - "php": ">=7.0", + "php": "~7.4", "vdb/uri": "~0.2" }, "require-dev": { - "satooshi/php-coveralls": "~2.0", - "phpunit/phpunit": "~4.8", - "humbug/humbug": "dev-master" + "php-coveralls/php-coveralls": "~2.0", + "infection/infection": "^0.13.4", + "phpunit/phpunit": "^8.3" }, "authors": [ { diff --git a/composer.lock b/composer.lock index 8a5d166..5fefb46 100644 --- a/composer.lock +++ b/composer.lock @@ -1,11 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "549b63663a3618eb7cc9e586936e7849", - "content-hash": "6d4c1c3a62811513d06cc551b6bfd021", + "content-hash": "ac89665f7d0d7bc1a410ec8f6109b040", "packages": [ { "name": "vdb/uri", @@ -49,38 +48,140 @@ "url", "validator" ], - "time": "2015-12-29 19:19:30" + "time": "2015-12-29T19:19:30+00:00" } ], "packages-dev": [ + { + "name": "composer/ca-bundle", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "f26a67e397be0e5c00d7c52ec7b5010098e15ce5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/f26a67e397be0e5c00d7c52ec7b5010098e15ce5", + "reference": "f26a67e397be0e5c00d7c52ec7b5010098e15ce5", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", + "psr/log": "^1.0", + "symfony/process": "^2.5 || ^3.0 || ^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "time": "2019-08-02T09:05:43+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "46867cbf8ca9fb8d60c506895449eb799db1184f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/46867cbf8ca9fb8d60c506895449eb799db1184f", + "reference": "46867cbf8ca9fb8d60c506895449eb799db1184f", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2019-05-27T17:52:04+00:00" + }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "a2c590166b2133a4633738648b6b064edae0814a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", + "reference": "a2c590166b2133a4633738648b6b064edae0814a", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^6.0", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -100,41 +201,44 @@ } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2019-03-17T17:37:11+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.2.0", + "version": "6.3.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d094e337976dff9d8e2424e8485872194e768662" + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662", - "reference": "d094e337976dff9d8e2424e8485872194e768662", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", "shasum": "" }, "require": { - "guzzlehttp/promises": "~1.0", - "guzzlehttp/psr7": "~1.1", - "php": ">=5.5.0" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "~4.0", - "psr/log": "~1.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.2-dev" + "dev-master": "6.3-dev" } }, "autoload": { @@ -167,32 +271,32 @@ "rest", "web service" ], - "time": "2016-03-21 20:02:09" + "time": "2018-04-22T15:46:56+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.2.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", "shasum": "" }, "require": { "php": ">=5.5.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -218,36 +322,41 @@ "keywords": [ "promise" ], - "time": "2016-05-18 16:56:05" + "time": "2016-12-20T10:07:11+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.3.1", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + "reference": "239400de7a173fe9901b9ac7c06497751f00727a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", + "reference": "239400de7a173fe9901b9ac7c06497751f00727a", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -267,61 +376,73 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "PSR-7 message implementation", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", + "psr-7", + "request", + "response", "stream", - "uri" + "uri", + "url" ], - "time": "2016-06-24 23:00:38" + "time": "2019-07-01T23:21:34+00:00" }, { - "name": "humbug/humbug", - "version": "dev-master", + "name": "infection/infection", + "version": "0.13.4", "source": { "type": "git", - "url": "https://github.com/padraic/humbug.git", - "reference": "d80edfcb3e14cd3afce4b0cf8169565af33e1657" + "url": "https://github.com/infection/infection.git", + "reference": "f0f8327f5e60d1a7d8ab4ea01074c6250ab96f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/humbug/zipball/d80edfcb3e14cd3afce4b0cf8169565af33e1657", - "reference": "d80edfcb3e14cd3afce4b0cf8169565af33e1657", + "url": "https://api.github.com/repos/infection/infection/zipball/f0f8327f5e60d1a7d8ab4ea01074c6250ab96f57", + "reference": "f0f8327f5e60d1a7d8ab4ea01074c6250ab96f57", "shasum": "" }, "require": { - "padraic/phar-updater": "^1.0.0", - "padraic/phpunit-accelerator": "^1.0.2", - "padraic/phpunit-extensions": "^1.0.0", - "php": ">=5.4.0", - "phpunit/phpunit": "^4.5|^5.0", - "sebastian/diff": "~1.1", - "symfony/console": "~2.6", - "symfony/event-dispatcher": "~2.6", - "symfony/finder": "~2.6", - "symfony/process": "~2.6" + "composer/xdebug-handler": "^1.3", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "justinrainbow/json-schema": "^5.2", + "nikic/php-parser": "^4.2.1", + "ocramius/package-versions": "^1.2", + "padraic/phar-updater": "^1.0.4", + "php": "^7.1.3", + "pimple/pimple": "^3.2", + "sebastian/diff": "^1.4 || ^2.0 || ^3.0", + "symfony/console": "^3.4 || ^4.0", + "symfony/filesystem": "^3.4 || ^4.0", + "symfony/finder": "^3.4 || ^4.0", + "symfony/process": "^3.4 || ^4.0", + "symfony/yaml": "^3.4 || ^4.0", + "webmozart/assert": "^1.3" + }, + "conflict": { + "symfony/console": "=3.4.16 || =4.1.5", + "symfony/process": "3.4.2" }, "require-dev": { - "behat/behat": "^3.0.15", - "mikey179/vfsstream": "~1.4", - "mockery/mockery": "~0.9", - "symfony/filesystem": "~2.6" + "helmich/phpunit-json-assert": "^2.1 || ^3.0", + "phpunit/phpunit": "^7.5" }, "bin": [ - "bin/humbug" + "bin/infection" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { - "Humbug\\": "src/" + "Infection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -330,108 +451,187 @@ ], "authors": [ { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com", + "homepage": "https://twitter.com/maks_rafalko" + }, + { + "name": "Gert de Pagter", + "homepage": "https://github.com/BackEndTea" + }, + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com", + "homepage": "https://twitter.com/tfidry" + }, + { + "name": "Oleg Zhulnev", + "homepage": "https://github.com/sidz" + }, + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com", + "homepage": "https://www.alexeykopytko.com" } ], - "description": "Humbug is a Mutation Testing framework for PHP. Whereas Code Coverage can tell you what code your tests are executing, Mutation Testing is intended to help you judge how well your unit tests actually perform and where they could be improved.", - "homepage": "https://github.com/padraic/humbug", + "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", "keywords": [ "coverage", + "mutant", + "mutation framework", "mutation testing", "testing", "unit testing" ], - "time": "2016-02-03 23:27:07" + "time": "2019-07-01T18:01:41+00:00" }, { - "name": "padraic/humbug_get_contents", - "version": "1.0.4", + "name": "justinrainbow/json-schema", + "version": "5.2.8", "source": { "type": "git", - "url": "https://github.com/padraic/file_get_contents.git", - "reference": "66797199019d0cb4529cb8d29c6f0b4c5085b53a" + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/file_get_contents/zipball/66797199019d0cb4529cb8d29c6f0b4c5085b53a", - "reference": "66797199019d0cb4529cb8d29c6f0b4c5085b53a", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/dcb6e1006bb5fd1e392b4daa68932880f37550d4", + "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4", "shasum": "" }, "require": { - "php": ">=5.3" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "friendsofphp/php-cs-fixer": "~2.2.20", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" }, + "bin": [ + "bin/validate-json" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { "psr-4": { - "Humbug\\": "src/Humbug/" - }, - "files": [ - "src/function.php" - ] + "JsonSchema\\": "src/JsonSchema/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" } ], - "description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+", - "homepage": "https://github.com/padraic/file_get_contents", + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", "keywords": [ - "download", - "file_get_contents", - "http", - "https", - "ssl", - "tls" + "json", + "schema" ], - "time": "2015-04-22 18:45:00" + "time": "2019-01-14T23:55:14+00:00" }, { - "name": "padraic/phar-updater", - "version": "1.0.3", + "name": "myclabs/deep-copy", + "version": "1.9.3", "source": { "type": "git", - "url": "https://github.com/padraic/phar-updater.git", - "reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/phar-updater/zipball/c17eeb3887dc4269d1b4837dc875d39e9f8149a8", - "reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", + "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", "shasum": "" }, "require": { - "padraic/humbug_get_contents": "^1.0", - "php": ">=5.3.3" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2019-08-09T12:45:53+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.2.3", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "e612609022e935f3d0337c1295176505b41188c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e612609022e935f3d0337c1295176505b41188c8", + "reference": "e612609022e935f3d0337c1295176505b41188c8", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "4.2-dev" } }, "autoload": { "psr-4": { - "Humbug\\SelfUpdate\\": "src/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", @@ -440,45 +640,52 @@ ], "authors": [ { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "name": "Nikita Popov" } ], - "description": "A thing to make PHAR self-updating easy and secure.", + "description": "A PHP parser written in PHP", "keywords": [ - "humbug", - "phar", - "self-update", - "update" + "parser", + "php" ], - "time": "2016-01-05 23:08:01" + "time": "2019-08-12T20:17:41+00:00" }, { - "name": "padraic/phpunit-accelerator", - "version": "v1.0.2", + "name": "ocramius/package-versions", + "version": "1.5.1", "source": { "type": "git", - "url": "https://github.com/padraic/phpunit-accelerator.git", - "reference": "0b3b58e6e9a794eec22df712776058850d5fe0c1" + "url": "https://github.com/Ocramius/PackageVersions.git", + "reference": "1d32342b8c1eb27353c8887c366147b4c2da673c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/phpunit-accelerator/zipball/0b3b58e6e9a794eec22df712776058850d5fe0c1", - "reference": "0b3b58e6e9a794eec22df712776058850d5fe0c1", + "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/1d32342b8c1eb27353c8887c366147b4c2da673c", + "reference": "1d32342b8c1eb27353c8887c366147b4c2da673c", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/phpunit": ">=3.7" + "composer-plugin-api": "^1.0.0", + "php": "^7.3.0" }, - "replace": { - "mybuilder/phpunit-accelerator": "1.0.x" + "require-dev": { + "composer/composer": "^1.8.6", + "doctrine/coding-standard": "^6.0.0", + "ext-zip": "*", + "infection/infection": "^0.13.4", + "phpunit/phpunit": "^8.2.5", + "vimeo/psalm": "^3.4.9" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.6.x-dev" + } }, - "type": "library", "autoload": { "psr-4": { - "MyBuilder\\PhpunitAccelerator\\": "src" + "PackageVersions\\": "src/PackageVersions" } }, "notification-url": "https://packagist.org/downloads/", @@ -487,55 +694,54 @@ ], "authors": [ { - "name": "Keyvan Akbary", - "email": "keyvan@mybuilder.com", - "role": "Developer" - }, - { - "name": "Padraic Brady", - "email": "padraic.brady@gmail.com", - "role": "Contributor" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], - "description": "PHPUnit Accelerator: Speeds up PHPUnit by freeing memory after test runs", - "keywords": [ - "accelerator", - "fast", - "free", - "memory", - "phpunit", - "property" - ], - "time": "2015-01-15 21:18:21" + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "time": "2019-07-17T15:49:50+00:00" }, { - "name": "padraic/phpunit-extensions", - "version": "1.0.1", + "name": "padraic/humbug_get_contents", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/padraic/phpunit-extensions.git", - "reference": "a6942fa3ada5487e1b9a409c235013a677c2689b" + "url": "https://github.com/humbug/file_get_contents.git", + "reference": "dcb086060c9dd6b2f51d8f7a895500307110b7a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/phpunit-extensions/zipball/a6942fa3ada5487e1b9a409c235013a677c2689b", - "reference": "a6942fa3ada5487e1b9a409c235013a677c2689b", + "url": "https://api.github.com/repos/humbug/file_get_contents/zipball/dcb086060c9dd6b2f51d8f7a895500307110b7a7", + "reference": "dcb086060c9dd6b2f51d8f7a895500307110b7a7", "shasum": "" }, "require": { - "php": ">=5.4.0", - "phpunit/phpunit": "^4.0|^5.0" + "composer/ca-bundle": "^1.0", + "ext-openssl": "*", + "php": "^5.3 || ^7.0 || ^7.1 || ^7.2" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.1", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": "^4.8 || ^5.7 || ^6.5" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": false + }, "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Humbug\\": "src/" - } + }, + "files": [ + "src/function.php", + "src/functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -546,98 +752,346 @@ "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Théo Fidry", + "email": "theo.fidry@gmail.com" } ], - "description": "Collection of Listeners to log and manipulate test run order", + "description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+", + "homepage": "https://github.com/padraic/file_get_contents", "keywords": [ - "extension", - "humbug", - "listener", - "phpunit", - "testing", - "tests" + "download", + "file_get_contents", + "http", + "https", + "ssl", + "tls" ], - "time": "2016-01-06 12:16:20" + "time": "2018-02-12T18:47:17+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "1.0", + "name": "padraic/phar-updater", + "version": "v1.0.6", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "url": "https://github.com/humbug/phar-updater.git", + "reference": "d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/humbug/phar-updater/zipball/d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1", + "reference": "d01d3b8f26e541ac9b9eeba1e18d005d852f7ff1", "shasum": "" }, "require": { - "php": ">=5.5" + "padraic/humbug_get_contents": "^1.0", + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "Humbug\\SelfUpdate\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" } ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", + "description": "A thing to make PHAR self-updating easy and secure.", "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" + "humbug", + "phar", + "self-update", + "update" ], - "time": "2015-12-27 11:43:31" + "time": "2018-03-30T12:52:15+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.0", + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "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": "Arne Blankerts", + "role": "Developer", + "email": "arne@blankerts.de" + }, + { + "name": "Sebastian Heuer", + "role": "Developer", + "email": "sebastian@phpeople.de" + }, + { + "name": "Sebastian Bergmann", + "role": "Developer", + "email": "sebastian@phpunit.de" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "role": "Developer", + "email": "arne@blankerts.de" + }, + { + "name": "Sebastian Heuer", + "role": "Developer", + "email": "sebastian@phpeople.de" + }, + { + "name": "Sebastian Bergmann", + "role": "Developer", + "email": "sebastian@phpunit.de" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3b00c229726f892bfdadeaf01ea430ffd04a939d", + "reference": "3b00c229726f892bfdadeaf01ea430ffd04a939d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/php-coveralls" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCoveralls\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "role": "Original creator", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + }, + { + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" + }, + { + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2018-05-22T23:11:08+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -656,24 +1110,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-06-10 09:48:41" + "time": "2019-04-30T17:48:53+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -703,41 +1157,42 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10 07:14:17" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.6.1", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.0" + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -765,43 +1220,44 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2019-06-13T12:50:23+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "7.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", + "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -816,8 +1272,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", @@ -827,29 +1283,32 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2019-07-25T05:31:54+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "050bedf145a257b1ff02746c31894800e5122946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -864,8 +1323,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "FilterIterator implementation that filters files based on a list of suffixes.", @@ -874,7 +1333,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2018-09-13T20:33:42+00:00" }, { "name": "phpunit/php-text-template", @@ -906,8 +1365,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Simple template engine.", @@ -915,29 +1374,34 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^7.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -950,8 +1414,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Utility class for timing", @@ -959,33 +1423,33 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2019-06-07T04:22:29+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", + "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -1008,45 +1472,56 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2019-07-25T05:29:42+00:00" }, { "name": "phpunit/phpunit", - "version": "4.8.26", + "version": "8.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74" + "reference": "e31cce0cf4499c0ccdbbb211a3280d36ab341e36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc1d8cd5b5de11625979125c5639347896ac2c74", - "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e31cce0cf4499c0ccdbbb211a3280d36ab341e36", + "reference": "e31cce0cf4499c0ccdbbb211a3280d36ab341e36", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.2.0", "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.2", + "phpspec/prophecy": "^1.8.1", + "phpunit/php-code-coverage": "^7.0.7", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.2", + "sebastian/exporter": "^3.1.0", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -1054,7 +1529,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "8.3-dev" } }, "autoload": { @@ -1069,8 +1544,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "The PHP Unit Testing framework.", @@ -1080,76 +1555,70 @@ "testing", "xunit" ], - "time": "2016-05-17 03:09:28" + "time": "2019-08-11T06:56:55+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "name": "pimple/pimple", + "version": "v3.2.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": ">=5.3.0", + "psr/container": "^1.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" + "symfony/phpunit-bridge": "^3.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "Pimple": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", "keywords": [ - "mock", - "xunit" + "container", + "dependency injection" ], - "time": "2015-10-02 06:51:40" + "time": "2018-01-21T07:42:36+00:00" }, { - "name": "psr/http-message", - "version": "1.0", + "name": "psr/container", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { @@ -1163,7 +1632,7 @@ }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1176,35 +1645,43 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for HTTP messages", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2015-05-04 20:22:00" + "time": "2017-02-14T16:28:37+00:00" }, { - "name": "psr/log", - "version": "1.0.0", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1217,54 +1694,44 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for logging libraries", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "log", + "http", + "http-message", "psr", - "psr-3" + "psr-7", + "request", + "response" ], - "time": "2012-12-21 11:40:51" + "time": "2016-08-06T14:39:51+00:00" }, { - "name": "satooshi/php-coveralls", - "version": "dev-master", + "name": "psr/log", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/satooshi/php-coveralls.git", - "reference": "50c60bb64054974f8ed7540ae6e75fd7981a5fd3" + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/50c60bb64054974f8ed7540ae6e75fd7981a5fd3", - "reference": "50c60bb64054974f8ed7540ae6e75fd7981a5fd3", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5", - "psr/log": "^1.0", - "symfony/config": "^2.1|^3.0", - "symfony/console": "^2.1|^3.0", - "symfony/stopwatch": "^2.0|^3.0", - "symfony/yaml": "^2.0|^3.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" + "php": ">=5.3.0" }, - "bin": [ - "bin/coveralls" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Satooshi\\": "src/Satooshi/" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1273,47 +1740,130 @@ ], "authors": [ { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/satooshi/php-coveralls", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "ci", - "coverage", - "github", - "test" + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" ], - "time": "2016-01-20 17:44:41" + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1343,39 +1893,271 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-07-12T15:12:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2019-02-04T06:01:07+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2019-05-05T09:05:15+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "06a9a5947f47b3029d76118eb5c22802e5869687" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687", + "reference": "06a9a5947f47b3029d76118eb5c22802e5869687", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2019-08-11T12:43:14+00:00" + }, + { + "name": "sebastian/global-state", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "shasum": "" + }, + "require": { + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "comparator", - "compare", - "equality" + "global state" ], - "time": "2015-07-26 15:48:44" + "time": "2019-02-01T05:30:01+00:00" }, { - "name": "sebastian/diff", - "version": "1.4.1", + "name": "sebastian/object-enumerator", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1388,46 +2170,39 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" } ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-12-08 07:14:41" + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" }, { - "name": "sebastian/environment", - "version": "1.3.7", + "name": "sebastian/object-reflector", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -1445,41 +2220,34 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-05-17 03:18:57" + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" }, { - "name": "sebastian/exporter", - "version": "1.2.2", + "name": "sebastian/recursion-context", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1496,14 +2264,6 @@ "name": "Jeff Welch", "email": "whatthejeff@gmail.com" }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" @@ -1513,41 +2273,31 @@ "email": "aharvey@php.net" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2016-06-17 09:04:28" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" }, { - "name": "sebastian/global-state", - "version": "1.1.1", + "name": "sebastian/resource-operations", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" + "php": "^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1565,37 +2315,34 @@ "email": "sebastian@phpunit.de" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12 03:26:01" + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2018-10-04T04:07:39+00:00" }, { - "name": "sebastian/recursion-context", - "version": "1.0.2", + "name": "sebastian/type", + "version": "1.1.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -1608,38 +2355,39 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", + "role": "lead", "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2019-07-02T08:10:15+00:00" }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, + "require": { + "php": ">=5.6" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1652,31 +2400,42 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "role": "lead", + "email": "sebastian@phpunit.de" } ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/config", - "version": "v3.1.1", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "048dc47e07f92333203c3b7045868bbc864fc40e" + "reference": "a17a2aea43950ce83a0603ed301bac362eb86870" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/048dc47e07f92333203c3b7045868bbc864fc40e", - "reference": "048dc47e07f92333203c3b7045868bbc864fc40e", + "url": "https://api.github.com/repos/symfony/config/zipball/a17a2aea43950ce83a0603ed301bac362eb86870", + "reference": "a17a2aea43950ce83a0603ed301bac362eb86870", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/messenger": "~4.1", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -1684,7 +2443,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -1711,40 +2470,55 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-05-20 11:48:17" + "time": "2019-07-18T10:34:59+00:00" }, { "name": "symfony/console", - "version": "v2.8.7", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3" + "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3", - "reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3", + "url": "https://api.github.com/repos/symfony/console/zipball/8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9", + "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/service-contracts": "^1.1" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/event-dispatcher": "<4.3", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1|~3.0.0", - "symfony/process": "~2.1|~3.0.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "^4.3", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", + "symfony/var-dumper": "^4.3" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -1771,45 +2545,35 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-06-06 15:06:25" + "time": "2019-07-24T17:13:59+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v2.8.7", + "name": "symfony/filesystem", + "version": "v4.3.3", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "2a6b8713f8bdb582058cfda463527f195b066110" + "url": "https://github.com/symfony/filesystem.git", + "reference": "b9896d034463ad6fd2bf17e2bf9418caecd6313d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2a6b8713f8bdb582058cfda463527f195b066110", - "reference": "2a6b8713f8bdb582058cfda463527f195b066110", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b9896d034463ad6fd2bf17e2bf9418caecd6313d", + "reference": "b9896d034463ad6fd2bf17e2bf9418caecd6313d", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "4.3-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" + "Symfony\\Component\\Filesystem\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1829,36 +2593,36 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:11:27" + "time": "2019-06-23T08:51:25+00:00" }, { - "name": "symfony/filesystem", - "version": "v3.1.1", + "name": "symfony/finder", + "version": "v4.3.3", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "5751e80d6f94b7c018f338a4a7be0b700d6f3058" + "url": "https://github.com/symfony/finder.git", + "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/5751e80d6f94b7c018f338a4a7be0b700d6f3058", - "reference": "5751e80d6f94b7c018f338a4a7be0b700d6f3058", + "url": "https://api.github.com/repos/symfony/finder/zipball/9638d41e3729459860bb96f6247ccb61faaa45f2", + "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Filesystem\\": "" + "Symfony\\Component\\Finder\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1878,39 +2642,42 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-04-12 18:27:47" + "time": "2019-06-28T13:16:30+00:00" }, { - "name": "symfony/finder", - "version": "v2.8.7", + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "3ec095fab1800222732ca522a95dce8fa124007b" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3ec095fab1800222732ca522a95dce8fa124007b", - "reference": "3ec095fab1800222732ca522a95dce8fa124007b", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "1.12-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Finder\\": "" + "Symfony\\Polyfill\\Ctype\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1919,30 +2686,36 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", - "time": "2016-06-06 11:11:27" + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-08-06T08:03:45+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.2.0", + "version": "v1.12.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "dff51f72b0706335131b00a7f49606168c582594" + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", - "reference": "dff51f72b0706335131b00a7f49606168c582594", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", "shasum": "" }, "require": { @@ -1954,7 +2727,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.12-dev" } }, "autoload": { @@ -1988,29 +2761,87 @@ "portable", "shim" ], - "time": "2016-05-18 14:26:46" + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", + "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06T08:03:45+00:00" }, { "name": "symfony/process", - "version": "v2.8.7", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c" + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/115347d00c342198cdc52a7bd8bc15b5ab43500c", - "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c", + "url": "https://api.github.com/repos/symfony/process/zipball/856d35814cf287480465bb7a6c413bb7f5f5e69c", + "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -2037,29 +2868,88 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:11:27" + "time": "2019-05-30T16:10:05+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v1.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", + "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-06-13T11:15:36+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.1.1", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "e7238f98c90b99e9b53f3674a91757228663b04d" + "reference": "6b100e9309e8979cf1978ac1778eb155c1f7d93b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e7238f98c90b99e9b53f3674a91757228663b04d", - "reference": "e7238f98c90b99e9b53f3674a91757228663b04d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6b100e9309e8979cf1978ac1778eb155c1f7d93b", + "reference": "6b100e9309e8979cf1978ac1778eb155c1f7d93b", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3", + "symfony/service-contracts": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -2086,29 +2976,39 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2016-06-06 11:42:41" + "time": "2019-05-27T08:16:38+00:00" }, { "name": "symfony/yaml", - "version": "v3.1.1", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623" + "reference": "34d29c2acd1ad65688f58452fd48a46bd996d5a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c5a7e7fc273c758b92b85dcb9c46149ccda89623", - "reference": "c5a7e7fc273c758b92b85dcb9c46149ccda89623", + "url": "https://api.github.com/repos/symfony/yaml/zipball/34d29c2acd1ad65688f58452fd48a46bd996d5a6", + "reference": "34d29c2acd1ad65688f58452fd48a46bd996d5a6", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.3-dev" } }, "autoload": { @@ -2135,32 +3035,74 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-06-14 11:18:07" + "time": "2019-07-24T14:47:54+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "role": "Developer", + "email": "arne@blankerts.de" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2019-06-13T22:48:21+00:00" }, { "name": "webmozart/assert", - "version": "1.0.2", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -2184,18 +3126,16 @@ "check", "validate" ], - "time": "2015-08-24 13:29:44" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "humbug/humbug": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": ">=5.4" + "php": "~7.4" }, "platform-dev": [] } diff --git a/global.php b/global.php new file mode 100644 index 0000000..b8afa30 --- /dev/null +++ b/global.php @@ -0,0 +1,946 @@ +getEscaper(), + $attributes, + $children + ); +} + +function raw(string $text): RawNode +{ + return new RawNode($text); +} + +function text(string $text): TextNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return new TextNode($text, $noTeePHP->getEscaper()); +} + +function _a(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('a', func_get_args()); +} + +function _abbr(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('abbr', func_get_args()); +} + +function _acronym(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('acronym', func_get_args()); +} + +function _address(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('address', func_get_args()); +} + +function _applet(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('applet', func_get_args()); +} + +function _area(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('area', func_get_args()); +} + +function _article(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('article', func_get_args()); +} + +function _aside(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('aside', func_get_args()); +} + +function _audio(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('audio', func_get_args()); +} + +function _base(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('base', func_get_args()); +} + +function _basefont(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('basefont', func_get_args()); +} + +function _b(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('b', func_get_args()); +} + +function _bdo(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('bdo', func_get_args()); +} + +function _bgsound(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('bgsound', func_get_args()); +} + +function _big(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('big', func_get_args()); +} + +function _blink(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('blink', func_get_args()); +} + +function _blockquote(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('blockquote', func_get_args()); +} + +function _body(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('body', func_get_args()); +} + +function _br(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('br', func_get_args()); +} + +function _button(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('button', func_get_args()); +} + +function _canvas(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('canvas', func_get_args()); +} + +function _caption(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('caption', func_get_args()); +} + +function _center(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('center', func_get_args()); +} + +function _cite(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('cite', func_get_args()); +} + +function _code(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('code', func_get_args()); +} + +function _col(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('col', func_get_args()); +} + +function _colgroup(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('colgroup', func_get_args()); +} + +function _command(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('command', func_get_args()); +} + +function _datalist(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('datalist', func_get_args()); +} + +function _dd(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('dd', func_get_args()); +} + +function _del(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('del', func_get_args()); +} + +function _details(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('details', func_get_args()); +} + +function _dfn(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('dfn', func_get_args()); +} + +function _div(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('div', func_get_args()); +} + +function _dl(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('dl', func_get_args()); +} + +function _dt(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('dt', func_get_args()); +} + +function _embed(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('embed', func_get_args()); +} + +function _em(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('em', func_get_args()); +} + +function _fieldset(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('fieldset', func_get_args()); +} + +function _figcaption(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('figcaption', func_get_args()); +} + +function _figure(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('figure', func_get_args()); +} + +function _font(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('font', func_get_args()); +} + +function _footer(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('footer', func_get_args()); +} + +function _form(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('form', func_get_args()); +} + +function _frame(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('frame', func_get_args()); +} + +function _frameset(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('frameset', func_get_args()); +} + +function _h1(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('h1', func_get_args()); +} + +function _h2(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('h2', func_get_args()); +} + +function _h3(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('h3', func_get_args()); +} + +function _h4(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('h4', func_get_args()); +} + +function _h5(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('h5', func_get_args()); +} + +function _h6(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('h6', func_get_args()); +} + +function _header(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('header', func_get_args()); +} + +function _head(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('head', func_get_args()); +} + +function _hgroup(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('hgroup', func_get_args()); +} + +function _hr(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('hr', func_get_args()); +} + +function _html(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('html', func_get_args()); +} + +function _iframe(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('iframe', func_get_args()); +} + +function _i(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('i', func_get_args()); +} + +function _img(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('img', func_get_args()); +} + +function _input(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('input', func_get_args()); +} + +function _ins(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('ins', func_get_args()); +} + +function _isindex(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('isindex', func_get_args()); +} + +function _kbd(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('kbd', func_get_args()); +} + +function _keygen(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('keygen', func_get_args()); +} + +function _label(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('label', func_get_args()); +} + +function _legend(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('legend', func_get_args()); +} + +function _li(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('li', func_get_args()); +} + +function _link(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('link', func_get_args()); +} + +function _listing(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('listing', func_get_args()); +} + +function _map(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('map', func_get_args()); +} + +function _mark(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('mark', func_get_args()); +} + +function _marquee(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('marquee', func_get_args()); +} + +function _math(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('math', func_get_args()); +} + +function _menu(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('menu', func_get_args()); +} + +function _meta(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('meta', func_get_args()); +} + +function _meter(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('meter', func_get_args()); +} + +function _nav(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('nav', func_get_args()); +} + +function _nextid(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('nextid', func_get_args()); +} + +function _nobr(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('nobr', func_get_args()); +} + +function _noembed(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('noembed', func_get_args()); +} + +function _noframes(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('noframes', func_get_args()); +} + +function _noscript(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('noscript', func_get_args()); +} + +function _object(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('object', func_get_args()); +} + +function _ol(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('uol', func_get_args()); +} + +function _optgroup(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('optgroup', func_get_args()); +} + +function _option(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('option', func_get_args()); +} + +function _output(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('output', func_get_args()); +} + +function _param(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('param', func_get_args()); +} + +function _plaintext(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('plaintext', func_get_args()); +} + +function _p(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('p', func_get_args()); +} + +function _pre(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('pre', func_get_args()); +} + +function _progress(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('progress', func_get_args()); +} + +function _q(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('q', func_get_args()); +} + +function _rp(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('rp', func_get_args()); +} + +function _rt(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('rt', func_get_args()); +} + +function _ruby(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('ruby', func_get_args()); +} + +function _samp(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('samp', func_get_args()); +} + +function _script(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('script', func_get_args()); +} + +function _section(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('section', func_get_args()); +} + +function _select(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('select', func_get_args()); +} + +function _small(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('small', func_get_args()); +} + +function _source(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('source', func_get_args()); +} + +function _spacer(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('spacer', func_get_args()); +} + +function _span(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('span', func_get_args()); +} + +function _s(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('s', func_get_args()); +} + +function _strike(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('strike', func_get_args()); +} + +function _strong(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('strong', func_get_args()); +} + +function _style(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('style', func_get_args()); +} + +function _sub(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('sub', func_get_args()); +} + +function _sup(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('sup', func_get_args()); +} + +function _summary(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('summary', func_get_args()); +} + +function _svg(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('svg', func_get_args()); +} + +function _table(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('table', func_get_args()); +} + +function _tbody(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('tbody', func_get_args()); +} + +function _td(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('td', func_get_args()); +} + +function _textarea(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('textarea', func_get_args()); +} + +function _tfoot(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('tfoot', func_get_args()); +} + +function _thead(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('thead', func_get_args()); +} + +function _th(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('th', func_get_args()); +} + +function _time(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('time', func_get_args()); +} + +function _title(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('title', func_get_args()); +} + +function _tr(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('tr', func_get_args()); +} + +function _tt(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('tt', func_get_args()); +} + +function _ul(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('ul', func_get_args()); +} + +function _u(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('u', func_get_args()); +} + +function __var(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('var', func_get_args()); +} + +function _video(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('video', func_get_args()); +} + +function _wbr(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('wbr', func_get_args()); +} + +function _xmp(): DefaultNode +{ + global $noTeePHP; + assert($noTeePHP instanceof NodeFactory); + return $noTeePHP->create('xmp', func_get_args()); +} diff --git a/humbug.json.dist b/humbug.json.dist deleted file mode 100644 index 412f220..0000000 --- a/humbug.json.dist +++ /dev/null @@ -1,11 +0,0 @@ -{ - "source": { - "directories": [ - "src" - ] - }, - "timeout": 10, - "logs": { - "text": "humbuglog.txt" - } -} \ No newline at end of file diff --git a/infection.json.dist b/infection.json.dist new file mode 100644 index 0000000..d4d6b3c --- /dev/null +++ b/infection.json.dist @@ -0,0 +1,14 @@ +{ + "timeout": 100, + "source": { + "directories": [ + "src" + ] + }, + "logs": { + "text": "infection.log" + }, + "mutators": { + "@default": true + } +} \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index eb4aab3..ff8af6c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,6 +1,5 @@ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1f51743..251ff72 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,5 @@ diff --git a/src/AbstractNodeFactory.php b/src/AbstractNodeFactory.php new file mode 100644 index 0000000..c27ba23 --- /dev/null +++ b/src/AbstractNodeFactory.php @@ -0,0 +1,239 @@ + true, + 'archive' => true, + 'cite' => true, + 'classid' => true, + 'codebase' => true, + 'data' => true, + 'formaction' => true, + 'href' => true, + 'icon' => true, + 'longdesc' => true, + 'manifest' => true, + 'poster' => true, + 'src' => true, + 'usemap' => true, + ]; + + protected EscaperInterface $escaper; + protected UriValidatorInterface $uriValidator; + protected bool $debug; + /** @var SubscriberInterface[] */ + protected array $subscriber = []; + + public function __construct( + EscaperInterface $escaper, + UriValidatorInterface $uriValidator, + bool $debug = false + ) + { + $this->escaper = $escaper; + $this->uriValidator = $uriValidator; + $this->debug = $debug; + } + + /** + * @param string $name + * @param array $arguments + * @return DefaultNode + * @throws InvalidArgumentException + */ + public function create(string $name, array $arguments): DefaultNode + { + $attributes = []; + if ($this->debug) $attributes['data-source'] = $this->generateDebugSource(); + + $firstArgument = reset($arguments); + if (is_array($firstArgument)) { + $firstAttribute = reset($firstArgument); + if ($firstAttribute !== null && !$firstAttribute instanceof NodeInterface) { + $attributes = array_merge($firstArgument, $attributes); + $this->validateAttributes($attributes); + // remove the first element (because it contains the attributes) + array_shift($arguments); + } + } + + return $this->notify( + new DefaultNode( + $name, + $this->escaper, + $attributes, + static::flatten($arguments) + ) + ); + } + + /** + * Get information on where a node has been created + * @return string + */ + protected function generateDebugSource() + { + $trace = debug_backtrace(); + $callee = $trace[2]; + return $callee['file'] . ':' . $callee['line']; + } + + /** + * @param array $attributes + * @throws InvalidArgumentException + */ + protected function validateAttributes(array $attributes) + { + foreach ($attributes as $key => $value) { + if (!$this->isValidAttributeKey($key)) { + throw new \InvalidArgumentException('invalid attribute name ' . $key); + } + if (!$this->isValidAttributeValue($key, $value)) { + throw new \InvalidArgumentException('invalid attribute value for ' . $key); + } + } + } + + protected function isValidAttributeKey(string $key): bool + { + if (!preg_match('/^[0-9a-z-_]*$/i', $key)) { + return false; + } + return true; + } + + protected function isValidAttributeValue(string $key, string $value): bool + { + if (array_key_exists($key, static::URI_ATTRIBUTES)) { + return $this->uriValidator->isValid($value); + } + return true; + } + + /** + * An api consumer can pass arrays coming from function calls as children to the method "create". Elements in this + * array are direct children of the node created with the method "create". Those must therefore be flattened. + * @param array $arguments + * @return array + */ + protected static function flatten(array $arguments): array + { + $result = []; + foreach ($arguments as $argument) { + if (is_array($argument)) { + $result = array_merge($result, $argument); + } elseif ($argument !== null) { + $result[] = $argument; + } + } + return $result; + } + + /** + * Notify all subscriber + * + * @param DefaultNode $node + * @return DefaultNode + */ + protected function notify(DefaultNode $node): DefaultNode + { + foreach ($this->subscriber as $subscriber) { + $node = $subscriber->notify($this, $node); + } + + return $node; + } + + /** + * Add an event listener. The event listener is called when a new DefaultNode is created. + * + * @param SubscriberInterface $callable + */ + public function subscribe(SubscriberInterface $callable) + { + $this->subscriber[] = $callable; + } + + /** + * Output escaped text. + * + * @param string $text + * @return TextNode + */ + public function text(string $text): TextNode + { + return new TextNode($text, $this->escaper); + } + + /** + * This method creates a RawNode instance. RawNode is used to output unescaped html content. + * + * @param string $text + * @return RawNode + */ + public function raw(string $text): RawNode + { + return new RawNode($text); + } + + /** + * The Document-Node is used for creating the DOCTYPE. Even if the html representation of the doctype does not + * contain any nodes, NodeFactory expects the Document-Node to contain all other nodes. + * + * @param string $doctype + * @param DefaultNode $html + * @return DocumentNode + */ + public function document(string $doctype, DefaultNode $html): DocumentNode + { + return new DocumentNode($doctype, $html); + } + + /** + * Creates a wrapper, that does not produce any HTML. This method is useful for cases, where you need to output + * multiple nodes. + * + * Example: + * + * $values = [1, 2, 3]; + * $nodeFactory->ul( + * $nodeFactory->wrapper(array_map(function ($value) { return $nodeFactory->li($value); }) + * ) + * + * @return WrapperNode + */ + public function wrapper(): WrapperNode + { + return new WrapperNode(static::flatten(func_get_args()), $this->escaper); + } + + /** + * This method handles all default node types. + * + * @param $name + * @param $arguments + * @return NodeInterface + */ + public function __call($name, $arguments): NodeInterface + { + return $this->create($name, $arguments); + } + + /** + * @return EscaperInterface + */ + public function getEscaper(): EscaperInterface + { + return $this->escaper; + } +} diff --git a/src/EscaperForNoTeeContext.php b/src/DefaultEscaper.php similarity index 63% rename from src/EscaperForNoTeeContext.php rename to src/DefaultEscaper.php index bb82079..a13a569 100644 --- a/src/EscaperForNoTeeContext.php +++ b/src/DefaultEscaper.php @@ -4,6 +4,7 @@ namespace NoTee; +use InvalidArgumentException; /** * Class SecureContextEscaper @@ -13,9 +14,9 @@ * * @package NoTee */ -class EscaperForNoTeeContext implements Escaper +class DefaultEscaper implements EscaperInterface { - protected static $supportedEncodings = [ + protected const SUPPORTED_ENCODINGS = [ 'iso-8859-1', 'iso8859-1', 'iso-8859-5', 'iso8859-5', 'iso-8859-15', 'iso8859-15', 'utf-8', 'cp866', 'ibm866', '866', 'cp1251', 'windows-1251', @@ -27,36 +28,43 @@ class EscaperForNoTeeContext implements Escaper 'eucjp-win', 'macroman' ]; - protected $encoding; + protected string $encoding; /** * EscaperForNoTeeContext constructor. * @param string $encoding * @throws \InvalidArgumentException */ - public function __construct($encoding) + public function __construct(string $encoding) { - $encoding = strtolower($encoding); - if(!in_array($encoding, static::$supportedEncodings)) { - throw new \InvalidArgumentException('Invalid encoding. Please use an encoding allowed for htmlspecialchars'); - } + static::checkEncoding($encoding); $this->encoding = $encoding; } - - /* - * I used ENT_COMPAT because escaping single quotes is only relevant, if attribute are written with single quotes. - * Since NoTeePHP does not use single quotes, using ENT_COMPAT is enough. - */ - public function escapeHtml(string $value) : string { - return htmlspecialchars($value, ENT_COMPAT, $this->encoding, false); + /* + * NoTeePHP knows the context of a text. Therefore we can be sure, that this escape function is not used for + * attributes. So we can use ENT_NOQUOTES, because we we only need to escape '<' and '>'. + */ + return htmlspecialchars($value, ENT_NOQUOTES, $this->encoding, false); } public function escapeAttribute(string $value) : string { + // ENT_COMPAT because NoTeePHP always uses double quotes for attributes return htmlspecialchars($value, ENT_COMPAT, $this->encoding, false); } + /** + * @param string $encoding + * @throws InvalidArgumentException + */ + protected static function checkEncoding(string $encoding) + { + $encoding = strtolower($encoding); + if(!in_array($encoding, static::SUPPORTED_ENCODINGS)) { + throw new \InvalidArgumentException('Invalid encoding. Please use an encoding allowed for htmlspecialchars'); + } + } } diff --git a/src/DefaultNode.php b/src/DefaultNode.php deleted file mode 100644 index db3e07b..0000000 --- a/src/DefaultNode.php +++ /dev/null @@ -1,65 +0,0 @@ -tagName = $tagName; - $this->escaper = $escaper; - $this->attributes = $attributes; - foreach($children as &$child) { - if(!is_object($child)) { - $child = new TextNode((string)$child, $this->escaper); - } - } - $this->children = $children; - } - - public function __toString() : string - { - $attributeString = !empty($this->attributes) ? ' ' . $this->getAttributeString() : ''; - if(isset($this->children[0]) || !in_array($this->tagName, static::$voidTags)) { - $result = ''; - /** @var Node $child */ - foreach($this->children as $child) { - $result .= $child; - } - return '<' . $this->tagName . $attributeString . '>' . $result . 'tagName . '>'; - } - return '<' . $this->tagName . $attributeString . ' />'; - } - - public function getAttributeString() : string - { - $attributeString = ''; - $first = true; - foreach($this->attributes as $name => $value) { - $escapedAttribute = $this->escapeAttribute($value); - $attributeString .= ($first ? '' : ' ') . $name . '="' . $escapedAttribute . '"'; - $first = false; - } - return $attributeString; - } - - protected function escapeAttribute(string $value) : string - { - return $this->escaper->escapeAttribute($value); - } -} diff --git a/src/Document.php b/src/Document.php deleted file mode 100644 index e115635..0000000 --- a/src/Document.php +++ /dev/null @@ -1,29 +0,0 @@ -doctype = $doctype; - $this->htmlNode = $htmlNode; - } - - public function __toString() : string - { - - return 'doctype . ">\n" . (string)$this->htmlNode; - } - -} diff --git a/src/Escaper.php b/src/EscaperInterface.php similarity index 84% rename from src/Escaper.php rename to src/EscaperInterface.php index 774fe4b..4db4cd9 100644 --- a/src/Escaper.php +++ b/src/EscaperInterface.php @@ -3,7 +3,7 @@ namespace NoTee; -interface Escaper +interface EscaperInterface { public function escapeHtml(string $value) : string; public function escapeAttribute(string $value) : string; diff --git a/src/Helper.php b/src/Helper.php deleted file mode 100644 index 38ae4a2..0000000 --- a/src/Helper.php +++ /dev/null @@ -1,20 +0,0 @@ - $value) { - if($preserveKey) { - $result[$key] = $callable($key, $value); - } else { - $result[] = $callable($key, $value); - } - } - return $result; - } -} \ No newline at end of file diff --git a/src/NodeFactory.php b/src/NodeFactory.php index 24070d5..51cc7b9 100644 --- a/src/NodeFactory.php +++ b/src/NodeFactory.php @@ -1,216 +1,14 @@ true, - 'archive' => true, - 'cite' => true, - 'classid' => true, - 'codebase' => true, - 'data' => true, - 'formaction' => true, - 'href' => true, - 'icon' => true, - 'longdesc' => true, - 'manifest' => true, - 'poster' => true, - 'src' => true, - 'usemap' => true, - ]; - - /** @var UriValidator */ - protected $uriValidator; - - /** - * NodeFactory constructor. - * @param string $encoding - * @param bool $debug - * @throws \InvalidArgumentException - */ - public function __construct(string $encoding, bool $debug = false) { - $this->escaper = new EscaperForNoTeeContext($encoding); - $this->debug = $debug; - $this->uriValidator = new UriValidator(); - } - - /** - * @param string $name - * @param array $arguments - * @return DefaultNode - * @throws \InvalidArgumentException - * @throws UriSyntaxException - */ - public function create(string $name, array $arguments) : DefaultNode - { - $debugAttributes = []; - if($this->debug) { - $debugAttributes = [ - 'data-source' => $this->generateDebugSource() - ]; - } - - if( - !isset($arguments[0]) - || !is_array($arguments[0]) - || reset($arguments[0]) instanceof Node - || reset($arguments[0]) === null - ) { - list($attributes, $children) = $this->triggerEvents($name, $debugAttributes, static::flatten($arguments)); - return new DefaultNode($name, $this->escaper, $attributes, $children); - } - - $attributes = array_shift($arguments); - $this->validateAttributes($attributes); - list($attributes, $children) = $this->triggerEvents( - $name, - array_merge($attributes, $debugAttributes), - static::flatten($arguments) - ); - return new DefaultNode($name, $this->escaper, $attributes, $children); - } - - /** - * Get information on where a node has been created - * @return string - */ - protected function generateDebugSource() - { - $trace = debug_backtrace(); - $callee = $trace[2]; - return $callee['file'] . ':' . $callee['line']; - } - - /** - * @param array $attributes - * @throws \InvalidArgumentException - * @throws UriSyntaxException - */ - protected function validateAttributes(array $attributes) - { - foreach($attributes as $key => $value) { - if(!$this->isValidAttributeKey($key)) { - throw new \InvalidArgumentException('invalid attribute name ' . $key); - } - if(!$this->isValidAttributeValue($key, $value)) { - throw new \InvalidArgumentException('invalid attribute value for ' . $key); - } - } - } - - protected function isValidAttributeKey(string $key) : bool - { - if(!preg_match('/^[0-9a-z-_]*$/i', $key)) { - return false; - } - return true; - } - - protected function isValidAttributeValue(string $key, string $value) : bool - { - if(array_key_exists($key, static::$uriAttributes)) { - return $this->uriValidator->isValid($value); - } - return true; - } - - /** - * An api consumer can pass arrays coming from function calls as children to the method "create". Elements in this - * array are direct children of the node created with the method "create". Those must therefore be flattened. - * @param array $arguments - * @return array - */ - protected static function flatten(array $arguments) : array - { - $result = []; - foreach($arguments as $argument) { - if(is_array($argument)) { - $result = array_merge($result, $argument); - } elseif($argument !== null) { - $result[] = $argument; - } - } - return $result; - } - - /** - * @param string $tagName - * @param array $attributes - * @param array $children - * @return array - */ - protected function triggerEvents(string $tagName, array $attributes, array $children) : array - { - list($attributes, $children) = $this->triggerTagEvents($tagName, $attributes, $children); - list($attributes, $children) = $this->triggerClassEvents($attributes, $children); - list($attributes, $children) = $this->triggerAttributeEvents($attributes, $children); - return [$attributes, $children]; - } - - protected function triggerTagEvents(string $tagName, array $attributes, array $children) : array - { - $lowerTagName = strtolower($tagName); - foreach($this->tagEvents as $tagEvent) { - if(strtolower($tagEvent[0]) === $lowerTagName) { - list($attributes, $children) = call_user_func_array($tagEvent[1], [$attributes, $children]); - } - } - return [$attributes, $children]; - } - - protected function triggerClassEvents(array $attributes, array $children) : array - { - foreach($this->classEvents as $classEvent) { - if(isset($attributes['class']) && in_array($classEvent[0], explode(' ', $attributes['class']))) { - list($attributes, $children) = call_user_func_array($classEvent[1], [$attributes, $children]); - } - } - return [$attributes, $children]; - } - - protected function triggerAttributeEvents(array $attributes, array $children) : array - { - foreach($this->attributeEvents as $attributeEvent) { - if( - isset($attributes[$attributeEvent[0]]) - && $attributes[$attributeEvent[0]] === $attributeEvent[1] - ) { - list($attributes, $children) = call_user_func_array($attributeEvent[2], [$attributes, $children]); - } - } - return [$attributes, $children]; - } - - public function onClass(string $class, callable $callable) - { - $this->classEvents[] = [$class, $callable]; - } - - public function onAttr(string $key, string $value, callable $callable) - { - $this->attributeEvents[] = [$key, $value, $callable]; - } - - public function onTag(string $tag, callable $callable) - { - $this->tagEvents[] = [$tag, $callable]; - } +use NoTee\Nodes\DefaultNode; +class NodeFactory extends AbstractNodeFactory +{ public function a() : DefaultNode { return $this->create('a', func_get_args()); } public function abbr() : DefaultNode { return $this->create('abbr', func_get_args()); } public function acronym() : DefaultNode { return $this->create('acronym', func_get_args()); } @@ -337,30 +135,8 @@ public function tr() : DefaultNode { return $this->create('tr', func_get_args()) public function tt() : DefaultNode { return $this->create('tt', func_get_args()); } public function ul() : DefaultNode { return $this->create('ul', func_get_args()); } public function u() : DefaultNode { return $this->create('u', func_get_args()); } - public function _var() : DefaultNode { return $this->create('var', func_get_args()); } + public function var() : DefaultNode { return $this->create('var', func_get_args()); } public function video() : DefaultNode { return $this->create('video', func_get_args()); } public function wbr() : DefaultNode { return $this->create('wbr', func_get_args()); } public function xmp() : DefaultNode { return $this->create('xmp', func_get_args()); } - - - public function text(string $text): TextNode - { - return new TextNode($text, $this->escaper); - } - - public function raw(string $text) : RawNode - { - return new RawNode($text); - } - - public function document(string $doctype, DefaultNode $html) : Document - { - return new Document($doctype, $html); - } - - public function wrapper() - { - return new WrapperNode(static::flatten(func_get_args()), $this->escaper); - } - -} +} \ No newline at end of file diff --git a/src/Node.php b/src/NodeInterface.php similarity index 75% rename from src/Node.php rename to src/NodeInterface.php index aa39d0a..3b902bb 100644 --- a/src/Node.php +++ b/src/NodeInterface.php @@ -3,7 +3,7 @@ namespace NoTee; -interface Node +interface NodeInterface { public function __toString() : string; } diff --git a/src/Nodes/DefaultNode.php b/src/Nodes/DefaultNode.php new file mode 100644 index 0000000..9347417 --- /dev/null +++ b/src/Nodes/DefaultNode.php @@ -0,0 +1,105 @@ + + */ + private const VOID_TAGS = [ + 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', + 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr' + ]; + + protected string $tagName; + protected EscaperInterface $escaper; + protected array $attributes; + + /** @var array Node[] */ + protected array $children; + + public function __construct(string $tagName, EscaperInterface $escaper, array $attributes = [], array $children = []) + { + $this->tagName = $tagName; + $this->escaper = $escaper; + $this->attributes = $attributes; + foreach ($children as &$child) { + if (!is_object($child)) { + $child = new TextNode((string)$child, $this->escaper); + } + } + $this->children = $children; + } + + public function __toString(): string + { + $attributeString = !empty($this->attributes) ? ' ' . $this->getAttributeString() : ''; + if (isset($this->children[0]) || !in_array($this->tagName, static::VOID_TAGS)) { + $result = ''; + foreach ($this->children as $child) { + assert($child instanceof NodeInterface, 'All children must be instances of Node'); + $result .= $child; + } + return '<' . $this->tagName . $attributeString . '>' . $result . 'tagName . '>'; + } + return '<' . $this->tagName . $attributeString . ' />'; + } + + public function getAttributeString(): string + { + $attributeString = ''; + $first = true; + foreach ($this->attributes as $name => $value) { + $escapedAttribute = $this->escapeAttribute($value); + $attributeString .= ($first ? '' : ' ') . $name . '="' . $escapedAttribute . '"'; + $first = false; + } + return $attributeString; + } + + /** + * @return string + */ + public function getTagName(): string + { + return $this->tagName; + } + + /** + * @return EscaperInterface + */ + public function getEscaper(): EscaperInterface + { + return $this->escaper; + } + + /** + * @return array + */ + public function getAttributes(): array + { + return $this->attributes; + } + + /** + * @return NodeInterface[] + */ + public function getChildren(): array + { + return $this->children; + } + + protected function escapeAttribute(string $value): string + { + return $this->escaper->escapeAttribute($value); + } +} diff --git a/src/Nodes/DocumentNode.php b/src/Nodes/DocumentNode.php new file mode 100644 index 0000000..4796944 --- /dev/null +++ b/src/Nodes/DocumentNode.php @@ -0,0 +1,27 @@ +doctype = $doctype; + $this->topNode = $topNode; + } + + public function __toString(): string + { + + return 'doctype . ">\n" . (string)$this->topNode; + } + +} diff --git a/src/Nodes/RawNode.php b/src/Nodes/RawNode.php new file mode 100644 index 0000000..719abad --- /dev/null +++ b/src/Nodes/RawNode.php @@ -0,0 +1,22 @@ +raw = $raw; + } + + public function __toString(): string + { + return $this->raw; + } +} diff --git a/src/Nodes/TextNode.php b/src/Nodes/TextNode.php new file mode 100644 index 0000000..61dde6e --- /dev/null +++ b/src/Nodes/TextNode.php @@ -0,0 +1,24 @@ +text = $escaper->escapeHtml($text); + } + + public function __toString(): string + { + return $this->text; + } + +} diff --git a/src/WrapperNode.php b/src/Nodes/WrapperNode.php similarity index 65% rename from src/WrapperNode.php rename to src/Nodes/WrapperNode.php index 2ee6bf9..c83c4f0 100644 --- a/src/WrapperNode.php +++ b/src/Nodes/WrapperNode.php @@ -1,13 +1,16 @@ raw = $value; - } - - public function __toString() : string - { - return $this->raw; - } -} diff --git a/src/SubscriberInterface.php b/src/SubscriberInterface.php new file mode 100644 index 0000000..85d81cc --- /dev/null +++ b/src/SubscriberInterface.php @@ -0,0 +1,12 @@ +text = $escaper->escapeHtml($text); - } - - public function __toString() : string - { - return $this->text; - } - -} diff --git a/src/UriValidator.php b/src/UriValidator.php index 1727e37..a8d82df 100644 --- a/src/UriValidator.php +++ b/src/UriValidator.php @@ -5,6 +5,7 @@ namespace NoTee; +use VDB\Uri\Exception\UriSyntaxException; use VDB\Uri\Uri; /** @@ -14,9 +15,9 @@ * * @package NoTee */ -class UriValidator +class UriValidator implements UriValidatorInterface { - protected static $schemeWhitelist = [ + protected const SCHEME_WHITELIST = [ '', 'http', 'https', @@ -27,7 +28,12 @@ class UriValidator public function isValid(string $uri) : bool { - $uriObject = new Uri($uri); - return $uriObject->getScheme() === null || in_array(strtolower($uriObject->getScheme()), static::$schemeWhitelist); + try { + $uriObject = new Uri($uri); + } catch(UriSyntaxException $ex) { + return false; + } + $scheme = mb_strtolower($uriObject->getScheme()); + return $uriObject->getScheme() === null || in_array($scheme, static::SCHEME_WHITELIST); } } diff --git a/src/UriValidatorInterface.php b/src/UriValidatorInterface.php new file mode 100644 index 0000000..74e40b2 --- /dev/null +++ b/src/UriValidatorInterface.php @@ -0,0 +1,10 @@ +expectException(InvalidArgumentException::class); + new DefaultEscaper('utf--8'); + } +} \ No newline at end of file diff --git a/tests/EventTest.php b/tests/EventTest.php index f2ba353..1445456 100644 --- a/tests/EventTest.php +++ b/tests/EventTest.php @@ -5,32 +5,34 @@ namespace NoTee; -class EventTest extends \PHPUnit_Framework_TestCase +use NoTee\Nodes\DefaultNode; +use PHPUnit\Framework\TestCase; + +class EventTestFormTagSubscriber implements SubscriberInterface +{ + public function notify(NodeFactory $nodeFactory, DefaultNode $node): DefaultNode + { + if ($node->getTagName() !== 'form') return $node; + $children = array_merge( + [$nodeFactory->input(['type' => 'hidden', 'value' => '12345', 'name' => 'xsrf_token'])], + $node->getChildren() + ); + return new DefaultNode('form', $node->getEscaper(), $node->getAttributes(), $children); + } +} + +class EventTest extends TestCase { public function test() { - $nf = new NodeFactory('utf-8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $expected = $nf->form( - ['class' => 'someclass anotherclass', 'id' => 'someid'], + ['class' => 'someclass', 'id' => 'someid'], $nf->input(['type' => 'hidden', 'value' => '12345', 'name' => 'xsrf_token']), - $nf->div('onAttr') ); - $nf->onAttr('id', 'someid', function($attributes, $children) use ($nf) { - $children[] = $nf->div('onAttr'); - return [$attributes, $children]; - }); - - $nf->onClass('someclass', function($attributes, $children) { - $attributes['class'] = $attributes['class'] . ' anotherclass'; - return [$attributes, $children]; - }); - - $nf->onTag('form', function($attributes, $children) use ($nf){ - $children[] = $nf->input(['type' => 'hidden', 'value' => '12345', 'name' => 'xsrf_token']); - return [$attributes, $children]; - }); + $nf->subscribe(new EventTestFormTagSubscriber()); $node = $nf->form( ['class' => 'someclass', 'id' => 'someid'] diff --git a/tests/GlobalTest.php b/tests/GlobalTest.php new file mode 100644 index 0000000..c01a49c --- /dev/null +++ b/tests/GlobalTest.php @@ -0,0 +1,22 @@ +assertEquals('', _a()); + + $noTeePHP = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator(), true); + $a = $noTeePHP->a(); + $this->assertEquals(__FILE__ . ':19', $a->getAttributes()['data-source']); + } +} \ No newline at end of file diff --git a/tests/HelperTest.php b/tests/HelperTest.php deleted file mode 100644 index 6054d33..0000000 --- a/tests/HelperTest.php +++ /dev/null @@ -1,36 +0,0 @@ -assertEquals([ - 2, - 3, - 4, - 5, - ], Helper::map([ - 1, - 2, - 3, - 4, - ], function($key, $value) { - return ++$value; - })); - - $this->assertEquals([ - 2 => 2, - 3 => 3, - 4 => 4, - ], Helper::map([ - 2 => 1, - 3 => 2, - 4 => 3, - ], function($key, $value) { - return ++$value; - }, true)); - } -} diff --git a/tests/Issues/67-double-encoding.php b/tests/Issues/67-double-encoding.php index 3aa27cb..d3c0fa1 100644 --- a/tests/Issues/67-double-encoding.php +++ b/tests/Issues/67-double-encoding.php @@ -2,11 +2,13 @@ namespace NoTee; -class DoubleEncodingTest extends \PHPUnit_Framework_TestCase +use PHPUnit\Framework\TestCase; + +class DoubleEncodingTest extends TestCase { public function test() { - $nf = new NodeFactory('utf-8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $nodes = $nf->p(['data-text' => 'Möge'], $nf->text('Möge')); $this->assertEquals('

Möge

', (string)$nodes); } diff --git a/tests/NodeFactoryTest.php b/tests/NodeFactoryTest.php index bdbfee4..84c7b19 100644 --- a/tests/NodeFactoryTest.php +++ b/tests/NodeFactoryTest.php @@ -4,7 +4,10 @@ namespace NoTee; -class NodeFactoryTest extends \PHPUnit_Framework_TestCase +use NoTee\Nodes\DocumentNode; +use PHPUnit\Framework\TestCase; + +class NodeFactoryTest extends TestCase { /** @var NodeFactory */ @@ -15,7 +18,7 @@ class NodeFactoryTest extends \PHPUnit_Framework_TestCase */ public function before() { - $this->nf = new NodeFactory('utf-8'); + $this->nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); } public function Test_ComplexStructure() @@ -60,22 +63,23 @@ public function test() } - public function test_invalidEncoding_throwsException() + public function test_debugMode() { - $this->setExpectedException('InvalidArgumentException'); - new NodeFactory('utf--8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator(), true); + $root = $nf->span(); + $this->assertEquals('', (string)$root); } - public function test_debugMode() + public function test_debugModeWithExistingAttributes() { - $nf = new NodeFactory('utf-8', true); - $root = $nf->span(); - $this->assertEquals('', (string)$root); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator(), true); + $root = $nf->span(['id' => 'hello-world']); + $this->assertEquals('', (string)$root); } public function test_textAndRaw() { - $nf = new NodeFactory('utf-8', true); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $node = $nf->text('test>'); $this->assertEquals('test>', (string)$node); $node = $nf->raw('test>'); @@ -84,9 +88,9 @@ public function test_textAndRaw() public function testDocument() { - $nf = new NodeFactory('utf-8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $doc = $nf->document( - Document::DOCTYPE_HTML5, + 'html', $nf->html( $nf->head( @@ -101,21 +105,21 @@ public function testDocument() public function test_issue57_firstItemInFirstParameterIsNull_shouldBeInterpretedAsNode() { - $nf = new NodeFactory('utf-8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $node = $nf->div([null, $nf->text('test')]); $this->assertEquals('
test
', (string)$node); } public function test_childNeitherObjectNorString() { - $nf = new NodeFactory('utf-8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $node = $nf->div('1', 1); $this->assertEquals($nf->div('1', '1'), $node); } public function test_wrapper() { - $nf = new NodeFactory('utf-8'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $wrapper = $nf->wrapper( $nf->div('test'), [ diff --git a/tests/PerformanceTest.php b/tests/PerformanceTest.php new file mode 100644 index 0000000..8fb8c68 --- /dev/null +++ b/tests/PerformanceTest.php @@ -0,0 +1,34 @@ +subscribe(new SubscriberDoingNothing()); + $start = microtime(true); + $items = []; + for($x = 0; $x < 1000; $x++) { + $items[] = $nf->div(['class' => 'hello-world']); + } + $node = $nf->div($items); + (string)$node; + $end = microtime(true); + $this->assertLessThan(0.030, $start - $end); + } +} \ No newline at end of file diff --git a/tests/SecurityTest.php b/tests/SecurityTest.php index bff3378..b38a911 100644 --- a/tests/SecurityTest.php +++ b/tests/SecurityTest.php @@ -4,12 +4,16 @@ namespace NoTee; -class SecurityTest extends \PHPUnit_Framework_TestCase +use InvalidArgumentException; +use NoTee\Nodes\DefaultNode; +use PHPUnit\Framework\TestCase; + +class SecurityTest extends TestCase { private function getEscaper() { - return new EscaperForNoTeeContext('utf-8'); + return new DefaultEscaper('utf-8'); } public function test_EscapesAttributes() @@ -20,15 +24,15 @@ public function test_EscapesAttributes() public function test_InvalidAttributeName_ThrowsException() { - $nf = new NodeFactory('utf-8'); - $this->setExpectedException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); $nf->a(['_invalid>attribute 'google.de']); } public function test_UriInjection() { - $nf = new NodeFactory('utf-8'); - $this->setExpectedException('InvalidArgumentException'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); + $this->expectException(InvalidArgumentException::class); $nf->a( ['href' => 'javascript: alert(1)'] ); @@ -36,8 +40,8 @@ public function test_UriInjection() public function test_UriInjectionWithWhitespace() { - $nf = new NodeFactory('utf-8'); - $this->setExpectedException('InvalidArgumentException'); + $nf = new NodeFactory(new DefaultEscaper('utf-8'), new UriValidator()); + $this->expectException(InvalidArgumentException::class); $nf->a(['href' => ' javascript: alert(1) ']); } }