diff --git a/.editorconfig b/.editorconfig index 2de6e38..c1067a2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,7 +4,7 @@ root = true [*] -indent_style = spaces +indent_style = space end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true diff --git a/.gitignore b/.gitignore index bc4b7c2..30ec480 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Icon Vendor/* /.idea +/coverage/* diff --git a/.travis.yml b/.travis.yml index 84b0a18..6d2e84e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,14 @@ language: php php: - - 5.6 - 7.0 + - 7.1 matrix: - allow_failures: - - php: 7.0 - fast_finish: true include: - - php: 5.6 + - php: 7.1 env: - COVERALLS=1 diff --git a/README.md b/README.md index 7d9f554..db9b387 100755 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ The plugin includes a trait, a view helper, a behavior and a shell to clean your --- -**For CakePHP 2.x use the 1.x version or branch!** +* For **CakePHP 2.x** use the 1.x version or branch. +* For **CakePHP <=3.5** use the 2.0 version or branch. Documentation ------------- @@ -25,13 +26,6 @@ Support For support and feature request, please visit the [Support Site](https://github.com/burzum/cakephp-html-purifier/issues). -Branch strategy -------------- - -* The **master** branch holds the `STABLE` latest version of the plugin. -* The **2.0** branch is `UNSTABLE` and used to test new features before releasing them. -* Only **hot fixes** are accepted against the master branch. - Contributing to this Plugin --------------------------- @@ -43,6 +37,6 @@ Please feel free to contribute to the plugin with new issues, requests, unit tes License ------- -Copyright 2012 - 2016 Florian Krämer +Copyright 2012 - 2018 Florian Krämer Licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) License. Redistributions of the source code included in this repository must retain the copyright notice found in each file. diff --git a/composer.json b/composer.json index 52c4281..f4ce7e0 100644 --- a/composer.json +++ b/composer.json @@ -13,11 +13,12 @@ ], "minimum-stability": "stable", "require": { - "cakephp/cakephp": "3.*", - "ezyang/htmlpurifier": "*" + "cakephp/cakephp": "^3.6", + "ezyang/htmlpurifier": "*", + "cakephp/cakephp-codesniffer": "^3.0" }, "require-dev": { - "phpunit/phpunit": "5.*" + "phpunit/phpunit": "6.*" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 3ab5f2e..e9b009f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,117 +4,43 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ae139d53d02c53e33d5eccc67ca66e9f", - "content-hash": "29971f31636cef331b9f1188e8c2082f", + "content-hash": "d648a8bcc69f8b0d0b6a047c8cb4d91d", "packages": [ - { - "name": "aura/installer-default", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/auraphp/installer-default.git", - "reference": "52f8de3670cc1ef45a916f40f732937436d028c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/auraphp/installer-default/zipball/52f8de3670cc1ef45a916f40f732937436d028c8", - "reference": "52f8de3670cc1ef45a916f40f732937436d028c8", - "shasum": "" - }, - "type": "composer-installer", - "extra": { - "class": "Aura\\Composer\\DefaultInstaller" - }, - "autoload": { - "psr-0": { - "Aura\\Composer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Paul M. Jones", - "email": "pmjones88@gmail.com", - "homepage": "http://paul-m-jones.com" - } - ], - "description": "Installs Aura packages using the Composer defaults.", - "keywords": [ - "aura", - "installer" - ], - "time": "2012-11-26 21:35:57" - }, { "name": "aura/intl", - "version": "1.1.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/auraphp/Aura.Intl.git", - "reference": "c5fe620167550ad6fa77dd3570fba2efc77a2a21" + "reference": "7fce228980b19bf4dee2d7bbd6202a69b0dde926" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/auraphp/Aura.Intl/zipball/c5fe620167550ad6fa77dd3570fba2efc77a2a21", - "reference": "c5fe620167550ad6fa77dd3570fba2efc77a2a21", + "url": "https://api.github.com/repos/auraphp/Aura.Intl/zipball/7fce228980b19bf4dee2d7bbd6202a69b0dde926", + "reference": "7fce228980b19bf4dee2d7bbd6202a69b0dde926", "shasum": "" }, "require": { - "aura/installer-default": "1.0.*", - "php": ">=5.4.0" - }, - "type": "aura-package", - "extra": { - "aura": { - "type": "library", - "config": { - "common": "Aura\\Intl\\_Config\\Common" - } - }, - "branch-alias": { - "dev-develop": "1.1.x-dev" - } + "php": "^5.6|^7.0" }, + "type": "library", "autoload": { - "psr-0": { - "Aura\\Intl": "src/" - }, "psr-4": { - "Aura\\Intl\\_Config\\": "config/" + "Aura\\Intl\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-2-Clause" + "MIT" ], "authors": [ - { - "name": "Paul M. Jones", - "email": "pmjones88@gmail.com", - "homepage": "http://paul-m-jones.com" - }, { "name": "Aura.Intl Contributors", "homepage": "https://github.com/auraphp/Aura.Intl/contributors" - }, - { - "name": "Pascal Borreli", - "email": "pascal@borreli.com" - }, - { - "name": "Mapthegod", - "email": "mapthegod@gmail.com" - }, - { - "name": "Jose Lorenzo Rodriguez", - "email": "jose.zap@gmail.com" } ], - "description": "The Aura.Intl package provides internationalization (I18N) tools, specifically\npackage-oriented per-locale message translation.", - "homepage": "http://auraphp.com/Aura.Intl", + "description": "The Aura Intl package provides internationalization tools, specifically message translation.", + "homepage": "https://github.com/auraphp/Aura.Intl", "keywords": [ "g11n", "globalization", @@ -124,29 +50,33 @@ "l10n", "localization" ], - "time": "2014-08-24 00:00:00" + "time": "2017-01-20T05:00:11+00:00" }, { "name": "cakephp/cakephp", - "version": "3.2.12", + "version": "3.6.3", "source": { "type": "git", "url": "https://github.com/cakephp/cakephp.git", - "reference": "c318328d981cad94e223ec95c79fd0a2e98679bc" + "reference": "1cfebf6c6719a2a743d9a3e59ee091a726f18844" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/cakephp/zipball/c318328d981cad94e223ec95c79fd0a2e98679bc", - "reference": "c318328d981cad94e223ec95c79fd0a2e98679bc", + "url": "https://api.github.com/repos/cakephp/cakephp/zipball/1cfebf6c6719a2a743d9a3e59ee091a726f18844", + "reference": "1cfebf6c6719a2a743d9a3e59ee091a726f18844", "shasum": "" }, "require": { - "aura/intl": "1.1.*", - "cakephp/chronos": "*", + "aura/intl": "^3.0.0", + "cakephp/chronos": "^1.0.1", "ext-intl": "*", "ext-mbstring": "*", - "php": ">=5.5.9", - "psr/log": "1.0" + "php": ">=5.6.0", + "psr/log": "^1.0.0", + "zendframework/zend-diactoros": "^1.4.0" + }, + "conflict": { + "phpunit/phpunit": "<5.7" }, "replace": { "cakephp/cache": "self.version", @@ -156,6 +86,7 @@ "cakephp/datasource": "self.version", "cakephp/event": "self.version", "cakephp/filesystem": "self.version", + "cakephp/form": "self.version", "cakephp/i18n": "self.version", "cakephp/log": "self.version", "cakephp/orm": "self.version", @@ -163,16 +94,17 @@ "cakephp/validation": "self.version" }, "require-dev": { - "cakephp/cakephp-codesniffer": "dev-master", - "phpunit/phpunit": "*" + "cakephp/cakephp-codesniffer": "^3.0", + "phpunit/phpunit": "^5.7.14|^6.0" }, "suggest": { - "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation." + "ext-openssl": "To use Security::encrypt() or have secure CSRF token generation.", + "lib-ICU": "The intl PHP library, to use Text::transliterate() or Text::slug()" }, "type": "library", "autoload": { "psr-4": { - "Cake\\": "src" + "Cake\\": "src/" }, "files": [ "src/Core/functions.php", @@ -192,33 +124,88 @@ } ], "description": "The CakePHP framework", + "homepage": "https://cakephp.org", + "keywords": [ + "conventions over configuration", + "dry", + "form", + "framework", + "mvc", + "orm", + "psr-7", + "rapid-development", + "validation" + ], + "time": "2018-05-13T23:20:49+00:00" + }, + { + "name": "cakephp/cakephp-codesniffer", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/cakephp/cakephp-codesniffer.git", + "reference": "d77ac81199f2f1e5a8d8ebf96a5d6d7cd4e0542b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/cakephp-codesniffer/zipball/d77ac81199f2f1e5a8d8ebf96a5d6d7cd4e0542b", + "reference": "d77ac81199f2f1e5a8d8ebf96a5d6d7cd4e0542b", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.0.0" + }, + "require-dev": { + "phpunit/phpunit": "<6.0" + }, + "type": "phpcodesniffer-standard", + "autoload": { + "psr-4": { + "CakePHP\\": "CakePHP" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/cakephp-codesniffer/graphs/contributors" + } + ], + "description": "CakePHP CodeSniffer Standards", "homepage": "http://cakephp.org", "keywords": [ + "codesniffer", "framework" ], - "time": "2016-07-09 02:08:27" + "time": "2017-12-21T20:01:35+00:00" }, { "name": "cakephp/chronos", - "version": "0.4.11", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/cakephp/chronos.git", - "reference": "39db65d38488d6edd88bab5f33e19b1205ceeeda" + "reference": "85bcaea6a832684b32ef54b2487b0c14a172e9e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cakephp/chronos/zipball/39db65d38488d6edd88bab5f33e19b1205ceeeda", - "reference": "39db65d38488d6edd88bab5f33e19b1205ceeeda", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/85bcaea6a832684b32ef54b2487b0c14a172e9e6", + "reference": "85bcaea6a832684b32ef54b2487b0c14a172e9e6", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|^7" }, "require-dev": { "athletic/athletic": "~0.1", - "cakephp/cakephp-codesniffer": "dev-master", - "phpunit/phpunit": "*" + "cakephp/cakephp-codesniffer": "~2.3", + "phpbench/phpbench": "@dev", + "phpstan/phpstan": "^0.6.4", + "phpunit/phpunit": "<6.0" }, "type": "library", "autoload": { @@ -251,25 +238,28 @@ "datetime", "time" ], - "time": "2016-06-15 06:26:37" + "time": "2018-01-13T12:19:50+00:00" }, { "name": "ezyang/htmlpurifier", - "version": "v4.7.0", + "version": "v4.10.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "ae1828d955112356f7677c465f94f7deb7d27a40" + "reference": "d85d39da4576a6934b72480be6978fb10c860021" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/ae1828d955112356f7677c465f94f7deb7d27a40", - "reference": "ae1828d955112356f7677c465f94f7deb7d27a40", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021", + "reference": "d85d39da4576a6934b72480be6978fb10c860021", "shasum": "" }, "require": { "php": ">=5.2" }, + "require-dev": { + "simpletest/simpletest": "^1.1" + }, "type": "library", "autoload": { "psr-0": { @@ -295,26 +285,84 @@ "keywords": [ "html" ], - "time": "2015-08-05 01:03:42" + "time": "2018-02-23T01:58:20+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "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-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "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\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -328,43 +376,147 @@ } ], "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ "log", "psr", "psr-3" ], - "time": "2012-12-21 11:40:51" + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.2.3", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4842476c434e375f9d3182ff7b89059583aa8b27", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-02-20T21:35:23+00:00" + }, + { + "name": "zendframework/zend-diactoros", + "version": "1.7.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "bf26aff803a11c5cc8eb7c4878a702c403ec67f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/bf26aff803a11c5cc8eb7c4878a702c403ec67f1", + "reference": "bf26aff803a11c5cc8eb7c4878a702c403ec67f1", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "phpunit/phpunit": "^5.7.16 || ^6.0.8", + "zendframework/zend-coding-standard": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7.x-dev", + "dev-develop": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://github.com/zendframework/zend-diactoros", + "keywords": [ + "http", + "psr", + "psr-7" + ], + "time": "2018-02-26T15:44:50+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -389,41 +541,44 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.5.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "a8773992b362b58498eed24bf85005f363c34771" + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771", - "reference": "a8773992b362b58498eed24bf85005f363c34771", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.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", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -431,20 +586,122 @@ "object", "object graph" ], - "time": "2015-11-20 12:04:31" + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "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", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "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", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { @@ -485,33 +742,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.0", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", - "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "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\\": [ @@ -530,24 +793,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": "2017-11-30T07:14:17+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": { @@ -577,36 +840,37 @@ "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.7.6", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", "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" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } }, "autoload": { @@ -639,44 +903,44 @@ "spy", "stub" ], - "time": "2016-06-07 08:13:47" + "time": "2018-04-18T13:57:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "4.0.0", + "version": "5.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9" + "reference": "c89677919c5dd6d3b3852f230a663118762218ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9", - "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", + "reference": "c89677919c5dd6d3b3852f230a663118762218ac", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0|~2.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "^5.4" + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.4.0", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -691,7 +955,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -702,20 +966,20 @@ "testing", "xunit" ], - "time": "2016-06-03 05:03:56" + "time": "2018-04-06T15:36:58+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "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/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -749,7 +1013,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -790,29 +1054,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": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "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/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -834,33 +1103,33 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "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/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -883,51 +1152,57 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "5.4.6", + "version": "6.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59" + "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f1fc94b77ea6418bd6a06c64a1dac0645fbce59", - "reference": "2f1fc94b77ea6418bd6a06c64a1dac0645fbce59", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4f21a3c6b97c42952fd5c2837bb354ec0199b97b", + "reference": "4f21a3c6b97c42952fd5c2837bb354ec0199b97b", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3 || ^2.0", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/object-enumerator": "~1.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", - "symfony/yaml": "~2.1|~3.0" + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.5", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" }, "bin": [ "phpunit" @@ -935,7 +1210,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4.x-dev" + "dev-master": "6.5.x-dev" } }, "autoload": { @@ -961,33 +1236,33 @@ "testing", "xunit" ], - "time": "2016-06-16 06:01:15" + "time": "2018-04-10T11:38:34+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "3.2.3", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52" + "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52", - "reference": "b13d0d9426ced06958bd32104653526a6c998a52", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf", + "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2" + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" }, "conflict": { - "phpunit/phpunit": "<5.4.0" + "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "^5.4" + "phpunit/phpunit": "^6.5" }, "suggest": { "ext-soap": "*" @@ -995,7 +1270,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { @@ -1010,7 +1285,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1020,27 +1295,27 @@ "mock", "xunit" ], - "time": "2016-06-12 07:37:26" + "time": "2018-01-06T05:45:45+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1065,34 +1340,34 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^7.0", + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1123,38 +1398,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1181,32 +1456,32 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2017-08-03T08:09:46+00:00" }, { "name": "sebastian/environment", - "version": "1.3.7", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1231,34 +1506,34 @@ "environment", "hhvm" ], - "time": "2016-05-17 03:18:57" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.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.1.x-dev" } }, "autoload": { @@ -1298,27 +1573,27 @@ "export", "exporter" ], - "time": "2016-06-17 09:04:28" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -1326,7 +1601,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1349,33 +1624,34 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2017-04-27T15:39:26+00:00" }, { "name": "sebastian/object-enumerator", - "version": "1.0.0", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1395,32 +1671,77 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-01-28 13:25:10" + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "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/recursion-context", - "version": "1.0.2", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "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.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1448,7 +1769,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11 19:50:13" + "time": "2017-03-03T06:23:57+00:00" }, { "name": "sebastian/resource-operations", @@ -1490,20 +1811,20 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { @@ -1533,81 +1854,73 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-02-04 12:56:52" + "time": "2016-10-03T07:35:21+00:00" }, { - "name": "symfony/yaml", - "version": "v3.1.2", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": ">=5.5.9" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" }, { "name": "webmozart/assert", - "version": "1.0.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", - "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "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": { @@ -1631,7 +1944,7 @@ "check", "validate" ], - "time": "2015-08-24 13:29:44" + "time": "2018-01-29T19:49:41+00:00" } ], "aliases": [], diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..9d4c21b --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,9 @@ + + + + + + + 0 + + diff --git a/src/Lib/Purifier.php b/src/Lib/Purifier.php index 26979ba..28d4e50 100644 --- a/src/Lib/Purifier.php +++ b/src/Lib/Purifier.php @@ -2,13 +2,17 @@ /** * Purifier * - * @author Florian Krämer - * @copyright 2012 - 2016 Florian Krämer - * @license MIT + * @author Florian Krämer + * @copyright 2012 - 2018 Florian Krämer + * @license MIT */ namespace Burzum\HtmlPurifier\Lib; -class Purifier { +/** + * Purifier + */ +class Purifier +{ /** * Purifier configurations @@ -27,7 +31,7 @@ class Purifier { /** * Return a singleton instance of the StorageManager. * - * @return ClassRegistry instance + * @return Purifier Purifier instance */ public static function &getInstance() { @@ -35,16 +39,17 @@ public static function &getInstance() if (!$instance) { $instance[0] = new Purifier(); } + return $instance[0]; } /** * Gets and sets purifier configuration sets. * - * @param string $configName - * @param string $config + * @param string $configName + * @param string $config * @throws \InvalidArgumentException - * @return \HTMLPurifier + * @return \HTMLPurifier_Config */ public static function config($configName, $config = null) { @@ -74,7 +79,7 @@ public static function config($configName, $config = null) /** * Gets an instance of the purifier lib only when needed, lazy loading it * - * @param string $configName + * @param string $configName * @return HTMLPurifier */ public static function getPurifierInstance($configName = 'default') diff --git a/src/Lib/PurifierTrait.php b/src/Lib/PurifierTrait.php index a183a7d..402caed 100644 --- a/src/Lib/PurifierTrait.php +++ b/src/Lib/PurifierTrait.php @@ -2,13 +2,17 @@ /** * Purifier * - * @author Florian Krämer - * @copyright 2012 - 2016 Florian Krämer - * @license MIT + * @author Florian Krämer + * @copyright 2012 - 2018 Florian Krämer + * @license MIT */ namespace Burzum\HtmlPurifier\Lib; -trait PurifierTrait { +/** + * Purifier Trait + */ +trait PurifierTrait +{ /** * Cleans markup @@ -24,8 +28,8 @@ public function purifyHtml($markup, $config = 'default') /** * Gets a HtmlPurifier instance based on a configuration name. * - * @param string $config - * @return \HtmlPurifier + * @param string $config + * @return HTMLPurifier */ public function getHtmlPurifier($config = 'default') { diff --git a/src/Model/Behavior/HtmlPurifierBehavior.php b/src/Model/Behavior/HtmlPurifierBehavior.php index 7b3b6cc..56912a5 100755 --- a/src/Model/Behavior/HtmlPurifierBehavior.php +++ b/src/Model/Behavior/HtmlPurifierBehavior.php @@ -2,9 +2,9 @@ /** * Purifier * - * @author Florian Krämer - * @copyright 2012 - 2016 Florian Krämer - * @license MIT + * @author Florian Krämer + * @copyright 2012 - 2018 Florian Krämer + * @license MIT */ namespace Burzum\HtmlPurifier\Model\Behavior; @@ -13,7 +13,13 @@ use Cake\Event\Event; use Cake\ORM\Behavior; -class HtmlPurifierBehavior extends Behavior { +/** + * HtmlPurifier Behavior + * + * Sanitize a set of given fields automatically + */ +class HtmlPurifierBehavior extends Behavior +{ use PurifierTrait; @@ -33,24 +39,22 @@ class HtmlPurifierBehavior extends Behavior { ] ]; - protected $_purifier; - /** * Before marshal callaback * - * @param \Cake\Event\Event $event The Model.beforeMarshal event. - * @param \ArrayObject $data Data. - * @param \ArrayObject $options Options. + * @param \Cake\Event\Event $event The Model.beforeMarshal event. + * @param \ArrayObject $data Data. * @return void */ - public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options) + public function beforeMarshal(Event $event, ArrayObject $data) { - foreach ($this->config('fields') as $key => $field) { + foreach ($this->getConfig('fields') as $key => $field) { if (is_int($key) && isset($data[$field])) { - $data[$field] = $this->purifyHtml($data[$field], $this->config('purifierConfig')); + $data[$field] = $this->purifyHtml($data[$field], $this->getConfig('purifierConfig')); } + if (is_string($key) && is_string($field)) { - $data[$key] = $this->purifyHtml($data[$key], $this->config($field)); + $data[$key] = $this->purifyHtml($data[$key], $this->getConfig($field)); } } } diff --git a/src/Shell/PurifierShell.php b/src/Shell/PurifierShell.php index c576240..1a5456c 100644 --- a/src/Shell/PurifierShell.php +++ b/src/Shell/PurifierShell.php @@ -2,18 +2,21 @@ /** * Purifier Shell * - * @author Florian Krämer - * @copyright 2012 - 2016 Florian Krämer - * @license MIT + * @author Florian Krämer + * @copyright 2012 - 2018 Florian Krämer + * @license MIT */ namespace Burzum\HtmlPurifier\Shell; -use Cake\Console\ConsoleOptionParser; use Cake\Console\Shell; +use Cake\ORM\Locator\TableLocator; use Cake\ORM\Table; -use Cake\ORM\TableRegistry; -class PurifierShell extends Shell { +/** + * PurifierShell + */ +class PurifierShell extends Shell +{ /** * Main entry point @@ -32,19 +35,21 @@ public function main() */ protected function _getTable() { - $table = TableRegistry::get($this->args[0]); - $connection = $table->connection(); - $tables = $connection->schemaCollection()->listTables(); - if (!in_array($table->table(), $tables)) { - $this->abort(__d('Burzum/HtmlPurifier', 'Table `{0}` does not exist in connection `{1}`!', $table->table(), $connection->configName())); + $table = (new TableLocator())->get($this->args[0]); + $connection = $table->getConnection(); + $tables = $connection->getSchemaCollection()->listTables(); + + if (!in_array($table->getTable(), $tables)) { + $this->abort(__d('Burzum/HtmlPurifier', 'Table `{0}` does not exist in connection `{1}`!', $table->getTable(), $connection->configName())); } + return $table; } /** * Gets the field(s) from the args and checks if they're present in the table. * - * @param \Cake\ORM\Table $table Table object. + * @param \Cake\ORM\Table $table Table object. * @return array Set of of fields explode()'ed from the args */ protected function _getFields(Table $table) @@ -52,7 +57,7 @@ protected function _getFields(Table $table) $fields = explode(',', $this->args[1]); foreach ($fields as $field) { if (!$table->hasField($field)) { - $this->abort(sprintf('Table `%s` is missing the field `%s`.', $table->table(), $field)); + $this->abort(sprintf('Table `%s` is missing the field `%s`.', $table->getTable(), $field)); } } @@ -62,17 +67,19 @@ protected function _getFields(Table $table) /** * Loads the purifier behavior for the given table if not already attached. * - * @param \Cake\ORM\Table $table Table object. - * @param array Set of fields to sanitize + * @param \Cake\ORM\Table $table Table object. + * @param array Set of fields to sanitize * @return void */ protected function _loadBehavior(Table $table, $fields) { if (!in_array('HtmlPurifier', $table->behaviors()->loaded())) { - $table->addBehavior('Burzum/HtmlPurifier.HtmlPurifier', [ + $table->addBehavior( + 'Burzum/HtmlPurifier.HtmlPurifier', [ 'fields' => $fields, 'purifierConfig' => $this->param('config') - ]); + ] + ); } } @@ -95,7 +102,8 @@ public function purify() $this->info(__d('Burzum/HtmlPurifier', 'Sanitizing fields `{0}` in table `{1}`', implode(',', $fields), $table->table())); - $this->helper('progress')->output([ + $this->helper('progress')->output( + [ 'total' => $total, 'callback' => function ($progress) use ($total, $table, $fields) { $chunkSize = 25; @@ -108,30 +116,33 @@ public function purify() } return; } - ]); + ] + ); } /** * Processes the records. * - * @param \Cake\ORM\Table $table - * @param int $chunkCount - * @param int $chunkSize + * @param \Cake\ORM\Table $table Table instance + * @param int $chunkCount Chunk Count + * @param int $chunkSize Chunk Size + * @param array $fields Fields to sanitize * @return void */ - protected function _process(Table $table, $chunkCount, $chunkSize, $fields) { + protected function _process(Table $table, $chunkCount, $chunkSize, $fields) + { $query = $table->find(); if ($table->hasFinder('purifier')) { $query->find('purifier'); } - $fields[] = $table->primaryKey(); + $fields[] = $table->getPrimaryKey(); $results = $query ->select($fields) ->offset($chunkCount) ->limit($chunkSize) - ->orderDesc($table->aliasField($table->primaryKey())) + ->orderDesc($table->aliasField($table->primarygetPrimaryKey())) ->all(); if (empty($results)) { @@ -151,14 +162,16 @@ protected function _process(Table $table, $chunkCount, $chunkSize, $fields) { /** * {@inheritDoc} */ - public function getOptionParser() { + public function getOptionParser() + { $parser = parent::getOptionParser(); - $parser->description([ + $parser->setDescription([ __d('Burzum/HtmlPurifier', 'This shell allows you to clean database content with the HTML Purifier.'), ]); - $parser->addArguments([ + $parser->addArguments( + [ 'table' => [ 'help' => __d('Burzum/HtmlPurifier', 'The table to sanitize'), 'required' => true, @@ -167,13 +180,16 @@ public function getOptionParser() { 'help' => __d('Burzum/HtmlPurifier', 'The field(s) to purify, comma separated'), 'required' => true, ], - ]); + ] + ); - $parser->addOption('config', [ + $parser->addOption( + 'config', [ 'short' => 'c', 'help' => __d('Burzum/HtmlPurifier', 'The purifier config you want to use'), 'default' => 'default' - ]); + ] + ); return $parser; } diff --git a/src/View/Helper/HtmlPurifierHelper.php b/src/View/Helper/HtmlPurifierHelper.php index db0a8e6..d278168 100644 --- a/src/View/Helper/HtmlPurifierHelper.php +++ b/src/View/Helper/HtmlPurifierHelper.php @@ -3,7 +3,7 @@ * HtmlPurifierHelper * * @author Florian Krämer - * @copyright 2012 - 2016 Florian Krämer + * @copyright 2012 - 2018 Florian Krämer * @license MIT */ namespace Burzum\HtmlPurifier\View\Helper; @@ -11,7 +11,11 @@ use Burzum\HtmlPurifier\Lib\Purifier; use Cake\View\Helper; -class HtmlPurifierHelper extends Helper { +/** + * HtmlPurifierHelper + */ +class HtmlPurifierHelper extends Helper +{ /** * Default config @@ -25,15 +29,16 @@ class HtmlPurifierHelper extends Helper { /** * Clean markup * - * @param string $markup - * @param string $config + * @param string $markup Markup string to be sanitized + * @param string $config Purifier config name * @return string */ public function clean($markup, $config = null) { if (empty($config) && !empty($this->_config['config'])) { - $config = $this->config('config'); + $config = $this->getConfig('config'); } + return Purifier::clean($markup, $config); } } diff --git a/tests/TestCase/Case/Lib/PurifierTest.php b/tests/TestCase/Case/Lib/PurifierTest.php index 2c8a46c..9f6b18e 100644 --- a/tests/TestCase/Case/Lib/PurifierTest.php +++ b/tests/TestCase/Case/Lib/PurifierTest.php @@ -5,6 +5,9 @@ use Burzum\HtmlPurifier\Lib\Purifier; +/** + * PurifierTest + */ class PurifierTest extends TestCase { public function setUp()