diff --git a/composer.json b/composer.json index d9c5d7c82..7a97a4799 100644 --- a/composer.json +++ b/composer.json @@ -4,11 +4,11 @@ "type": "project", "license": "GPL-2.0+", "require": { - "composer/installers": "^1.0.21", - "wikimedia/composer-merge-plugin": "~1.3" + "composer/installers": "^1.0.24", + "wikimedia/composer-merge-plugin": "~1.4" }, "replace": { - "drupal/core": "~8.1" + "drupal/core": "~8.3" }, "minimum-stability": "dev", "prefer-stable": true, @@ -19,7 +19,10 @@ "extra": { "_readme": [ "By default Drupal loads the autoloader from ./vendor/autoload.php.", - "To change the autoloader you can edit ./autoload.php." + "To change the autoloader you can edit ./autoload.php.", + "This file specifies the packages.drupal.org repository.", + "You can read more about this composer repository at:", + "https://www.drupal.org/node/2718229" ], "merge-plugin": { "include": [ @@ -28,6 +31,15 @@ "recurse": false, "replace": false, "merge-extra": false + }, + "installer-paths": { + "core": ["type:drupal-core"], + "modules/contrib/{$name}": ["type:drupal-module"], + "profiles/contrib/{$name}": ["type:drupal-profile"], + "themes/contrib/{$name}": ["type:drupal-theme"], + "drush/contrib/{$name}": ["type:drupal-drush"], + "modules/custom/{$name}": ["type:drupal-custom-module"], + "themes/custom/{$name}": ["type:drupal-custom-theme"] } }, "autoload": { @@ -37,8 +49,16 @@ }, "scripts": { "pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump", - "post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess", + "post-autoload-dump": [ + "Drupal\\Core\\Composer\\Composer::ensureHtaccess" + ], "post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup", "post-package-update": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup" - } + }, + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + } + ] } diff --git a/composer.lock b/composer.lock index 9f9324119..eb564b8e0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,23 +4,68 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "5e14f057cfce03180014a6a75e38de6f", - "content-hash": "7d72dc63a3981fb6edb92f6786ba94b1", + "content-hash": "38fbd049e065401d0e3a8f7b92465485", "packages": [ { - "name": "composer/installers", - "version": "v1.0.21", + "name": "asm89/stack-cors", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/composer/installers.git", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45" + "url": "https://github.com/asm89/stack-cors.git", + "reference": "3ae8ef219bb4c9a6caf857421719aa07fa7776cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/3ae8ef219bb4c9a6caf857421719aa07fa7776cc", + "reference": "3ae8ef219bb4c9a6caf857421719aa07fa7776cc", "shasum": "" }, + "require": { + "php": ">=5.3.2", + "symfony/http-foundation": "~2.1|~3.0", + "symfony/http-kernel": "~2.1|~3.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Asm89\\Stack": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexander", + "email": "iam.asm89@gmail.com" + } + ], + "description": "Cross-origin resource sharing library and stack middleware", + "homepage": "https://github.com/asm89/stack-cors", + "keywords": [ + "cors", + "stack" + ], + "time": "2016-08-01T12:05:04+00:00" + }, + { + "name": "composer/installers", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "d78064c68299743e0161004f2de3a0204e33b804" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804", + "reference": "d78064c68299743e0161004f2de3a0204e33b804", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0" + }, "replace": { "roundcube/plugin-installer": "*", "shama/baton": "*" @@ -29,16 +74,16 @@ "composer/composer": "1.0.*@dev", "phpunit/phpunit": "4.1.*" }, - "type": "composer-installer", + "type": "composer-plugin", "extra": { - "class": "Composer\\Installers\\Installer", + "class": "Composer\\Installers\\Plugin", "branch-alias": { "dev-master": "1.0-dev" } }, "autoload": { - "psr-0": { - "Composer\\Installers\\": "src/" + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" } }, "notification-url": "https://packagist.org/downloads/", @@ -53,28 +98,35 @@ } ], "description": "A multi-framework Composer library installer", - "homepage": "http://composer.github.com/installers/", + "homepage": "https://composer.github.io/installers/", "keywords": [ "Craft", "Dolibarr", "Hurad", + "ImageCMS", "MODX Evo", + "Mautic", "OXID", + "Plentymarkets", + "RadPHP", "SMF", "Thelia", "WolfCMS", "agl", "aimeos", "annotatecms", + "attogram", "bitrix", "cakephp", "chef", + "cockpit", "codeigniter", "concrete5", "croogo", "dokuwiki", "drupal", "elgg", + "expressionengine", "fuelphp", "grav", "installer", @@ -91,42 +143,44 @@ "piwik", "ppi", "puppet", + "reindex", "roundcube", "shopware", "silverstripe", "symfony", "typo3", "wordpress", + "yawik", "zend", "zikula" ], - "time": "2015-02-18 17:17:01" + "time": "2016-08-13T20:53:52+00:00" }, { "name": "composer/semver", - "version": "1.0.0", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "d0e1ccc6d44ab318b758d709e19176037da6b1ba" + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/d0e1ccc6d44ab318b758d709e19176037da6b1ba", - "reference": "d0e1ccc6d44ab318b758d709e19176037da6b1ba", + "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "~2.3" + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.1-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -139,10 +193,6 @@ "MIT" ], "authors": [ - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com" - }, { "name": "Nils Adermann", "email": "naderman@naderman.de", @@ -152,6 +202,11 @@ "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], "description": "Semver library that offers utilities, version constraint parsing and validation.", @@ -161,7 +216,7 @@ "validation", "versioning" ], - "time": "2015-09-21 09:42:36" + "time": "2016-08-30T16:08:34+00:00" }, { "name": "doctrine/annotations", @@ -229,42 +284,42 @@ "docblock", "parser" ], - "time": "2015-08-31 12:32:49" + "time": "2015-08-31T12:32:49+00:00" }, { "name": "doctrine/cache", - "version": "v1.4.2", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca" + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/8c434000f420ade76a07c64cbe08ca47e5c101ca", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca", + "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "~5.5|~7.0" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "phpunit/phpunit": ">=3.7", + "phpunit/phpunit": "~4.8|~5.0", "predis/predis": "~1.0", "satooshi/php-coveralls": "~0.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } }, "notification-url": "https://packagist.org/downloads/", @@ -299,7 +354,7 @@ "cache", "caching" ], - "time": "2015-08-31 12:36:41" + "time": "2016-10-29T11:16:17+00:00" }, { "name": "doctrine/collections", @@ -365,20 +420,20 @@ "collections", "iterator" ], - "time": "2015-04-14 22:21:58" + "time": "2015-04-14T22:21:58+00:00" }, { "name": "doctrine/common", - "version": "v2.5.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9" + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/0009b8f0d4a917aabc971fb089eba80e872f83f9", - "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9", + "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", "shasum": "" }, "require": { @@ -387,20 +442,20 @@ "doctrine/collections": "1.*", "doctrine/inflector": "1.*", "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "php": "~5.5|~7.0" }, "require-dev": { - "phpunit/phpunit": "~3.7" + "phpunit/phpunit": "~4.8|~5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6.x-dev" + "dev-master": "2.7.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\Common\\": "lib/" + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" } }, "notification-url": "https://packagist.org/downloads/", @@ -438,20 +493,20 @@ "persistence", "spl" ], - "time": "2015-08-31 13:00:22" + "time": "2016-11-30T16:50:46+00:00" }, { "name": "doctrine/inflector", - "version": "v1.0.1", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604" + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/0bcb2e79d8571787f18b7eb036ed3d004908e604", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", "shasum": "" }, "require": { @@ -463,7 +518,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -505,7 +560,7 @@ "singularize", "string" ], - "time": "2014-12-20 21:24:13" + "time": "2015-11-06T14:35:42+00:00" }, { "name": "doctrine/lexer", @@ -559,7 +614,7 @@ "lexer", "parser" ], - "time": "2014-09-09 13:34:57" + "time": "2014-09-09T13:34:57+00:00" }, { "name": "easyrdf/easyrdf", @@ -621,29 +676,28 @@ "rdfa", "sparql" ], - "time": "2015-02-27 09:45:49" + "time": "2015-02-27T09:45:49+00:00" }, { "name": "egulias/email-validator", - "version": "1.2.9", + "version": "1.2.14", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "af864423f50ea59f96c87bb1eae147a70bcf67a1" + "reference": "5642614492f0ca2064c01d60cc33284cc2f731a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/af864423f50ea59f96c87bb1eae147a70bcf67a1", - "reference": "af864423f50ea59f96c87bb1eae147a70bcf67a1", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/5642614492f0ca2064c01d60cc33284cc2f731a9", + "reference": "5642614492f0ca2064c01d60cc33284cc2f731a9", "shasum": "" }, "require": { - "doctrine/lexer": "~1.0,>=1.0.1", + "doctrine/lexer": "^1.0.1", "php": ">= 5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.4", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^4.8.24" }, "type": "library", "extra": { @@ -674,25 +728,25 @@ "validation", "validator" ], - "time": "2015-06-22 21:07:51" + "time": "2017-02-03T22:48:59+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "6.2.1", + "version": "6.2.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", "shasum": "" }, "require": { "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", + "guzzlehttp/psr7": "^1.4", "php": ">=5.5" }, "require-dev": { @@ -736,32 +790,32 @@ "rest", "web service" ], - "time": "2016-07-15 17:22:37" + "time": "2017-02-28T22:50:30+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": { @@ -787,20 +841,20 @@ "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.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", "shasum": "" }, "require": { @@ -836,16 +890,23 @@ "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", + "request", + "response", "stream", - "uri" + "uri", + "url" ], - "time": "2016-06-24 23:00:38" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "ircmaxell/password-compat", @@ -887,20 +948,20 @@ "hashing", "password" ], - "time": "2014-11-20 16:49:30" + "time": "2014-11-20T16:49:30+00:00" }, { "name": "masterminds/html5", - "version": "2.2.1", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "170aa5cb35b29fccafbf5ea63487c013f396fdc9" + "reference": "7866e93dcf0245de22378414e0c2c7350abc45af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/170aa5cb35b29fccafbf5ea63487c013f396fdc9", - "reference": "170aa5cb35b29fccafbf5ea63487c013f396fdc9", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/7866e93dcf0245de22378414e0c2c7350abc45af", + "reference": "7866e93dcf0245de22378414e0c2c7350abc45af", "shasum": "" }, "require": { @@ -915,7 +976,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -952,20 +1013,20 @@ "serializer", "xml" ], - "time": "2016-05-10 14:11:45" + "time": "2016-09-22T11:01:11+00:00" }, { "name": "paragonie/random_compat", - "version": "1.1.1", + "version": "v2.0.10", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "a208865a5aeffc2dbbef2a5b3409887272d93f32" + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/a208865a5aeffc2dbbef2a5b3409887272d93f32", - "reference": "a208865a5aeffc2dbbef2a5b3409887272d93f32", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", "shasum": "" }, "require": { @@ -1000,20 +1061,20 @@ "pseudorandom", "random" ], - "time": "2015-12-01 02:52:15" + "time": "2017-03-13T16:27:32+00:00" }, { "name": "psr/http-message", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "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/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { @@ -1041,6 +1102,7 @@ } ], "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ "http", "http-message", @@ -1049,26 +1111,34 @@ "request", "response" ], - "time": "2015-05-04 20:22:00" + "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": "1.0.0" + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/1.0.0", - "reference": "1.0.0", + "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/", @@ -1082,31 +1152,32 @@ } ], "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": "stack/builder", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/stackphp/builder.git", - "reference": "c1f8a4693b55c563405024f708a76ef576c3b276" + "reference": "59fcc9b448a8ce5e338a04c4e2e4aca893e83425" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stackphp/builder/zipball/c1f8a4693b55c563405024f708a76ef576c3b276", - "reference": "c1f8a4693b55c563405024f708a76ef576c3b276", + "url": "https://api.github.com/repos/stackphp/builder/zipball/59fcc9b448a8ce5e338a04c4e2e4aca893e83425", + "reference": "59fcc9b448a8ce5e338a04c4e2e4aca893e83425", "shasum": "" }, "require": { "php": ">=5.3.0", - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" + "symfony/http-foundation": "~2.1|~3.0", + "symfony/http-kernel": "~2.1|~3.0" }, "require-dev": { "silex/silex": "~1.0" @@ -1136,40 +1207,42 @@ "keywords": [ "stack" ], - "time": "2014-11-23 20:37:11" + "time": "2016-06-02T06:58:42+00:00" }, { "name": "symfony-cmf/routing", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/symfony-cmf/Routing.git", - "reference": "8e87981d72c6930a27585dcd3119f3199f6cb2a6" + "reference": "b93704ca098334f56e9b317932f21a4362e620db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/8e87981d72c6930a27585dcd3119f3199f6cb2a6", - "reference": "8e87981d72c6930a27585dcd3119f3199f6cb2a6", + "url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/b93704ca098334f56e9b317932f21a4362e620db", + "reference": "b93704ca098334f56e9b317932f21a4362e620db", "shasum": "" }, "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/http-kernel": "~2.2", - "symfony/routing": "~2.2" + "php": "^5.3.9|^7.0", + "psr/log": "1.*", + "symfony/http-kernel": "^2.2|3.*", + "symfony/routing": "^2.2|3.*" }, "require-dev": { - "symfony/config": "~2.2", - "symfony/dependency-injection": "~2.0@stable", - "symfony/event-dispatcher": "~2.1" + "friendsofsymfony/jsrouting-bundle": "^1.1", + "symfony-cmf/testing": "^1.3", + "symfony/config": "^2.2|3.*", + "symfony/dependency-injection": "^2.0.5|3.*", + "symfony/event-dispatcher": "^2.1|3.*" }, "suggest": { - "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ~2.1" + "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1183,7 +1256,7 @@ ], "authors": [ { - "name": "Symfony CMF community", + "name": "Symfony CMF Community", "homepage": "https://github.com/symfony-cmf/Routing/contributors" } ], @@ -1193,20 +1266,20 @@ "database", "routing" ], - "time": "2014-10-20 20:55:17" + "time": "2016-03-31T09:11:39+00:00" }, { "name": "symfony/class-loader", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "7d362c22710980730d46a5d039e788946a2938cb" + "reference": "2c8de07a8a4cc4da9c018ab7a81888b80e762f93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/7d362c22710980730d46a5d039e788946a2938cb", - "reference": "7d362c22710980730d46a5d039e788946a2938cb", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/2c8de07a8a4cc4da9c018ab7a81888b80e762f93", + "reference": "2c8de07a8a4cc4da9c018ab7a81888b80e762f93", "shasum": "" }, "require": { @@ -1214,7 +1287,7 @@ "symfony/polyfill-apcu": "~1.1" }, "require-dev": { - "symfony/finder": "~2.0,>=2.0.5|~3.0.0" + "symfony/finder": "^2.0.5|~3.0.0" }, "type": "library", "extra": { @@ -1246,24 +1319,25 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2016-03-10 19:33:53" + "time": "2017-02-18T19:13:35+00:00" }, { "name": "symfony/console", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9a5aef5fc0d4eff86853d44202b02be8d5a20154" + "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9a5aef5fc0d4eff86853d44202b02be8d5a20154", - "reference": "9a5aef5fc0d4eff86853d44202b02be8d5a20154", + "url": "https://api.github.com/repos/symfony/console/zipball/81508e6fac4476771275a3f4f53c3fee9b956bfa", + "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa", "shasum": "" }, "require": { "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { @@ -1306,20 +1380,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-03-17 09:19:04" + "time": "2017-03-04T11:00:12+00:00" }, { "name": "symfony/debug", - "version": "v2.7.6", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b" + "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fb9e6887db716939f41af0ba8ef38a1582eb501b", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b", + "url": "https://api.github.com/repos/symfony/debug/zipball/e90099a2958d4833a02d05b504cc06e1c234abcc", + "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc", "shasum": "" }, "require": { @@ -1330,19 +1404,22 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.2", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1360,20 +1437,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2017-02-18T19:13:35+00:00" }, { "name": "symfony/dependency-injection", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f7b4a498e679fa440b16facb934680a1527ed48c" + "reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f7b4a498e679fa440b16facb934680a1527ed48c", - "reference": "f7b4a498e679fa440b16facb934680a1527ed48c", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/efdbeefa454a41154fd99a6f0489f0e9cb46c497", + "reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497", "shasum": "" }, "require": { @@ -1385,10 +1462,11 @@ "require-dev": { "symfony/config": "~2.2|~3.0.0", "symfony/expression-language": "~2.6|~3.0.0", - "symfony/yaml": "~2.1|~3.0.0" + "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7" }, "suggest": { "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", "symfony/yaml": "" }, @@ -1422,20 +1500,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2016-03-21 07:27:21" + "time": "2017-02-28T12:31:05+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "47d2d8cade9b1c3987573d2943bb9352536cdb87" + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/47d2d8cade9b1c3987573d2943bb9352536cdb87", - "reference": "47d2d8cade9b1c3987573d2943bb9352536cdb87", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bb4ec47e8e109c1c1172145732d0aa468d967cd0", + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0", "shasum": "" }, "require": { @@ -1443,7 +1521,7 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/config": "^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" @@ -1482,20 +1560,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-03-07 14:04:32" + "time": "2017-02-21T08:33:48+00:00" }, { "name": "symfony/http-foundation", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "06d6b2c755b2f34ce21e688b62072e9c625709c4" + "reference": "88af747e7af17d8d7d439ad4639dc3e23ddd3edd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/06d6b2c755b2f34ce21e688b62072e9c625709c4", - "reference": "06d6b2c755b2f34ce21e688b62072e9c625709c4", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/88af747e7af17d8d7d439ad4639dc3e23ddd3edd", + "reference": "88af747e7af17d8d7d439ad4639dc3e23ddd3edd", "shasum": "" }, "require": { @@ -1537,28 +1615,28 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-03-27 12:57:53" + "time": "2017-03-04T12:20:59+00:00" }, { "name": "symfony/http-kernel", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "2c45576fee2eb228d4771342a05b0565e4711ba2" + "reference": "18d7a01ac14ffa5a652a635c402b9777f858fc1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2c45576fee2eb228d4771342a05b0565e4711ba2", - "reference": "2c45576fee2eb228d4771342a05b0565e4711ba2", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/18d7a01ac14ffa5a652a635c402b9777f858fc1a", + "reference": "18d7a01ac14ffa5a652a635c402b9777f858fc1a", "shasum": "" }, "require": { "php": ">=5.3.9", "psr/log": "~1.0", - "symfony/debug": "~2.6,>=2.6.2", - "symfony/event-dispatcher": "~2.6,>=2.6.7|~3.0.0", - "symfony/http-foundation": "~2.5,>=2.5.4|~3.0.0" + "symfony/debug": "^2.6.2", + "symfony/event-dispatcher": "^2.6.7|~3.0.0", + "symfony/http-foundation": "~2.7.20|~2.8.13|~3.1.6" }, "conflict": { "symfony/config": "<2.7" @@ -1568,16 +1646,16 @@ "symfony/class-loader": "~2.1|~3.0.0", "symfony/config": "~2.8", "symfony/console": "~2.3|~3.0.0", - "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/css-selector": "^2.0.5|~3.0.0", "symfony/dependency-injection": "~2.8|~3.0.0", - "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", + "symfony/dom-crawler": "^2.0.5|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", - "symfony/finder": "~2.0,>=2.0.5|~3.0.0", - "symfony/process": "~2.0,>=2.0.5|~3.0.0", + "symfony/finder": "^2.0.5|~3.0.0", + "symfony/process": "^2.0.5|~3.0.0", "symfony/routing": "~2.8|~3.0.0", "symfony/stopwatch": "~2.3|~3.0.0", "symfony/templating": "~2.2|~3.0.0", - "symfony/translation": "~2.0,>=2.0.5|~3.0.0", + "symfony/translation": "^2.0.5|~3.0.0", "symfony/var-dumper": "~2.6|~3.0.0" }, "suggest": { @@ -1619,20 +1697,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-03-25 01:40:30" + "time": "2017-03-06T03:54:35+00:00" }, { "name": "symfony/polyfill-apcu", - "version": "v1.1.1", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-apcu.git", - "reference": "0c901e4e65a2f7ece68f0fd249b56d6ad3adc214" + "reference": "5d4474f447403c3348e37b70acc2b95475b7befa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/0c901e4e65a2f7ece68f0fd249b56d6ad3adc214", - "reference": "0c901e4e65a2f7ece68f0fd249b56d6ad3adc214", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/5d4474f447403c3348e37b70acc2b95475b7befa", + "reference": "5d4474f447403c3348e37b70acc2b95475b7befa", "shasum": "" }, "require": { @@ -1641,7 +1719,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1672,20 +1750,20 @@ "portable", "shim" ], - "time": "2016-03-03 16:49:40" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.1.1", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "08e3b8768d785ba7f271ef94906d50f7efe72ce8" + "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/08e3b8768d785ba7f271ef94906d50f7efe72ce8", - "reference": "08e3b8768d785ba7f271ef94906d50f7efe72ce8", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/cba36f3616d9866b3e52662e88da5c090fac1e97", + "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97", "shasum": "" }, "require": { @@ -1697,7 +1775,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1731,20 +1809,20 @@ "portable", "shim" ], - "time": "2016-02-26 11:31:02" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.1.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "1289d16209491b584839022f29257ad859b8532d" + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", - "reference": "1289d16209491b584839022f29257ad859b8532d", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", "shasum": "" }, "require": { @@ -1756,7 +1834,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1790,20 +1868,20 @@ "portable", "shim" ], - "time": "2016-01-20 09:13:37" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-php54", - "version": "v1.1.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "74663d5a2ff3c530c1bc0571500e0feec9094054" + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/74663d5a2ff3c530c1bc0571500e0feec9094054", - "reference": "74663d5a2ff3c530c1bc0571500e0feec9094054", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0", + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0", "shasum": "" }, "require": { @@ -1812,7 +1890,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1848,20 +1926,20 @@ "portable", "shim" ], - "time": "2016-01-20 09:13:37" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-php55", - "version": "v1.1.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "b4f3f07d91702f8f926339fc4fcf81671d8c27e6" + "reference": "03e3f0350bca2220e3623a0e340eef194405fc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/b4f3f07d91702f8f926339fc4fcf81671d8c27e6", - "reference": "b4f3f07d91702f8f926339fc4fcf81671d8c27e6", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/03e3f0350bca2220e3623a0e340eef194405fc67", + "reference": "03e3f0350bca2220e3623a0e340eef194405fc67", "shasum": "" }, "require": { @@ -1871,7 +1949,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1904,20 +1982,20 @@ "portable", "shim" ], - "time": "2016-01-20 09:13:37" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/process", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "fb467471952ef5cf8497c029980e556b47545333" + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/fb467471952ef5cf8497c029980e556b47545333", - "reference": "fb467471952ef5cf8497c029980e556b47545333", + "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", "shasum": "" }, "require": { @@ -1953,20 +2031,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-03-23 13:11:46" + "time": "2017-03-04T12:20:59+00:00" }, { "name": "symfony/psr-http-message-bridge", - "version": "v0.2", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "dc7e308e1dc2898a46776e2221a643cb08315453" + "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/dc7e308e1dc2898a46776e2221a643cb08315453", - "reference": "dc7e308e1dc2898a46776e2221a643cb08315453", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/66085f246d3893cbdbcec5f5ad15ac60546cf0de", + "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de", "shasum": "" }, "require": { @@ -1978,9 +2056,15 @@ "symfony/phpunit-bridge": "~2.7|~3.0" }, "suggest": { + "psr/http-message-implementation": "To use the HttpFoundation factory", "zendframework/zend-diactoros": "To use the Zend Diactoros factory" }, "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "psr-4": { "Symfony\\Bridge\\PsrHttpMessage\\": "" @@ -2007,20 +2091,20 @@ "http-message", "psr-7" ], - "time": "2015-05-29 17:57:12" + "time": "2016-09-14T18:37:20+00:00" }, { "name": "symfony/routing", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "d7d4a20cb55a90a06c0070d1a360e5ac606306ef" + "reference": "d145cd396f702c497cb24b21785ddac90a23fe71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d7d4a20cb55a90a06c0070d1a360e5ac606306ef", - "reference": "d7d4a20cb55a90a06c0070d1a360e5ac606306ef", + "url": "https://api.github.com/repos/symfony/routing/zipball/d145cd396f702c497cb24b21785ddac90a23fe71", + "reference": "d145cd396f702c497cb24b21785ddac90a23fe71", "shasum": "" }, "require": { @@ -2036,7 +2120,7 @@ "symfony/config": "~2.7|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", "symfony/http-foundation": "~2.3|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + "symfony/yaml": "^2.0.5|~3.0.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -2082,20 +2166,20 @@ "uri", "url" ], - "time": "2016-03-23 13:11:46" + "time": "2017-03-02T15:56:34+00:00" }, { "name": "symfony/serializer", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "e848750ceffdc4af374844c338c299627a98196a" + "reference": "df3d919f00177f599c8970e86112c7582b08a582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/e848750ceffdc4af374844c338c299627a98196a", - "reference": "e848750ceffdc4af374844c338c299627a98196a", + "url": "https://api.github.com/repos/symfony/serializer/zipball/df3d919f00177f599c8970e86112c7582b08a582", + "reference": "df3d919f00177f599c8970e86112c7582b08a582", "shasum": "" }, "require": { @@ -2107,7 +2191,7 @@ "doctrine/cache": "~1.0", "symfony/config": "~2.2|~3.0.0", "symfony/property-access": "~2.3|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + "symfony/yaml": "^2.0.5|~3.0.0" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", @@ -2146,20 +2230,20 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "time": "2016-03-07 14:04:32" + "time": "2017-03-05T17:40:13+00:00" }, { "name": "symfony/translation", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "d60b8e076d22953aabebeebda53bf334438e7aca" + "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/d60b8e076d22953aabebeebda53bf334438e7aca", - "reference": "d60b8e076d22953aabebeebda53bf334438e7aca", + "url": "https://api.github.com/repos/symfony/translation/zipball/b538355bc99db2ec7cc35284ec76d92ae7d1d256", + "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256", "shasum": "" }, "require": { @@ -2172,7 +2256,7 @@ "require-dev": { "psr/log": "~1.0", "symfony/config": "~2.8", - "symfony/intl": "~2.4|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", "symfony/yaml": "~2.2|~3.0.0" }, "suggest": { @@ -2210,36 +2294,37 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-03-25 01:40:30" + "time": "2017-03-04T12:20:59+00:00" }, { "name": "symfony/validator", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "ea0ce99531c9eb82abf21011da4e111932f8ce81" + "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/ea0ce99531c9eb82abf21011da4e111932f8ce81", - "reference": "ea0ce99531c9eb82abf21011da4e111932f8ce81", + "url": "https://api.github.com/repos/symfony/validator/zipball/8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", + "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", "shasum": "" }, "require": { "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0", "symfony/translation": "~2.4|~3.0.0" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", - "egulias/email-validator": "~1.2,>=1.2.1", + "egulias/email-validator": "^1.2.1", "symfony/config": "~2.2|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", - "symfony/http-foundation": "~2.1|~3.0.0", - "symfony/intl": "~2.7.4|~2.8|~3.0.0", + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", "symfony/property-access": "~2.3|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + "symfony/yaml": "^2.0.5|~3.0.0" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", @@ -2282,20 +2367,20 @@ ], "description": "Symfony Validator Component", "homepage": "https://symfony.com", - "time": "2016-03-27 12:57:53" + "time": "2017-02-28T02:24:56+00:00" }, { "name": "symfony/yaml", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "584e52cb8f788a887553ba82db6caacb1d6260bb" + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/584e52cb8f788a887553ba82db6caacb1d6260bb", - "reference": "584e52cb8f788a887553ba82db6caacb1d6260bb", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", "shasum": "" }, "require": { @@ -2331,20 +2416,20 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:54:35" + "time": "2017-03-01T18:13:50+00:00" }, { "name": "twig/twig", - "version": "v1.23.1", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6" + "reference": "f16a634ab08d87e520da5671ec52153d627f10f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/d9b6333ae8dd2c8e3fd256e127548def0bc614c6", - "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/f16a634ab08d87e520da5671ec52153d627f10f6", + "reference": "f16a634ab08d87e520da5671ec52153d627f10f6", "shasum": "" }, "require": { @@ -2357,7 +2442,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.23-dev" + "dev-master": "1.25-dev" } }, "autoload": { @@ -2392,20 +2477,20 @@ "keywords": [ "templating" ], - "time": "2015-11-05 12:49:06" + "time": "2016-09-21T23:05:12+00:00" }, { "name": "wikimedia/composer-merge-plugin", - "version": "v1.3.1", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/wikimedia/composer-merge-plugin.git", - "reference": "0bdf8543d445ee067c9ba7d5d4a5dde70b9785f4" + "reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/0bdf8543d445ee067c9ba7d5d4a5dde70b9785f4", - "reference": "0bdf8543d445ee067c9ba7d5d4a5dde70b9785f4", + "url": "https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/ca453f9f13d8b05f86f20ea10be992a782e6f78c", + "reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c", "shasum": "" }, "require": { @@ -2413,7 +2498,7 @@ "php": ">=5.3.2" }, "require-dev": { - "composer/composer": "1.0.*@dev", + "composer/composer": "~1.0.0", "jakub-onderka/php-parallel-lint": "~0.8", "phpunit/phpunit": "~4.8|~5.0", "squizlabs/php_codesniffer": "~2.1.0" @@ -2441,38 +2526,38 @@ } ], "description": "Composer plugin to merge multiple composer.json files", - "time": "2016-03-08 17:11:37" + "time": "2017-03-13T16:52:55+00:00" }, { "name": "zendframework/zend-diactoros", - "version": "1.1.3", + "version": "1.3.10", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "e2f5c12916c74da384058d0dfbc7fbc0b03d1181" + "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/e2f5c12916c74da384058d0dfbc7fbc0b03d1181", - "reference": "e2f5c12916c74da384058d0dfbc7fbc0b03d1181", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/83e8d98b9915de76c659ce27d683c02a0f99fa90", + "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90", "shasum": "" }, "require": { - "php": ">=5.4", + "php": "^5.4 || ^7.0", "psr/http-message": "~1.0" }, "provide": { "psr/http-message-implementation": "~1.0.0" }, "require-dev": { - "phpunit/phpunit": "~4.6", - "squizlabs/php_codesniffer": "^2.3.1" + "phpunit/phpunit": "^4.6 || ^5.5", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev", - "dev-develop": "1.1-dev" + "dev-master": "1.3-dev", + "dev-develop": "1.4-dev" } }, "autoload": { @@ -2491,24 +2576,24 @@ "psr", "psr-7" ], - "time": "2015-08-10 20:04:20" + "time": "2017-01-23T04:53:24+00:00" }, { "name": "zendframework/zend-escaper", - "version": "2.5.1", + "version": "2.5.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73" + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73", - "reference": "a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": ">=5.5" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", @@ -2535,48 +2620,50 @@ "escaper", "zf2" ], - "time": "2015-06-03 14:05:37" + "time": "2016-06-30T19:48:38+00:00" }, { "name": "zendframework/zend-feed", - "version": "2.5.2", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-feed.git", - "reference": "0661345b82b51428619e05d3aadd3de65b57fa54" + "reference": "12b328d382aa5200f1de53d4147033b885776b67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/0661345b82b51428619e05d3aadd3de65b57fa54", - "reference": "0661345b82b51428619e05d3aadd3de65b57fa54", + "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/12b328d382aa5200f1de53d4147033b885776b67", + "reference": "12b328d382aa5200f1de53d4147033b885776b67", "shasum": "" }, "require": { - "php": ">=5.5", - "zendframework/zend-escaper": "~2.5", - "zendframework/zend-stdlib": "~2.5" + "php": "^5.5 || ^7.0", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "zendframework/zend-cache": "~2.5", - "zendframework/zend-db": "~2.5", - "zendframework/zend-http": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-validator": "~2.5" + "psr/http-message": "^1.0", + "zendframework/zend-cache": "^2.5", + "zendframework/zend-db": "^2.5", + "zendframework/zend-http": "^2.5", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-validator": "^2.5" }, "suggest": { - "zendframework/zend-cache": "Zend\\Cache component", - "zendframework/zend-db": "Zend\\Db component", + "psr/http-message": "PSR-7 ^1.0, if you wish to use Zend\\Feed\\Reader\\Http\\Psr7ResponseDecorator", + "zendframework/zend-cache": "Zend\\Cache component, for optionally caching feeds between requests", + "zendframework/zend-db": "Zend\\Db component, for use with PubSubHubbub", "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations", - "zendframework/zend-validator": "Zend\\Validator component" + "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for easily extending ExtensionManager implementations", + "zendframework/zend-validator": "Zend\\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" } }, "autoload": { @@ -2594,104 +2681,35 @@ "feed", "zf2" ], - "time": "2015-08-04 21:39:18" - }, - { - "name": "zendframework/zend-hydrator", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-hydrator.git", - "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/f3ed8b833355140350bbed98d8a7b8b66875903f", - "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "zendframework/zend-stdlib": "^2.5.1" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "^2.0@dev", - "zendframework/zend-eventmanager": "^2.5.1", - "zendframework/zend-filter": "^2.5.1", - "zendframework/zend-inputfilter": "^2.5.1", - "zendframework/zend-serializer": "^2.5.1", - "zendframework/zend-servicemanager": "^2.5.1" - }, - "suggest": { - "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage", - "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage", - "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy", - "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev", - "dev-develop": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\Hydrator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-hydrator", - "keywords": [ - "hydrator", - "zf2" - ], - "time": "2015-09-17 14:06:43" + "time": "2016-02-11T18:54:29+00:00" }, { "name": "zendframework/zend-stdlib", - "version": "2.7.3", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc" + "reference": "8bafa58574204bdff03c275d1d618aaa601588ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8ac0c77ff567fcf49b58689ee3bfa7595be102bc", - "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8bafa58574204bdff03c275d1d618aaa601588ae", + "reference": "8bafa58574204bdff03c275d1d618aaa601588ae", "shasum": "" }, "require": { - "php": ">=5.5", - "zendframework/zend-hydrator": "~1.0" + "php": "^5.5 || ^7.0" }, "require-dev": { "athletic/athletic": "~0.1", "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-inputfilter": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-filter": "To support naming strategy hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" } }, "autoload": { @@ -2708,22 +2726,22 @@ "stdlib", "zf2" ], - "time": "2015-09-25 04:06:33" + "time": "2016-04-12T21:19:36+00:00" } ], "packages-dev": [ { "name": "behat/mink", - "version": "v1.7.1", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/minkphp/Mink.git", - "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9" + "reference": "9ea1cebe3dc529ba3861d87c818f045362c40484" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/minkphp/Mink/zipball/e6930b9c74693dff7f4e58577e1b1743399f3ff9", - "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9", + "url": "https://api.github.com/repos/minkphp/Mink/zipball/9ea1cebe3dc529ba3861d87c818f045362c40484", + "reference": "9ea1cebe3dc529ba3861d87c818f045362c40484", "shasum": "" }, "require": { @@ -2768,7 +2786,7 @@ "testing", "web" ], - "time": "2016-03-05 08:26:18" + "time": "2017-02-06T09:59:54+00:00" }, { "name": "behat/mink-browserkit-driver", @@ -2824,7 +2842,7 @@ "browser", "testing" ], - "time": "2016-03-05 08:59:47" + "time": "2016-03-05T08:59:47+00:00" }, { "name": "behat/mink-goutte-driver", @@ -2879,7 +2897,7 @@ "headless", "testing" ], - "time": "2016-03-05 09:04:22" + "time": "2016-03-05T09:04:22+00:00" }, { "name": "doctrine/instantiator", @@ -2933,20 +2951,57 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { - "name": "fabpot/goutte", - "version": "v3.1.2", + "name": "drupal/coder", + "version": "8.2.12", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/Goutte.git", - "reference": "3cbc6ed222422a28400e470050f14928a153207e" + "url": "https://github.com/klausi/coder.git", + "reference": "984c54a7b1e8f27ff1c32348df69712afd86b17f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/3cbc6ed222422a28400e470050f14928a153207e", - "reference": "3cbc6ed222422a28400e470050f14928a153207e", + "url": "https://api.github.com/repos/klausi/coder/zipball/984c54a7b1e8f27ff1c32348df69712afd86b17f", + "reference": "984c54a7b1e8f27ff1c32348df69712afd86b17f", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.4.0", + "squizlabs/php_codesniffer": ">=2.8.1 <3.0", + "symfony/yaml": ">=2.0.0" + }, + "require-dev": { + "phpunit/phpunit": ">=3.7 <6" + }, + "type": "phpcodesniffer-standard", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "description": "Coder is a library to review Drupal code.", + "homepage": "https://www.drupal.org/project/coder", + "keywords": [ + "code review", + "phpcs", + "standards" + ], + "time": "2017-03-18T10:28:49+00:00" + }, + { + "name": "fabpot/goutte", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/Goutte.git", + "reference": "db5c28f4a010b4161d507d5304e28a7ebf211638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/db5c28f4a010b4161d507d5304e28a7ebf211638", + "reference": "db5c28f4a010b4161d507d5304e28a7ebf211638", "shasum": "" }, "require": { @@ -2959,7 +3014,7 @@ "type": "application", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2982,7 +3037,7 @@ "keywords": [ "scraper" ], - "time": "2015-11-05 12:58:44" + "time": "2017-01-03T13:21:43+00:00" }, { "name": "jcalderonzumba/gastonjs", @@ -3039,7 +3094,7 @@ "headless", "phantomjs" ], - "time": "2016-01-18 09:21:03" + "time": "2016-01-18T09:21:03+00:00" }, { "name": "jcalderonzumba/mink-phantomjs-driver", @@ -3100,20 +3155,20 @@ "phantomjs", "testing" ], - "time": "2015-12-04 13:55:02" + "time": "2015-12-04T13:55:02+00:00" }, { "name": "mikey179/vfsStream", - "version": "v1.6.0", + "version": "v1.6.4", "source": { "type": "git", "url": "https://github.com/mikey179/vfsStream.git", - "reference": "73bcb605b741a7d5044b47592338c633788b0eb7" + "reference": "0247f57b2245e8ad2e689d7cee754b45fbabd592" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/73bcb605b741a7d5044b47592338c633788b0eb7", - "reference": "73bcb605b741a7d5044b47592338c633788b0eb7", + "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/0247f57b2245e8ad2e689d7cee754b45fbabd592", + "reference": "0247f57b2245e8ad2e689d7cee754b45fbabd592", "shasum": "" }, "require": { @@ -3146,7 +3201,7 @@ ], "description": "Virtual file system to mock the real file system in unit tests.", "homepage": "http://vfs.bovigo.org/", - "time": "2015-10-06 16:59:57" + "time": "2016-07-18T14:02:57+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -3195,34 +3250,37 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2015-02-03T12:10:50+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.5.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1|^2.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 || ^5.6.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -3255,7 +3313,7 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2017-03-02T20:05:34+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3317,20 +3375,20 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2015-10-06T15:47:00+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" }, "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/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", "shasum": "" }, "require": { @@ -3364,7 +3422,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21 13:08:43" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -3405,26 +3463,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.7", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "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.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -3446,20 +3512,20 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "1.4.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" }, "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/e03f8f67534427a787e21a385a67ec3ca6978ea7", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", "shasum": "" }, "require": { @@ -3495,20 +3561,20 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15 10:49:45" + "time": "2017-02-27T10:12:30+00:00" }, { "name": "phpunit/phpunit", - "version": "4.8.11", + "version": "4.8.35", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5" + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bdd199472410fd7e32751f9c814c7e06f2c21bd5", - "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", "shasum": "" }, "require": { @@ -3522,9 +3588,9 @@ "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/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", + "sebastian/comparator": "~1.2.2", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", @@ -3567,7 +3633,7 @@ "testing", "xunit" ], - "time": "2015-10-07 10:39:46" + "time": "2017-02-06T05:18:07+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -3623,26 +3689,26 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "time": "2015-10-02T06:51:40+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -3687,32 +3753,32 @@ "compare", "equality" ], - "time": "2015-07-26 15:48:44" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -3735,31 +3801,31 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", - "version": "1.3.2", + "version": "1.3.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8 || ^5.0" }, "type": "library", "extra": { @@ -3789,20 +3855,20 @@ "environment", "hhvm" ], - "time": "2015-08-03 06:14:51" + "time": "2016-08-18T05:49:44+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -3810,12 +3876,13 @@ "sebastian/recursion-context": "~1.0" }, "require-dev": { + "ext-mbstring": "*", "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -3855,20 +3922,20 @@ "export", "exporter" ], - "time": "2015-06-21 07:55:53" + "time": "2016-06-17T09:04:28+00:00" }, { "name": "sebastian/global-state", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { @@ -3906,20 +3973,20 @@ "keywords": [ "global state" ], - "time": "2014-10-06 09:23:50" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/recursion-context", - "version": "1.0.1", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "shasum": "" }, "require": { @@ -3959,7 +4026,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" + "time": "2016-10-03T07:41:43+00:00" }, { "name": "sebastian/version", @@ -3994,29 +4061,107 @@ ], "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": "2015-06-21T13:59:46+00:00" }, { - "name": "symfony/browser-kit", - "version": "v2.7.6", + "name": "squizlabs/php_codesniffer", + "version": "2.8.1", "source": { "type": "git", - "url": "https://github.com/symfony/browser-kit.git", - "reference": "07d664a052572ccc28eb2ab7dbbe82155b1ad367" + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/07d664a052572ccc28eb2ab7dbbe82155b1ad367", - "reference": "07d664a052572ccc28eb2ab7dbbe82155b1ad367", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", + "reference": "d7cf0d894e8aa4c73712ee4a331cc1eaa37cdc7d", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "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": "2017-03-01T22:17:45+00:00" + }, + { + "name": "symfony/browser-kit", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "8827db04bcd8d9b9bf3114ea41081d8036ab209c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/8827db04bcd8d9b9bf3114ea41081d8036ab209c", + "reference": "8827db04bcd8d9b9bf3114ea41081d8036ab209c", "shasum": "" }, "require": { "php": ">=5.3.9", - "symfony/dom-crawler": "~2.0,>=2.0.5" + "symfony/dom-crawler": "~2.1|~3.0.0" }, "require-dev": { - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/process": "~2.3.34|~2.7,>=2.7.6" + "symfony/css-selector": "^2.0.5|~3.0.0", + "symfony/process": "~2.3.34|^2.7.6|~3.0.0" }, "suggest": { "symfony/process": "" @@ -4024,13 +4169,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\BrowserKit\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4048,20 +4196,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2015-10-23 14:47:27" + "time": "2017-02-21T08:33:48+00:00" }, { "name": "symfony/css-selector", - "version": "v2.8.4", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "07b7ced3ae0c12918477c095453ea8595000810e" + "reference": "742bd688bd778dde8991ba696cb372570610afcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/07b7ced3ae0c12918477c095453ea8595000810e", - "reference": "07b7ced3ae0c12918477c095453ea8595000810e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/742bd688bd778dde8991ba696cb372570610afcd", + "reference": "742bd688bd778dde8991ba696cb372570610afcd", "shasum": "" }, "require": { @@ -4101,27 +4249,28 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:54:35" + "time": "2017-02-21T08:33:48+00:00" }, { "name": "symfony/dom-crawler", - "version": "v2.7.6", + "version": "v2.8.18", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612" + "reference": "24b1a3ffa5b64e4f8b1c5f2cdffd16368640704a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5fef7d8b80d8f9992df99d8ee283f420484c9612", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/24b1a3ffa5b64e4f8b1c5f2cdffd16368640704a", + "reference": "24b1a3ffa5b64e4f8b1c5f2cdffd16368640704a", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "symfony/css-selector": "~2.3" + "symfony/css-selector": "~2.8|~3.0.0" }, "suggest": { "symfony/css-selector": "" @@ -4129,13 +4278,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\DomCrawler\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4153,12 +4305,14 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2017-02-21T08:33:48+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "behat/mink": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/core/.eslintignore b/core/.eslintignore new file mode 100644 index 000000000..a15282a9a --- /dev/null +++ b/core/.eslintignore @@ -0,0 +1,4 @@ +assets/vendor/**/* +modules/locale/tests/locale_test.js +node_modules/**/* +**/js_test_files/**/* diff --git a/core/.eslintrc.json b/core/.eslintrc.json new file mode 100644 index 000000000..218d84f93 --- /dev/null +++ b/core/.eslintrc.json @@ -0,0 +1,97 @@ +{ + "extends": "eslint:recommended", + "env": { + "browser": true, + "es6": true, + "node": true + }, + "globals": { + "Drupal": true, + "drupalSettings": true, + "drupalTranslations": true, + "domready": true, + "jQuery": true, + "_": true, + "matchMedia": true, + "Backbone": true, + "Modernizr": true, + "CKEDITOR": true + }, + "rules": { + // Errors. + "array-bracket-spacing": [2, "never"], + "block-scoped-var": 2, + "brace-style": [2, "stroustrup", {"allowSingleLine": true}], + "comma-dangle": [2, "never"], + "comma-spacing": 2, + "comma-style": [2, "last"], + "computed-property-spacing": [2, "never"], + "curly": [2, "all"], + "eol-last": 2, + "eqeqeq": [2, "smart"], + "guard-for-in": 2, + "indent": [2, 2, {"SwitchCase": 1}], + "key-spacing": [2, {"beforeColon": false, "afterColon": true}], + "keyword-spacing": [2, {"before": true, "after": true}], + "linebreak-style": [2, "unix"], + "lines-around-comment": [2, {"beforeBlockComment": true, "afterBlockComment": false}], + "new-parens": 2, + "no-array-constructor": 2, + "no-caller": 2, + "no-catch-shadow": 2, + "no-eval": 2, + "no-extend-native": 2, + "no-extra-bind": 2, + "no-extra-parens": [2, "functions"], + "no-implied-eval": 2, + "no-iterator": 2, + "no-label-var": 2, + "no-labels": 2, + "no-lone-blocks": 2, + "no-loop-func": 2, + "no-multi-spaces": 2, + "no-multi-str": 2, + "no-native-reassign": 2, + "no-nested-ternary": 2, + "no-new-func": 2, + "no-new-object": 2, + "no-new-wrappers": 2, + "no-octal-escape": 2, + "no-process-exit": 2, + "no-proto": 2, + "no-return-assign": 2, + "no-script-url": 2, + "no-sequences": 2, + "no-shadow-restricted-names": 2, + "no-spaced-func": 2, + "no-trailing-spaces": 2, + "no-undef-init": 2, + "no-undefined": 2, + "no-unused-expressions": 2, + "no-unused-vars": [2, {"vars": "all", "args": "none"}], + "no-with": 2, + "object-curly-spacing": [2, "never"], + "one-var": [2, "never"], + "quote-props": [2, "consistent-as-needed"], + "quotes": [2, "single", "avoid-escape"], + "semi": [2, "always"], + "semi-spacing": [2, {"before": false, "after": true}], + "space-before-blocks": [2, "always"], + "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}], + "space-in-parens": [2, "never"], + "space-infix-ops": 2, + "space-unary-ops": [2, { "words": true, "nonwords": false }], + "spaced-comment": [2, "always"], + "strict": [2, "function"], + "yoda": [2, "never"], + // Warnings. + "max-nested-callbacks": [1, 3], + "valid-jsdoc": [1, { + "prefer": { + "returns": "return", + "property": "prop" + }, + "requireReturn": false + }] + } +} diff --git a/core/CHANGELOG.txt b/core/CHANGELOG.txt index f6fad6c59..1cfd863cf 100644 --- a/core/CHANGELOG.txt +++ b/core/CHANGELOG.txt @@ -1,10 +1,202 @@ -Drupal 8.1.7, 2016-07-18 +Drupal 8.3.7, 2017-08-16 ------------------------ -- Fixed security issue. SA-CORE-2016-003. +- Fixed security issues. See SA-CORE-2017-004. -Drupal 8.1.3, 2016-06-15 +Drupal 8.3.4, 2017-06-21 ------------------------ -- Fixed security issue. SA-CORE-2016-002. +- Fixed security issues. See SA-CORE-2017-003. + +Drupal 8.3.1, 2017-04-19 +------------------------ +- Fixed security issues. See SA-CORE-2017-002. + +Drupal 8.3.0, 2017-04-05 +------------------------ +- Added modules: + * Added the Workflows module (experimental) which abstracts transitions and + states from Content Moderation into a separate component for reuse by + other modules implementing non-publishing workflows. + * Added the Layout Discovery module (experimental) which provides an API for + modules or themes to register layouts. + * Added the Field Layout module (experimental) which provides the ability + for site builders to rearrange fields on content types, block types, etc. + into new regions, for both the form and display, on the same forms + provided by the normal field user interface. +- Updated vendor libraries: + * Updated to Twig 1.25. + * Updated to jQuery 2.2.4. + * Updated to CKEditor 4.6.2 (with new Moono-Lisa skin). + * Updated Symfony components to 2.8.18. + * Updated PHPUnit to 4.8.35. + * Applied patch-level updates to the latest versions for all dependencies + wherever possible. Minor updates applied for Symfony PSR-7 Bridge and + Zend Stdlib, which Drupal does not depend on directly. +- Browser support: + * Advance notice: Internet Explore 9 and 10 will no longer supported from + 8.4.x, scheduled for October 2017. Microsoft has now ended support for + these browsers. Drupal will still support Internet Explorer 11 and its + replacement, Edge. +- Raised stability levels of experimental modules: + * Updated the BigPipe module from beta to stable. + * Updated the Migrate module from alpha to beta. + * See https://www.drupal.org/core/experimental#versions for more + information about the stability levels of experimental modules. +- Improved authoring features: + * Can now drag and drop images into image fields in Quick Edit mode. + * Image fields are now limited to only accepting images, so that users on + mobile clients are not offered a confusing and non-functional video + upload option. + * CKEditor now utilizes the AutoGrow plugin to better take advantage of + larger screen sizes. +- Improved site building and administration: + * Redesigned status report. + * Standardized display of Views overview page to more closely match that of + other administrative overview pages. + * Views filter order now matches the table column order below in Content + and People overview pages. + * The "Allowed HTML tags" input has been converted to a textarea, which + significantly improves the usability of HTML filter configuration. + * Removed the 'disabled' region from block administration. + * Incoming paths are again case-insensitive for routing, similar to earlier + major Drupal versions. +- Content Moderation improvements (experimental): + * Refactored to use new experimental Workflows module. + * Now supports moderation of non-translatable entity types. + * When reverting a moderated revision, the moderation state is now + reverted too. + * Added an API to create and enforce default workflow states and + transitions. + * Allow moderation of entity types without bundles, as long as they have + revisions. + * Publishes any entity type that implements EntityPublishedInterface, not + just Nodes. +- Migration improvements (experimental): + * Drupal 7 core node translations are now migrated to Drupal 8. + * Configuration translation support is added to migrations in general and + implemented for Drupal 6 user profile fields. +- Improved REST API and decoupled site features: + * REST API now supports the registering of users. + * Anonymous REST API performance increased by 60% by utilizing the internal + page cache. + * Improved the response bodies and status codes for requests with incorrect + request headers or request bodies, in dozens of situations. + * Massive overhaul of the test coverage. + * 403 responses now return reason why access was denied. + * Serialized values for Booleans and integers are now returned as the + correct data type, rather than incorrectly typed as strings. +- Improved performance/scalability: + * Optimized class loader detection made more generic to support class + loaders other than ApcClassLoader. + * ViewsData and Token info cache now use the default cache bin to prevent + APCu memory from being filled too quickly. + * Improve statistics performance by adding a swappable backend. +- Improved developer APIs: + * Deprecated several routing services in favor of two more unified services. + * Replaced the deprecated Symfony ExecutionContextInterface by subclassing + from ConstraintValidator to prepare for an update to Symfony 3. + * EntityPublishedInterface and EntityPublishedTrait have been added to give + a generic publishing API, and are being used by Node and Comment entity + types. + * Added a collection label to EntityType. This is a plural uppercase label + for a collection of entities - e.g. "Workflows". +- Changed coding standards: + * Officially adopted short array syntax and updated all of core accordingly. + * PHP CodeSniffer and Drupal Coder have been added as composer dev + requirements, so they can be installed automatically with + `composer install --dev` rather than requiring separate installation. (Do + not use `composer install --dev` for production sites.) + * Most global constants in Drupal 8 have been deprecated in favor of class + constants. As a best practice, use appropriate class constants rather than + global constants. +- Testing improvements: + * Integrated PHPUnit verbose output in SimpleTest UI. + * Improved backward compatibility with WebTestBase. + * Improved backward compatibility between BrowserTestBase and WebTestBase. + * Many old WebTestBase tests have been moved to BrowserTestBase. + * Expanded automated test coverage for JavaScript. +- Package management: + * composer.json now uses the new official endpoint for modules and themes, + packages.drupal.org. + * Custom modules and themes can now be installed to correct locations using + composer. + * Added Package.json enabling new JavaScript language features. + +Drupal 8.2.0, 2016-10-05 +------------------------ +- Updated the git repository configuration to not normalize line endings for + files of unknown type. +- Added vendor libraries: + * Added Stack/Cors 1.0.0. +- Updated vendor libraries: + * Updated to jQuery 2.2.3. + * Updated to Twig 1.24. + * Updated to CKEditor 4.5.11. + * Updated to Symfony Routing 1.4.0. + * Updated to Stack/Builder 1.0.4. + * Updated to Guzzle 6.2.1. +- Added modules: + * Added the Place Block module (experimental) to place a block on any page + without having to navigate to the backend administration form. + * Added the Settings Tray module (experimental) to edit the configuration of + any block on the page. Its machine name in this release is "outside_in". + * Added the Content Moderation module (experimental) to define and use + workflow states such as Draft, Archived and Published. This functionality + was previously provided by the contributed module Workbench Moderation. + * Added the Datetime Range module (experimental) that provides a new field + type with support for start and end dates. +- Raised stability levels of experimental modules: + * Updated the BigPipe module from alpha to beta. + * See https://www.drupal.org/core/experimental#versions for more + information about the stability levels of experimental modules. +- Improved authoring features: + * Relative URLs are automatically converted to absolute ones when content + is output to an RSS feed. + * Enabled revisions by default on new node types. + * Added a redirect option to site-wide contact forms. + * Whenever a new entity is created, a link to it is now provided in a + status message, for easy access to it regardless of the form workflow. + * Styled CKEditor dialogs to match Drupal dialogs. +- Improved site administration experience: + * Numerous improvements to user interface text. +- Improved site building features: + * Added the ability to remove a module's content entities prior to + uninstallation. + * Made it possible to select the comment view mode in the formatter form. + * Fixed the Migrate module to skip over migration sources that require + code from uninstalled modules. +- Improved REST API and decoupled site features: + * Added support for reading (GET) configuration entities as REST resources. + * Added dedicated resources for user login, logout and registration. + * Added support for selecting an authentication provider as part of the + configuration of a REST Export Views Display. + * Added a cors.config service parameter for enabling and configuring + cross-origin resource sharing (CORS). + * Simplified REST configuration with per-resource configuration entities + and less verbose configuration structure. (The previous, advanced + configuration structure is also still supported.) + * Improved the response messages and status codes for requests with missing + or incorrect headers. + * Improved responses to PATCH requests to entity resources to contain the + updated entity in the response body. +- Improved developer APIs: + * Added support for specifying the field item delta as part of an entity + query condition. This was possible in Drupal 7 via + EntityFieldQuery::fieldDeltaCondition(), but missing from earlier + versions of Drupal 8. +- Improved performance/scalability: + * In the internal page cache, 404 responses are now cached for a shorter + time (1 hour by default), to consume less space. + * Breadcrumbs are now cached by the parent of the path rather than the full + path, for fewer cache entries and higher cache hit rates. +- Changed coding standards: + * Local variables and parameters can now use camelCase. + * A blank line is now required after the `-based editor](http://ckeditor.com/addon/divarea). + +## CKEditor 4.6.1 + +New Features: + +* [#16639](http://dev.ckeditor.com/ticket/16639): The `callback` parameter in the [CKEDITOR.ajax.post](http://docs.ckeditor.com/#!/api/CKEDITOR.ajax-method-post) method became optional. + +Fixed Issues: + +* [#11064](http://dev.ckeditor.com/ticket/11064): [Blink, WebKit] Fixed: Cannot select all editor content when a widget or a non-editable element is the first or last element of the content. Also fixes this issue in the [Select All](http://ckeditor.com/addon/selectall) plugin. +* [#14755](http://dev.ckeditor.com/ticket/14755): [Blink, WebKit, IE8] Fixed: Browser hangs when a table is inserted in the place of a selected list with an empty last item. +* [#16624](http://dev.ckeditor.com/ticket/16624): Fixed: Improved the [Color Button](http://ckeditor.com/addon/colorbutton) plugin which will now normalize the CSS `background` property if it only contains a color value. This fixes missing background colors when using [Paste from Word](http://ckeditor.com/addon/pastefromword). +* [#16600](http://dev.ckeditor.com/ticket/16600): [Blink, WebKit] Fixed: Error thrown occasionally by an uninitialized editable for multiple CKEditor instances on the same page. + +## CKEditor 4.6 + +New Features: + +* [#14569](http://dev.ckeditor.com/ticket/14569): Added a new, flat, default CKEditor skin called [Moono-Lisa](http://ckeditor.com/addon/moono-lisa). Refreshed default colors available in the [Color Button](http://ckeditor.com/addon/colorbutton) plugin ([Text Color and Background Color](http://docs.ckeditor.com/#!/guide/dev_colorbutton) feature). +* [#14707](http://dev.ckeditor.com/ticket/14707): Added a new [Copy Formatting](http://ckeditor.com/addon/copyformatting) feature to enable easy copying of styles between your document parts. +* Introduced the completely rewritten [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin: + * Backward incompatibility: The [`config.pasteFromWordRemoveFontStyles`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles) option now defaults to `false`. This option will be deprecated in the future. Use [Advanced Content Filter](http://docs.ckeditor.com/#!/guide/dev_acf) to replicate the effect of setting it to `true`. + * Backward incompatibility: The [`config.pasteFromWordNumberedHeadingToList`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordNumberedHeadingToList) and [`config.pasteFromWordRemoveStyles`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveStyles) options were dropped and no longer have any effect on pasted content. + * Major improvements in preservation of list numbering, styling and indentation (nested lists with multiple levels). + * Major improvements in document structure parsing that fix plenty of issues with distorted or missing content after paste. +* Added new translation: Occitan. Thanks to [Cédric Valmary](https://totenoc.eu/)! +* [#10015](http://dev.ckeditor.com/ticket/10015): Keyboard shortcuts (relevant to the operating system in use) will now be displayed in tooltips and context menus. +* [#13794](http://dev.ckeditor.com/ticket/13794): The [Upload Image](http://ckeditor.com/addon/uploadimage) feature now uses `uploaded.width/height` if set. +* [#12541](http://dev.ckeditor.com/ticket/12541): Added the [Upload File](http://ckeditor.com/addon/uploadfile) plugin that lets you upload a file by drag&dropping it into the editor content. +* [#14449](http://dev.ckeditor.com/ticket/14449): Introduced the [Balloon Panel](http://ckeditor.com/addon/balloonpanel) plugin that lets you create stylish floating UI elements for the editor. +* [#12077](https://dev.ckeditor.com/ticket/12077): Added support for the HTML5 `download` attribute in link (``) elements. Selecting the "Force Download" checkbox in the [Link](http://ckeditor.com/addon/link) dialog will cause the linked file to be downloaded automatically. Thanks to [sbusse](https://github.com/sbusse)! +* [#13518](http://dev.ckeditor.com/ticket/13518): Introduced the [`additionalRequestParameters`](http://docs.ckeditor.com/#!/api/CKEDITOR.fileTools.uploadWidgetDefinition-property-additionalRequestParameters) property for file uploads to make it possible to send additional information about the uploaded file to the server. +* [#14889](http://dev.ckeditor.com/ticket/14889): Added the [`config.image2_altRequired`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-image2_altRequired) option for the [Enhanced Image](http://ckeditor.com/addon/image2) plugin to allow making alternative text a mandatory field. Thanks to [Andrey Fedoseev](https://github.com/andreyfedoseev)! + +Fixed Issues: + +* [#9991](http://dev.ckeditor.com/ticket/9991): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) should only normalize input data. +* [#7209](http://dev.ckeditor.com/ticket/7209): Fixed: Lists with 3 levels not [pasted from Word](http://ckeditor.com/addon/pastefromword) correctly. +* [#14335](http://dev.ckeditor.com/ticket/14335): Fixed: Pasting a numbered list starting with a value different from "1" from Microsoft Word does not work correctly. +* [#14542](http://dev.ckeditor.com/ticket/14542): Fixed: Copying a numbered list from Microsoft Word does not preserve list formatting. +* [#14544](http://dev.ckeditor.com/ticket/14544): Fixed: Copying a nested list from Microsoft Word results in an empty list. +* [#14660](http://dev.ckeditor.com/ticket/14660): Fixed: [Pasting text from Word](http://ckeditor.com/addon/pastefromword) breaks the styling in some cases. +* [#14867](http://dev.ckeditor.com/ticket/14867): [Firefox] Fixed: Text gets stripped when [pasting content from Word](http://ckeditor.com/addon/pastefromword). +* [#2507](http://dev.ckeditor.com/ticket/2507): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) does not detect pasting a part of a paragraph. +* [#3336](http://dev.ckeditor.com/ticket/3336): Fixed: Extra blank row added on top of the content [pasted from Word](http://ckeditor.com/addon/pastefromword). +* [#6115](http://dev.ckeditor.com/ticket/6115): Fixed: When Right-to-Left text direction is applied to a table [pasted from Word](http://ckeditor.com/addon/pastefromword), borders are missing on one side. +* [#6342](http://dev.ckeditor.com/ticket/6342): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) filters out a basic text style when it is [configured to use attributes](http://docs.ckeditor.com/#!/guide/dev_basicstyles-section-custom-basic-text-style-definition). +* [#6457](http://dev.ckeditor.com/ticket/6457): [IE] Fixed: [Pasting from Word](http://ckeditor.com/addon/pastefromword) is extremely slow. +* [#6789](http://dev.ckeditor.com/ticket/6789): Fixed: The `mso-list: ignore` style is not handled properly when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#7262](http://dev.ckeditor.com/ticket/7262): Fixed: Lists in preformatted body disappear when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#7662](http://dev.ckeditor.com/ticket/7662): [Opera] Fixed: Extra empty number/bullet shown in the editor body when editing a multi-level list [pasted from Word](http://ckeditor.com/addon/pastefromword). +* [#7807](http://dev.ckeditor.com/ticket/7807): Fixed: Last item in a list not converted to a `
  • ` element after [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#7950](http://dev.ckeditor.com/ticket/7950): [IE] Fixed: Content [from Word pasted](http://ckeditor.com/addon/pastefromword) differently than in other browsers. +* [#7982](http://dev.ckeditor.com/ticket/7982): Fixed: Multi-level lists get split into smaller ones when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#8231](http://dev.ckeditor.com/ticket/8231): [WebKit, Opera] Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) inserts empty paragraphs. +* [#8266](http://dev.ckeditor.com/ticket/8266): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) inserts a blank line at the top. +* [#8341](http://dev.ckeditor.com/ticket/8341), [#7646](http://dev.ckeditor.com/ticket/7646): Fixed: Faulty removal of empty `` elements in [Paste from Word](http://ckeditor.com/addon/pastefromword) content cleanup breaking content formatting. +* [#8754](http://dev.ckeditor.com/ticket/8754): [Firefox] Fixed: Incorrect pasting of multiple nested lists in [Paste from Word](http://ckeditor.com/addon/pastefromword). +* [#8983](http://dev.ckeditor.com/ticket/8983): Fixed: Alignment lost when [pasting from Word](http://ckeditor.com/addon/pastefromword) with [`config.enterMode`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) set to [`CKEDITOR.ENTER_BR`](http://docs.ckeditor.com/#!/api/CKEDITOR-property-ENTER_BR). +* [#9331](http://dev.ckeditor.com/ticket/9331): [IE] Fixed: [Pasting text from Word](http://ckeditor.com/addon/pastefromword) creates a simple Caesar cipher. +* [#9422](http://dev.ckeditor.com/ticket/9422): Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) leaves an unwanted `color:windowtext` style. +* [#10011](http://dev.ckeditor.com/ticket/10011): [IE9-10] Fixed: [`config.pasteFromWordRemoveFontStyles`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles) is ignored under certain conditions. +* [#10643](http://dev.ckeditor.com/ticket/10643): Fixed: Differences between using Ctrl+V and pasting from the [Paste from Word](http://ckeditor.com/addon/pastefromword) dialog. +* [#10784](http://dev.ckeditor.com/ticket/10784): Fixed: Lines missing when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#11294](http://dev.ckeditor.com/ticket/11294): [IE10] Fixed: Font size is not preserved when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#11627](http://dev.ckeditor.com/ticket/11627): Fixed: Missing words when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#12784](http://dev.ckeditor.com/ticket/12784): Fixed: Bulleted list with custom bullets gets changed to a numbered list when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#13174](http://dev.ckeditor.com/ticket/13174): Fixed: Data loss after [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#13828](http://dev.ckeditor.com/ticket/13828): Fixed: Widget classes should be added to the wrapper rather than the widget element. +* [#13829](http://dev.ckeditor.com/ticket/13829): Fixed: No class in [Widget](http://ckeditor.com/addon/widget) wrapper to identify the widget type. +* [#13519](http://dev.ckeditor.com/ticket/13519): Server response received when uploading files should be more flexible. + +Other Changes: + +* Updated [SCAYT](http://ckeditor.com/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](http://ckeditor.com/addon/wsc) plugins: + * Support for the new default Moono-Lisa skin. + * [#121](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/121): Fixed: [Basic Styles](http://ckeditor.com/addon/basicstyles) do not work when SCAYT is enabled. + * [#125](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/125): Fixed: Inline styles are not continued when writing multiple lines of styled text with SCAYT enabled. + * [#127](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/127): Fixed: Uncaught TypeError after enabling SCAYT in the CKEditor `
    ` element. + * [#128](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/128): Fixed: Error thrown after enabling SCAYT caused by conflicts with RequireJS. + +## CKEditor 4.5.11 + +**Security Updates:** + +* [Severity: minor] Fixed the `target="_blank"` vulnerability reported by James Gaskell. + + Issue summary: If a victim had access to a spoofed version of ckeditor.com via HTTP (e.g. due to DNS spoofing, using a hacked public network or mailicious hotspot), then when using a link to the ckeditor.com website it was possible for the attacker to change the current URL of the opening page, even if the opening page was protected with SSL. + + An upgrade is recommended. + +New Features: + +* [#14747](http://dev.ckeditor.com/ticket/14747): The [Enhanced Image](http://ckeditor.com/addon/image2) caption now supports the link `target` attribute. +* [#7154](http://dev.ckeditor.com/ticket/7154): Added support for the "Display Text" field to the [Link](http://ckeditor.com/addon/link) dialog. Thanks to [Ryan Guill](https://github.com/ryanguill)! + +Fixed Issues: + +* [#13362](http://dev.ckeditor.com/ticket/13362): [Blink, WebKit] Fixed: Active widget element is not cached when it is losing focus and it is inside an editable element. +* [#13755](http://dev.ckeditor.com/ticket/13755): [Edge] Fixed: Pasting images does not work. +* [#13548](http://dev.ckeditor.com/ticket/13548): [IE] Fixed: Clicking the [elements path](http://ckeditor.com/addon/elementspath) disables Cut and Copy icons. +* [#13812](http://dev.ckeditor.com/ticket/13812): Fixed: When aborting file upload the placeholder for image is left. +* [#14659](http://dev.ckeditor.com/ticket/14659): [Blink] Fixed: Content scrolled to the top after closing the dialog in a [`
    `-based editor](http://ckeditor.com/addon/divarea). +* [#14825](http://dev.ckeditor.com/ticket/14825): [Edge] Fixed: Focusing the editor causes unwanted scrolling due to dropped support for the `setActive` method. + ## CKEditor 4.5.10 Fixed Issues: @@ -15,7 +141,6 @@ Fixed Issues: * [#14252](http://dev.ckeditor.com/ticket/14252): [IE] Fixed: Styles drop-down list does not always reflect the current style of the text line. * [#14275](http://dev.ckeditor.com/ticket/14275): [IE9+] Fixed: `onerror` and `onload` events are not used in browsers it could have been used when loading scripts dynamically. - ## CKEditor 4.5.9 Fixed Issues: @@ -29,7 +154,6 @@ Fixed Issues: * [#11697](http://dev.ckeditor.com/ticket/11697): Fixed: Content is replaced ignoring the letter case setting in the [Find and Replace](http://ckeditor.com/addon/find) dialog window. * [#13886](http://dev.ckeditor.com/ticket/13886): Fixed: Invalid handling of the [`CKEDITOR.style`](http://docs.ckeditor.com/#!/api/CKEDITOR.style) instance with the `styles` property by [`CKEDITOR.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter). * [#14535](http://dev.ckeditor.com/ticket/14535): Fixed: CSS syntax corrections. Thanks to [mdjdenormandie](https://github.com/mdjdenormandie)! -* [#14312](http://dev.ckeditor.com/ticket/14312): [IE] Fixed: Artifact is visible after pasting any text. ## CKEditor 4.5.8 diff --git a/core/assets/vendor/ckeditor/LICENSE.md b/core/assets/vendor/ckeditor/LICENSE.md index 55be53afa..d6f58ca44 100644 --- a/core/assets/vendor/ckeditor/LICENSE.md +++ b/core/assets/vendor/ckeditor/LICENSE.md @@ -2,7 +2,7 @@ Software License Agreement ========================== CKEditor - The text editor for Internet - http://ckeditor.com -Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. Licensed under the terms of any of the following licenses at your choice: @@ -37,7 +37,7 @@ done by developers outside of CKSource with their express permission. The following libraries are included in CKEditor under the MIT license (see Appendix D): -* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2016, CKSource - Frederico Knabben. +* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2017, CKSource - Frederico Knabben. * PicoModal (included in `samples/js/sf.js`) - Copyright (c) 2012 James Frasca. * CodeMirror (included in the samples) - Copyright (C) 2014 by Marijn Haverbeke and others. diff --git a/core/assets/vendor/ckeditor/build-config.js b/core/assets/vendor/ckeditor/build-config.js index c4eda91da..4a3398147 100644 --- a/core/assets/vendor/ckeditor/build-config.js +++ b/core/assets/vendor/ckeditor/build-config.js @@ -22,76 +22,79 @@ /* exported CKBUILDER_CONFIG */ var CKBUILDER_CONFIG = { - skin: 'moono', + skin: 'moono-lisa', ignore: [ // CKEditor repository structure: unrelated to the usage of CKEditor itself. - 'dev', - 'README.md', - '.editorconfig', - '.gitignore', - '.gitattributes', - '.idea', - '.mailmap', - '.DS_Store', - 'tests', - 'package.json', 'bender.js', '.bender', 'bender-err.log', 'bender-out.log', - 'node_modules', + 'dev', + 'docs', + '.DS_Store', + '.editorconfig', + '.gitignore', + '.gitattributes', + 'gruntfile.js', + '.idea', '.jscsrc', + '.jshintignore', '.jshintrc', + 'less', + '.mailmap', + 'node_modules', + 'package.json', + 'README.md', + 'tests', // Parts of CKEditor that we consciously don't ship with Drupal. 'adapters', 'config.js', 'contents.css', - 'gruntfile.js', 'styles.js', 'samples', - 'skins/moono/readme.md' + 'skins/moono-lisa/readme.md' ], - plugins : { - 'about' : 1, - 'a11yhelp' : 1, - 'basicstyles' : 1, - 'blockquote' : 1, - 'clipboard' : 1, - 'contextmenu' : 1, - 'resize' : 1, - 'toolbar' : 1, - 'elementspath' : 1, - 'enterkey' : 1, - 'entities' : 1, - 'filebrowser' : 1, - 'floatingspace' : 1, - 'format' : 1, - 'htmlwriter' : 1, - 'horizontalrule' : 1, - 'wysiwygarea' : 1, - 'indent' : 1, - 'indentlist' : 1, - 'language' : 1, - 'list' : 1, - 'magicline' : 1, - 'maximize' : 1, - 'pastetext' : 1, - 'pastefromword' : 1, - 'removeformat' : 1, - 'sourcearea' : 1, - 'specialchar' : 1, - 'stylescombo' : 1, - 'tab' : 1, - 'table' : 1, - 'tabletools' : 1, - 'undo' : 1, - 'justify' : 1, - 'showblocks' : 1, - 'showborders' : 1, - 'tableresize' : 1, - 'sharedspace' : 1, - 'sourcedialog' : 1, - 'widget' : 1, - 'image2' : 1 + plugins: { + a11yhelp: 1, + about: 1, + autogrow: 1, + basicstyles: 1, + blockquote: 1, + clipboard: 1, + contextmenu: 1, + elementspath: 1, + enterkey: 1, + entities: 1, + filebrowser: 1, + floatingspace: 1, + format: 1, + horizontalrule: 1, + htmlwriter: 1, + image2: 1, + indent: 1, + indentlist: 1, + justify: 1, + language: 1, + list: 1, + magicline: 1, + maximize: 1, + pastefromword: 1, + pastetext: 1, + removeformat: 1, + sharedspace: 1, + showblocks: 1, + showborders: 1, + sourcearea: 1, + sourcedialog: 1, + specialchar: 1, + stylescombo: 1, + tab: 1, + table: 1, + tableresize: 1, + tabletools: 1, + toolbar: 1, + undo: 1, + widget: 1, + wysiwygarea: 1 } }; diff --git a/core/assets/vendor/ckeditor/ckeditor.js b/core/assets/vendor/ckeditor/ckeditor.js index dc590e364..7de640e87 100644 --- a/core/assets/vendor/ckeditor/ckeditor.js +++ b/core/assets/vendor/ckeditor/ckeditor.js @@ -1,546 +1,563 @@ /* -Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,f={timestamp:"G6DJ",version:"4.5.10",revision:"b47abaf",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var c=document.getElementsByTagName("script"),f=0;fg.getListenerIndex(h)){g=g.listeners;f||(f=this);isNaN(k)&&(k=10);var p=this;b.fn=h;b.priority=k;for(var r=g.length-1;0<=r;r--)if(g[r].priority<=k)return g.splice(r+1,0,b),{removeListener:d};g.unshift(b)}return{removeListener:d}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this, -arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,c=function(){a=1},m=0,l=function(){m=1};return function(k,b,d){var g=f(this)[k];k=a;var p=m;a=m=0;if(g){var r=g.listeners;if(r.length)for(var r=r.slice(0),v,u=0;ug.getListenerIndex(h)){g=g.listeners;e||(e=this);isNaN(k)&&(k=10);var p=this;d.fn=h;d.priority=k;for(var v=g.length-1;0<=v;v--)if(g[v].priority<=k)return g.splice(v+1,0,d),{removeListener:b};g.unshift(d)}return{removeListener:b}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this, +arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,c=function(){a=1},m=0,l=function(){m=1};return function(k,d,b){var g=e(this)[k];k=a;var p=m;a=m=0;if(g){var v=g.listeners;if(v.length)for(var v=v.slice(0),r,w=0;wdocument.documentMode),mobile:-1e||c.quirks);c.gecko&&(f=a.match(/rv:([\d\.]+)/))&&(f=f[1].split("."),e=1E4*f[0]+100*(f[1]||0)+1*(f[2]||0));c.air&&(e=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));c.webkit&&(e=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));c.version=e;c.isCompatible=!(c.ie&&7>e)&&!(c.gecko&&4E4>e)&&!(c.webkit&& -534>e);c.hidpi=2<=window.devicePixelRatio;c.needsBrFiller=c.gecko||c.webkit||c.ie&&10e;c.cssClass="cke_browser_"+(c.ie?"ie":c.gecko?"gecko":c.webkit?"webkit":"unknown");c.quirks&&(c.cssClass+=" cke_browser_quirks");c.ie&&(c.cssClass+=" cke_browser_ie"+(c.quirks?"6 cke_browser_iequirks":c.version));c.air&&(c.cssClass+=" cke_browser_air");c.iOS&&(c.cssClass+=" cke_browser_ios");c.hidpi&&(c.cssClass+=" cke_hidpi");return c}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR); -CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status= -"basic_ready",a&&a._load?a():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*f))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:f})},CKEDITOR.error=function(a,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log", -{type:"error",errorCode:a,additionalData:f})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var f=console[a.data.type]?a.data.type:"log",c=a.data.errorCode;if(a=a.data.additionalData)console[f]("[CKEDITOR] Error code: "+c+".",a);else console[f]("[CKEDITOR] Error code: "+c+".");console[f]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+c)}},null,null,999),CKEDITOR.dom={},function(){var a=[],f=CKEDITOR.env.gecko?"-moz-": -CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",c=/&/g,e=/>/g,h=/|\s) /g,function(g,d){return d+"\x26nbsp;"}).replace(/ (?=<)/g, -"\x26nbsp;")},getNextNumber:function(){var d=0;return function(){return++d}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var d="e",g=0;8>g;g++)d+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return d},override:function(d,g){var b=g(d);b.prototype=d.prototype;return b},setTimeout:function(d,g,b,a,k){k||(k=window);b||(b=k);return k.setTimeout(function(){a?d.apply(b,[].concat(a)):d.apply(b)},g||0)},trim:function(){var d=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; -return function(g){return g.replace(d,"")}}(),ltrim:function(){var d=/^[ \t\n\r]+/g;return function(g){return g.replace(d,"")}}(),rtrim:function(){var d=/[ \t\n\r]+$/g;return function(g){return g.replace(d,"")}}(),indexOf:function(d,g){if("function"==typeof g)for(var b=0,a=d.length;bd;d++)g[d]=("0"+parseInt(g[d],10).toString(16)).slice(-2);return"#"+g.join("")})},normalizeHex:function(d){return d.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi, -function(g,d,b,a){g=d.toLowerCase();3==g.length&&(g=g.split(""),g=[g[0],g[0],g[1],g[1],g[2],g[2]].join(""));return"#"+g+a})},parseCssText:function(d,g,b){var a={};b&&(d=(new CKEDITOR.dom.element("span")).setAttribute("style",d).getAttribute("style")||"");d&&(d=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(d)));if(!d||";"==d)return a;d.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(d,b,k){g&&(b=b.toLowerCase(),"font-family"==b&&(k=k.replace(/\s*,\s*/g, -",")),k=CKEDITOR.tools.trim(k));a[b]=k});return a},writeCssText:function(d,g){var b,a=[];for(b in d)a.push(b+":"+d[b]);g&&a.sort();return a.join("; ")},objectCompare:function(d,g,b){var a;if(!d&&!g)return!0;if(!d||!g)return!1;for(a in d)if(d[a]!=g[a])return!1;if(!b)for(a in g)if(d[a]!=g[a])return!1;return!0},objectKeys:function(d){var g=[],b;for(b in d)g.push(b);return g},convertArrayToObject:function(d,g){var b={};1==arguments.length&&(g=!0);for(var a=0,k=d.length;ab;b++)d.push(Math.floor(256*Math.random())); -for(b=0;bCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&e(h);return h},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$, -this.$);return a},getAddress:function(a){for(var f=[],c=this.getDocument().$.documentElement,e=this.$;e&&e!=c;){var h=e.parentNode;h&&f.unshift(this.getIndex.call({$:e},a));e=h}return f},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function f(a,k){var b=k?a.nextSibling:a.previousSibling;return b&&b.nodeType==CKEDITOR.NODE_TEXT?c(b)?f(b,k):b:null}function c(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE} -var e=this.$,h=-1,m;if(!this.$.parentNode||a&&e.nodeType==CKEDITOR.NODE_TEXT&&c(e)&&!f(e)&&!f(e,!0))return-1;do a&&e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(m||c(e))||(h++,m=e.nodeType==CKEDITOR.NODE_TEXT);while(e=e.previousSibling);return h},getNextSourceNode:function(a,f,c){if(c&&!c.call){var e=c;c=function(a){return!a.equals(e)}}a=!a&&this.getFirst&&this.getFirst();var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getNext()}for(;!a&&(h=(h||this).getParent());){if(c&& -!1===c(h,!0))return null;a=h.getNext()}return!a||c&&!1===c(a)?null:f&&f!=a.type?a.getNextSourceNode(!1,f,c):a},getPreviousSourceNode:function(a,f,c){if(c&&!c.call){var e=c;c=function(a){return!a.equals(e)}}a=!a&&this.getLast&&this.getLast();var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getPrevious()}for(;!a&&(h=(h||this).getParent());){if(c&&!1===c(h,!0))return null;a=h.getPrevious()}return!a||c&&!1===c(a)?null:f&&a.type!=f?a.getPreviousSourceNode(!1,f,c): -a},getPrevious:function(a){var f=this.$,c;do c=(f=f.previousSibling)&&10!=f.nodeType&&new CKEDITOR.dom.node(f);while(c&&a&&!a(c));return c},getNext:function(a){var f=this.$,c;do c=(f=f.nextSibling)&&new CKEDITOR.dom.node(f);while(c&&a&&!a(c));return c},getParent:function(a){var f=this.$.parentNode;return f&&(f.nodeType==CKEDITOR.NODE_ELEMENT||a&&f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(f):null},getParents:function(a){var f=this,c=[];do c[a?"push":"unshift"](f);while(f=f.getParent()); -return c},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var f=this.contains?this:this.getParent();do if(f.contains(a))return f;while(f=f.getParent());return null},getPosition:function(a){var f=this.$,c=a.$;if(f.compareDocumentPosition)return f.compareDocumentPosition(c);if(f==c)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(f.contains){if(f.contains(c))return CKEDITOR.POSITION_CONTAINS+ -CKEDITOR.POSITION_PRECEDING;if(c.contains(f))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in f)return 0>f.sourceIndex||0>c.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:f.sourceIndex=document.documentMode||!f||(a=f+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow|| -this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a|| -(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}},CKEDITOR.dom.element=function(a,f){"string"==typeof a&&(a=(f?f.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a= -"string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,f){var c=new CKEDITOR.dom.element("div",f);c.setHtml(a);return c.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,f,c,e){var h=f.getCustomData("list_marker_id")||f.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=f.getCustomData("list_marker_names")|| -f.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[h]=f;m[c]=1;return f.setCustomData(c,e)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var f in a)CKEDITOR.dom.element.clearMarkers(a,a[f],1)},CKEDITOR.dom.element.clearMarkers=function(a,f,c){var e=f.getCustomData("list_marker_names"),h=f.getCustomData("list_marker_id"),m;for(m in e)f.removeCustomData(m);f.removeCustomData("list_marker_names");c&&(f.removeCustomData("list_marker_id"),delete a[h])},function(){function a(a, -b){return-1<(" "+a+" ").replace(m," ").indexOf(" "+b+" ")}function f(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function c(a,b){var d=CKEDITOR.tools.escapeCss(a.$.id);return"#"+d+" "+b.split(/,\s*/).join(", #"+d+" ")}function e(a){for(var b=0,d=0,g=l[a].length;dCKEDITOR.env.version? -this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);var g=d.extractContents(!1,b||!1),c;d.insertNode(this.remove()); -if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(d=new CKEDITOR.dom.element("div");c=g.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),d.append(c);d.insertAfter(this);d.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}} -return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&& -(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var d=this.getDocument()._getHtml5ShivFrag();d.appendChild(b);b.innerHTML=a;d.removeChild(b);return a}catch(g){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p"); -a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a), -(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},d=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g=document.documentMode){var b=this.$.scopeName;"HTML"!= -b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a]; -for(var b=0;bCKEDITOR.env.version&&this.is("a")){var d=this.getParent(); -d.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.setHtml(b),b=d.getHtml(),d.setHtml(a),a=d.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,d;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(d=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(d)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(), -b=0,d=a.count();bCKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var d=this.$;a=a.$;if(d!=a){var g;if(b)for(;g=d.lastChild;)a.insertBefore(d.removeChild(g),a.firstChild);else for(;g=d.firstChild;)a.appendChild(d.removeChild(g))}},mergeSiblings:function(){function a(b,d,g){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var c=[];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(c.push(d), -d=g?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(d)){for(var e=g?b.getLast():b.getFirst();c.length;)c.shift().move(b,!g);d.moveChildren(b,!g);d.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a, -d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,d){"class"==b?this.$.className=d:"style"==b?this.$.style.cssText=d:"tabindex"==b?this.$.tabIndex=d:"checked"==b?this.$.checked=d:"contenteditable"==b?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,d){if("src"==b&&d.match(/^http:\/\//))try{a.apply(this,arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b, -a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")); -if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),d=0,g=b.count();dh||0h?h:c);d&&(0>e||0e?e:g,0)},setState:function(a,b,d){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");d&&this.setAttribute("aria-pressed", -!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src= -a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var d=this.$.attributes;b=b||{};for(var g=0;g=D.getChildCount()?(D=D.getChild(y-1),F=!0):D=D.getChild(y):L=F=!0;w.type==CKEDITOR.NODE_TEXT?t?G=!0:w.split(B):0S)for(;U;)U=h(U,P,!0);P=K}t||k()}}function c(){var a= -!1,d=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!0),c=CKEDITOR.dom.walker.bogus();return function(e){return b(e)||d(e)?!0:c(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(m)?!1:!0}}function e(a){var d=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(1);return function(c){return b(c)||d(c)?!0:!a&&l(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}} -function h(a){return function(){var c;return this[a?"getPreviousNode":"getNextNode"](function(a){!c&&d(a)&&(c=a);return b(a)&&!(l(a)&&a.equals(c))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(),k=/^[\t\r\n ]*(?: |\xa0)$/,b=CKEDITOR.dom.walker.editable(),d=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a= -new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed|| -f(this,2,d,!1,"undefined"==typeof a?!0:a);return d},deleteContents:function(a){this.collapsed||f(this,0,null,a)},extractContents:function(a,d){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||f(this,1,b,a,"undefined"==typeof d?!0:d);return b},createBookmark:function(a){var d,b,c,e,h=this.collapsed;d=this.document.createElement("span");d.data("cke-bookmark",1);d.setStyle("display","none");d.setHtml("\x26nbsp;");a&&(c="cke_bm_"+CKEDITOR.tools.getNextNumber(),d.setAttribute("id", -c+(h?"C":"S")));h||(b=d.clone(),b.setHtml("\x26nbsp;"),a&&b.setAttribute("id",c+"E"),e=this.clone(),e.collapse(),e.insertNode(b));e=this.clone();e.collapse(!0);e.insertNode(d);b?(this.setStartAfter(d),this.setEndBefore(b)):this.moveToPosition(d,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(h?"C":"S"):d,endNode:a?c+"E":b,serializable:a,collapsed:h}},createBookmark2:function(){function a(g){var d=g.container,c=g.offset,e;e=d;var h=c;e=e.type!=CKEDITOR.NODE_ELEMENT||0===h||h==e.getChildCount()? -0:e.getChild(h-1).type==CKEDITOR.NODE_TEXT&&e.getChild(h).type==CKEDITOR.NODE_TEXT;e&&(d=d.getChild(c-1),c=d.getLength());if(d.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=c.getIndex(),a.container=c.getParent()))}}var b=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(b){var c=this.collapsed,e={container:this.startContainer,offset:this.startOffset},h={container:this.endContainer,offset:this.endOffset};b&&(a(e), -d(e,this.root),c||(a(h),d(h,this.root)));return{start:e.container.getAddress(b),end:c?null:h.container.getAddress(b),startOffset:e.offset,endOffset:h.offset,normalized:b,collapsed:c,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var d=this.document.getByAddress(a.start,a.normalized),b=a.startOffset,c=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(d,b);c?this.setEnd(c,a):this.collapse(!0)}else d=(b=a.serializable)?this.document.getById(a.startNode):a.startNode, -a=b?this.document.getById(a.endNode):a.endNode,this.setStartBefore(d),d.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,d=this.endContainer,b=this.startOffset,c=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>b)a=a.getChild(b);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(d.type==CKEDITOR.NODE_ELEMENT)if(e=d.getChildCount(), -e>c)d=d.getChild(c).getPreviousSourceNode(!0);else if(1>e)d=d.getPreviousSourceNode();else{for(d=d.$;d.lastChild;)d=d.lastChild;d=new CKEDITOR.dom.node(d)}a.getPosition(d)&CKEDITOR.POSITION_FOLLOWING&&(a=d);return{startNode:a,endNode:d}},getCommonAncestor:function(a,d){var b=this.startContainer,c=this.endContainer,b=b.equals(c)?a&&b.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?b.getChild(this.startOffset):b:b.getCommonAncestor(c);return d&&!b.is?b.getParent():b},optimize:function(){var a= -this.startContainer,d=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(d?d>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;d=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(d?d>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,d=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);d&&d.is&&d.is("span")&&d.data("cke-bookmark")&&this.setEndAt(d,CKEDITOR.POSITION_AFTER_END)}, -trim:function(a,d){var b=this.startContainer,c=this.startOffset,e=this.collapsed;if((!a||e)&&b&&b.type==CKEDITOR.NODE_TEXT){if(c)if(c>=b.getLength())c=b.getIndex()+1,b=b.getParent();else{var h=b.split(c),c=b.getIndex()+1,b=b.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):b.equals(this.endContainer)&&(this.endOffset+=1)}else c=b.getIndex(),b=b.getParent();this.setStart(b,c);if(e){this.collapse(!0);return}}b=this.endContainer;c=this.endOffset; -d||e||!b||b.type!=CKEDITOR.NODE_TEXT||(c?(c>=b.getLength()||b.split(c),c=b.getIndex()+1):c=b.getIndex(),b=b.getParent(),this.setEnd(b,c))},enlarge:function(a,d){function b(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var c=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,d){var b=new CKEDITOR.dom.range(k);b.setStart(a,d);b.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var b=new CKEDITOR.dom.walker(b), -g;for(b.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=b.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;C=g!=a?g.getText():g.substring(d);if(c.test(C))return!1}return!0};if(this.collapsed)break;var f=this.getCommonAncestor(),k=this.root,m,l,t,w,D,B=!1,y,C;y=this.startContainer;var F=this.startOffset;y.type==CKEDITOR.NODE_TEXT?(F&&(y=!CKEDITOR.tools.trim(y.substring(0,F)).length&&y,B=!!y),y&&((w=y.getPrevious())||(t=y.getParent()))):(F&&(w=y.getChild(F-1)||y.getLast()), -w||(t=y));for(t=b(t);t||w;){if(t&&!w){!D&&t.equals(f)&&(D=!0);if(e?t.isBlockBoundary():!k.contains(t))break;B&&"inline"==t.getComputedStyle("display")||(B=!1,D?m=t:this.setStartBefore(t));w=t.getPrevious()}for(;w;)if(y=!1,w.type==CKEDITOR.NODE_COMMENT)w=w.getPrevious();else{if(w.type==CKEDITOR.NODE_TEXT)C=w.getText(),c.test(C)&&(w=null),y=/[\s\ufeff]$/.test(C);else if((w.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||d&&w.is("br"))&&!w.data("cke-bookmark"))if(B&&CKEDITOR.dtd.$removeEmpty[w.getName()]){C= -w.getText();if(c.test(C))w=null;else for(var F=w.$.getElementsByTagName("*"),E=0,L;L=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){w=null;break}w&&(y=!!C.length)}else w=null;y&&(B?D?m=t:t&&this.setStartBefore(t):B=!0);if(w){y=w.getPrevious();if(!t&&!y){t=w;w=null;break}w=y}else t=null}t&&(t=b(t.getParent()))}y=this.endContainer;F=this.endOffset;t=w=null;D=B=!1;y.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(y.substring(F)).length?B=!0:(B=!y.getLength(),F==y.getLength()?(w=y.getNext())|| -(t=y.getParent()):h(y,F)&&(t=y.getParent())):(w=y.getChild(F))||(t=y);for(;t||w;){if(t&&!w){!D&&t.equals(f)&&(D=!0);if(e?t.isBlockBoundary():!k.contains(t))break;B&&"inline"==t.getComputedStyle("display")||(B=!1,D?l=t:t&&this.setEndAfter(t));w=t.getNext()}for(;w;){y=!1;if(w.type==CKEDITOR.NODE_TEXT)C=w.getText(),h(w,0)||(w=null),y=/^[\s\ufeff]/.test(C);else if(w.type==CKEDITOR.NODE_ELEMENT){if((0=e.getLength()?c.setStartAfter(e):(c.setStartBefore(e),m= -0):c.setStartBefore(e));h&&h.type==CKEDITOR.NODE_TEXT&&(f?f>=h.getLength()?c.setEndAfter(h):(c.setEndAfter(h),l=0):c.setEndBefore(h));var c=new CKEDITOR.dom.walker(c),t=CKEDITOR.dom.walker.bookmark();c.evaluator=function(d){return d.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var w;c.guard=function(d,c){if(t(d))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&d.type==CKEDITOR.NODE_TEXT||c&&d.equals(w)||!1===b&&d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()||d.type==CKEDITOR.NODE_ELEMENT&& -d.hasAttribute("contenteditable"))return!1;c||d.type!=CKEDITOR.NODE_ELEMENT||(w=d);return!0};m&&(e=c[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);l&&(c.reset(),(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!m&&!l)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var d=this.startContainer,b=d.getChild(this.startOffset); -b?a.insertBefore(b):d.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,d){this.setStartAt(a,d);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(d,b){d.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[d.getName()]&& -(b=d.getIndex(),d=d.getParent());this._setStartContainer(d);this.startOffset=b;this.endContainer||(this._setEndContainer(d),this.endOffset=b);a(this)},setEnd:function(d,b){d.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[d.getName()]&&(b=d.getIndex()+1,d=d.getParent());this._setEndContainer(d);this.endOffset=b;this.startContainer||(this._setStartContainer(d),this.startOffset=b);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(), -a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(d,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(d,0);break;case CKEDITOR.POSITION_BEFORE_END:d.type==CKEDITOR.NODE_TEXT?this.setStart(d,d.getLength()):this.setStart(d,d.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(d);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(d)}a(this)}, -setEndAt:function(d,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(d,0);break;case CKEDITOR.POSITION_BEFORE_END:d.type==CKEDITOR.NODE_TEXT?this.setEnd(d,d.getLength()):this.setEnd(d,d.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(d);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(d)}a(this)},fixBlock:function(a,d){var b=this.createBookmark(),c=this.document.createElement(d);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(c); -c.trim();this.insertNode(c);var e=c.getBogus();e&&e.remove();c.appendBogus();this.moveToBookmark(b);return c},splitBlock:function(a,d){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=b.block,h=c.block,k=null;if(!b.blockLimit.equals(c.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),h=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),h||(h=this.fixBlock(!1,a)));b=e&&this.checkStartOfBlock(); -c=h&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(h)&&(c?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),h=null):b?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(h=this.splitElement(e,d||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:h,wasStartOfBlock:b,wasEndOfBlock:c,elementPath:k}},splitElement:function(a,d){if(!this.collapsed)return null; -this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(!1,d||!1),c=a.clone(!1,d||!1);b.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return d(a)||b(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||g.is("table")&&a.is("caption")?!1:!0}}var d=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!1);return function(d){for(var b=this.createBookmark(), -c=this[d?"endPath":"startPath"](),e=c.block||c.blockLimit,h;e&&!e.equals(c.root)&&!e.getFirst(a(e));)h=e.getParent(),this[d?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=h;this.moveToBookmark(b)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,d){var b=d==CKEDITOR.START,c=this.clone();c.collapse(b);c[b?"setStartAt": -"setEndAt"](a,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=e(b);return c[b?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,d=this.startOffset;CKEDITOR.env.ie&&d&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,d)),k.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);d=this.clone();d.collapse(!0);d.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START); -a=new CKEDITOR.dom.walker(d);a.evaluator=c();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,d=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(d)),k.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);d=this.clone();d.collapse(!1);d.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(d);a.evaluator=c();return a.checkForward()},getPreviousNode:function(a, -d,b){var c=this.clone();c.collapse(1);c.setStartAt(b||this.root,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(c);b.evaluator=a;b.guard=d;return b.previous()},getNextNode:function(a,d,b){var c=this.clone();c.collapse();c.setEndAt(b||this.root,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(c);b.evaluator=a;b.guard=d;return b.next()},checkReadOnly:function(){function a(d,b){for(;d;){if(d.type==CKEDITOR.NODE_ELEMENT){if("false"==d.getAttribute("contentEditable")&&!d.data("cke-editable"))return 0; -if(d.is("html")||"true"==d.getAttribute("contentEditable")&&(d.contains(b)||d.equals(b)))break}d=d.getParent()}return 1}return function(){var d=this.startContainer,b=this.endContainer;return!(a(d,b)&&a(b,d))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())? -this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a), -this.setEndAfter(a),!0;var e=a,h=c,n=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(n=e[b?"getLast":"getFirst"](d));h||n||(n=e[b?"getPrevious":"getNext"](d));a=n}return!!c},moveToClosestEditablePosition:function(a,d){var b,c=0,e,h,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(b=new CKEDITOR.dom.range(this.root),b.moveToPosition(a,k[d?0:1])):b=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))c=1;else if(e=b[d?"getNextEditableNode":"getPreviousEditableNode"]())c=1,(h=e.type== -CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(b.setEnd(e,0),b.collapse()):b.moveToPosition(e,k[d?1:0]);c&&this.moveToRange(b);return!!c},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a, -!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),d=CKEDITOR.dom.walker.bookmark(!1,!0),b=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return b(a)&&d(a)};var c=a.next();a.reset();return c&&c.equals(a.previous())?c:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)|| -a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:h(),getPreviousEditableNode:h(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),d,b,c,e=this.clone();e.optimize();(c=e.startContainer.type==CKEDITOR.NODE_TEXT)?(b=e.startContainer.getText(),d=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)): -e.insertNode(a);a.scrollIntoView();c&&(e.startContainer.setText(b),d.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT= -1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function f(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function c(a,b,e,h){a:{null==h&&(h=f(e));for(var k;k=h.shift();)if(k.getDtd().p){h={element:k,remaining:h};break a}h=null}if(!h)return 0;if((k=CKEDITOR.filter.instances[h.element.data("cke-filter")])&& -!k.check(b))return c(a,b,e,h.remaining);b=new CKEDITOR.dom.range(h.element);b.selectNodeContents(h.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=k;a._.nestedEditable={element:h.element,container:e,remaining:h.remaining,iterator:b};return 1}function e(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0), -k=function(a){return m(a)&&l(a)},b={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var g,f,l,v,u;a=a||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable= -null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var n=this.range.clone();f=n.startPath();var q=n.endPath(),x=!n.collapsed&&e(n,f.block),z=!n.collapsed&&e(n,q.block,1);n.shrink(CKEDITOR.SHRINK_ELEMENT,!0);x&&n.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);z&&n.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);f=n.endContainer.hasAscendant("pre",!0)||n.startContainer.hasAscendant("pre",!0);n.enlarge(this.forceBrBreak&&!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS); -n.collapsed||(f=new CKEDITOR.dom.walker(n.clone()),q=CKEDITOR.dom.walker.bookmark(!0,!0),f.evaluator=q,this._.nextNode=f.next(),f=new CKEDITOR.dom.walker(n.clone()),f.evaluator=q,f=f.previous(),this._.lastNode=f.getNextSourceNode(!0,null,n.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&& -(q=new CKEDITOR.dom.elementPath(q.endContainer,q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&n.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=n.document.createText(""),this._.lastNode.insertAfter(f)),n=null);this._.started=1;f=n}q=this._.nextNode;n=this._.lastNode;for(this._.nextNode=null;q;){var x=0,z=q.hasAscendant("pre"),A=q.type!=CKEDITOR.NODE_ELEMENT,t=0;if(A)q.type==CKEDITOR.NODE_TEXT&&h.test(q.getText())&&(A=0);else{var w=q.getName(); -if(CKEDITOR.dtd.$block[w]&&"false"==q.getAttribute("contenteditable")){g=q;c(this,a,g);break}else if(q.isBlockBoundary(this.forceBrBreak&&!z&&{br:1})){if("br"==w)A=1;else if(!f&&!q.getChildCount()&&"hr"!=w){g=q;l=q.equals(n);break}f&&(f.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=w&&(this._.nextNode=q));x=1}else{if(q.getFirst()){f||(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}A=1}}A&&!f&&(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START)); -l=(!x||A)&&q.equals(n);if(f&&!x)for(;!q.getNext(k)&&!l;){w=q.getParent();if(w.isBlockBoundary(this.forceBrBreak&&!z&&{br:1})){x=1;A=0;l||w.equals(n);f.setEndAt(w,CKEDITOR.POSITION_BEFORE_END);break}q=w;A=1;l=q.equals(n);t=1}A&&f.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,t,n);if((l=!q)||x&&f)break}if(!g){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(f.startContainer,f.root);q=g.blockLimit;x={div:1,th:1,td:1}; -g=g.block;!g&&q&&!this.enforceRealBlocks&&x[q.getName()]&&f.checkStartOfBlock()&&f.checkEndOfBlock()&&!q.equals(f.root)?g=q:!g||this.enforceRealBlocks&&g.is(b)?(g=this.range.document.createElement(a),f.extractContents().appendTo(g),g.trim(),f.insertNode(g),v=u=!0):"li"!=g.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(g=g.clone(!1),f.extractContents().appendTo(g),g.trim(),u=f.splitBlock(),v=!u.wasStartOfBlock,u=!u.wasEndOfBlock,f.insertNode(g)):l||(this._.nextNode=g.equals(n)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode, -1,n))}v&&(v=g.getPrevious())&&v.type==CKEDITOR.NODE_ELEMENT&&("br"==v.getName()?v.remove():v.getLast()&&"br"==v.getLast().$.nodeName.toLowerCase()&&v.getLast().remove());u&&(v=g.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&"br"==v.getName()&&(!CKEDITOR.env.needsBrFiller||v.getPrevious(m)||v.getNext(m))&&v.remove();this._.nextNode||(this._.nextNode=l||g.equals(n)||!n?null:this._getNextSourceNode(g,1,n));return g},_getNextSourceNode:function(a,b,c){function e(a){return!(a.equals(c)||a.equals(h))}var h= -this.range.root;for(a=a.getNextSourceNode(b,null,e);!m(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,f){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==f.exec.call(this,a,c)};this.refresh=function(a,c){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!c.isContextFor(this.context)|| -!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:c})?!0:f.refresh&&!1!==f.refresh.apply(this,arguments)};var c;this.checkAllowed=function(e){return e||"boolean"!=typeof c?c=a.activeFilter.checkFeature(this):c};CKEDITOR.tools.extend(this,f,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!f.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype= +!0:c.safari=!0);var f=0;c.ie&&(f=e?parseFloat(e[1]):c.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,c.ie9Compat=9==f,c.ie8Compat=8==f,c.ie7Compat=7==f,c.ie6Compat=7>f||c.quirks);c.gecko&&(e=a.match(/rv:([\d\.]+)/))&&(e=e[1].split("."),f=1E4*e[0]+100*(e[1]||0)+1*(e[2]||0));c.air&&(f=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));c.webkit&&(f=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));c.version=f;c.isCompatible=!(c.ie&&7>f)&&!(c.gecko&&4E4>f)&&!(c.webkit&& +534>f);c.hidpi=2<=window.devicePixelRatio;c.needsBrFiller=c.gecko||c.webkit||c.ie&&10f;c.cssClass="cke_browser_"+(c.ie?"ie":c.gecko?"gecko":c.webkit?"webkit":"unknown");c.quirks&&(c.cssClass+=" cke_browser_quirks");c.ie&&(c.cssClass+=" cke_browser_ie"+(c.quirks?"6 cke_browser_iequirks":c.version));c.air&&(c.cssClass+=" cke_browser_air");c.iOS&&(c.cssClass+=" cke_browser_ios");c.hidpi&&(c.cssClass+=" cke_hidpi");return c}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR); +CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status= +"basic_ready",a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*e))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:e})},CKEDITOR.error=function(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log", +{type:"error",errorCode:a,additionalData:e})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var e=console[a.data.type]?a.data.type:"log",c=a.data.errorCode;if(a=a.data.additionalData)console[e]("[CKEDITOR] Error code: "+c+".",a);else console[e]("[CKEDITOR] Error code: "+c+".");console[e]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+c)}},null,null,999),CKEDITOR.dom={},function(){var a=[],e=CKEDITOR.env.gecko?"-moz-": +CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",c=/&/g,f=/>/g,h=/|\s) /g,function(g,b){return b+"\x26nbsp;"}).replace(/ (?=<)/g, +"\x26nbsp;")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var b="e",g=0;8>g;g++)b+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return b},override:function(b,g){var d=g(b);d.prototype=b.prototype;return d},setTimeout:function(b,g,d,a,k){k||(k=window);d||(d=k);return k.setTimeout(function(){a?b.apply(d,[].concat(a)):b.apply(d)},g||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; +return function(g){return g.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(g){return g.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(g){return g.replace(b,"")}}(),indexOf:function(b,g){if("function"==typeof g)for(var d=0,a=b.length;db;b++)g[b]=("0"+parseInt(g[b],10).toString(16)).slice(-2);return"#"+g.join("")})},normalizeHex:function(b){return b.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi, +function(g,b,d,a){g=b.toLowerCase();3==g.length&&(g=g.split(""),g=[g[0],g[0],g[1],g[1],g[2],g[2]].join(""));return"#"+g+a})},parseCssText:function(b,g,d){var a={};d&&(b=(new CKEDITOR.dom.element("span")).setAttribute("style",b).getAttribute("style")||"");b&&(b=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(b)));if(!b||";"==b)return a;b.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,d,k){g&&(d=d.toLowerCase(),"font-family"==d&&(k=k.replace(/\s*,\s*/g, +",")),k=CKEDITOR.tools.trim(k));a[d]=k});return a},writeCssText:function(b,g){var d,a=[];for(d in b)a.push(d+":"+b[d]);g&&a.sort();return a.join("; ")},objectCompare:function(b,g,d){var a;if(!b&&!g)return!0;if(!b||!g)return!1;for(a in b)if(b[a]!=g[a])return!1;if(!d)for(a in g)if(b[a]!=g[a])return!1;return!0},objectKeys:function(b){var g=[],d;for(d in b)g.push(d);return g},convertArrayToObject:function(b,g){var d={};1==arguments.length&&(g=!0);for(var a=0,k=b.length;ad;d++)b.push(Math.floor(256*Math.random()));for(d=0;dCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&f(h);return h},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling}, +insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var e=[],c=this.getDocument().$.documentElement,f=this.$;f&&f!=c;){var h=f.parentNode;h&&e.unshift(this.getIndex.call({$:f},a));f=h}return e},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)}, +getIndex:function(a){function e(a,k){var d=k?a.nextSibling:a.previousSibling;return d&&d.nodeType==CKEDITOR.NODE_TEXT?c(d)?e(d,k):d:null}function c(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var f=this.$,h=-1,m;if(!this.$.parentNode||a&&f.nodeType==CKEDITOR.NODE_TEXT&&c(f)&&!e(f)&&!e(f,!0))return-1;do a&&f!=this.$&&f.nodeType==CKEDITOR.NODE_TEXT&&(m||c(f))||(h++,m=f.nodeType==CKEDITOR.NODE_TEXT);while(f=f.previousSibling);return h},getNextSourceNode:function(a, +e,c){if(c&&!c.call){var f=c;c=function(a){return!a.equals(f)}}a=!a&&this.getFirst&&this.getFirst();var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getNext()}for(;!a&&(h=(h||this).getParent());){if(c&&!1===c(h,!0))return null;a=h.getNext()}return!a||c&&!1===c(a)?null:e&&e!=a.type?a.getNextSourceNode(!1,e,c):a},getPreviousSourceNode:function(a,e,c){if(c&&!c.call){var f=c;c=function(a){return!a.equals(f)}}a=!a&&this.getLast&&this.getLast();var h;if(!a){if(this.type== +CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getPrevious()}for(;!a&&(h=(h||this).getParent());){if(c&&!1===c(h,!0))return null;a=h.getPrevious()}return!a||c&&!1===c(a)?null:e&&a.type!=e?a.getPreviousSourceNode(!1,e,c):a},getPrevious:function(a){var e=this.$,c;do c=(e=e.previousSibling)&&10!=e.nodeType&&new CKEDITOR.dom.node(e);while(c&&a&&!a(c));return c},getNext:function(a){var e=this.$,c;do c=(e=e.nextSibling)&&new CKEDITOR.dom.node(e);while(c&&a&&!a(c));return c},getParent:function(a){var e= +this.$.parentNode;return e&&(e.nodeType==CKEDITOR.NODE_ELEMENT||a&&e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(e):null},getParents:function(a){var e=this,c=[];do c[a?"push":"unshift"](e);while(e=e.getParent());return c},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var e=this.contains?this:this.getParent();do if(e.contains(a))return e;while(e=e.getParent());return null},getPosition:function(a){var e=this.$,c=a.$;if(e.compareDocumentPosition)return e.compareDocumentPosition(c); +if(e==c)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(e.contains){if(e.contains(c))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(c.contains(e))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in e)return 0>e.sourceIndex||0>c.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:e.sourceIndex=document.documentMode||!e||(a=e+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"), +!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))}, +findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}}, +CKEDITOR.dom.element=function(a,e){"string"==typeof a&&(a=(e?e.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,e){var c=new CKEDITOR.dom.element("div",e);c.setHtml(a);return c.getFirst().remove()},CKEDITOR.dom.element.setMarker= +function(a,e,c,f){var h=e.getCustomData("list_marker_id")||e.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=e.getCustomData("list_marker_names")||e.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[h]=e;m[c]=1;return e.setCustomData(c,f)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var e in a)CKEDITOR.dom.element.clearMarkers(a,a[e],1)},CKEDITOR.dom.element.clearMarkers=function(a,e,c){var f=e.getCustomData("list_marker_names"), +h=e.getCustomData("list_marker_id"),m;for(m in f)e.removeCustomData(m);e.removeCustomData("list_marker_names");c&&(e.removeCustomData("list_marker_id"),delete a[h])},function(){function a(a,d){return-1<(" "+a+" ").replace(m," ").indexOf(" "+d+" ")}function e(a){var d=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),d=!1);return function(){d||a.removeAttribute("id")}}function c(a,d){var b=CKEDITOR.tools.escapeCss(a.$.id);return"#"+b+" "+d.split(/,\s*/).join(", #"+b+" ")}function f(a){for(var d= +0,b=0,g=l[a].length;bCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type", +"_moz"),this.append(a))}},breakParent:function(a,d){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);var g=b.extractContents(!1,d||!1),c;b.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");c=g.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),b.append(c);b.insertAfter(this);b.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)& +16)}:function(a){var d=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?d.contains(a.getParent().$):d!=a.$&&d.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(d){}}return function(d){d?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0)); +return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var d=this.$;if(this.getParent())return d.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(d);d.innerHTML=a;b.removeChild(d);return a}catch(g){this.$.innerHTML="";d=new CKEDITOR.dom.element("body",this.getDocument());d.$.innerHTML= +a;for(d=d.getChildren();d.count();)this.append(d.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(d){this.$[a?"textContent":"innerText"]=d}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name; +case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var d= +{},b=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g=document.documentMode){var d=this.$.scopeName;"HTML"!=d&&(a=d.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var d=this.$.firstChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getNext(a));return d},getLast:function(a){var d=this.$.lastChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getPrevious(a));return d},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, +is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var d=0;dCKEDITOR.env.version&&this.is("a")){var b=this.getParent();b.type==CKEDITOR.NODE_ELEMENT&&(b=b.clone(),b.setHtml(d),d=b.getHtml(),b.setHtml(a),a=b.getHtml())}return d==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),d,b;a&&CKEDITOR.env.webkit&&(d=this.getWindow(),!d.equals(CKEDITOR.document.getWindow())&&(b=d.$.frameElement)&&(a=(new CKEDITOR.dom.element(b)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; +for(var a=this.getChildren(),d=0,b=a.count();dCKEDITOR.env.version?function(d){return"name"==d?!!this.$.name:a.call(this,d)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,d){var b=this.$;a=a.$;if(b!=a){var g;if(d)for(;g=b.lastChild;)a.insertBefore(b.removeChild(g),a.firstChild);else for(;g=b.firstChild;)a.appendChild(b.removeChild(g))}},mergeSiblings:function(){function a(d,b,g){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var c= +[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(c.push(b),b=g?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(d.isIdentical(b)){for(var k=g?d.getLast():d.getFirst();c.length;)c.shift().move(d,!g);b.moveChildren(d,!g);b.remove();k&&k.type==CKEDITOR.NODE_ELEMENT&&k.mergeSiblings()}}}return function(d){if(!1===d||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", +visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d,b){"class"==d?this.$.className=b:"style"==d?this.$.style.cssText=b:"tabindex"==d?this.$.tabIndex=b:"checked"==d?this.$.checked=b:"contenteditable"==d?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(d,b){if("src"==d&&b.match(/^http:\/\//))try{a.apply(this, +arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var d in a)this.setAttribute(d,a[d]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var d= +0;dCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", +"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,d=this.getElementsByTag("*"),b=0,g=d.count();bh||0h?h:c);b&&(0>f||0f?f:g,0)},setState:function(a,d,b){d=d||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(d+"_on");this.removeClass(d+ +"_off");this.removeClass(d+"_disabled");b&&this.setAttribute("aria-pressed",!0);b&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(d+"_disabled");this.removeClass(d+"_off");this.removeClass(d+"_on");b&&this.setAttribute("aria-disabled",!0);b&&this.removeAttribute("aria-pressed");break;default:this.addClass(d+"_off"),this.removeClass(d+"_on"),this.removeClass(d+"_disabled"),b&&this.removeAttribute("aria-pressed"),b&&this.removeAttribute("aria-disabled")}}, +getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(d){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,d){var b=this.$.attributes;d=d||{};for(var g=0;g=l.getChildCount()?(l=l.getChild(A-1),E=!0):l=l.getChild(A):I=E=!0;x.type==CKEDITOR.NODE_TEXT?t?H=!0:x.split(z):0X)for(;W;)W=n(W,O,!0);O=T}t||e()}}function c(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),c=CKEDITOR.dom.walker.bogus();return function(f){return d(f)||b(f)?!0:c(f)&&!a?a=!0:f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(m)?!1:!0}}function f(a){var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(1); +return function(c){return d(c)||b(c)?!0:!a&&l(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}}function h(a){return function(){var c;return this[a?"getPreviousNode":"getNextNode"](function(a){!c&&b(a)&&(c=a);return d(a)&&!(l(a)&&a.equals(c))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(),k=/^[\t\r\n ]*(?: |\xa0)$/, +d=CKEDITOR.dom.walker.editable(),b=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset); +this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||e(this,0,null,a)},extractContents:function(a,b){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,1,d,a,"undefined"==typeof b?!0:b);return d},createBookmark:function(a){var b,d,c,f,n=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display", +"none");b.setHtml("\x26nbsp;");a&&(c="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",c+(n?"C":"S")));n||(d=b.clone(),d.setHtml("\x26nbsp;"),a&&d.setAttribute("id",c+"E"),f=this.clone(),f.collapse(),f.insertNode(d));f=this.clone();f.collapse(!0);f.insertNode(b);d?(this.setStartAfter(b),this.setEndBefore(d)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(n?"C":"S"):b,endNode:a?c+"E":d,serializable:a,collapsed:n}},createBookmark2:function(){function a(g){var b= +g.container,c=g.offset,f;f=b;var h=c;f=f.type!=CKEDITOR.NODE_ELEMENT||0===h||h==f.getChildCount()?0:f.getChild(h-1).type==CKEDITOR.NODE_TEXT&&f.getChild(h).type==CKEDITOR.NODE_TEXT;f&&(b=b.getChild(c-1),c=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=c.getIndex(),a.container=c.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(d){var c=this.collapsed,f={container:this.startContainer, +offset:this.startOffset},h={container:this.endContainer,offset:this.endOffset};d&&(a(f),b(f,this.root),c||(a(h),b(h,this.root)));return{start:f.container.getAddress(d),end:c?null:h.container.getAddress(d),startOffset:f.offset,endOffset:h.offset,normalized:d,collapsed:c,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,c=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,d);c?this.setEnd(c,a):this.collapse(!0)}else b= +(d=a.serializable)?this.document.getById(a.startNode):a.startNode,a=d?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,d=this.startOffset,c=this.endOffset,f;if(a.type==CKEDITOR.NODE_ELEMENT)if(f=a.getChildCount(),f>d)a=a.getChild(d);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a= +a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(),f>c)b=b.getChild(c).getPreviousSourceNode(!0);else if(1>f)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var d=this.startContainer,c=this.endContainer,d=d.equals(c)?a&&d.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?d.getChild(this.startOffset): +d:d.getCommonAncestor(c);return b&&!d.is?d.getParent():d},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START); +b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var d=this.startContainer,c=this.startOffset,f=this.collapsed;if((!a||f)&&d&&d.type==CKEDITOR.NODE_TEXT){if(c)if(c>=d.getLength())c=d.getIndex()+1,d=d.getParent();else{var h=d.split(c),c=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):d.equals(this.endContainer)&&(this.endOffset+=1)}else c=d.getIndex(),d=d.getParent(); +this.setStart(d,c);if(f){this.collapse(!0);return}}d=this.endContainer;c=this.endOffset;b||f||!d||d.type!=CKEDITOR.NODE_TEXT||(c?(c>=d.getLength()||d.split(c),c=d.getIndex()+1):c=d.getIndex(),d=d.getParent(),this.setEnd(d,c))},enlarge:function(a,b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var c=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var f=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,b){var d=new CKEDITOR.dom.range(k); +d.setStart(a,b);d.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var d=new CKEDITOR.dom.walker(d),g;for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=d.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;C=g!=a?g.getText():g.substring(b);if(c.test(C))return!1}return!0};if(this.collapsed)break;var e=this.getCommonAncestor(),k=this.root,l,m,t,x,F,z=!1,A,C;A=this.startContainer;var E=this.startOffset;A.type==CKEDITOR.NODE_TEXT?(E&&(A=!CKEDITOR.tools.trim(A.substring(0,E)).length&& +A,z=!!A),A&&((x=A.getPrevious())||(t=A.getParent()))):(E&&(x=A.getChild(E-1)||A.getLast()),x||(t=A));for(t=d(t);t||x;){if(t&&!x){!F&&t.equals(e)&&(F=!0);if(f?t.isBlockBoundary():!k.contains(t))break;z&&"inline"==t.getComputedStyle("display")||(z=!1,F?l=t:this.setStartBefore(t));x=t.getPrevious()}for(;x;)if(A=!1,x.type==CKEDITOR.NODE_COMMENT)x=x.getPrevious();else{if(x.type==CKEDITOR.NODE_TEXT)C=x.getText(),c.test(C)&&(x=null),A=/[\s\ufeff]$/.test(C);else if((x.$.offsetWidth>(CKEDITOR.env.webkit?1: +0)||b&&x.is("br"))&&!x.data("cke-bookmark"))if(z&&CKEDITOR.dtd.$removeEmpty[x.getName()]){C=x.getText();if(c.test(C))x=null;else for(var E=x.$.getElementsByTagName("*"),D=0,I;I=E[D++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){x=null;break}x&&(A=!!C.length)}else x=null;A&&(z?F?l=t:t&&this.setStartBefore(t):z=!0);if(x){A=x.getPrevious();if(!t&&!A){t=x;x=null;break}x=A}else t=null}t&&(t=d(t.getParent()))}A=this.endContainer;E=this.endOffset;t=x=null;F=z=!1;A.type==CKEDITOR.NODE_TEXT? +CKEDITOR.tools.trim(A.substring(E)).length?z=!0:(z=!A.getLength(),E==A.getLength()?(x=A.getNext())||(t=A.getParent()):h(A,E)&&(t=A.getParent())):(x=A.getChild(E))||(t=A);for(;t||x;){if(t&&!x){!F&&t.equals(e)&&(F=!0);if(f?t.isBlockBoundary():!k.contains(t))break;z&&"inline"==t.getComputedStyle("display")||(z=!1,F?m=t:t&&this.setEndAfter(t));x=t.getNext()}for(;x;){A=!1;if(x.type==CKEDITOR.NODE_TEXT)C=x.getText(),h(x,0)||(x=null),A=/^[\s\ufeff]/.test(C);else if(x.type==CKEDITOR.NODE_ELEMENT){if((0=f.getLength()?c.setStartAfter(f):(c.setStartBefore(f),l=0):c.setStartBefore(f));h&&h.type==CKEDITOR.NODE_TEXT&&(k?k>=h.getLength()?c.setEndAfter(h):(c.setEndAfter(h),m=0):c.setEndBefore(h));var c=new CKEDITOR.dom.walker(c),t=CKEDITOR.dom.walker.bookmark();c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var x;c.guard=function(b,c){if(t(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(x)||!1===d&&b.type== +CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(x=b);return!0};l&&(f=c[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(f,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);m&&(c.reset(),(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!l&&!m)}},insertNode:function(a){this.optimizeBookmark(); +this.trim(!1,!0);var b=this.startContainer,d=b.getChild(this.startOffset);d?a.insertBefore(d):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())}, +setStart:function(b,d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=d;this.endContainer||(this._setEndContainer(b),this.endOffset=d);a(this)},setEnd:function(b,d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=d;this.startContainer||(this._setStartContainer(b),this.startOffset=d);a(this)},setStartAfter:function(a){this.setStart(a.getParent(), +a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b); +break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var d=this.createBookmark(),c=this.document.createElement(b);this.collapse(a); +this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(c);c.trim();this.insertNode(c);var f=c.getBogus();f&&f.remove();c.appendBogus();this.moveToBookmark(d);return c},splitBlock:function(a,b){var d=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),f=d.block,h=c.block,e=null;if(!d.blockLimit.equals(c.blockLimit))return null;"br"!=a&&(f||(f=this.fixBlock(!0,a),h=(new CKEDITOR.dom.elementPath(this.endContainer, +this.root)).block),h||(h=this.fixBlock(!1,a)));d=f&&this.checkStartOfBlock();c=h&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(h)&&(c?(e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),h=null):d?(e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f=null):(h=this.splitElement(f,b||!1),f.is("ul","ol")||f.appendBogus()));return{previousBlock:f,nextBlock:h,wasStartOfBlock:d, +wasEndOfBlock:c,elementPath:e}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,b||!1),c=a.clone(!1,b||!1);d.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return b(a)||d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||g.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(), +d=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var d=this.createBookmark(),c=this[b?"endPath":"startPath"](),f=c.block||c.blockLimit,h;f&&!f.equals(c.root)&&!f.getFirst(a(f));)h=f.getParent(),this[b?"setEndAt":"setStartAt"](f,CKEDITOR.POSITION_AFTER_END),f.remove(1),f=h;this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a, +b){var d=b==CKEDITOR.START,c=this.clone();c.collapse(d);c[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=f(d);return c[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,b=this.startOffset;CKEDITOR.env.ie&&b&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,b)),k.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root); +b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=c();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,b=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(b)),k.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END); +a=new CKEDITOR.dom.walker(b);a.evaluator=c();return a.checkForward()},getPreviousNode:function(a,b,d){var c=this.clone();c.collapse(1);c.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var c=this.clone();c.collapse();c.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(b,d){for(;b;){if(b.type== +CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(d)||b.equals(d)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,b))}}(),moveToElementEditablePosition:function(a,d){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START), +!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){d&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(d&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); +else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var f=a,h=c,n=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(!1)&&(n=f[d?"getLast":"getFirst"](b));h||n||(n=f[d?"getPrevious":"getNext"](b));a=n}return!!c},moveToClosestEditablePosition:function(a,b){var d,c=0,f,h,e=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,e[b?0:1])):d=this.clone();if(a&& +!a.is(CKEDITOR.dtd.$block))c=1;else if(f=d[b?"getNextEditableNode":"getPreviousEditableNode"]())c=1,(h=f.type==CKEDITOR.NODE_ELEMENT)&&f.is(CKEDITOR.dtd.$block)&&"false"==f.getAttribute("contenteditable")?(d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(f,0),d.collapse()):d.moveToPosition(f,e[b?1:0]);c&&this.moveToRange(d);return!!c},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)}, +moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return d(a)&&b(a)};var c=a.next();a.reset();return c&&c.equals(a.previous())?c:null},getTouchedStartNode:function(){var a=this.startContainer; +return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:h(),getPreviousEditableNode:h(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,d,c,f=this.clone();f.optimize();(c=f.startContainer.type==CKEDITOR.NODE_TEXT)?(d=f.startContainer.getText(), +b=f.startContainer.split(f.startOffset),a.insertAfter(f.startContainer)):f.insertNode(a);a.scrollIntoView();c&&(f.startContainer.setText(d),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var d=this.getCommonAncestor(),c=this.getBoundaryNodes(),f=[],h,e,k,l;if(d&&d.find)for(e=d.find(a),h=0;h +arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function e(a){var d=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return d.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return d}function c(a,d,f,h){a:{null==h&&(h=e(f));for(var k;k=h.shift();)if(k.getDtd().p){h={element:k,remaining:h};break a}h=null}if(!h)return 0;if((k=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!k.check(d))return c(a,d,f,h.remaining); +d=new CKEDITOR.dom.range(h.element);d.selectNodeContents(h.element);d=d.createIterator();d.enlargeBr=a.enlargeBr;d.enforceRealBlocks=a.enforceRealBlocks;d.activeFilter=d.filter=k;a._.nestedEditable={element:h.element,container:f,remaining:h.remaining,iterator:d};return 1}function f(a,d,c){if(!d)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(d,c?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),k=function(a){return m(a)&& +l(a)},d={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var g,e,l,r,w;a=a||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null; +if(!this._.started){var n=this.range.clone();e=n.startPath();var q=n.endPath(),u=!n.collapsed&&f(n,e.block),B=!n.collapsed&&f(n,q.block,1);n.shrink(CKEDITOR.SHRINK_ELEMENT,!0);u&&n.setStartAt(e.block,CKEDITOR.POSITION_BEFORE_END);B&&n.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);e=n.endContainer.hasAscendant("pre",!0)||n.startContainer.hasAscendant("pre",!0);n.enlarge(this.forceBrBreak&&!e||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);n.collapsed||(e=new CKEDITOR.dom.walker(n.clone()), +q=CKEDITOR.dom.walker.bookmark(!0,!0),e.evaluator=q,this._.nextNode=e.next(),e=new CKEDITOR.dom.walker(n.clone()),e.evaluator=q,e=e.previous(),this._.lastNode=e.getNextSourceNode(!0,null,n.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&&(q=new CKEDITOR.dom.elementPath(q.endContainer, +q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&n.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=n.document.createText(""),this._.lastNode.insertAfter(e)),n=null);this._.started=1;e=n}q=this._.nextNode;n=this._.lastNode;for(this._.nextNode=null;q;){var u=0,B=q.hasAscendant("pre"),y=q.type!=CKEDITOR.NODE_ELEMENT,t=0;if(y)q.type==CKEDITOR.NODE_TEXT&&h.test(q.getText())&&(y=0);else{var x=q.getName();if(CKEDITOR.dtd.$block[x]&&"false"==q.getAttribute("contenteditable")){g= +q;c(this,a,g);break}else if(q.isBlockBoundary(this.forceBrBreak&&!B&&{br:1})){if("br"==x)y=1;else if(!e&&!q.getChildCount()&&"hr"!=x){g=q;l=q.equals(n);break}e&&(e.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=x&&(this._.nextNode=q));u=1}else{if(q.getFirst()){e||(e=this.range.clone(),e.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}y=1}}y&&!e&&(e=this.range.clone(),e.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));l=(!u||y)&&q.equals(n);if(e&&!u)for(;!q.getNext(k)&&!l;){x= +q.getParent();if(x.isBlockBoundary(this.forceBrBreak&&!B&&{br:1})){u=1;y=0;l||x.equals(n);e.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);break}q=x;y=1;l=q.equals(n);t=1}y&&e.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,t,n);if((l=!q)||u&&e)break}if(!g){if(!e)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(e.startContainer,e.root);q=g.blockLimit;u={div:1,th:1,td:1};g=g.block;!g&&q&&!this.enforceRealBlocks&&u[q.getName()]&& +e.checkStartOfBlock()&&e.checkEndOfBlock()&&!q.equals(e.root)?g=q:!g||this.enforceRealBlocks&&g.is(d)?(g=this.range.document.createElement(a),e.extractContents().appendTo(g),g.trim(),e.insertNode(g),r=w=!0):"li"!=g.getName()?e.checkStartOfBlock()&&e.checkEndOfBlock()||(g=g.clone(!1),e.extractContents().appendTo(g),g.trim(),w=e.splitBlock(),r=!w.wasStartOfBlock,w=!w.wasEndOfBlock,e.insertNode(g)):l||(this._.nextNode=g.equals(n)?null:this._getNextSourceNode(e.getBoundaryNodes().endNode,1,n))}r&&(r= +g.getPrevious())&&r.type==CKEDITOR.NODE_ELEMENT&&("br"==r.getName()?r.remove():r.getLast()&&"br"==r.getLast().$.nodeName.toLowerCase()&&r.getLast().remove());w&&(r=g.getLast())&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()&&(!CKEDITOR.env.needsBrFiller||r.getPrevious(m)||r.getNext(m))&&r.remove();this._.nextNode||(this._.nextNode=l||g.equals(n)||!n?null:this._getNextSourceNode(g,1,n));return g},_getNextSourceNode:function(a,d,c){function f(a){return!(a.equals(c)||a.equals(h))}var h=this.range.root; +for(a=a.getNextSourceNode(d,null,f);!m(a);)a=a.getNextSourceNode(d,null,f);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,e){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==e.exec.call(this,a,c)};this.refresh=function(a,c){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!c.isContextFor(this.context)|| +!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:c})?!0:e.refresh&&!1!==e.refresh.apply(this,arguments)};var c;this.checkAllowed=function(f){return f||"boolean"!=typeof c?c=a.activeFilter.checkFeature(this):c};CKEDITOR.tools.extend(this,e,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!e.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype= {enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON): this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"), -extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,d,c,g){var e,h;a=[];for(e in b){h=b[e];h="boolean"==typeof h?{}:"function"==typeof h?{match:h}:E(h);"$"!=e.charAt(0)&&(h.elements=e);d&&(h.featureName=d.toLowerCase());var f=h;f.elements=l(f.elements,/\s+/)||null;f.propertiesOnly=f.propertiesOnly||!0===f.elements;var n=/\s*,\s*/,k=void 0;for(k in N){f[k]=l(f[k], -n)||null;var t=f,m=O[k],p=l(f[O[k]],n),w=f[k],q=[],D=!0,A=void 0;p?D=!1:p={};for(A in w)"!"==A.charAt(0)&&(A=A.slice(1),q.push(A),p[A]=!0,D=!1);for(;A=q.pop();)w[A]=w["!"+A],delete w["!"+A];t[m]=(D?!1:p)||null}f.match=f.match||null;c.push(h);a.push(h)}b=g.elements;g=g.generic;var u;d=0;for(c=a.length;d=--k&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),g(c))},r=function(b,d){a[b]=1;var c=f[b];delete f[b];for(var g=0;g=CKEDITOR.env.version?c.$.onreadystatechange=function(){if("loaded"==c.$.readyState||"complete"== -c.$.readyState)c.$.onreadystatechange=null,r(b,!0)}:(c.$.onload=function(){setTimeout(function(){r(b,!0)},0)},c.$.onerror=function(){r(b,!1)}));c.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var u=0;u]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}, -function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,f={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(c){for(var e,h,m=0,l;e=this._.htmlPartsRegex.exec(c);){h=e.index;if(h>m)if(m=c.substring(m,h),l)l.push(m);else this.onText(m); -m=this._.htmlPartsRegex.lastIndex;if(h=e[1])if(h=h.toLowerCase(),l&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(h);continue}if(l)l.push(e[0]);else if(h=e[3]){if(h=h.toLowerCase(),!/="/.test(h)){var k={},b,d=e[4];e=!!e[5];if(d)for(;b=a.exec(d);){var g=b[1].toLowerCase();b=b[2]||b[3]||b[4]||"";k[g]=!b&&f[g]?g:CKEDITOR.tools.htmlDecodeAttr(b)}this.onTagOpen(h,k,e);!l&&CKEDITOR.dtd.$cdata[h]&&(l=[])}}else if(h=e[2])this.onComment(h)}if(c.length>m)this.onText(c.substring(m, -c.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,f){f?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,f){"string"==typeof f&&(f=CKEDITOR.tools.htmlEncodeAttr(f));this._.output.push(" ",a,'\x3d"',f,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--", -a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var f=this._.output.join("");a&&this.reset();return f}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,f=CKEDITOR.tools.indexOf(a,this),c=this.previous,e=this.next;c&&(c.next=e);e&&(e.previous=c);a.splice(f,1);this.parent=null},replaceWith:function(a){var f=this.parent.children, -c=CKEDITOR.tools.indexOf(f,this),e=a.previous=this.previous,h=a.next=this.next;e&&(e.next=a);h&&(h.previous=a);f[c]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var f=a.parent.children,c=CKEDITOR.tools.indexOf(f,a),e=a.next;f.splice(c+1,0,this);this.next=a.next;this.previous=a;a.next=this;e&&(e.previous=this);this.parent=a.parent},insertBefore:function(a){var f=a.parent.children,c=CKEDITOR.tools.indexOf(f,a);f.splice(c,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next= -this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var f="function"==typeof a?a:"string"==typeof a?function(c){return c.name==a}:function(c){return c.name in a},c=this.parent;for(;c&&c.type==CKEDITOR.NODE_ELEMENT;){if(f(c))return c;c=c.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment= -function(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,f){var c=this.value;if(!(c=a.onComment(f,c,this)))return this.remove(),!1;if("string"!=typeof c)return this.replaceWith(c),!1;this.value=c;return!0},writeHtml:function(a,f){f&&this.filter(f);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype= -CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,f){if(!(this.value=a.onText(f,this.value,this)))return this.remove(),!1},writeHtml:function(a,f){f&&this.filter(f);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict", -CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var f=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),c={ol:1,ul:1},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),h={ul:"li", -ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,l,k){function b(a){var b;if(0l;l++)if(f=h[l]){f= -f.exec(a,e,this);if(!1===f)return null;if(f&&f!=e)return this.onNode(a,f);if(e.parent&&!e.name)break}return e},onNode:function(a,e){var h=e.type;return h==CKEDITOR.NODE_ELEMENT?this.onElement(a,e):h==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,e.value)):h==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,e.value)):null},onAttribute:function(a,e,h,f){return(h=this.attributesRules[h])?h.exec(a,f,e,this):f}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype= -{add:function(a,e,h){this.rules.splice(this.findIndex(e),0,{value:a,priority:e,options:h})},addMany:function(a,e,h){for(var f=[this.findIndex(e),0],l=0,k=a.length;l/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function p(a){return a.replace(N,function(a,b){return decodeURIComponent(b)})}function r(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, -function(a){return"\x3c!--"+x+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function u(a,b){var d=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function n(a,b){var d=[],c=b.config.protectedSource,g=b._.dataStore||(b._.dataStore= -{id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,c=[/|$)/gi,//gi,//gi].concat(c);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-1)+"--\x3e"});for(var h=0;h]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){g[g.id]=decodeURIComponent(b);return"{cke_protected_"+g.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,g){return"\x3c"+d+c+"\x3e"+u(v(g),b)+"\x3c/"+d+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c, -e,h=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(w);c.addRules(D,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});e.addRules(B);e.addRules(y,{applyToAll:!0});e.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,e,c=n(c,b),c=g(c,G),c=d(c),c=g(c,L),c=c.replace(O,"$1cke:$2"),c=c.replace(R,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), -c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=a.context||b.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",h=1);e=b.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(c=c.replace(/^
    |<\/pre>$/gi,""));c=c.replace(I,"$1$2");c=p(c);c=v(c);e=!1===a.fixForBody?!1:
    -f(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,e);e&&(h=c,!h.children.length&&CKEDITOR.dtd[h.name][e]&&(e=new CKEDITOR.htmlParser.element(e),h.add(e)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(h.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
    -d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(!0);a.dataValue=r(b)},null,null,15);b.on("toDataFormat",function(a){var d=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^
    /i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.data.context,f(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, -!1,!0)},null,null,11);b.on("toDataFormat",function(a){var d=a.data.dataValue,c=h.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(!0);d=v(d);d=u(d,b);a.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,c){var g=this.editor,e,h,f,k;b&&"object"==typeof b?(e=b.context,d=b.fixForBody,c=b.dontFilter,h=b.filter,f=b.enterMode,k=b.protectedWhitespaces):e=b;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:d,dontFilter:c, -filter:h||g.filter,enterMode:f||g.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,b){var d,c,g;b&&(d=b.context,c=b.filter,g=b.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:c||this.editor.filter,context:d,enterMode:g||this.editor.enterMode}).dataValue}};var q=/(?: |\xa0)$/,x="{cke_protected}",z=CKEDITOR.dtd,A="caption colgroup col thead tfoot tbody".split(" "),t=CKEDITOR.tools.extend({},z.$blockLimit, -z.$block),w={elements:{input:k,textarea:k}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},B={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var d=b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},y={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/, -""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var d=["name","href","src"],c,g=0;gc? -1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text); -b.value=a.attributes["data-cke-title"]||""},input:b,textarea:b},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(y.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var C=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/^(href|src|name)$/i,L=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, -G=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,N=/([^<]*)<\/cke:encoded>/gi,O=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,I=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,R=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(a,f){this.name=a;this.attributes=f||{};this.children=[];var c=a||"",e=c.match(/^cke:(.*)/);e&&(c=e[1]);c=!!(CKEDITOR.dtd.$nonBodyContent[c]||CKEDITOR.dtd.$block[c]||CKEDITOR.dtd.$listItem[c]|| -CKEDITOR.dtd.$tableContent[c]||CKEDITOR.dtd.$nonEditable[c]||"br"==c);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:c,hasInlineStarted:this.isEmpty||!c}},CKEDITOR.htmlParser.cssStyle=function(a){var f={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,h){"font-family"==e&&(h=h.replace(/["']/g,""));f[e.toLowerCase()]=h});return{rules:f,populate:function(a){var e= -this.toString();e&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",e):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=e:a.style=e)},toString:function(){var a=[],e;for(e in f)f[e]&&a.push(e,":",f[e],";");return a.join("")}}},function(){function a(a){return function(c){return c.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?c.name==a:c.name in a)}}var f=function(a,c){a=a[0];c=c[0];return ac?1:0},c=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype= -CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,c){var f=this,l,k;c=f.getFilterContext(c);if(c.off)return!0;if(!f.parent)a.onRoot(c,f);for(;;){l=f.name;if(!(k=a.onElementName(c,l)))return this.remove(),!1;f.name=k;if(!(f=a.onElement(c,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==l)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f), -!1;if(!f.name)return this.replaceWithChildren(),!1}l=f.attributes;var b,d;for(b in l){for(k=l[b];;)if(d=a.onAttributeName(c,b))if(d!=b)delete l[b],b=d;else break;else{delete l[b];break}d&&(!1===(k=a.onAttribute(c,f,d,k))?delete l[d]:l[d]=k)}f.isEmpty||this.filterChildren(a,!1,c);return!0},filterChildren:c.filterChildren,writeHtml:function(a,c){c&&this.filter(c);var m=this.name,l=[],k=this.attributes,b,d;a.openTag(m,k);for(b in k)l.push([b,k[b]]);a.sortAttributes&&l.sort(f);b=0;for(d=l.length;bCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus", -function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};x.eol.detect(a,this);x.bogus.exclude(a);x.cell.shrink(a);a.fragment=a.range.cloneContents();x.tree.rebuild(a,this);x.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=z,c={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE, -1);d.table.detectPurge(c);c.bookmark=a.createBookmark();delete c.range;var e=this.editor.createRange();e.moveToPosition(c.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);c.targetBookmark=e.createBookmark();d.list.detectMerge(c,this);d.table.detectRanges(c,this);d.block.detectMerge(c,this);c.tableContentsRanges?(d.table.deleteRanges(c),a.moveToBookmark(c.bookmark),c.range=a):(a.moveToBookmark(c.bookmark),c.range=a,a.extractContents(d.detectExtractMerge(c)));a.moveToBookmark(c.targetBookmark);a.optimize(); -d.fixUneditableRangePosition(a);d.list.merge(c,this);d.table.purge(c,this);d.block.merge(c,this);if(b){d=a.startPath();if(c=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var c=d.block.getElementsByTag("span"),e=0,h;if(c)for(;h=c.getItem(e++);)if(!p(h)){c=!0;break a}c=!1}c=!c}c&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),r(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings(); -return g},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(u,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a, -"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"): -a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom", -function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var h=a.config.contentsLangDirection;this.getDirection(1)!=h&&this.changeAttr("dir",h);var f=CKEDITOR.getCss();if(f){var h=b.getHead(),k=h.getCustomData("stylesheet");k?f!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText= -f:k.setText(f)):(f=b.appendStyleText(f),f=new CKEDITOR.dom.element(f.ownerNode||f.owningElement),h.setCustomData("stylesheet",f),f.data("cke-temp",1))}h=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",h+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var p={8:1,46:1};this.attachListener(a, -"key",function(b){if(a.readOnly)return!0;var d=b.data.domEvent.getKey(),c;if(d in p){b=a.getSelection();var e,h=b.getRanges()[0],f=h.startPath(),k,t,l,d=8==d;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=m(b))?(a.fire("saveSnapshot"),h.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),h.select(),a.fire("saveSnapshot"),c=1):h.collapsed&&((k=f.block)&&(l=k[d?"getPrevious":"getNext"](g))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("table")&&h[d?"checkStartOfBlock":"checkEndOfBlock"]()? -(a.fire("saveSnapshot"),h[d?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),h["moveToElementEdit"+(d?"End":"Start")](l),h.select(),a.fire("saveSnapshot"),c=1):f.blockLimit&&f.blockLimit.is("td")&&(t=f.blockLimit.getAscendant("table"))&&h.checkBoundaryOfElement(t,d?CKEDITOR.START:CKEDITOR.END)&&(l=t[d?"getPrevious":"getNext"](g))?(a.fire("saveSnapshot"),h["moveToElementEdit"+(d?"End":"Start")](l),h.checkStartOfBlock()&&h.checkEndOfBlock()?l.remove():h.select(),a.fire("saveSnapshot"),c=1):(t=f.contains(["td", -"th","caption"]))&&h.checkBoundaryOfElement(t,d?CKEDITOR.START:CKEDITOR.END)&&(c=1))}return!c});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in p&&!this.getFirst(e)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this, -"click",c);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var d=b.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(a.getSelection().selectElement(d),d.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&& -(b=b.data.getTarget(),!b.getOuterHtml().replace(u,""))){var d=a.createRange();d.moveToElementEditStart(b);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in p){var c= -8==b,g=a.getSelection().getRanges()[0];b=g.startPath();if(g.collapsed)a:{var e=b.block;if(e&&g[c?"checkStartOfBlock":"checkEndOfBlock"]()&&g.moveToClosestEditablePosition(e,!c)&&g.collapsed){if(g.startContainer.type==CKEDITOR.NODE_ELEMENT){var h=g.startContainer.getChild(g.startOffset-(c?1:0));if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("hr")){a.fire("saveSnapshot");h.remove();b=!0;break a}}g=g.startPath().block;if(!g||g&&g.contains(e))b=void 0;else{a.fire("saveSnapshot");var f;(f=(c?g:e).getBogus())&& -f.remove();f=a.getSelection();h=f.createBookmarks();(c?e:g).moveChildren(c?g:e,!1);b.lastElement.mergeSiblings();d(e,g,!c);f.selectBookmarks(h);b=!0}}else b=!1}else c=g,f=b.block,g=c.endPath().block,f&&g&&!f.equals(g)?(a.fire("saveSnapshot"),(e=f.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),g.getParent()&&(g.moveChildren(f,!1),b.lastElement.mergeSiblings(),d(f,g,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(), -c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"), -b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(b){var d=b.editor;d.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&& -a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});d.on("selectionChange",function(b){if(!d.readOnly){var c=d.getSelection();c&&!c.isLocked&&(c=d.checkDirty(),d.fire("lockSnapshot"),a(b),d.fire("unlockSnapshot"),!c&&d.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var d=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",d);d&&a.changeAttr("title", -d);var c=b.fire("ariaEditorHelpLabel",{}).label;if(c&&(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var g=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+c+"\x3c/span\x3e");d.append(c);a.changeAttr("aria-describedby",g)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");g=CKEDITOR.dom.walker.whitespaces(!0);p=CKEDITOR.dom.walker.bookmark(!1, -!0);r=CKEDITOR.dom.walker.empty();v=CKEDITOR.dom.walker.bogus();u=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;n=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(d,c){var g,e,h,f,k=[],l=c.range.startContainer;g=c.range.startPath();for(var l=p[l.getName()],n=0,m=d.getChildren(),u=m.count(),q=-1,w=-1,x=0,r=g.contains(p.$list);nCKEDITOR.env.version&&c.getChildCount()&&c.getFirst().remove())}return function(c){var g=c.startContainer,e=g.getAscendant("table",1),h=!1;d(e.getElementsByTag("td"));d(e.getElementsByTag("th"));e=c.clone();e.setStart(g,0);e=a(e).lastBackward();e||(e=c.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END), -e=a(e).lastForward(),h=!0);e||(e=g);e.is("table")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=b(e,"tr",h)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",h)),(g=e.getBogus())&&g.remove(),c.moveToPosition(e,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();x={eol:{detect:function(a,b){var d=a.range,c=d.clone(),g=d.clone(),e=new CKEDITOR.dom.elementPath(d.startContainer,b),h=new CKEDITOR.dom.elementPath(d.endContainer, -b);c.collapse(1);g.collapse();e.block&&c.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(d.setStartAfter(e.block),a.prependEolBr=1);h.block&&g.checkBoundaryOfElement(h.block,CKEDITOR.START)&&(d.setEndBefore(h.block),a.appendEolBr=1)},fix:function(a,b){var d=b.getDocument(),c;a.appendEolBr&&(c=this.createEolBr(d),a.fragment.append(c));!a.prependEolBr||c&&!c.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}}, -bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode,b=b.endNode;!b||!v(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(c,b),e=new CKEDITOR.dom.elementPath(d.startContainer,b),d=new CKEDITOR.dom.elementPath(d.endContainer,b),h;c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());if(g.blockLimit.is({tr:1,table:1})){var f=g.contains("table").getParent();h=function(a){return!a.equals(f)}}else if(g.block&& -g.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!e.equals(d))){var k=g.contains(CKEDITOR.dtd.$list).getParent();h=function(a){return!a.equals(k)}}h||(h=function(a){return!a.equals(g.block)&&!a.equals(g.blockLimit)});this.rebuildFragment(a,b,c,h)},rebuildFragment:function(a,b,d,c){for(var g;d&&!d.equals(b)&&c(d);)g=d.clone(0,1),a.fragment.appendTo(g),a.fragment=g,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer, -c=a.startOffset,g=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++c==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};z=function(){function a(b,d){var c=b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)}function b(d,c,g){a(c);a(g,1);for(var e;e=g.getNext();)e.insertAfter(c),c=e;r(d)&&d.remove()}function d(a,b){var c=new CKEDITOR.dom.range(a);c.setStartAfter(b.startNode);c.setEndBefore(b.endNode);return c}return{list:{detectMerge:function(a,b){var c=d(b,a.bookmark), -g=c.startPath(),e=c.endPath(),h=g.contains(CKEDITOR.dtd.$list),f=e.contains(CKEDITOR.dtd.$list);a.mergeList=h&&f&&h.getParent().equals(f.getParent())&&!h.equals(f);a.mergeListItems=g.block&&e.block&&g.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)c=c.clone(),c.setStartBefore(a.bookmark.startNode),c.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=c.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var c=a.mergeListBookmark.startNode, -g=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(g,d);if(a.mergeList){var f=e.contains(CKEDITOR.dtd.$list),k=h.contains(CKEDITOR.dtd.$list);f.equals(k)||(k.moveChildren(f),k.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$listItem),e.equals(h)||b(h,c,g));c.remove();g.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(b);d.setStartBefore(a.bookmark.startNode); -d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var c=a.mergeBlockBookmark.startNode,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(g,d),e=e.block,h=h.block;e&&h&&!e.equals(h)&&b(h,c,g);c.remove();g.remove()}}},table:function(){function a(d){var g=[],e,h=new CKEDITOR.dom.walker(d),f=d.startPath().contains(c),k=d.endPath().contains(c),p={};h.guard=function(a, -h){if(a.type==CKEDITOR.NODE_ELEMENT){var n="visited_"+(h?"out":"in");if(a.getCustomData(n))return;CKEDITOR.dom.element.setMarker(p,a,n,1)}if(h&&f&&a.equals(f))e=d.clone(),e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!h&&k&&a.equals(k))e=d.clone(),e.setStartAt(k,CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(n=!h)n=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!f||b(a,f))&&(!k||b(a,k));n&&(e=d.clone(),e.selectNodeContents(a),g.push(e))}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(p); -return g}function b(a,d){var c=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(d);return g===CKEDITOR.POSITION_IDENTICAL?!1:0===(g&c)}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),g=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++g};d.checkForward();if(1e&&g&&g.intersectsNode(d.$)){var h=[{node:c.anchorNode,offset:c.anchorOffset},{node:c.focusNode,offset:c.focusOffset}];c.anchorNode==d.$&&c.anchorOffset>e&&(h[0].offset-=e);c.focusNode==d.$&&c.focusOffset>e&&(h[1].offset-=e)}}d.setText(k(d.getText(),1));h&&(d=a.getDocument().$,c=d.getSelection(),d=d.createRange(),d.setStart(h[0].node, -h[0].offset),d.collapse(!0),c.removeAllRanges(),c.addRange(d),c.extend(h[1].node,h[1].offset))}}function k(a,b){return b?a.replace(A,function(a,b){return b?" ":""}):a.replace(z,"")}function b(a,b){var d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e'+(b||"\x26nbsp;")+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var c=a.getSelection(1),g= -a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);g.setStartAt(d,CKEDITOR.POSITION_AFTER_START);g.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([g]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function d(a){var b={37:1,39:1,8:1,46:1};return function(d){var c=d.data.getKeystroke();if(b[c]){var g=a.getSelection().getRanges(),e=g[0];1==g.length&&e.collapsed&&(c=e[38>c?"getPreviousEditableNode":"getNextEditableNode"]())&&c.type== -CKEDITOR.NODE_ELEMENT&&"false"==c.getAttribute("contenteditable")&&(a.getSelection().fake(c),d.data.preventDefault(),d.cancel())}}}function g(a){for(var b=0;b=c.getLength()?f.setStartAfter(c):f.setStartBefore(c));g&&g.type==CKEDITOR.NODE_TEXT&&(h?f.setEndAfter(g):f.setEndBefore(g));c=new CKEDITOR.dom.walker(f);c.evaluator=function(c){if(c.type==CKEDITOR.NODE_ELEMENT&&c.isReadOnly()){var g=d.clone();d.setEndBefore(c);d.collapsed&&a.splice(b--,1);c.getPosition(f.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(c),g.collapsed||a.splice(b+1,0,g));return!0}return!1};c.next()}}return a} -var p,r,v=CKEDITOR.dom.walker.invisible(1),u=function(){function a(b){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([d]);return!1}}function b(a){return function(b){var d=b.editor,c=d.createRange(),g;(g=c.moveToClosestEditablePosition(b.selected,a))||(g=c.moveToClosestEditablePosition(b.selected,!a));g&&d.getSelection().selectRanges([c]);d.fire("saveSnapshot");b.selected.remove();g||(c.moveToElementEditablePosition(d.editable()), -d.getSelection().selectRanges([c]));d.fire("saveSnapshot");return!1}}var d=a(),c=a(1);return{37:d,38:d,39:c,40:c,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=g.getSelection();a&&a.removeAllRanges()}var g=b.editor;g.on("contentDom",function(){function b(){u=new CKEDITOR.dom.selection(g.getSelection());u.lock()}function c(){h.removeListener("mouseup",c);m.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument== -e.$&&b.select()}var e=g.document,h=CKEDITOR.document,k=g.editable(),p=e.getBody(),m=e.getDocumentElement(),t=k.isInline(),q,u;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==q&&(a=g.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=g.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){q&&CKEDITOR.env.webkit&&(q=g._.previousActive&&g._.previousActive.equals(e.getActive())); -g.unlockSelection(q);q=0},null,null,-1);k.attachListener(k,"mousedown",function(){q=0});if(CKEDITOR.env.ie||t)n?k.attachListener(k,"beforedeactivate",b,null,null,-1):k.attachListener(g,"selectionCheck",b,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){g.lockSelection(u);q=1},null,null,-1),k.attachListener(k,"mousedown",function(){q=0});if(CKEDITOR.env.ie&&!t){var x;k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=g.document.getSelection())&&a.getType()!= -CKEDITOR.SELECTION_NONE||(x=g.window.getScrollPosition()))});k.attachListener(k,"mouseup",function(a){2==a.data.$.button&&x&&(g.document.$.documentElement.scrollLeft=x.x,g.document.$.documentElement.scrollTop=x.y);x=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)m.on("mousedown",function(a){function b(a){a=a.data.$;if(c){var d=p.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(g){}c.setEndPoint(0>e.compareEndPoints("StartToStart",d)?"EndToEnd": -"StartToStart",d);c.select()}}function d(){m.removeListener("mousemove",b);h.removeListener("mouseup",d);m.removeListener("mouseup",d);c.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)m.on("mousedown",function(a){a.data.getTarget().is("html")&& -(h.on("mouseup",c),m.on("mouseup",c))})}}k.attachListener(k,"selectionchange",a,g);k.attachListener(k,"keyup",f,g);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){g.forceNextSelectionCheck();g.selectionChange(1)});if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var r;k.attachListener(k,"mousedown",function(){r=1});k.attachListener(e.getDocumentElement(),"mouseup",function(){r&&f.call(g);r=0})}else k.attachListener(CKEDITOR.env.ie?k:e.getDocumentElement(),"mouseup",f,g);CKEDITOR.env.webkit&& -k.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:l(k)}},null,null,-1);k.attachListener(k,"keydown",d(g),null,null,-1)});g.on("setData",function(){g.unlockSelection();CKEDITOR.env.webkit&&c()});g.on("contentDomUnload",function(){g.unlockSelection()});if(CKEDITOR.env.ie9Compat)g.on("beforeDestroy",c,null,null,9);g.on("dataReady",function(){delete g._.fakeSelection;delete g._.hiddenSelectionContainer;g.selectionChange(1)}); -g.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=g.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=g.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);g.on("key",function(a){if("wysiwyg"==g.mode){var b=g.getSelection();if(b.isFake){var d=u[a.data.keyCode];if(d)return d({editor:g,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady", -function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?l(a):d.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){l(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=k(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=k(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:f).call(this)};CKEDITOR.editor.prototype.getSelection= -function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0): -!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var n="function"!=typeof window.getSelection, -q=1;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var d=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:q++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var c,g;if(a)if(a.getRangeAt)c=(g=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer); -else{try{g=a.createRange()}catch(e){}c=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!c||c.type!=CKEDITOR.NODE_ELEMENT&&c.type!=CKEDITOR.NODE_TEXT||!this.root.equals(c)&&!this.root.contains(c))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var x={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1, -select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1},z=CKEDITOR.tools.repeat("​",7),A=new RegExp(z+"( )?","g");CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:k,_createFillingCharSequenceNode:m,FILLING_CHAR_SEQUENCE:z});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=n?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:n?function(){var a=this._.cache; -if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),c=d.type;"Text"==c&&(b=CKEDITOR.SELECTION_TEXT);"Control"==c&&(b=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(g){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==d.rangeCount){var d=d.getRangeAt(0),c=d.startContainer;c==d.endContainer&&1==c.nodeType&& -1==d.endOffset-d.startOffset&&x[c.childNodes[d.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=n?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,d){b=b.duplicate();b.collapse(d);var c=b.parentElement();if(!c.hasChildNodes())return{container:c,offset:0};for(var g=c.children,e,h,f=b.duplicate(),k=0,p=g.length-1,n=-1,l,m;k<=p;)if(n=Math.floor((k+p)/2),e=g[n],f.moveToElementText(e),l=f.compareEndPoints("StartToStart", -b),0l)k=n+1;else return{container:c,offset:a(e)};if(-1==n||n==g.length-1&&0>l){f.moveToElementText(c);f.setEndPoint("StartToStart",b);f=f.text.replace(/(\r\n|\r)/g,"\n").length;g=c.childNodes;if(!f)return e=g[g.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:g.length}:{container:e,offset:e.nodeValue.length};for(c=g.length;0]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+| )/g," ");h=h.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var f=a.getDocument().createElement("div");f.append(e);e.$.outerHTML="\x3cpre\x3e"+h+"\x3c/pre\x3e";e.copyAttributes(f.getFirst());e=f.getFirst().remove()}else e.setHtml(h); -b=e}else h?b=r(d?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(c){var d=b,k;(k=d.getPrevious(G))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(c=p(k.getHtml(),/\n$/,"")+"\n\n"+p(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+c+"\x3c/pre\x3e":d.setHtml(c),k.remove())}else d&&q(b)}function g(a){var b=[];p(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,d){return b+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi, -function(a,d){b.push(d)});return b}function p(a,b,d){var c="",g="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(c=b);d&&(g=d);return""});return c+a.replace(b,d)+g}function r(a,b){var d;1=--k&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),g(c))},v=function(b,d){a[b]=1;var c=e[b];delete e[b];for(var g=0;g=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)? +c.$.onreadystatechange=function(){if("loaded"==c.$.readyState||"complete"==c.$.readyState)c.$.onreadystatechange=null,v(b,!0)}:(c.$.onload=function(){setTimeout(function(){v(b,!0)},0)},c.$.onerror=function(){v(b,!1)}));c.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var w=0;w]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,e={checked:1,compact:1,declare:1, +defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(c){for(var f,h,m=0,l;f=this._.htmlPartsRegex.exec(c);){h=f.index;if(h>m)if(m=c.substring(m,h),l)l.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(h=f[1])if(h=h.toLowerCase(),l&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(l.join("")), +l=null),!l){this.onTagClose(h);continue}if(l)l.push(f[0]);else if(h=f[3]){if(h=h.toLowerCase(),!/="/.test(h)){var k={},d,b=f[4];f=!!f[5];if(b)for(;d=a.exec(b);){var g=d[1].toLowerCase();d=d[2]||d[3]||d[4]||"";k[g]=!d&&e[g]?g:CKEDITOR.tools.htmlDecodeAttr(d)}this.onTagOpen(h,k,f);!l&&CKEDITOR.dtd.$cdata[h]&&(l=[])}}else if(h=f[2])this.onComment(h)}if(c.length>m)this.onText(c.substring(m,c.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c", +a)},openTagClose:function(a,e){e?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,e){"string"==typeof e&&(e=CKEDITOR.tools.htmlEncodeAttr(e));this._.output.push(" ",a,'\x3d"',e,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var e=this._.output.join(""); +a&&this.reset();return e}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,e=CKEDITOR.tools.indexOf(a,this),c=this.previous,f=this.next;c&&(c.next=f);f&&(f.previous=c);a.splice(e,1);this.parent=null},replaceWith:function(a){var e=this.parent.children,c=CKEDITOR.tools.indexOf(e,this),f=a.previous=this.previous,h=a.next=this.next;f&&(f.next=a);h&&(h.previous=a);e[c]=a;a.parent=this.parent;this.parent=null}, +insertAfter:function(a){var e=a.parent.children,c=CKEDITOR.tools.indexOf(e,a),f=a.next;e.splice(c+1,0,this);this.next=a.next;this.previous=a;a.next=this;f&&(f.previous=this);this.parent=a.parent},insertBefore:function(a){var e=a.parent.children,c=CKEDITOR.tools.indexOf(e,a);e.splice(c,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var e="function"==typeof a?a:"string"==typeof a?function(c){return c.name==a}:function(c){return c.name in +a},c=this.parent;for(;c&&c.type==CKEDITOR.NODE_ELEMENT;){if(e(c))return c;c=c.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a, +e){var c=this.value;if(!(c=a.onComment(e,c,this)))return this.remove(),!1;if("string"!=typeof c)return this.replaceWith(c),!1;this.value=c;return!0},writeHtml:function(a,e){e&&this.filter(e);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,e){if(!(this.value=a.onText(e,this.value,this)))return this.remove(), +!1},writeHtml:function(a,e){e&&this.filter(e);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes["data-cke-survive"]? +!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var e=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),c={ol:1,ul:1},f=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),h={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,l,k){function d(a){var d;if(0l;l++)if(e=h[l]){e=e.exec(a,f,this);if(!1===e)return null;if(e&&e!=f)return this.onNode(a,e);if(f.parent&&!f.name)break}return f},onNode:function(a,f){var h=f.type;return h==CKEDITOR.NODE_ELEMENT?this.onElement(a,f):h==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a, +f.value)):h==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,f.value)):null},onAttribute:function(a,f,h,e){return(h=this.attributesRules[h])?h.exec(a,e,f,this):e}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,f,h){this.rules.splice(this.findIndex(f),0,{value:a,priority:f,options:h})},addMany:function(a,f,h){for(var e=[this.findIndex(f),0],l=0,k=a.length;l/g, +"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function p(a){return a.replace(M,function(a,b){return decodeURIComponent(b)})}function v(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+u+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function r(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function w(a,b){var d=b._.dataStore; +return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function n(a,b){var d=[],c=b.config.protectedSource,g=b._.dataStore||(b._.dataStore={id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,c=[/|$)/gi,//gi,//gi].concat(c);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)- +1)+"--\x3e"});for(var h=0;h]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){g[g.id]= +decodeURIComponent(b);return"{cke_protected_"+g.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,g){return"\x3c"+d+c+"\x3e"+w(r(g),b)+"\x3c/"+d+"\x3e"})}CKEDITOR.htmlDataProcessor=function(d){var c,f,h=this;this.editor=d;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=f=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(x);c.addRules(F,{applyToAll:!0});c.addRules(a(d,"data"),{applyToAll:!0}); +f.addRules(z);f.addRules(A,{applyToAll:!0});f.addRules(a(d,"html"),{applyToAll:!0});d.on("toHtml",function(a){a=a.data;var c=a.dataValue,f,c=n(c,d),c=g(c,H),c=b(c),c=g(c,I),c=c.replace(P,"$1cke:$2"),c=c.replace(S,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");f=a.context||d.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==f&&(f="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e", +h=1);f=d.document.createElement(f);f.setHtml("a"+c);c=f.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(c=c.replace(/^
    |<\/pre>$/gi,""));c=c.replace(G,"$1$2");c=p(c);c=r(c);f=!1===a.fixForBody?!1:e(a.enterMode,d.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,f);f&&(h=c,!h.children.length&&CKEDITOR.dtd[h.name][f]&&(f=new CKEDITOR.htmlParser.element(f),h.add(f)));a.dataValue=c},null,null,5);d.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,
    +!0,a.data.dontFilter,a.data.enterMode)&&d.fire("dataFiltered")},null,null,6);d.on("toHtml",function(a){a.data.dataValue.filterChildren(h.dataFilter,!0)},null,null,10);d.on("toHtml",function(a){a=a.data;var b=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(!0);a.dataValue=v(b)},null,null,15);d.on("toDataFormat",function(a){var b=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(b=b.replace(/^
    /i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(b, +a.data.context,e(a.data.enterMode,d.config.autoParagraph))},null,null,5);d.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.htmlFilter,!0)},null,null,10);d.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);d.on("toDataFormat",function(a){var b=a.data.dataValue,c=h.writer;c.reset();b.writeChildrenHtml(c);b=c.getHtml(!0);b=r(b);b=w(b,d);a.data.dataValue=b},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,c){var g=this.editor, +f,h,e,k;b&&"object"==typeof b?(f=b.context,d=b.fixForBody,c=b.dontFilter,h=b.filter,e=b.enterMode,k=b.protectedWhitespaces):f=b;f||null===f||(f=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:f,fixForBody:d,dontFilter:c,filter:h||g.filter,enterMode:e||g.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,b){var d,c,g;b&&(d=b.context,c=b.filter,g=b.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a, +filter:c||this.editor.filter,context:d,enterMode:g||this.editor.enterMode}).dataValue}};var q=/(?: |\xa0)$/,u="{cke_protected}",B=CKEDITOR.dtd,y="caption colgroup col thead tfoot tbody".split(" "),t=CKEDITOR.tools.extend({},B.$blockLimit,B.$block),x={elements:{input:k,textarea:k}},F={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},z={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var d=b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d); +b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},A={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var d=["name","href","src"],c,g=0;gc?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable}, +style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:d,textarea:d},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(A.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})}); +var C=/<(a|area|img|input|source)\b([^>]*)>/gi,E=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/^(href|src|name)$/i,I=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,H=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,M=/([^<]*)<\/cke:encoded>/gi,P=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,G=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,S=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element= +function(a,e){this.name=a;this.attributes=e||{};this.children=[];var c=a||"",f=c.match(/^cke:(.*)/);f&&(c=f[1]);c=!!(CKEDITOR.dtd.$nonBodyContent[c]||CKEDITOR.dtd.$block[c]||CKEDITOR.dtd.$listItem[c]||CKEDITOR.dtd.$tableContent[c]||CKEDITOR.dtd.$nonEditable[c]||"br"==c);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:c,hasInlineStarted:this.isEmpty||!c}},CKEDITOR.htmlParser.cssStyle=function(a){var e={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style: +a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,f,h){"font-family"==f&&(h=h.replace(/["']/g,""));e[f.toLowerCase()]=h});return{rules:e,populate:function(a){var f=this.toString();f&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",f):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=f:a.style=f)},toString:function(){var a=[],f;for(f in e)e[f]&&a.push(f,":",e[f],";");return a.join("")}}},function(){function a(a){return function(c){return c.type== +CKEDITOR.NODE_ELEMENT&&("string"==typeof a?c.name==a:c.name in a)}}var e=function(a,c){a=a[0];c=c[0];return ac?1:0},c=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,c){var e=this,l,k;c=e.getFilterContext(c);if(c.off)return!0;if(!e.parent)a.onRoot(c,e);for(;;){l=e.name;if(!(k= +a.onElementName(c,l)))return this.remove(),!1;e.name=k;if(!(e=a.onElement(c,e)))return this.remove(),!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==l)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(),!1}l=e.attributes;var d,b;for(d in l){for(k=l[d];;)if(b=a.onAttributeName(c,d))if(b!=d)delete l[d],d=b;else break;else{delete l[d];break}b&&(!1===(k=a.onAttribute(c,e,b,k))?delete l[b]:l[b]=k)}e.isEmpty||this.filterChildren(a,!1, +c);return!0},filterChildren:c.filterChildren,writeHtml:function(a,c){c&&this.filter(c);var m=this.name,l=[],k=this.attributes,d,b;a.openTag(m,k);for(d in k)l.push([d,k[d]]);a.sortAttributes&&l.sort(e);d=0;for(b=l.length;dCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};B.eol.detect(a,this);B.bogus.exclude(a);B.cell.shrink(a);a.fragment=a.range.cloneContents();B.tree.rebuild(a, +this);B.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=y,c={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(c);c.bookmark=a.createBookmark();delete c.range;var f=this.editor.createRange();f.moveToPosition(c.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);c.targetBookmark=f.createBookmark();d.list.detectMerge(c,this);d.table.detectRanges(c, +this);d.block.detectMerge(c,this);c.tableContentsRanges?(d.table.deleteRanges(c),a.moveToBookmark(c.bookmark),c.range=a):(a.moveToBookmark(c.bookmark),c.range=a,a.extractContents(d.detectExtractMerge(c)));a.moveToBookmark(c.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(c,this);d.table.purge(c,this);d.block.merge(c,this);if(b){d=a.startPath();if(c=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var c=d.block.getElementsByTag("span"),f=0, +e;if(c)for(;e=c.getItem(f++);)if(!p(e)){c=!0;break a}c=!1}c=!c}c&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),v(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return g},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(w,function(a,b){return b}));a.setData(b,null,1)},this); +this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a, +"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]= ++a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?l.$.styleSheet.cssText=k:l.setText(k)):(k=e.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),h.setCustomData("stylesheet",k),k.data("cke-temp",1))}h=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref",h+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b= +(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var p={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var d=b.data.domEvent.getKey(),c;if(d in p){b=a.getSelection();var f,e=b.getRanges()[0],h=e.startPath(),k,l,n,d=8==d;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(f=b.getSelectedElement())||(f=m(b))?(a.fire("saveSnapshot"),e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove(),e.select(),a.fire("saveSnapshot"), +c=1):e.collapsed&&((k=h.block)&&(n=k[d?"getPrevious":"getNext"](g))&&n.type==CKEDITOR.NODE_ELEMENT&&n.is("table")&&e[d?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),e[d?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),e["moveToElementEdit"+(d?"End":"Start")](n),e.select(),a.fire("saveSnapshot"),c=1):h.blockLimit&&h.blockLimit.is("td")&&(l=h.blockLimit.getAscendant("table"))&&e.checkBoundaryOfElement(l,d?CKEDITOR.START:CKEDITOR.END)&&(n=l[d?"getPrevious":"getNext"](g))?(a.fire("saveSnapshot"), +e["moveToElementEdit"+(d?"End":"Start")](n),e.checkStartOfBlock()&&e.checkEndOfBlock()?n.remove():e.select(),a.fire("saveSnapshot"),c=1):(l=h.contains(["td","th","caption"]))&&e.checkBoundaryOfElement(l,d?CKEDITOR.START:CKEDITOR.END)&&(c=1))}return!c});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in p&&!this.getFirst(f)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())}); +this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",c);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var d=b.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(a.getSelection().selectElement(d),d.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup", +function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getOuterHtml().replace(w,""))){var d=a.createRange();d.moveToElementEditStart(b);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input", +"textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(d){if(a.readOnly)return!0;d=d.data.domEvent.getKey();if(d in p){var c=8==d,g=a.getSelection().getRanges()[0];d=g.startPath();if(g.collapsed)a:{var e=d.block;if(e&&g[c?"checkStartOfBlock":"checkEndOfBlock"]()&&g.moveToClosestEditablePosition(e,!c)&&g.collapsed){if(g.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=g.startContainer.getChild(g.startOffset-(c?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){a.fire("saveSnapshot"); +f.remove();d=!0;break a}}g=g.startPath().block;if(!g||g&&g.contains(e))d=void 0;else{a.fire("saveSnapshot");var h;(h=(c?g:e).getBogus())&&h.remove();h=a.getSelection();f=h.createBookmarks();(c?e:g).moveChildren(c?g:e,!1);d.lastElement.mergeSiblings();b(e,g,!c);h.selectBookmarks(f);d=!0}}else d=!1}else c=g,h=d.block,g=c.endPath().block,h&&g&&!h.equals(g)?(a.fire("saveSnapshot"),(e=h.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),g.getParent()&&(g.moveChildren(h,!1),d.lastElement.mergeSiblings(), +b(h,g,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),d=!0):d=!1;if(!d)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b= +a.getHead();if(b.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded", +function(b){var d=b.editor;d.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});d.on("selectionChange",function(b){if(!d.readOnly){var c=d.getSelection();c&&!c.isLocked&&(c=d.checkDirty(),d.fire("lockSnapshot"),a(b),d.fire("unlockSnapshot"),!c&&d.resetDirty())}})});CKEDITOR.on("instanceCreated", +function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var d=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var c=b.fire("ariaEditorHelpLabel",{}).label;if(c&&(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var g=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+c+"\x3c/span\x3e");d.append(c);a.changeAttr("aria-describedby", +g)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");g=CKEDITOR.dom.walker.whitespaces(!0);p=CKEDITOR.dom.walker.bookmark(!1,!0);v=CKEDITOR.dom.walker.empty();r=CKEDITOR.dom.walker.bogus();w=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;n=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(d,c){var g,e,f,h,k=[],l=c.range.startContainer; +g=c.range.startPath();for(var l=p[l.getName()],n=0,m=d.getChildren(),q=m.count(),w=-1,u=-1,v=0,r=g.contains(p.$list);nCKEDITOR.env.version&&c.getChildCount()&&c.getFirst().remove())}return function(c){var g=c.startContainer,e=g.getAscendant("table", +1),f=!1;d(e.getElementsByTag("td"));d(e.getElementsByTag("th"));e=c.clone();e.setStart(g,0);e=a(e).lastBackward();e||(e=c.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),f=!0);e||(e=g);e.is("table")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=b(e,"tr",f)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",f)),(g=e.getBogus())&&g.remove(),c.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}(); +u=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var d=b.startContainer,c=!1,g;g=b.clone();g.setStart(d,0);g=a(g).lastBackward();g||(g=b.clone(),g.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),c=!0);g||(g=d);g.is(CKEDITOR.dtd.$list)? +(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),g.remove()):((d=g.getBogus())&&d.remove(),b.moveToPosition(g,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();B={eol:{detect:function(a,b){var d=a.range,c=d.clone(),g=d.clone(),e=new CKEDITOR.dom.elementPath(d.startContainer,b),f=new CKEDITOR.dom.elementPath(d.endContainer,b);c.collapse(1);g.collapse();e.block&&c.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(d.setStartAfter(e.block),a.prependEolBr=1);f.block&& +g.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(d.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,b){var d=b.getDocument(),c;a.appendEolBr&&(c=this.createEolBr(d),a.fragment.append(c));!a.prependEolBr||c&&!c.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode,b=b.endNode;!b||!r(b)||d&&d.equals(b)||a.range.setEndBefore(b)}}, +tree:{rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(c,b),e=new CKEDITOR.dom.elementPath(d.startContainer,b),d=new CKEDITOR.dom.elementPath(d.endContainer,b),f;c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());if(g.blockLimit.is({tr:1,table:1})){var h=g.contains("table").getParent();f=function(a){return!a.equals(h)}}else if(g.block&&g.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!e.equals(d))){var k=g.contains(CKEDITOR.dtd.$list).getParent(); +f=function(a){return!a.equals(k)}}f||(f=function(a){return!a.equals(g.block)&&!a.equals(g.blockLimit)});this.rebuildFragment(a,b,c,f)},rebuildFragment:function(a,b,d,c){for(var g;d&&!d.equals(b)&&c(d);)g=d.clone(0,1),a.fragment.appendTo(g),a.fragment=g,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer,c=a.startOffset,g=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++c==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};y=function(){function a(b,d){var c= +b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)}function b(d,c,g){a(c);a(g,1);for(var e;e=g.getNext();)e.insertAfter(c),c=e;v(d)&&d.remove()}function d(a,b){var c=new CKEDITOR.dom.range(a);c.setStartAfter(b.startNode);c.setEndBefore(b.endNode);return c}return{list:{detectMerge:function(a,b){var c=d(b,a.bookmark),g=c.startPath(),e=c.endPath(),f=g.contains(CKEDITOR.dtd.$list),h=e.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h); +a.mergeListItems=g.block&&e.block&&g.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)c=c.clone(),c.setStartBefore(a.bookmark.startNode),c.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=c.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var c=a.mergeListBookmark.startNode,g=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),f=new CKEDITOR.dom.elementPath(g,d);if(a.mergeList){var h=e.contains(CKEDITOR.dtd.$list),k= +f.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),e.equals(f)||b(f,c,g));c.remove();g.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(b);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var c= +a.mergeBlockBookmark.startNode,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),f=new CKEDITOR.dom.elementPath(g,d),e=e.block,f=f.block;e&&f&&!e.equals(f)&&b(f,c,g);c.remove();g.remove()}}},table:function(){function a(d){var g=[],e,f=new CKEDITOR.dom.walker(d),h=d.startPath().contains(c),k=d.endPath().contains(c),n={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(f?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(n,a,l,1)}if(f&& +h&&a.equals(h))e=d.clone(),e.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!f&&k&&a.equals(k))e=d.clone(),e.setStartAt(k,CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!h||b(a,h))&&(!k||b(a,k));l&&(e=d.clone(),e.selectNodeContents(a),g.push(e))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);return g}function b(a,d){var c=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(d);return g===CKEDITOR.POSITION_IDENTICAL? +!1:0===(g&c)}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),g=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++g};d.checkForward();if(1e&&g&&g.intersectsNode(d.$)){var f=[{node:c.anchorNode,offset:c.anchorOffset},{node:c.focusNode,offset:c.focusOffset}];c.anchorNode==d.$&&c.anchorOffset>e&&(f[0].offset-=e);c.focusNode==d.$&&c.focusOffset>e&&(f[1].offset-=e)}}d.setText(k(d.getText(),1));f&&(d=a.getDocument().$,c=d.getSelection(),d=d.createRange(),d.setStart(f[0].node,f[0].offset),d.collapse(!0),c.removeAllRanges(), +c.addRange(d),c.extend(f[1].node,f[1].offset))}}function k(a,b){return b?a.replace(w,function(a,b){return b?" ":""}):a.replace(r,"")}function d(a,b){var d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e'+(b||"\x26nbsp;")+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var c=a.getSelection(1),g=a.createRange(),e=c.root.on("selectionchange", +function(a){a.cancel()},null,null,0);g.setStartAt(d,CKEDITOR.POSITION_AFTER_START);g.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([g]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function b(a){var b={37:1,39:1,8:1,46:1};return function(d){var c=d.data.getKeystroke();if(b[c]){var g=a.getSelection().getRanges(),e=g[0];1==g.length&&e.collapsed&&(c=e[38>c?"getPreviousEditableNode":"getNextEditableNode"]())&&c.type==CKEDITOR.NODE_ELEMENT&&"false"==c.getAttribute("contenteditable")&& +(a.getSelection().fake(c),d.data.preventDefault(),d.cancel())}}}function g(a){for(var b=0;b=c.getLength()?h.setStartAfter(c):h.setStartBefore(c));g&&g.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(g):h.setEndBefore(g));c=new CKEDITOR.dom.walker(h);c.evaluator=function(c){if(c.type==CKEDITOR.NODE_ELEMENT&&c.isReadOnly()){var g=d.clone();d.setEndBefore(c);d.collapsed&&a.splice(b--,1);c.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(c),g.collapsed||a.splice(b+1,0,g));return!0}return!1};c.next()}}return a}var p="function"!=typeof window.getSelection,v=1,r=CKEDITOR.tools.repeat("​", +7),w=new RegExp(r+"( )?","g"),n,q,u=CKEDITOR.dom.walker.invisible(1),B=function(){function a(b){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([d]);return!1}}function b(a){return function(b){var d=b.editor,c=d.createRange(),g;(g=c.moveToClosestEditablePosition(b.selected,a))||(g=c.moveToClosestEditablePosition(b.selected,!a));g&&d.getSelection().selectRanges([c]);d.fire("saveSnapshot");b.selected.remove();g||(c.moveToElementEditablePosition(d.editable()), +d.getSelection().selectRanges([c]));d.fire("saveSnapshot");return!1}}var d=a(),c=a(1);return{37:d,38:d,39:c,40:c,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(d){function c(){var a=g.getSelection();a&&a.removeAllRanges()}var g=d.editor;g.on("contentDom",function(){function d(){w=new CKEDITOR.dom.selection(g.getSelection());w.lock()}function c(){h.removeListener("mouseup",c);m.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument== +f.$&&b.select()}var f=g.document,h=CKEDITOR.document,k=g.editable(),n=f.getBody(),m=f.getDocumentElement(),t=k.isInline(),q,w;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==q&&(a=g.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=g.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){q&&CKEDITOR.env.webkit&&(q=g._.previousActive&&g._.previousActive.equals(f.getActive()))&& +null!=g._.previousScrollTop&&g._.previousScrollTop!=k.$.scrollTop&&(k.$.scrollTop=g._.previousScrollTop);g.unlockSelection(q);q=0},null,null,-1);k.attachListener(k,"mousedown",function(){q=0});if(CKEDITOR.env.ie||t)p?k.attachListener(k,"beforedeactivate",d,null,null,-1):k.attachListener(g,"selectionCheck",d,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){g.lockSelection(w);q=1},null,null,-1),k.attachListener(k,"mousedown",function(){q=0});if(CKEDITOR.env.ie&&!t){var u; +k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=g.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(u=g.window.getScrollPosition()))});k.attachListener(k,"mouseup",function(a){2==a.data.$.button&&u&&(g.document.$.documentElement.scrollLeft=u.x,g.document.$.documentElement.scrollTop=u.y);u=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var v,r;m.on("mousedown",function(a){function b(a){a=a.data.$;if(v){var d=n.$.createTextRange(); +try{d.moveToPoint(a.clientX,a.clientY)}catch(c){}v.setEndPoint(0>r.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);v.select()}}function d(){m.removeListener("mousemove",b);h.removeListener("mouseup",d);m.removeListener("mouseup",d);v.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)m.on("mousedown",function(a){a.data.getTarget().is("html")&&(h.on("mouseup",c),m.on("mouseup",c))})}}k.attachListener(k,"selectionchange",a,g);k.attachListener(k,"keyup",e,g);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){g.forceNextSelectionCheck();g.selectionChange(1)});if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var x;k.attachListener(k,"mousedown",function(){x=1});k.attachListener(f.getDocumentElement(),"mouseup",function(){x&& +e.call(g);x=0})}else k.attachListener(CKEDITOR.env.ie?k:f.getDocumentElement(),"mouseup",e,g);CKEDITOR.env.webkit&&k.attachListener(f,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:l(k)}},null,null,-1);k.attachListener(k,"keydown",b(g),null,null,-1)});g.on("setData",function(){g.unlockSelection();CKEDITOR.env.webkit&&c()});g.on("contentDomUnload",function(){g.unlockSelection()});if(CKEDITOR.env.ie9Compat)g.on("beforeDestroy", +c,null,null,9);g.on("dataReady",function(){delete g._.fakeSelection;delete g._.hiddenSelectionContainer;g.selectionChange(1)});g.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=g.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=g.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);g.on("key",function(a){if("wysiwyg"==g.mode){var b=g.getSelection();if(b.isFake){var d= +B[a.data.keyCode];if(d)return d({editor:g,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?l(a):d.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){l(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=k(a.data))},b,null,20);b.on("toDataFormat", +function(a){a.data.dataValue=k(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:e).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&& +a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection(): +new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var d=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:v++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache), +this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var c,g;if(a)if(a.getRangeAt)c=(g=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer);else{try{g=a.createRange()}catch(e){}c=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!c||c.type!=CKEDITOR.NODE_ELEMENT&&c.type!=CKEDITOR.NODE_TEXT||!this.root.equals(c)&&!this.root.contains(c))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement= +null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var y={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:k,_createFillingCharSequenceNode:m,FILLING_CHAR_SEQUENCE:r});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel= +p?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:p?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),c=d.type;"Text"==c&&(b=CKEDITOR.SELECTION_TEXT);"Control"==c&&(b=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(g){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)b=CKEDITOR.SELECTION_NONE; +else if(1==d.rangeCount){var d=d.getRangeAt(0),c=d.startContainer;c==d.endContainer&&1==c.nodeType&&1==d.endOffset-d.startOffset&&y[c.childNodes[d.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=p?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,d){b=b.duplicate();b.collapse(d);var c=b.parentElement();if(!c.hasChildNodes())return{container:c,offset:0};for(var g=c.children,e,f,h=b.duplicate(),k=0, +n=g.length-1,l=-1,p,m;k<=n;)if(l=Math.floor((k+n)/2),e=g[l],h.moveToElementText(e),p=h.compareEndPoints("StartToStart",b),0p)k=l+1;else return{container:c,offset:a(e)};if(-1==l||l==g.length-1&&0>p){h.moveToElementText(c);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;g=c.childNodes;if(!h)return e=g[g.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:g.length}:{container:e,offset:e.nodeValue.length};for(c=g.length;0]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g," ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f); +b=e}else f?b=v(d?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(c){var d=b,k;(k=d.getPrevious(H))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(c=p(k.getHtml(),/\n$/,"")+"\n\n"+p(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+c+"\x3c/pre\x3e":d.setHtml(c),k.remove())}else d&&q(b)}function g(a){var b=[];p(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,d){return b+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi, +function(a,d){b.push(d)});return b}function p(a,b,d){var c="",g="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(c=b);d&&(g=d);return""});return c+a.replace(b,d)+g}function v(a,b){var d;1=e?(m=h.createText(""),m.insertAfter(this)):(a=h.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,f){return"number"!=typeof f?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,f)}}),function(){function a(a,e,h){var f=a.serializable,l=e[h?"endContainer":"startContainer"],k=h?"endOffset":"startOffset",b=f?e.document.getById(a.startNode):a.startNode;a=f?e.document.getById(a.endNode):a.endNode;l.equals(b.getPrevious())?(e.startOffset=e.startOffset-l.getLength()- -a.getPrevious().getLength(),l=a.getNext()):l.equals(a.getPrevious())&&(e.startOffset-=l.getLength(),l=a.getNext());l.equals(b.getParent())&&e[k]++;l.equals(a.getParent())&&e[k]++;e[h?"endContainer":"startContainer"]=l;return e}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),h=[],f;return{getNextRange:function(l){f= -void 0===f?0:f+1;var k=a[f];if(k&&1b?-1:1}),h=0,f;hCKEDITOR.env.version?a[k].$.styleSheet.cssText+=f:a[k].$.innerHTML+=f}}var m={};CKEDITOR.skin={path:a,loadPart:function(b,g){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]? -CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){c(b,g)}):c(b,g)},getPath:function(a){return CKEDITOR.getUrl(f(a))},icons:{},addIcon:function(a,b,c,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,b,c,e,h){var f;a&&(a=a.toLowerCase(),b&&(f=this.icons[a+"-rtl"]),f||(f=this.icons[a]));a=c||f&&f.path||"";e=e||f&&f.offset;h=h||f&&f.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+ -"');background-position:0 "+e+"px;background-size:"+h+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var c=e(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var d=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof d&&(e=d(this,"editor"),f=d(this,"panel"));a=[[b,a]];h([c],e,a);h(k,f,a)}).call(this,a)}});var l="cke_ui_color",k=[],b=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie|| -!CKEDITOR.env.quirks){var c=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=e(a);k.push(a);var d=c.getUiColor();d&&h([a],CKEDITOR.skin.chameleon(c,"panel"),[[b,d]])}};c.on("panelShow",a);c.on("menuShow",a);c.config.uiColor&&c.setUiColor(c.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e', -CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var f=a.getComputedStyle("border-top-color"),c=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!f||f!=c)}catch(e){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,f=0;fl;l++){var k=l,b;b=parseInt(f[l],16);b=("0"+(0>c?0|b*(1+c):0|b+(255-b)*c).toString(16)).slice(-2);f[k]=b}return"#"+f.join("")}}(),f=function(){var a=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');"); -return function(c,f){return a.output({from:c,to:f})}}(),c={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "), -panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; -return function(e,h){var m=e.uiColor,m={id:"."+e.id,defaultBorder:a(m,-.1),defaultGradient:f(a(m,.9),m),lightGradient:f(a(m,1),a(m,.7)),mediumGradient:f(a(m,.8),a(m,.5)),ckeButtonOn:f(a(m,.6),a(m,.7)),ckeResizer:a(m,-.4),ckeToolbarSeparator:a(m,.5),ckeColorauto:a(m,.8),dialogBody:a(m,.7),dialogTabSelected:f("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(m,-.6),elementsPathBg:m,menubuttonIcon:a(m,.5),menubuttonIconHover:a(m,.3)};return c[h].output(m).replace(/\[/g,"{").replace(/\]/g, -"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var d=[this._],c=1;carguments.length)){var h=a.call(this,d);h.labelId=CKEDITOR.tools.getNextId()+ -"_label";this._.children=[];var f={role:d.role||"presentation"};d.includeLabel&&(f["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,d,c,"div",null,f,function(){var a=[],c=d.required?" cke_required":"";"horizontal"!=d.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.inputId+'"':"",(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",d.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', -d.controlStyle?' style\x3d"'+d.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,b,d),"\x3c/div\x3e"):(c={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(d.controlStyle?' style\x3d"'+d.controlStyle+ -'"':"")+"\x3e"+e.call(this,b,d)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,c,a));return a.join("")})}},textInput:function(b,d,c){if(!(3>arguments.length)){a.call(this,d);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+d.type,id:e,type:d.type};d.validate&&(this.validate=d.validate);d.maxLength&&(h.maxlength=d.maxLength);d.size&&(h.size=d.size);d.inputStyle&&(h.style=d.inputStyle);var f=this,l=!1;b.on("load",function(){f.getInputElement().on("keydown", -function(a){13==a.data.getKeystroke()&&(l=!0)});f.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),l=!1);f.bidi&&k.call(f,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"'];d.width&&a.push('style\x3d"width:'+d.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&& -(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,d,c){if(!(3>arguments.length)){a.call(this,d);var e=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",f={};d.validate&&(this.validate=d.validate);f.rows=d.rows||5;f.cols=d.cols||20;f["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");"undefined"!=typeof d.inputStyle&&(f.style=d.inputStyle);d.dir&&(f.dir=d.dir);if(e.bidi)b.on("load", -function(){e.getInputElement().on("keyup",k)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){f["aria-labelledby"]=this._.labelId;this._.required&&(f["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',h,'" '],b;for(b in f)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(f[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, -d,c){if(!(3>arguments.length)){var e=a.call(this,d,{"default":!!d["default"]});d.validate&&(this.validate=d.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,d,c,"span",null,null,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),c=[],g=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(a);d["default"]&&(h.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle); -e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,c,"input",null,h);c.push(' \x3clabel id\x3d"',g,'" for\x3d"',h.id,'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(d.label),"\x3c/label\x3e");return c.join("")})}},radio:function(b,d,c){if(!(3>arguments.length)){a.call(this,d);this._["default"]||(this._["default"]=this._.initValue=d.items[0][1]);d.validate&&(this.validate=d.validate);var e=[],h=this;d.role="radiogroup";d.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, -b,d,c,function(){for(var a=[],c=[],g=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",f=0;farguments.length)){var e=a.call(this,d);d.validate&&(this.validate=d.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),c=[],g=[],h={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};c.push('\x3cdiv class\x3d"cke_dialog_ui_input_', -d.type,'" role\x3d"presentation"');d.width&&c.push('style\x3d"width:'+d.width+'" ');c.push("\x3e");void 0!==d.size&&(h.size=d.size);void 0!==d.multiple&&(h.multiple=d.multiple);l(a);for(var f=0,k;farguments.length)){void 0===d["default"]&&(d["default"]="");var e=CKEDITOR.tools.extend(a.call(this,d),{definition:d,buttons:[]});d.validate&&(this.validate=d.validate);b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', -e.frameId,'" title\x3d"',d.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,d,c){var e=this;if(!(3>arguments.length)){a.call(this,d);d.validate&&(this.validate=d.validate);var h=CKEDITOR.tools.extend({},d),f=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(a){var c= -d["for"];f&&!1===f.call(this,a)||(b.getContentElement(c[0],c[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(d["for"][0],d["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,h,c)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,d=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,h,f){if(!(3>arguments.length)){var k=[],n=h.html;"\x3c"!=n.charAt(0)&&(n="\x3cspan\x3e"+n+"\x3c/span\x3e");var l=h.focus;if(l){var m=this.focus;this.focus=function(){("function"== -typeof l?l:m).call(this);this.fire("focus")};h.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,h,k,"span",null,null,"");k=k.join("").match(a);n=n.match(d)||["","",""];c.test(n[1])&&(n[1]=n[1].slice(0,-1),n[2]="/"+n[2]);f.push([n[1]," ",k[1]||"",n[2]].join(""))}}}(),fieldset:function(a,d,c,e,h){var f=h.label;this._={children:d};CKEDITOR.ui.dialog.uiElement.call(this,a,h,e,"fieldset",null,null,function(){var a=[];f&&a.push("\x3clegend"+ -(h.labelStyle?' style\x3d"'+h.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var b=0;bd.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(d):d.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a= +e,'\x3d"',g[e],'"');(g=CKEDITOR.style.getStyleText(b))&&d.push(' style\x3d"',g,'"');d.push("\x3e",a||b.name,"\x3c/",c,"\x3e");return d.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,d=a.attributes&&a.attributes.style||"",c="";d.length&&(d=d.replace(E,";"));for(var g in b){var e=b[g],f=(g+":"+e).replace(E,";");"inherit"==e?c+=f:d+=f}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,!0));return a._ST=d+c};CKEDITOR.style.customHandlers= +{};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=b};var M=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,P=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a, +e){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,e,!0)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(a,e,c){CKEDITOR.stylesSet.addExternal(a,e,"");CKEDITOR.stylesSet.load(a, +c)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,e){var c=this._.styleStateChangeCallbacks;c||(c=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var e=0;e=f?(m=h.createText(""),m.insertAfter(this)):(a=h.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,e){return"number"!=typeof e?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,e)}}),function(){function a(a,e,h){var m=a.serializable,l=e[h?"endContainer":"startContainer"],k=h?"endOffset":"startOffset",d=m?e.document.getById(a.startNode):a.startNode;a=m?e.document.getById(a.endNode):a.endNode;l.equals(d.getPrevious())?(e.startOffset=e.startOffset-l.getLength()- +a.getPrevious().getLength(),l=a.getNext()):l.equals(a.getPrevious())&&(e.startOffset-=l.getLength(),l=a.getNext());l.equals(d.getParent())&&e[k]++;l.equals(a.getParent())&&e[k]++;e[h?"endContainer":"startContainer"]=l;return e}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,e)};var e={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),h=[],m;return{getNextRange:function(l){m= +void 0===m?0:m+1;var k=a[m];if(k&&1b?-1:1}),e=0,f;eCKEDITOR.env.version?a[k].$.styleSheet.cssText+=h:a[k].$.innerHTML+=h}}var m={};CKEDITOR.skin={path:a,loadPart:function(b,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]? +CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){c(b,d)}):c(b,d)},getPath:function(a){return CKEDITOR.getUrl(e(a))},icons:{},addIcon:function(a,d,c,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:d,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,d,c,e,f){var h;a&&(a=a.toLowerCase(),d&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=c||h&&h.path||"";e=e||h&&h.offset;f=f||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+ +"');background-position:0 "+e+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var c=f(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var b=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof b&&(e=b(this,"editor"),f=b(this,"panel"));a=[[d,a]];h([c],e,a);h(k,f,a)}).call(this,a)}});var l="cke_ui_color",k=[],d=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie|| +!CKEDITOR.env.quirks){var c=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=f(a);k.push(a);var b=c.getUiColor();b&&h([a],CKEDITOR.skin.chameleon(c,"panel"),[[d,b]])}};c.on("panelShow",a);c.on("menuShow",a);c.config.uiColor&&c.setUiColor(c.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e', +CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var e=a.getComputedStyle("border-top-color"),c=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!e||e!=c)}catch(f){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,e=0;em;m++){var l=m,k;k=parseInt(h[m],16);k=("0"+(0>e?0|k*(1+e):0|k+(255-k)*e).toString(16)).slice(-2);h[l]=k}return"#"+h.join("")}}(),e={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "), +panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; +return function(c,f){var h=a(c.uiColor,.4),h={id:"."+c.id,defaultBorder:a(h,-.2),toolbarElementsBorder:a(h,-.25),defaultBackground:h,lightBackground:a(h,.8),darkBackground:a(h,-.15),ckeButtonOn:a(h,.4),ckeResizer:a(h,-.4),ckeColorauto:a(h,.8),dialogBody:a(h,.7),dialogTab:a(h,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:a(h,-.6),menubuttonHover:a(h,.1),menubuttonIcon:a(h,.5),menubuttonIconHover:a(h,.3)};return e[f].output(h).replace(/\[/g,"{").replace(/\]/g,"}")}}(), +CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],c=1;carguments.length)){var f=a.call(this,b);f.labelId=CKEDITOR.tools.getNextId()+ +"_label";this._.children=[];var h={role:b.role||"presentation"};b.includeLabel&&(h["aria-labelledby"]=f.labelId);CKEDITOR.ui.dialog.uiElement.call(this,d,b,c,"div",null,h,function(){var a=[],c=b.required?" cke_required":"";"horizontal"!=b.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" ',' id\x3d"'+f.labelId+'"',f.inputId?' for\x3d"'+f.inputId+'"':"",(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e",b.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', +b.controlStyle?' style\x3d"'+b.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,d,b),"\x3c/div\x3e"):(c={type:"hbox",widths:b.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" id\x3d"'+f.labelId+'" for\x3d"'+f.inputId+'"'+(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(b.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(b.controlStyle?' style\x3d"'+b.controlStyle+ +'"':"")+"\x3e"+e.call(this,d,b)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(d,c,a));return a.join("")})}},textInput:function(d,b,c){if(!(3>arguments.length)){a.call(this,b);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",f={"class":"cke_dialog_ui_input_"+b.type,id:e,type:b.type};b.validate&&(this.validate=b.validate);b.maxLength&&(f.maxlength=b.maxLength);b.size&&(f.size=b.size);b.inputStyle&&(f.style=b.inputStyle);var h=this,l=!1;d.on("load",function(){h.getInputElement().on("keydown", +function(a){13==a.data.getKeystroke()&&(l=!0)});h.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(d.getButton("ok")&&setTimeout(function(){d.getButton("ok").click()},0),l=!1);h.bidi&&k.call(h,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',b.type,'" role\x3d"presentation"'];b.width&&a.push('style\x3d"width:'+b.width+'" ');a.push("\x3e\x3cinput ");f["aria-labelledby"]=this._.labelId;this._.required&& +(f["aria-required"]=this._.required);for(var d in f)a.push(d+'\x3d"'+f[d]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(d,b,c){if(!(3>arguments.length)){a.call(this,b);var e=this,f=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};b.validate&&(this.validate=b.validate);h.rows=b.rows||5;h.cols=b.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(b["class"]||"");"undefined"!=typeof b.inputStyle&&(h.style=b.inputStyle);b.dir&&(h.dir=b.dir);if(e.bidi)d.on("load", +function(){e.getInputElement().on("keyup",k)},e);CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',f,'" '],b;for(b in h)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(h[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(d, +b,c){if(!(3>arguments.length)){var e=a.call(this,b,{"default":!!b["default"]});b.validate&&(this.validate=b.validate);CKEDITOR.ui.dialog.uiElement.call(this,d,b,c,"span",null,null,function(){var a=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),c=[],g=CKEDITOR.tools.getNextId()+"_label",f={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(a);b["default"]&&(f.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle); +e.checkbox=new CKEDITOR.ui.dialog.uiElement(d,a,c,"input",null,f);c.push(' \x3clabel id\x3d"',g,'" for\x3d"',f.id,'"'+(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(b.label),"\x3c/label\x3e");return c.join("")})}},radio:function(d,b,c){if(!(3>arguments.length)){a.call(this,b);this._["default"]||(this._["default"]=this._.initValue=b.items[0][1]);b.validate&&(this.validate=b.validate);var e=[],f=this;b.role="radiogroup";b.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, +d,b,c,function(){for(var a=[],c=[],g=(b.id?b.id:CKEDITOR.tools.getNextId())+"_radio",h=0;harguments.length)){var e=a.call(this,b);b.validate&&(this.validate=b.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){var a=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),c=[],g=[],f={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};c.push('\x3cdiv class\x3d"cke_dialog_ui_input_', +b.type,'" role\x3d"presentation"');b.width&&c.push('style\x3d"width:'+b.width+'" ');c.push("\x3e");void 0!==b.size&&(f.size=b.size);void 0!==b.multiple&&(f.multiple=b.multiple);l(a);for(var h=0,k;harguments.length)){void 0===b["default"]&&(b["default"]="");var e=CKEDITOR.tools.extend(a.call(this,b),{definition:b,buttons:[]});b.validate&&(this.validate=b.validate);d.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', +e.frameId,'" title\x3d"',b.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(d,b,c){var e=this;if(!(3>arguments.length)){a.call(this,b);b.validate&&(this.validate=b.validate);var f=CKEDITOR.tools.extend({},b),h=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(a){var c= +b["for"];h&&!1===h.call(this,a)||(d.getContentElement(c[0],c[1]).submit(),this.disable())};d.on("load",function(){d.getContentElement(b["for"][0],b["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,d,f,c)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,f,h){if(!(3>arguments.length)){var k=[],n=f.html;"\x3c"!=n.charAt(0)&&(n="\x3cspan\x3e"+n+"\x3c/span\x3e");var l=f.focus;if(l){var m=this.focus;this.focus=function(){("function"== +typeof l?l:m).call(this);this.fire("focus")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,f,k,"span",null,null,"");k=k.join("").match(a);n=n.match(b)||["","",""];c.test(n[1])&&(n[1]=n[1].slice(0,-1),n[2]="/"+n[2]);h.push([n[1]," ",k[1]||"",n[2]].join(""))}}}(),fieldset:function(a,b,c,e,f){var h=f.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,f,e,"fieldset",null,null,function(){var a=[];h&&a.push("\x3clegend"+ +(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var b=0;bb.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a= CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:h},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()}, -isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,d){this.on("click",function(){d.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, -focus:function(){var a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&d.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&(d.$.focus(),d.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var d=a&&a.charAt(0);(d="‪"==d?"ltr":"‫"==d?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(d)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, -getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var d=this.getDirectionMarker();d&&(a=("ltr"==d?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var d=this.getInputElement();a?d.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&d.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.textarea.prototype= -new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,d,c){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),h=this.getInputElement().$;e.$.text=a;e.$.value=void 0===d||null===d?a:d;void 0===c||null===c?CKEDITOR.env.ie?h.add(e.$):h.add(e.$,null):h.add(e.$,c);return this},remove:function(a){this.getInputElement().$.remove(a); -return this},clear:function(){for(var a=this.getInputElement().$;0b-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function f(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=b+1;db-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function e(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=b+1;dp.width-k.width-h?p.width-k.width+("rtl"==e.lang.dir?0:f[1]):g.x,g.y+f[0]p.height-k.height-h?p.height-k.height+f[2]:g.y,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove", -b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=B.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var c=null,g=null,e=a.getParentEditor(),h=e.config.dialog_magnetDistance,f=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof h&&(h=20);a.parts.title.on("mousedown",function(e){c={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);g=a.getPosition();if(CKEDITOR.env.ie6Compat){var h= -B.getChild(0).getFrameDocument();h.on("mousemove",b);h.on("mouseup",d)}e.data.preventDefault()},a)}function g(a){function b(d){var n="rtl"==e.lang.dir,m=l.width,q=l.height,u=m+(d.data.$.screenX-p.x)*(n?-1:1)*(a._.moved?1:2),x=q+(d.data.$.screenY-p.y)*(a._.moved?1:2),t=a._.element.getFirst(),t=n&&t.getComputedStyle("right"),v=a.getPosition();v.y+x>k.height&&(x=k.height-v.y);(n?t:v.x)+u>k.width&&(u=k.width-(n?t:v.x));if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)m=Math.max(c.minWidth|| -0,u-h);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(c.minHeight||0,x-f);a.resize(m,q);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=B.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var c=a.definition,g=c.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(), -h,f,k,p,l,n,m=CKEDITOR.tools.addFunction(function(c){l=a.getSize();var g=a.parts.contents;g.$.getElementsByTagName("iframe").length&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),g.append(n));f=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));h=l.width-a.parts.contents.getSize("width",1);p={x:c.screenX,y:c.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize(); -CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(g=B.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",d));c.preventDefault&&c.preventDefault()});a.on("load",function(){var b="";g==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":g==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+ -'" onmousedown\x3d"CKEDITOR.tools.callFunction('+m+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(m)})}}function p(a){a.data.preventDefault(1)}function r(a){var b=CKEDITOR.document.getWindow(),d=a.config,c=d.dialog_backgroundCoverColor||"white",g=d.dialog_backgroundCoverOpacity,e=d.baseFloatZIndex,d=CKEDITOR.tools.genKey(c,g,e),h=D[d];h?h.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat? -"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+c,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(c="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+c+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+ -c+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),h=CKEDITOR.dom.element.createFromHtml(e.join("")),h.setOpacity(void 0!==g?g:.5),h.on("keydown",p),h.on("keypress",p),h.on("keyup",p),h.appendTo(CKEDITOR.document.getBody()),D[d]=h);a.focusManager.add(h);B=h;a=function(){var a=b.getViewPaneSize();h.setStyles({width:a.width+"px",height:a.height+ -"px"})};var f=function(){var a=b.getScrollPosition(),d=CKEDITOR.dialog._.currentTop;h.setStyles({left:a.x+"px",top:a.y+"px"});if(d){do a=d.getPosition(),d.move(a.x,a.y);while(d=d._.parentDialog)}};w=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||h.focus();if(CKEDITOR.env.ie6Compat){var k=function(){f();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){};window.onscroll=k},0);f()}}function v(a){B&&(a.focusManager.remove(B), -a=CKEDITOR.document.getWindow(),B.hide(),a.removeListener("resize",w),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),w=null)}var u=CKEDITOR.tools.cssLength,n='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; -CKEDITOR.dialog=function(b,c){function k(){var a=D._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,d=0;db.length)){var d=D._.currentFocusIndex;D._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(c){}var g=d,e=1n.width-k.width-f?n.width-k.width+("rtl"==e.lang.dir?0:h[1]):g.x,g.y+h[0]n.height-k.height-f?n.height-k.height+h[2]:g.y,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove", +b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=z.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var c=null,g=null,e=a.getParentEditor(),f=e.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(e){c={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);g=a.getPosition();if(CKEDITOR.env.ie6Compat){var f= +z.getChild(0).getFrameDocument();f.on("mousemove",b);f.on("mouseup",d)}e.data.preventDefault()},a)}function g(a){function b(d){var p="rtl"==e.lang.dir,m=l.width,q=l.height,u=m+(d.data.$.screenX-n.x)*(p?-1:1)*(a._.moved?1:2),w=q+(d.data.$.screenY-n.y)*(a._.moved?1:2),t=a._.element.getFirst(),t=p&&t.getComputedStyle("right"),r=a.getPosition();r.y+w>k.height&&(w=k.height-r.y);(p?t:r.x)+u>k.width&&(u=k.width-(p?t:r.x));if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)m=Math.max(c.minWidth|| +0,u-f);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(c.minHeight||0,w-h);a.resize(m,q);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",b);p&&(p.remove(),p=null);if(CKEDITOR.env.ie6Compat){var a=z.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var c=a.definition,g=c.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(), +f,h,k,n,l,p,m=CKEDITOR.tools.addFunction(function(c){l=a.getSize();var g=a.parts.contents;g.$.getElementsByTagName("iframe").length&&(p=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),g.append(p));h=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));f=l.width-a.parts.contents.getSize("width",1);n={x:c.screenX,y:c.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize(); +CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(g=z.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",d));c.preventDefault&&c.preventDefault()});a.on("load",function(){var b="";g==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":g==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+ +'" onmousedown\x3d"CKEDITOR.tools.callFunction('+m+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(m)})}}function p(a){a.data.preventDefault(1)}function v(a){var b=CKEDITOR.document.getWindow(),d=a.config,c=CKEDITOR.skinName||a.config.skin,g=d.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=d.dialog_backgroundCoverOpacity,e=d.baseFloatZIndex,d=CKEDITOR.tools.genKey(g,c,e),f=F[d];f?f.show(): +(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+g,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(g="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+g+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+ +CKEDITOR.tools.fixDomain+")();document.write( '"+g+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(e.join("")),f.setOpacity(void 0!==c?c:.5),f.on("keydown",p),f.on("keypress",p),f.on("keyup",p),f.appendTo(CKEDITOR.document.getBody()),F[d]=f);a.focusManager.add(f);z=f;a=function(){var a=b.getViewPaneSize(); +f.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),d=CKEDITOR.dialog._.currentTop;f.setStyles({left:a.x+"px",top:a.y+"px"});if(d){do a=d.getPosition(),d.move(a.x,a.y);while(d=d._.parentDialog)}};x=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||f.focus();if(CKEDITOR.env.ie6Compat){var k=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){}; +window.onscroll=k},0);h()}}function r(a){z&&(a.focusManager.remove(z),a=CKEDITOR.document.getWindow(),z.hide(),a.removeListener("resize",x),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),x=null)}var w=CKEDITOR.tools.cssLength,n='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+ +CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; +CKEDITOR.dialog=function(d,c){function k(){var a=K._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,d=0;db.length)){var d=K._.currentFocusIndex;K._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(c){}var g=d,e=1d.height|| b.width+(0d.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:c,this._.moved?this._.position.y:g)},foreach:function(a){for(var b in this._.contents)for(var d in this._.contents[b])a.call(this,this._.contents[b][d]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})}, -commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(L(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide(); -if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",C);a.removeListener("keyup",F);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog; +commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(I(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide(); +if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else r(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",C);a.removeListener("keyup",E);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog; this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],d=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",c=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),g=this._.contents[a.id]={},e=c.getChild(), -h=0;c=e.shift();)c.notAllowed||"hbox"==c.type||"vbox"==c.type||h++,g[c.id]=c,"function"==typeof c.getChild&&e.push.apply(e,c.getChild());h||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");c=CKEDITOR.env;g="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0arguments.length)){var f=(c.call?c(b):c)||"div", -k=["\x3c",f," "],p=(g&&g.call?g(b):g)||{},l=(e&&e.call?e(b):e)||{},n=(h&&h.call?h.call(this,a,b):h)||"",m=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(p.display="none",this.notAllowed=!0);l.id=m;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var u=l["class"]&&l["class"].split?l["class"].split(" "):[],m=0;marguments.length)){var h=(c.call?c(b):c)||"div", +k=["\x3c",h," "],n=(g&&g.call?g(b):g)||{},l=(e&&e.call?e(b):e)||{},p=(f&&f.call?f.call(this,a,b):f)||"",m=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(n.display="none",this.notAllowed=!0);l.id=m;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var u=l["class"]&&l["class"].split?l["class"].split(" "):[],m=0;mCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;x.fire("focus");d&&this.addClass(d)});b.on("blur",function(){x.fire("blur");d&&this.removeClass(d)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex= -a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=x.focusIndex}))}},hbox:function(a,b,d,c,g){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,h=g&&g.widths||null,f=g&&g.height||null,k,p={role:"presentation"};g&&g.align&&(p.align=g.align);CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"hbox"},c,"table",{},p,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;karguments.length)){this._||(this._={});var e=this._.children=b,h=g&&g.width||null,f=g&&g.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"vbox"},c,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');g&&g.expand&&b.push("height:100%;");b.push("width:"+u(h||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(g&& -g.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var c=0;cCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;w.fire("focus");d&&this.addClass(d)});b.on("blur",function(){w.fire("blur");d&&this.removeClass(d)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex= +a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=w.focusIndex}))}},hbox:function(a,b,d,c,g){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,f=g&&g.widths||null,h=g&&g.height||null,k,l={role:"presentation"};g&&g.align&&(l.align=g.align);CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"hbox"},c,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;karguments.length)){this._||(this._={});var e=this._.children=b,f=g&&g.width||null,h=g&&g.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"vbox"},c,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');g&&g.expand&&b.push("height:100%;");b.push("width:"+w(f||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(g&& +g.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var c=0;carguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild? -this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,d){for(var c=b.children,g,e=[],h=[],f=0;fl.length&&(c=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),k=m.shift(),h.insertNode(c),c.append(new CKEDITOR.dom.text("",a.document)),h.moveToBookmark(k),h.selectNodeContents(c),h.collapse(!0),k=h.createBookmark(),l.push(c),m.unshift(k));b=l[0].getParent();h=[];for(k=0;k]+data-cke-bookmark[^<]*?<\/span>/ig, -"");e&&a(b,c)})}function D(){if("wysiwyg"==b.mode){var a=B("paste");b.getCommand("cut").setState(B("cut"));b.getCommand("copy").setState(B("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function B(a){if(E&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var d=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var y=CKEDITOR.plugins.clipboard, -C=0,F=0,E=0;(function(){b.on("key",t);b.on("contentDom",d);b.on("selectionChange",function(a){E=a.data.selection.getRanges()[0].checkReadOnly();D()});b.contextMenu&&b.contextMenu.addListener(function(a,b){E=b.getRanges()[0].checkReadOnly();return{cut:B("cut"),copy:B("copy"),paste:B("paste")}})})();(function(){function a(d,c,e,h,f){var k=b.lang.clipboard[c];b.addCommand(c,e);b.ui.addButton&&b.ui.addButton(d,{label:k,command:c,toolbar:"clipboard,"+h});b.addMenuItems&&b.addMenuItem(c,{label:k,command:c, -group:"clipboard",order:f})}a("Cut","cut",c("cut"),10,1);a("Copy","copy",c("copy"),20,4);a("Paste","paste",e(),30,8)})();b.getClipboardData=function(a,d){function c(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();l=!0;d({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function h(){this.customTitle=a&&a.title}var f=!1,k="auto",l=!1;d||(d=a,a=null);b.on("paste",c,null,null,0);b.on("beforePaste",function(a){a.removeListener(); -f=!0;k=a.data.type},null,null,1E3);!1===A()&&(b.removeListener("paste",c),f&&b.fire("pasteDialog",h)?(b.on("pasteDialogCommit",e),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){l||d(null)},10)})):d(null))}}function c(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
    <\/div>|
    [^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

    ([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html"; -return"htmlifiedtext"}function e(a,b){function d(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1(
    |)<\/div>)(?!$|(

    (
    |)<\/div>))/g,"\x3cbr\x3e").replace(/^(
    (
    |)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"), -b.match(/
    (
    |)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(
    (
    |)<\/div>)+/g,function(a){return d(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div>
    /g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^

    $/,"\x3cbr\x3e")),-1){2,}/g,function(a){return d(a.length/4)})+"\x3c/p\x3e"));return l(a,b)}function h(){function a(){var b= -{},d;for(d in CKEDITOR.dtd)"$"!=d.charAt(0)&&"div"!=d&&"span"!=d&&(b[d]=1);return b}var b={};return{get:function(d){return"plain-text"==d?b.plainText||(b.plainText=new CKEDITOR.filter("br")):"semantic-content"==d?((d=b.semanticContent)||(d=new CKEDITOR.filter,d.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),d=b.semanticContent=d),d):d?new CKEDITOR.filter(d):null}}}function m(a,b,d){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var c=new CKEDITOR.htmlParser.basicWriter;d.applyTo(b,!0,!1, -a.activeEnterMode);b.writeHtml(c);return c.getHtml()}function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

    )+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function k(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function b(b){var d=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(d,e,h){e.select();a(b,{dataTransfer:h, -method:"drop"},1);h.sourceEditor.fire("saveSnapshot");h.sourceEditor.editable().extractHtmlFromRange(d);h.sourceEditor.getSelection().selectRanges([d]);h.sourceEditor.fire("saveSnapshot")}function e(c,h){c.select();a(b,{dataTransfer:h,method:"drop"},1);d.resetDragDataTransfer()}function h(a,d,c){var e={$:a.data.$,target:a.data.getTarget()};d&&(e.dragRange=d);c&&(e.dropRange=c);!1===b.fire(a.name,e)&&a.data.preventDefault()}function f(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()} -var k=b.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(b),m=b.ui.space("top"),A=b.ui.space("bottom");d.preventDefaultDropOnElement(m);d.preventDefaultDropOnElement(A);k.attachListener(l,"dragstart",h);k.attachListener(b,"dragstart",d.resetDragDataTransfer,d,null,1);k.attachListener(b,"dragstart",function(a){d.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=d.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(d.dragStartContainerChildCount= -a?f(a.startContainer):null,d.dragEndContainerChildCount=a?f(a.endContainer):null)},null,null,100);k.attachListener(l,"dragend",h);k.attachListener(b,"dragend",d.initDragDataTransfer,d,null,1);k.attachListener(b,"dragend",d.resetDragDataTransfer,d,null,100);k.attachListener(l,"dragover",function(a){var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}); -k.attachListener(l,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var c=a.data.getTarget();if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=d.getRangeAtDropPosition(a,b),e=d.dragRange;c&&h(a,e,c)}}},null,null,9999);k.attachListener(b,"drop",d.initDragDataTransfer,d,null,1);k.attachListener(b,"drop",function(a){if(a=a.data){var h=a.dropRange,f=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){d.internalDrop(f, -h,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,h,k):e(h,k)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var d,k=h();a.config.forcePasteAsPlainText?d="plain-text":a.config.pasteFilter?d=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(d="semantic-content");a.pasteFilter=k.get(d);f(a);b(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));a.on("paste",function(b){b.data.dataTransfer|| -(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var d=b.data.dataTransfer,c=d.getData("text/html");if(c)b.data.dataValue=c,b.data.type="html";else if(c=d.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(c),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,d=CKEDITOR.dtd.$block;-1 <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi, -function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var c,g,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(c=e.getFirst())&&c.type==CKEDITOR.NODE_ELEMENT&&(c.hasClass("cke_editable")|| -c.hasClass("cke_contents"));)e=g=c;g&&(b=g.getHtml().replace(/
    $/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,c){return c.toLowerCase()in d?(a.data.preSniffing="html","\x3c"+c):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


    <\/div>$/,function(b,c){return c in d?(a.data.endsWithEOL=1,"\x3c/"+c+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
    $/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(b){b=b.data;var d=b.type,h=b.dataValue,f,l=a.config.clipboard_defaultContentType|| -"html",p=b.dataTransfer.getTransferType(a);f="html"==d||"html"==b.preSniffing?"html":c(h);"htmlifiedtext"==f&&(h=e(a.config,h));"text"==d&&"html"==f?h=m(a,h,k.get("plain-text")):p==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!b.dontFilter&&(h=m(a,h,a.pasteFilter));b.startsWithEOL&&(h='\x3cbr data-cke-eol\x3d"1"\x3e'+h);b.endsWithEOL&&(h+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==f||"html"==l?"html":"text");b.type=d;b.dataValue=h;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL}, -null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,d,c){function e(a,d,c){var g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.equals(d)&&c!=d.getChildCount())return a= -b.startContainer.getChild(b.startOffset-1),d=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&d&&d.type==CKEDITOR.NODE_TEXT&&(c=a.getLength(),a.setText(a.getText()+d.getText()),d.remove(),b.setStart(a,c),b.collapse(!0)),!0}var h=b.startContainer;"number"==typeof c&&"number"==typeof d&&h.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,h,d)||e(a.endContainer,h,c))},isDropRangeAffectedByDragRange:function(a,b){var d=b.startContainer,c=b.endOffset;return a.endContainer.equals(d)&& -a.endOffset<=c||a.startContainer.getParent().equals(d)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,d,h.dragStartContainerChildCount,h.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(b,d))||(k=b.createBookmark(!1)); -h=d.clone().createBookmark(!1);l&&(k=b.createBookmark(!1));b=k.startNode;d=k.endNode;l=h.startNode;d&&b.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&d.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(b);b=e.createRange();b.moveToBookmark(k);f.extractHtmlFromRange(b,1);d=e.createRange();d.moveToBookmark(h);a(e,{dataTransfer:c,method:"drop",range:d},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var d=a.data.$,c=d.clientX,e=d.clientY,h=b.getSelection(!0).getRanges()[0],f= -b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint)d=b.document.$.caretRangeFromPoint(c,e),f.setStart(CKEDITOR.dom.node(d.startContainer),d.startOffset),f.collapse(!0);else if(d.rangeParent)f.setStart(CKEDITOR.dom.node(d.rangeParent),d.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8l&& -!k;l++){if(!k)try{d.moveToPoint(c,e-l),k=!0}catch(m){}if(!k)try{d.moveToPoint(c,e+l),k=!0}catch(t){}}if(k){var w="cke-temp-"+(new Date).getTime();d.pasteHTML('\x3cspan id\x3d"'+w+'"\x3e​\x3c/span\x3e');var D=b.document.getById(w);f.moveToPosition(D,CKEDITOR.POSITION_BEFORE_START);D.remove()}else{var B=b.document.$.elementFromPoint(c,e),y=new CKEDITOR.dom.element(B),C;if(y.equals(b.editable())||"html"==y.getName())return h&&h.startContainer&&!h.startContainer.equals(b.editable())?h:null;C=y.getClientRect(); -c/i,bodyRegExp:/([\s\S]*)<\/body>/i, -fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(d);this.id||(this.id="Text"==d?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=d)try{this.$.setData(d,this.id)}catch(c){}b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==d||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL= -1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a){a=this._.normalizeType(a);var b=this._.data[a];if(void 0===b||null===b||""===b)try{b=this.$.getData(a)}catch(d){}if(void 0===b||null===b||""===b)b="";"text/html"==a?(b=b.replace(this._.metaRegExp,""),(a=this._.bodyRegExp.exec(b))&&a.length&&(b=a[1],b=b.replace(this._.fragmentRegExp,""))):"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==b.substring(0, -7)&&(b="");return b},setData:function(a,b){a=this._.normalizeType(a);this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==d&&"Text"==a&&(this.id=b);try{this.$.setData(a,b)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(d){d=b._.normalizeType(d);var c=b.getData(d);c&&(b._.data[d]= -c)}if(this.$){var b=this,d,c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(d=0;de?q+e:c.width>e?q-a.left:q-a.right+c.width):he?q-e:c.width>e?q-a.right+c.width:q-a.left);e=a.top;c.height-a.topg?x-g:c.height>g?x-a.bottom+c.height:x-a.top);CKEDITOR.env.ie&&(c=a=new CKEDITOR.dom.element(p.$.offsetParent),"html"==c.getName()&& -(c=c.getDocument().getBody()),"rtl"==c.getComputedStyle("direction")&&(q=CKEDITOR.env.ie8Compat?q-2*p.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=p.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);p.setStyles({top:x+"px",left:q+"px"});p.setOpacity(1);k&&k()},this);b.isLoaded?a():b.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y; -this.focus();d.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused|| +[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var a={exec:function(a){var c=a.getCommand("blockquote").state,f=a.getSelection(),h=f&&f.getRanges()[0]; +if(h){var m=f.createBookmarks();if(CKEDITOR.env.ie){var l=m[0].startNode,k=m[0].endNode,d;if(l&&"blockquote"==l.getParent().getName())for(d=l;d=d.getNext();)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){l.move(d,!0);break}if(k&&"blockquote"==k.getParent().getName())for(d=k;d=d.getPrevious();)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){k.move(d);break}}var b=h.createIterator();b.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(c==CKEDITOR.TRISTATE_OFF){for(l=[];c=b.getNextParagraph();)l.push(c); +1>l.length&&(c=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),k=m.shift(),h.insertNode(c),c.append(new CKEDITOR.dom.text("",a.document)),h.moveToBookmark(k),h.selectNodeContents(c),h.collapse(!0),k=h.createBookmark(),l.push(c),m.unshift(k));d=l[0].getParent();h=[];for(k=0;k]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&a(b,c)})}function F(){if("wysiwyg"==b.mode){var a=z("paste");b.getCommand("cut").setState(z("cut"));b.getCommand("copy").setState(z("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function z(a){if(D&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var d=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED: +CKEDITOR.TRISTATE_OFF}var A=CKEDITOR.plugins.clipboard,C=0,E=0,D=0;(function(){b.on("key",t);b.on("contentDom",d);b.on("selectionChange",function(a){D=a.data.selection.getRanges()[0].checkReadOnly();F()});b.contextMenu&&b.contextMenu.addListener(function(a,b){D=b.getRanges()[0].checkReadOnly();return{cut:z("cut"),copy:z("copy"),paste:z("paste")}})})();(function(){function a(d,c,e,f,h){var k=b.lang.clipboard[c];b.addCommand(c,e);b.ui.addButton&&b.ui.addButton(d,{label:k,command:c,toolbar:"clipboard,"+ +f});b.addMenuItems&&b.addMenuItem(c,{label:k,command:c,group:"clipboard",order:h})}a("Cut","cut",c("cut"),10,1);a("Copy","copy",c("copy"),20,4);a("Paste","paste",e(),30,8)})();b.getClipboardData=function(a,d){function c(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();l=!0;d({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function f(){this.customTitle=a&&a.title}var h=!1,k="auto",l=!1;d||(d=a,a=null);b.on("paste",c,null,null, +0);b.on("beforePaste",function(a){a.removeListener();h=!0;k=a.data.type},null,null,1E3);!1===y()&&(b.removeListener("paste",c),h&&b.fire("pasteDialog",f)?(b.on("pasteDialogCommit",e),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){l||d(null)},10)})):d(null))}}function c(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
    <\/div>|
    [^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&& +!a.match(/^(

    ([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function f(a,b){function d(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&& +-1(
    |)<\/div>)(?!$|(

    (
    |)<\/div>))/g,"\x3cbr\x3e").replace(/^(
    (
    |)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/
    (
    |)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(
    (
    |)<\/div>)+/g,function(a){return d(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div>
    /g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^

    $/, +"\x3cbr\x3e")),-1){2,}/g,function(a){return d(a.length/4)})+"\x3c/p\x3e"));return l(a,b)}function h(){function a(){var b={},d;for(d in CKEDITOR.dtd)"$"!=d.charAt(0)&&"div"!=d&&"span"!=d&&(b[d]=1);return b}var b={};return{get:function(d){return"plain-text"==d?b.plainText||(b.plainText=new CKEDITOR.filter("br")):"semantic-content"==d?((d=b.semanticContent)||(d=new CKEDITOR.filter,d.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}), +d=b.semanticContent=d),d):d?new CKEDITOR.filter(d):null}}}function m(a,b,d){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var c=new CKEDITOR.htmlParser.basicWriter;d.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(c);return c.getHtml()}function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

    )+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function k(a){a.data.preventDefault(); +a.data.$.dataTransfer.dropEffect="none"}function d(b){var d=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(d,e,f){e.select();a(b,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot");f.sourceEditor.editable().extractHtmlFromRange(d);f.sourceEditor.getSelection().selectRanges([d]);f.sourceEditor.fire("saveSnapshot")}function e(c,f){c.select();a(b,{dataTransfer:f,method:"drop"},1);d.resetDragDataTransfer()}function f(a,d,c){var e={$:a.data.$,target:a.data.getTarget()}; +d&&(e.dragRange=d);c&&(e.dropRange=c);!1===b.fire(a.name,e)&&a.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=b.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(b),m=b.ui.space("top"),y=b.ui.space("bottom");d.preventDefaultDropOnElement(m);d.preventDefaultDropOnElement(y);k.attachListener(l,"dragstart",f);k.attachListener(b,"dragstart",d.resetDragDataTransfer,d,null,1);k.attachListener(b,"dragstart",function(a){d.initDragDataTransfer(a, +b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=d.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(d.dragStartContainerChildCount=a?h(a.startContainer):null,d.dragEndContainerChildCount=a?h(a.endContainer):null)},null,null,100);k.attachListener(l,"dragend",f);k.attachListener(b,"dragend",d.initDragDataTransfer,d,null,1);k.attachListener(b,"dragend",d.resetDragDataTransfer,d,null,100);k.attachListener(l,"dragover",function(a){var b=a.data.getTarget(); +b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()});k.attachListener(l,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var c=a.data.getTarget();if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=d.getRangeAtDropPosition(a,b),e=d.dragRange;c&&f(a,e,c)}}},null,null,9999);k.attachListener(b,"drop",d.initDragDataTransfer,d,null, +1);k.attachListener(b,"drop",function(a){if(a=a.data){var f=a.dropRange,h=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){d.internalDrop(h,f,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(h,f,k):e(f,k)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var b,k=h();a.config.forcePasteAsPlainText?b="plain-text":a.config.pasteFilter?b=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in +a.config||(b="semantic-content");a.pasteFilter=k.get(b);e(a);d(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var l=["image/png","image/jpeg","image/gif"],w;a.on("paste",function(b){var d=b.data,c=d.dataTransfer;if(!d.dataValue&&"paste"==d.method&&c&&1==c.getFilesCount()&&w!=c.id&&(c=c.getFile(0),-1!=CKEDITOR.tools.indexOf(l,c.type))){var e=new FileReader;e.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e'; +a.fire("paste",b.data)},!1);e.addEventListener("abort",function(){a.fire("paste",b.data)},!1);e.addEventListener("error",function(){a.fire("paste",b.data)},!1);e.readAsDataURL(c);w=d.dataTransfer.id;b.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var d=b.data.dataTransfer,c=d.getData("text/html");if(c)b.data.dataValue=c,b.data.type="html";else if(c=d.getData("text/plain"))b.data.dataValue= +a.editable().transformPlainTextToHtml(c),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,d=CKEDITOR.dtd.$block;-1 <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var c,g,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(c=e.getFirst())&&c.type==CKEDITOR.NODE_ELEMENT&&(c.hasClass("cke_editable")||c.hasClass("cke_contents"));)e=g=c;g&&(b=g.getHtml().replace(/
    $/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,c){return c.toLowerCase()in d?(a.data.preSniffing= +"html","\x3c"+c):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


    <\/div>$/,function(b,c){return c in d?(a.data.endsWithEOL=1,"\x3c/"+c+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
    $/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(b){b=b.data;var d=b.type,e=b.dataValue,h,l=a.config.clipboard_defaultContentType||"html",p=b.dataTransfer.getTransferType(a);h="html"==d||"html"==b.preSniffing?"html":c(e);"htmlifiedtext"==h&&(e=f(a.config,e));"text"==d&&"html"==h?e=m(a,e,k.get("plain-text")): +p==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!b.dontFilter&&(e=m(a,e,a.pasteFilter));b.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+e);b.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==h||"html"==l?"html":"text");b.type=d;b.dataValue=e;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,1E3); +a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,d,c){function e(a,d,c){var g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.equals(d)&&c!=d.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),d=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&d&&d.type==CKEDITOR.NODE_TEXT&&(c=a.getLength(),a.setText(a.getText()+ +d.getText()),d.remove(),b.setStart(a,c),b.collapse(!0)),!0}var f=b.startContainer;"number"==typeof c&&"number"==typeof d&&f.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,f,d)||e(a.endContainer,f,c))},isDropRangeAffectedByDragRange:function(a,b){var d=b.startContainer,c=b.endOffset;return a.endContainer.equals(d)&&a.endOffset<=c||a.startContainer.getParent().equals(d)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,d,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(b,d))||(k=b.createBookmark(!1));f=d.clone().createBookmark(!1);l&&(k=b.createBookmark(!1));b=k.startNode;d=k.endNode;l=f.startNode;d&&b.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&d.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&& +l.insertBefore(b);b=e.createRange();b.moveToBookmark(k);h.extractHtmlFromRange(b,1);d=e.createRange();d.moveToBookmark(f);a(e,{dataTransfer:c,method:"drop",range:d},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var d=a.data.$,c=d.clientX,e=d.clientY,f=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint)d=b.document.$.caretRangeFromPoint(c,e),h.setStart(CKEDITOR.dom.node(d.startContainer),d.startOffset), +h.collapse(!0);else if(d.rangeParent)h.setStart(CKEDITOR.dom.node(d.rangeParent),d.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!k;l++){if(!k)try{d.moveToPoint(c,e-l),k=!0}catch(m){}if(!k)try{d.moveToPoint(c,e+l),k=!0}catch(t){}}if(k){var x="cke-temp-"+(new Date).getTime();d.pasteHTML('\x3cspan id\x3d"'+x+'"\x3e​\x3c/span\x3e'); +var F=b.document.getById(x);h.moveToPosition(F,CKEDITOR.POSITION_BEFORE_START);F.remove()}else{var z=b.document.$.elementFromPoint(c,e),A=new CKEDITOR.dom.element(z),C;if(A.equals(b.editable())||"html"==A.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;C=A.getClientRect();c/i,bodyRegExp:/([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g, +data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(b);this.id||(this.id="Text"==b?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=b)try{this.$.setData(b,this.id)}catch(c){}d&&(this.sourceEditor=d,this.setData("text/html",d.getSelectedHtml(1)),"Text"==b||this.getData("text/plain")||this.setData("text/plain",d.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS= +2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a){a=this._.normalizeType(a);var b=this._.data[a];if(void 0===b||null===b||""===b)try{b=this.$.getData(a)}catch(d){}if(void 0===b||null===b||""===b)b="";"text/html"==a?(b=b.replace(this._.metaRegExp,""),(a=this._.bodyRegExp.exec(b))&&a.length&&(b=a[1],b=b.replace(this._.fragmentRegExp,""))):"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==b.substring(0,7)&&(b="");return b},setData:function(a, +d){a=this._.normalizeType(a);this._.data[a]=d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==b&&"Text"==a&&(this.id=d);try{this.$.setData(a,d)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(d){d=b._.normalizeType(d);var c=b.getData(d);c&&(b._.data[d]=c)}if(this.$){var b=this,d,c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(d= +0;de?q+e:c.width>e?q-a.left:q-a.right+c.width):fe?q-e:c.width>e?q-a.right+c.width:q-a.left);e=a.top;c.height-a.topg?u-g:c.height>g?u-a.bottom+c.height:u-a.top);CKEDITOR.env.ie&&(c=a=new CKEDITOR.dom.element(p.$.offsetParent),"html"==c.getName()&& +(c=c.getDocument().getBody()),"rtl"==c.getComputedStyle("direction")&&(q=CKEDITOR.env.ie8Compat?q-2*p.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=p.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);p.setStyles({top:u+"px",left:q+"px"});p.setOpacity(1);k&&k()},this);d.isLoaded?a():d.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y; +this.focus();b.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused|| this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(), -a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var e=this._.panel;void 0!==a&&(e.allowBlur=a);return e.allowBlur},showAsChild:function(a,e,h,f,l,k){if(this._.activeChild!=a||a._.panel._.offsetParentId!=h.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(e,h,f,l,k),this.blur(), -(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var e=this._.activeChild;e&&(delete e.onHide,delete this._.activeChild,e.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),e;for(e in f){var h=f[e];a?h.destroy():h.element.hide()}a&&(f={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(a){for(var f=a.config.menu_groups.split(","), -c=a._.menuGroups={},e=a._.menuItems={},h=0;hc.group?1:a.orderc.order?1:0})}var f='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1"_cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked}'; -CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(f+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),c=CKEDITOR.addTemplate("menuItem",f+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e'), -e=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,c){c=this._.definition=c||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=c.level||1;var e=CKEDITOR.tools.extend({},c.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),f=e.block.attributes=e.attributes||{};!f.role&&(f.role="menu");this._.panelDefinition= -e},_:{onShow:function(){var a=this.editor.getSelection(),c=a&&a.getStartElement(),e=this.editor.elementPath(),f=this._.listeners;this.removeAll();for(var b=0;bb.width&&(e.resize_minWidth=b.width);e.resize_minHeight>b.height&&(e.resize_minHeight=b.height);CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",c);a.document&&(a.document.on("mousemove",f),a.document.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(p)});a.on("uiSpace",function(b){if("bottom"==b.data.space){var c= -"";d&&!g&&(c=" cke_resizer_horizontal");!d&&g&&(c=" cke_resizer_vertical");var e='\x3cspan id\x3d"'+h+'" class\x3d"cke_resizer'+c+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+p+', event)"\x3e'+("ltr"==m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==c?b.data.html+=e:b.data.html=e+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var a= -'\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"'); -var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"'),a=a+'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e{arrowHtml}\x3c/a\x3e', -f=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),c=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(c){c.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}}; -CKEDITOR.ui.button.prototype={render:function(a,h){function m(){var b=a.mode;b&&(b=this.modes[b]?void 0!==n[b]?n[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var l=CKEDITOR.env,k=this._.id=CKEDITOR.tools.getNextId(),b="",d=this.command,g;this._.editor=a;var p={id:k,button:this,editor:a,focus:function(){CKEDITOR.document.getById(k).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}}, -r=CKEDITOR.tools.addFunction(function(a){if(p.onkey)return a=new CKEDITOR.dom.event(a),!1!==p.onkey(p,a.getKeystroke())}),v=CKEDITOR.tools.addFunction(function(a){var b;p.onfocus&&(b=!1!==p.onfocus(p,new CKEDITOR.dom.event(a)));return b}),u=0;p.clickFn=g=CKEDITOR.tools.addFunction(function(){u&&(a.unlockSelection(1),u=0);p.execute();l.iOS&&a.focus()});if(this.modes){var n={};a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(n[a.mode]=this._.state)},this);a.on("activeFilterChange", -m,this);a.on("mode",m,this);!this.readOnly&&a.on("readOnly",m,this)}else d&&(d=a.getCommand(d))&&(d.on("state",function(){this.setState(d.state)},this),b+=d.state==CKEDITOR.TRISTATE_ON?"on":d.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)a.on("contentDirChanged",function(b){var d=CKEDITOR.document.getById(this._.id),c=d.getFirst();b=b.data;b!=a.lang.dir?d.addClass("cke_"+b):d.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(x, -"rtl"==b,this.icon,this.iconOffset))},this);d||(b+="off");var q=this.name||this.command,x=q;this.icon&&!/\./.test(this.icon)&&(x=this.icon,this.icon=null);b={id:k,name:q,iconName:x,label:this.label,cls:this.className||"",state:b,ariaDisabled:"disabled"==b?"true":"false",title:this.title,titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:r,focusFn:v,clickFn:g,style:CKEDITOR.skin.getIconStyle(x,"rtl"==a.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow? -f.output():""};c.output(b,h);if(this.onRender)this.onRender();return p},setState:function(a){if(this._.state==a)return!1;this._.state=a;var c=CKEDITOR.document.getById(this._.id);return c?(c.setState(a,"cke_button"),a==CKEDITOR.TRISTATE_DISABLED?c.setAttribute("aria-disabled",!0):c.removeAttribute("aria-disabled"),this.hasArrow?(a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(a)):a==CKEDITOR.TRISTATE_ON? -c.setAttribute("aria-pressed",!0):c.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var c=this;this.allowedContent||this.requiredContent||!this.command||(c=a.getCommand(this.command)||c);return this._.feature=c}};CKEDITOR.ui.prototype.addButton=function(a,c){this.add(a,CKEDITOR.UI_BUTTON,c)}}(),function(){function a(a){function c(){for(var b=e(),d=CKEDITOR.tools.clone(a.config.toolbarGroups)||f(a),g=0;g< -d.length;g++){var m=d[g];if("/"!=m){"string"==typeof m&&(m=d[g]={name:m});var n,q=m.groups;if(q)for(var x=0;xb.order?-1:0>a.order?1:a.orderCKEDITOR.env.version? -l.createText("\r"):l.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("").insertAfter(a),m&&(q||n.blockLimit).appendBogus(),a.getNext().$.nodeValue="",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):k(a,c,e,h)}}};var m=CKEDITOR.plugins.enterkey,l=m.enterBr,k=m.enterBlock,b=/^h[1-6]$/}(),function(){function a(a,c){var e={},h=[],m={nbsp:" ",shy:"­",gt:"\x3e", -lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,b){var f=c?"\x26"+b+";":m[b];e[f]=c?m[b]:"\x26"+b+";";h.push(f);return""});if(!c&&a){a=a.split(",");var l=document.createElement("div"),k;l.innerHTML="\x26"+a.join(";\x26")+";";k=l.innerHTML;l=null;for(l=0;lc.group?1:a.orderc.order?1:0})}var e='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"'; +CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');var e=e+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),c=CKEDITOR.addTemplate("menuItem", +e+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e'),f=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'), +h=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,c){c=this._.definition=c||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=c.level||1;var e=CKEDITOR.tools.extend({},c.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),d=e.block.attributes=e.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition= +e},_:{onShow:function(){var a=this.editor.getSelection(),c=a&&a.getStartElement(),e=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var b=0;bb.order?-1:0>a.order?1:a.orderCKEDITOR.env.version?l.createText("\r"):l.createElement("br"),f.deleteContents(),f.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("").insertAfter(a), +m&&(q||n.blockLimit).appendBogus(),a.getNext().$.nodeValue="",f.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):f.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),f.collapse(!0),f.select(),f.scrollIntoView()):k(a,c,f,h)}}};var m=CKEDITOR.plugins.enterkey,l=m.enterBr,k=m.enterBlock,d=/^h[1-6]$/}(),function(){function a(a,c){var f={},h=[],m={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,d){var e=c?"\x26"+d+";":m[d]; +f[e]=c?m[d]:"\x26"+d+";";h.push(e);return""});if(!c&&a){a=a.split(",");var l=document.createElement("div"),k;l.innerHTML="\x26"+a.join(";\x26")+";";k=l.innerHTML;l=null;for(l=0;lf&&(f=640);420>c&&(c=420);var h=parseInt((window.screen.height-c)/2,10),m=parseInt((window.screen.width- -f)/2,10);e=(e||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+f+",height\x3d"+c+",top\x3d"+h+",left\x3d"+m;var l=window.open("",null,e,!0);if(!l)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(l.moveTo(m,h),l.resizeTo(f,c)),l.focus(),l.location.href=a}catch(k){window.open(a,null,e,!0)}return!0}}),function(){function a(a,d){var c=[];if(d)for(var e in d)c.push(e+ -"\x3d"+encodeURIComponent(d[e]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function f(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function c(){var b=this.getDialog(),d=b.getParentEditor();d._.filebrowserSe=this;var c=d.config["filebrowser"+f(b.getName())+"WindowWidth"]||d.config.filebrowserWindowWidth||"80%",b=d.config["filebrowser"+f(b.getName())+"WindowHeight"]||d.config.filebrowserWindowHeight||"70%",e=this.filebrowser.params||{};e.CKEditor=d.name;e.CKEditorFuncNum= -d._.filebrowserFn;e.langCode||(e.langCode=d.langCode);e=a(this.filebrowser.url,e);d.popup(e,c,b,d.config.filebrowserWindowFeatures||d.config.fileBrowserWindowFeatures)}function e(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function h(b,d,c){var e=c.params||{};e.CKEditor=b.name;e.CKEditorFuncNum=b._.filebrowserFn;e.langCode|| -(e.langCode=b.langCode);d.action=a(c.url,e);d.filebrowser=c}function m(a,d,g,k){if(k&&k.length)for(var l,v=k.length;v--;)if(l=k[v],"hbox"!=l.type&&"vbox"!=l.type&&"fieldset"!=l.type||m(a,d,g,l.children),l.filebrowser)if("string"==typeof l.filebrowser&&(l.filebrowser={action:"fileButton"==l.type?"QuickUpload":"Browse",target:l.filebrowser}),"Browse"==l.filebrowser.action){var u=l.filebrowser.url;void 0===u&&(u=a.config["filebrowser"+f(d)+"BrowseUrl"],void 0===u&&(u=a.config.filebrowserBrowseUrl)); -u&&(l.onClick=c,l.filebrowser.url=u,l.hidden=!1)}else if("QuickUpload"==l.filebrowser.action&&l["for"]&&(u=l.filebrowser.url,void 0===u&&(u=a.config["filebrowser"+f(d)+"UploadUrl"],void 0===u&&(u=a.config.filebrowserUploadUrl)),u)){var n=l.onClick;l.onClick=function(a){var b=a.sender;if(n&&!1===n.call(b,a))return!1;if(e.call(b,a)){a=b.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement();if(b=new CKEDITOR.dom.element(a.$.form))(a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a): -(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken());return!0}return!1};l.filebrowser.url=u;l.hidden=!1;h(a,g.getContents(l["for"][0]).get(l["for"][1]),l.filebrowser)}}function l(a,d,c){if(-1!==c.indexOf(";")){c=c.split(";");for(var e=0;ex.height-q.bottom?g("pin"):g("bottom"),d=x.width/2,d=h.floatSpacePreferRight?"right":0n.width?"rtl"==h.contentsLangDirection?"right":"left":d-q.left>q.right-d?"left":"right",n.width>x.width?(d="left",p=0):(p="left"==d?0x.width&&(d="left"==d? -"right":"left",p=0)),b.setStyle(d,c(("pin"==k?D:t)+p+("pin"==k?0:"left"==d?A:-A)))):(k="pin",g("pin"),l(d))}}}();if(m){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e': -" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:m,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(h.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),d=CKEDITOR.tools.eventsBuffer(500,l),g=CKEDITOR.tools.eventsBuffer(100,l);b.unselectable();b.on("mousedown", -function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){l(b);a.on("change",d.input);f.on("scroll",g.input);f.on("resize",g.input)});a.on("blur",function(){b.hide();a.removeListener("change",d.input);f.removeListener("scroll",g.input);f.removeListener("resize",g.input)});a.on("destroy",function(){f.removeListener("scroll",g.input);f.removeListener("resize",g.input);b.clearCustomData();b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b, -1)}}var f=CKEDITOR.document.getWindow(),c=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(c){c.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),f=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" href\x3d"javascript:void(\'{val}\')" {onclick}\x3d"CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), -c=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),e=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,c){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),c))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,c){c=c||{};var e=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&&(e["aria-multiselectable"]=!0);!e.role&& +h.entities_additional&&m.push(h.entities_additional));var l=a(m.join(",")),k=l.regex?"["+l.regex+"]":"a^";delete l.regex;h.entities&&h.entities_processNumerical&&(k="[^ -~]|"+k);var k=new RegExp(k,"g"),d=a("nbsp,gt,lt,amp,shy",!0),b=new RegExp(d.regex,"g");e.addRules({text:function(a){return a.replace(b,c).replace(k,f)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0, +CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(a,e,c,f){e=e||"80%";c=c||"70%";"string"==typeof e&&1e&&(e=640);420>c&&(c=420);var h=parseInt((window.screen.height-c)/2,10),m=parseInt((window.screen.width- +e)/2,10);f=(f||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+e+",height\x3d"+c+",top\x3d"+h+",left\x3d"+m;var l=window.open("",null,f,!0);if(!l)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(l.moveTo(m,h),l.resizeTo(e,c)),l.focus(),l.location.href=a}catch(k){window.open(a,null,f,!0)}return!0}}),function(){function a(a,b){var c=[];if(b)for(var e in b)c.push(e+ +"\x3d"+encodeURIComponent(b[e]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function e(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function c(){var d=this.getDialog(),b=d.getParentEditor();b._.filebrowserSe=this;var c=b.config["filebrowser"+e(d.getName())+"WindowWidth"]||b.config.filebrowserWindowWidth||"80%",d=b.config["filebrowser"+e(d.getName())+"WindowHeight"]||b.config.filebrowserWindowHeight||"70%",f=this.filebrowser.params||{};f.CKEditor=b.name;f.CKEditorFuncNum= +b._.filebrowserFn;f.langCode||(f.langCode=b.langCode);f=a(this.filebrowser.url,f);b.popup(f,c,d,b.config.filebrowserWindowFeatures||b.config.fileBrowserWindowFeatures)}function f(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function h(d,b,c){var e=c.params||{};e.CKEditor=d.name;e.CKEditorFuncNum=d._.filebrowserFn;e.langCode|| +(e.langCode=d.langCode);b.action=a(c.url,e);b.filebrowser=c}function m(a,b,g,k){if(k&&k.length)for(var l,r=k.length;r--;)if(l=k[r],"hbox"!=l.type&&"vbox"!=l.type&&"fieldset"!=l.type||m(a,b,g,l.children),l.filebrowser)if("string"==typeof l.filebrowser&&(l.filebrowser={action:"fileButton"==l.type?"QuickUpload":"Browse",target:l.filebrowser}),"Browse"==l.filebrowser.action){var w=l.filebrowser.url;void 0===w&&(w=a.config["filebrowser"+e(b)+"BrowseUrl"],void 0===w&&(w=a.config.filebrowserBrowseUrl)); +w&&(l.onClick=c,l.filebrowser.url=w,l.hidden=!1)}else if("QuickUpload"==l.filebrowser.action&&l["for"]&&(w=l.filebrowser.url,void 0===w&&(w=a.config["filebrowser"+e(b)+"UploadUrl"],void 0===w&&(w=a.config.filebrowserUploadUrl)),w)){var n=l.onClick;l.onClick=function(a){var b=a.sender;if(n&&!1===n.call(b,a))return!1;if(f.call(b,a)){a=b.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement();if(b=new CKEDITOR.dom.element(a.$.form))(a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a): +(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken());return!0}return!1};l.filebrowser.url=w;l.hidden=!1;h(a,g.getContents(l["for"][0]).get(l["for"][1]),l.filebrowser)}}function l(a,b,c){if(-1!==c.indexOf(";")){c=c.split(";");for(var e=0;eu.height-q.bottom?g("pin"):g("bottom"),b=u.width/2,b=h.floatSpacePreferRight?"right":0n.width?"rtl"==h.contentsLangDirection?"right":"left":b-q.left>q.right-b?"left":"right",n.width>u.width?(b="left",p=0):(p="left"==b?0u.width&&(b="left"==b? +"right":"left",p=0)),d.setStyle(b,c(("pin"==k?F:t)+p+("pin"==k?0:"left"==b?y:-y)))):(k="pin",g("pin"),l(b))}}}();if(m){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e': +" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),d=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:m,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(h.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),b=CKEDITOR.tools.eventsBuffer(500,l),g=CKEDITOR.tools.eventsBuffer(100,l);d.unselectable();d.on("mousedown", +function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(d){l(d);a.on("change",b.input);e.on("scroll",g.input);e.on("resize",g.input)});a.on("blur",function(){d.hide();a.removeListener("change",b.input);e.removeListener("scroll",g.input);e.removeListener("resize",g.input)});a.on("destroy",function(){e.removeListener("scroll",g.input);e.removeListener("resize",g.input);d.clearCustomData();d.remove()});a.focusManager.hasFocus&&d.show();a.focusManager.add(d, +1)}}var e=CKEDITOR.document.getWindow(),c=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(c){c.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),e=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" href\x3d"javascript:void(\'{val}\')" {onclick}\x3d"CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), +c=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),f=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,c){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),c))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,c){c=c||{};var e=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&&(e["aria-multiselectable"]=!0);!e.role&& (e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(e[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var c=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(c);delete this._.started}},getClick:function(){this._.click|| -(this._.click=CKEDITOR.tools.addFunction(function(a){var c=this.toggle(a);if(this.onClick)this.onClick(a,c)},this));return this._.click}},proto:{add:function(a,c,l){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=k;var b;b=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:k,val:b,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||a),text:c||a}; -this._.pendingList.push(f.output(a))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(c.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var c=this.isMarked(a);c?this.unmark(a):this.mark(a);return!c},hideGroup:function(a){var c=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display", -"none"),c&&"ul"==c.getName()&&c.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,c=this._.groups,e=this.element.getDocument(),f;for(f in a)e.getById(a[f]).setStyle("display","");for(var b in c)a=e.getById(c[b]),f=a.getNext(),a.setStyle("display",""),f&&"ul"==f.getName()&&f.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var c=this.element.getDocument().getById(a); +(this._.click=CKEDITOR.tools.addFunction(function(a){var c=this.toggle(a);if(this.onClick)this.onClick(a,c)},this));return this._.click}},proto:{add:function(a,c,l){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=k;var d;d=CKEDITOR.tools.htmlEncodeAttr(a).replace(f,"\\'");a={id:k,val:d,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||a),text:c||a}; +this._.pendingList.push(e.output(a))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(c.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var c=this.isMarked(a);c?this.unmark(a):this.mark(a);return!c},hideGroup:function(a){var c=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display", +"none"),c&&"ul"==c.getName()&&c.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,c=this._.groups,e=this.element.getDocument(),f;for(f in a)e.getById(a[f]).setStyle("display","");for(var d in c)a=e.getById(c[d]),f=a.getNext(),a.setStyle("display",""),f&&"ul"==f.getName()&&f.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var c=this.element.getDocument().getById(a); c.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(c)},unmark:function(a){var c=this.element.getDocument();a=this._.items[a];var e=c.getById(a);e.removeClass("cke_selected");c.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(e)},unmarkAll:function(){var a=this._.items,c=this.element.getDocument(),e;for(e in a){var f=a[e];c.getById(f).removeClass("cke_selected");c.getById(f+"_option").removeAttribute("aria-selected")}this.onUnmark&& this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var c=this.element.getElementsByTag("a"),e,f=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a=c.getItem(++f);){if(a.equals(e)){this._.focusIndex=f;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO, CKEDITOR.ui.richCombo.handler)}}),function(){var a='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&& (a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+ -(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),f=CKEDITOR.addTemplate("combo",a);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel"; -a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var e=[];this.render(a,e);return e.join("")},render:function(a,e){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var m= -CKEDITOR.env,l="cke_"+this.id,k=CKEDITOR.tools.addFunction(function(b){r&&(a.unlockSelection(1),r=0);d.execute(b)},this),b=this,d={id:l,combo:this,focus:function(){CKEDITOR.document.getById(l).getChild(1).focus()},execute:function(d){var e=b._;if(e.state!=CKEDITOR.TRISTATE_DISABLED)if(b.createPanel(a),e.on)e.panel.hide();else{b.commit();var g=b.getValue();g?e.list.mark(g):e.list.unmarkAll();e.panel.showBlock(b.id,new CKEDITOR.dom.element(d),4)}},clickFn:k};a.on("activeFilterChange",h,this);a.on("mode", -h,this);a.on("selectionChange",h,this);!this.readOnly&&a.on("readOnly",h,this);var g=CKEDITOR.tools.addFunction(function(b,e){b=new CKEDITOR.dom.event(b);var g=b.getKeystroke();if(40==g)a.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});switch(g){case 13:case 32:case 40:CKEDITOR.tools.callFunction(k,e);break;default:d.onkey(d,g)}b.preventDefault()}),p=CKEDITOR.tools.addFunction(function(){d.onfocus&&d.onfocus()}),r=0;d.keyDownFn=g;m={id:l,name:this.name||this.command,label:this.label, -title:this.title,cls:this.className||"",titleJs:m.gecko&&!m.hc?"":(this.title||"").replace("'",""),keydownFn:g,focusFn:p,clickFn:k};f.output(m,e);if(this.onRender)this.onRender();return d},createPanel:function(a){if(!this._.panel){var e=this._.panelDefinition,f=this._.panelDefinition.block,m=e.parent||CKEDITOR.document.getBody(),l="cke_combopanel__"+this.name,k=new CKEDITOR.ui.floatPanel(a,m,e),b=k.addListBlock(this.id,f),d=this;k.onShow=function(){this.element.addClass(l);d.setState(CKEDITOR.TRISTATE_ON); -d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen();a.once("panelShow",function(){b.focus(!b.multiSelect&&d.getValue())})};k.onHide=function(b){this.element.removeClass(l);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};k.onEscape=function(){k.hide(1)};b.onClick=function(a,b){d.onClick&&d.onClick.call(d,a,b);k.hide()};this._.panel=k;this._.list=b;k.getBlock(this.id).onHide=function(){d._.on= -0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var f=this.document.getById("cke_"+this.id+"_text");f&&(a||e?f.removeClass("cke_combo_inlinelabel"):(e=this.label,f.addClass("cke_combo_inlinelabel")),f.setText("undefined"!=typeof e?e:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)}, -showAll:function(){this._.list.showAll()},add:function(a,e,f){this._.items[a]=f||a;this._.list.add(a,e,f)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var e=this.document.getById("cke_"+this.id);e.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?e.setAttribute("aria-disabled",!0):e.removeAttribute("aria-disabled");this._.state= -a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,e){this.add(a,CKEDITOR.UI_RICHCOMBO,e)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(a){if(!a.blockless){for(var f= -a.config,c=a.lang.format,e=f.format_tags.split(";"),h={},m=0,l=[],k=0;kthis.$.offsetHeight){var d=e.createRange();d[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&& -this.attachListener(k,"blur",function(){try{k.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(k,"touchend",function(){a.focus()});b=e.document.getElementsByTag("title").getItem(0);b.data("cke-title",b.getText());CKEDITOR.env.ie&&(e.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");e.fire("contentDom");this._.isPendingFocus&&(e.focus(),this._.isPendingFocus=!1);setTimeout(function(){e.fire("dataReady")},0)}, -0,this)}function f(a){function c(){var b;a.editable().attachListener(a,"selectionChange",function(){var c=a.getSelection().getSelectedElement();c&&(b&&(b.detachEvent("onresizestart",e),b=null),c.$.attachEvent("onresizestart",e),b=c.$)})}function e(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var f=a.document.$;f.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);f.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(b){}else CKEDITOR.env.ie&&11> -CKEDITOR.env.version&&a.config.disableObjectResizing&&c(a)}function c(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var c=[],e;for(e in CKEDITOR.dtd.$removeEmpty)c.push("html.CSS1Compat "+e+"[contenteditable\x3dfalse]");a.push(c.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")); -a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(c){function f(d){d&&d.removeListener();a.editable(new e(a,b.$.contentWindow.document.body));a.setData(a.getData(1),c)}var k="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+ -")();":"")+"document.close();",k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(k)+"}())":"",b=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+k+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');b.setStyles({width:"100%",height:"100%"});b.addClass("cke_wysiwyg_frame").addClass("cke_reset");k=a.ui.space("contents");k.append(b);var d=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(d)b.on("load",f);var g=a.title, -p=a.fire("ariaEditorHelpLabel",{}).label;g&&(CKEDITOR.env.ie&&p&&(g+=", "+p),b.setAttribute("title",g));if(p){var g=CKEDITOR.tools.getNextId(),r=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+p+"\x3c/span\x3e");k.append(r,1);b.setAttribute("aria-describedby",g)}a.on("beforeModeUnload",function(a){a.removeListener();r&&r.remove()});b.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!d&&f();a.fire("ariaWidget",b)})}});CKEDITOR.editor.prototype.addContentsCss= -function(a){var c=this.config,e=c.contentsCss;CKEDITOR.tools.isArray(e)||(c.contentsCss=e?[e]:[]);c.contentsCss.push(a)};var e=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(c){CKEDITOR.tools.setTimeout(a,0,this,c)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,e){var f=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),f.fire("dataReady"); -else{this._.isLoadingData=!0;f._.dataStore={id:1};var k=f.config,b=k.fullPage,d=k.docType,g=CKEDITOR.tools.buildStyleHtml(c()).replace(/
    -
    - - + + + - <% _.each( data.not_called_listeners, function( item ){ %> + <% _.each( data.not_called_listeners, function( events, event_name ){ %> + <% _.each( events, function( priority, priority_value ){ %> + <% _.each( priority, function( listener ){ %> - - <% if(item.type == 'Method') { %> - - <% } else { %> - - <% } %> + + + <% }); %> + <% }); %> + <% }); %>
    {{ 'Non called listeners'|t }}{{ 'Class'|t }}{{ 'Not called listeners'|t }}{{ 'Service'|t }}{{ 'Priority'|t }}
    <%= item.event %> - <%= Drupal.webprofiler.helpers.classLink(item) %> - {{ 'Closure'|t }}<%= event_name %><%= listener.service[0] %>::<%= listener.service[1] %><%= priority_value %>
    + {% endblock %} diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/FunctionalJavascript/ToolbarTest.php b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/FunctionalJavascript/ToolbarTest.php new file mode 100644 index 000000000..84c7d820f --- /dev/null +++ b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/FunctionalJavascript/ToolbarTest.php @@ -0,0 +1,79 @@ +getEditable('system.site')->set('page.front', '/node')->save(TRUE); + } + + /** + * Tests if the toolbar appears on front page. + */ + public function testToolbarOnFrontPage() { + $this->loginForToolbar(); + + $this->drupalGet(''); + + $this->waitForToolbar(); + + $assert = $this->assertSession(); + $assert->pageTextContains(\Drupal::VERSION); + $assert->pageTextContains('Configure Webprofiler'); + $assert->pageTextContains('View latest reports'); + $assert->pageTextContains('Drupal Documentation'); + $assert->pageTextContains('Get involved!'); + } + + /** + * Tests the toolbar report page. + */ + public function testToolbarReportPage() { + $this->loginForDashboard(); + + $this->drupalGet(''); + + $token = $this->waitForToolbar(); + + $this->drupalGet('admin/reports/profiler/list'); + + $assert = $this->assertSession(); + $assert->pageTextContains($token); + } + + /** + * Tests the toolbar not appears on excluded path. + */ + public function testToolbarNotAppearsOnExcludedPath() { + $this->loginForDashboard(); + + $this->drupalGet('admin/config/development/devel'); + $token = $this->waitForToolbar(); + $assert = $this->assertSession(); + $assert->pageTextContains($token); + $assert->pageTextContains('Configure Webprofiler'); + + $this->config('webprofiler.config') + ->set('exclude', '/admin/config/development/devel') + ->save(); + $this->drupalGet('admin/config/development/devel'); + $this->assertSession()->pageTextNotContains('sf-toolbar'); + } + +} diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/FunctionalJavascript/WebprofilerTestBase.php b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/FunctionalJavascript/WebprofilerTestBase.php new file mode 100644 index 000000000..b38a1f21e --- /dev/null +++ b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/FunctionalJavascript/WebprofilerTestBase.php @@ -0,0 +1,80 @@ +getSession(); + $token = $this->getToken(); + $page = $session->getPage(); + + $toolbar = $page->findById('webprofiler' . $token); + $this->assertTrue($toolbar->hasClass('sf-toolbar'), 'Toolbar loader is present in page'); + + $session->wait(1000, 'null !== document.getElementById(\'sfToolbarMainContent-' . $token . '\')'); + + return $token; + } + + /** + * Return the Webprofiler token. + * + * @return null|string + * The page token + */ + protected function getToken() { + $token = $this->getSession()->getResponseHeader('X-Debug-Token'); + + if (NULL === $token) { + throw new PHPUnit_Framework_AssertionFailedError(); + } + + return $token; + } + + /** + * Login with a user that can see the toolbar. + */ + protected function loginForToolbar() { + $admin_user = $this->drupalCreateUser( + [ + 'view webprofiler toolbar', + ] + ); + $this->drupalLogin($admin_user); + } + + /** + * Login with a user that can see the toolbar and the dashboard. + */ + protected function loginForDashboard() { + $admin_user = $this->drupalCreateUser( + [ + 'view webprofiler toolbar', + 'access webprofiler', + ] + ); + $this->drupalLogin($admin_user); + } + + /** + * Flush cache. + */ + protected function flushCache() { + $module_handler = \Drupal::moduleHandler(); + $module_handler->invokeAll('cache_flush'); + } + +} diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Kernel/DecoratorTest.php b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Kernel/DecoratorTest.php new file mode 100644 index 000000000..a557c08f4 --- /dev/null +++ b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Kernel/DecoratorTest.php @@ -0,0 +1,65 @@ +container->get($service); + + $this->assertInstanceOf($original, $entityTypeManagerOriginal); + + $this->container->get('module_installer')->install(['webprofiler']); + + $entityTypeManagerDecorated = $this->container->get($service); + + $this->assertInstanceOf($decorated, $entityTypeManagerDecorated); + } + + /** + * DataProvider for testEntityTypeDecorator. + * + * @return array + * The array of values to run tests on. + */ + public function decorators() { + return array( + array('entity_type.manager', 'Drupal\Core\Entity\EntityTypeManager', 'Drupal\webprofiler\Entity\EntityManagerWrapper'), + array('cache_factory', 'Drupal\Core\Cache\MemoryBackendFactory', 'Drupal\webprofiler\Cache\CacheFactoryWrapper'), + array('asset.css.collection_renderer', 'Drupal\Core\Asset\CssCollectionRenderer', 'Drupal\webprofiler\Asset\CssCollectionRendererWrapper'), + array('asset.js.collection_renderer', 'Drupal\Core\Asset\JsCollectionRenderer', 'Drupal\webprofiler\Asset\JsCollectionRendererWrapper'), + array('state', 'Drupal\Core\State\State', 'Drupal\webprofiler\State\StateWrapper'), + array('views.executable', 'Drupal\views\ViewExecutableFactory', 'Drupal\webprofiler\Views\ViewExecutableFactoryWrapper'), + array('form_builder', 'Drupal\Core\Form\FormBuilder', 'Drupal\webprofiler\Form\FormBuilderWrapper'), + array('access_manager', 'Drupal\Core\Access\AccessManager', 'Drupal\webprofiler\Access\AccessManagerWrapper'), + array('theme.negotiator', 'Drupal\Core\Theme\ThemeNegotiator', 'Drupal\webprofiler\Theme\ThemeNegotiatorWrapper'), + array('config.factory', 'Drupal\Core\Config\ConfigFactory', 'Drupal\webprofiler\Config\ConfigFactoryWrapper'), + array('string_translation', 'Drupal\Core\StringTranslation\TranslationManager', 'Drupal\webprofiler\StringTranslation\TranslationManagerWrapper'), + ); + } + +} diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/AssetsDataCollectorTest.php b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/AssetsDataCollectorTest.php new file mode 100644 index 000000000..37d6ac3ee --- /dev/null +++ b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/AssetsDataCollectorTest.php @@ -0,0 +1,68 @@ +assetDataCollector = new AssetsDataCollector(AssetsDataCollectorTest::ROOT); + $this->assetCollectionRendererInterface = $this->getMock('Drupal\Core\Asset\AssetCollectionRendererInterface'); + } + + /** + * Tests the Assets data collector. + */ + public function testCSS() { + $css = [ + 'core/assets/vendor/normalize-css/normalize.css' => [ + 'weight' => -219.944, + 'group' => 0, + 'type' => 'file', + 'data' => 'core\/assets\/vendor\/normalize-css\/normalize.css', + 'version' => '3.0.3', + 'media' => 'all', + 'preprocess' => TRUE, + 'browsers' => [ + 'IE' => TRUE, + '!IE' => TRUE, + ], + ], + ]; + + $cssCollectionRendererWrapper = new CssCollectionRendererWrapper($this->assetCollectionRendererInterface, $this->assetDataCollector); + $cssCollectionRendererWrapper->render($css); + + $this->assertEquals(1, $this->assetDataCollector->getCssCount()); + + $this->assetDataCollector->collect($this->request, $this->response, $this->exception); + + $data = $this->assetDataCollector->getData(); + $this->assertEquals(AssetsDataCollectorTest::ROOT . '/', $data['assets']['installation_path']); + } + +} diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/Cache/CacheDataCollectorTest.php b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/CacheDataCollectorTest.php similarity index 91% rename from sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/Cache/CacheDataCollectorTest.php rename to sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/CacheDataCollectorTest.php index f4673eea7..d51e604dd 100644 --- a/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/Cache/CacheDataCollectorTest.php +++ b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/CacheDataCollectorTest.php @@ -1,16 +1,16 @@ cid = 'cache_id'; $cache->expire = 1; $cache->tags = ['tag1', 'tag2']; diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/DataCollectorBaseTest.php b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/DataCollectorBaseTest.php new file mode 100644 index 000000000..8d62e7809 --- /dev/null +++ b/sites/all/modules/contrib/dev/devel/webprofiler/tests/src/Unit/DataCollector/DataCollectorBaseTest.php @@ -0,0 +1,40 @@ +request = $this->getMock('Symfony\Component\HttpFoundation\Request'); + $this->response = $this->getMock('Symfony\Component\HttpFoundation\Response'); + $this->exception = $this->getMock('Exception'); + } + +} diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.info.yml b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.info.yml index 39b35b0e4..46d3635d5 100644 --- a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.info.yml +++ b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.info.yml @@ -9,8 +9,8 @@ tags: dependencies: - devel -# Information added by Drupal.org packaging script on 2016-09-03 -version: '8.x-1.0-alpha1+23-dev' +# Information added by Drupal.org packaging script on 2017-08-14 +version: '8.x-1.0' core: '8.x' project: 'devel' -datestamp: 1472897643 +datestamp: 1502732047 diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.install b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.install index 48c6e956f..e9828ed92 100644 --- a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.install +++ b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.install @@ -97,10 +97,9 @@ function webprofiler_requirements($phase) { if (!$has_d3) { $requirements['d3js']['severity'] = REQUIREMENT_WARNING; - $d3_url = Url::fromUri('https://github.com/mbostock/d3', ['attributes' => ['target' => '_blank']]); $requirements['d3js']['description'] = [ '#prefix' => ' ', - '#markup' => t('Webprofiler module requires D3.js library to properly render data. Download D3.js into /libraries/d3/d3.min.js.', [':d3_link' => $d3_url->toUriString()]) + '#markup' => t('Webprofiler module requires D3.js library to properly render data. Composer based install recommended, see README.md file for instructions.'), ]; } @@ -112,10 +111,9 @@ function webprofiler_requirements($phase) { if (!$has_highlight) { $requirements['highlightjs']['severity'] = REQUIREMENT_WARNING; - $highlight_url = Url::fromUri('http://highlightjs.org', ['attributes' => ['target' => '_blank']]); $requirements['highlightjs']['description'] = [ '#prefix' => ' ', - '#markup' => t('Webprofiler module requires highlight.js library to syntax highlight collected queries. Download highlight.js assets into /libraries/highlight.', [':highlight_link' => $highlight_url->toUriString()]) + '#markup' => t('Webprofiler module requires highlight.js library to syntax highlight collected queries. Composer based install recommended, see README.md file for instructions.'), ]; } } diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.libraries.yml b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.libraries.yml index 484cf8895..f99c62818 100644 --- a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.libraries.yml +++ b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.libraries.yml @@ -1,24 +1,24 @@ d3: - remote: https://github.com/mbostock/d3 - version: 3.4.4 + remote: https://github.com/d3/d3 + version: 3.5.17 license: name: BSD-3 - url: https://github.com/mbostock/d3/blob/master/LICENSE + url: https://github.com/d3/d3/blob/master/LICENSE gpl-compatible: true js: - libraries/d3/d3.min.js: {} -highlight: + /libraries/d3/d3.min.js: {} +highlightjs: remote: https://github.com/isagalaev/highlight.js - version: 8.0 + version: 9.7.0 license: name: BSD-3 url: https://github.com/isagalaev/highlight.js/blob/master/LICENSE gpl-compatible: true js: - libraries/highlightjs/highlight.pack.js: {} + /libraries/highlightjs/highlight.pack.js: {} css: component: - libraries/highlightjs/styles/idea.css: {} + /libraries/highlightjs/styles/idea.css: {} dashboard: version: 2.0 js: @@ -48,7 +48,7 @@ database: - core/jquery - core/drupal - core/drupalSettings - - webprofiler/highlight + - webprofiler/highlightjs timeline: version: 2.0 js: diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.make.yml b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.make.yml index decfe2c19..1f5d0682b 100644 --- a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.make.yml +++ b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.make.yml @@ -2,11 +2,11 @@ core: "8.x" api: 2 libraries: - highlight: + highlightjs: download: type: "git" - url: "git@github.com:mbostock/d3.git" + url: "https://github.com/isagalaev/highlight.js.git" d3: download: type: "git" - url: "git@github.com:mbostock/d3.git" + url: "https://github.com/d3/d3.git" diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.routing.yml b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.routing.yml index 200bc3973..11543ecb9 100644 --- a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.routing.yml +++ b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.routing.yml @@ -22,7 +22,7 @@ webprofiler.frontend.save: type: 'webprofiler:token' methods: [POST] requirements: - _permission: 'access webprofiler' + _permission: 'view webprofiler toolbar' # view profile webprofiler.dashboard: diff --git a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.services.yml b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.services.yml index 19b7e31f8..6332fef92 100644 --- a/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.services.yml +++ b/sites/all/modules/contrib/dev/devel/webprofiler/webprofiler.services.yml @@ -47,7 +47,7 @@ services: # event subscribers webprofiler.profiler_listener: class: Symfony\Component\HttpKernel\EventListener\ProfilerListener - arguments: ['@profiler', '@?webprofiler.matcher', '%webprofiler.only_exceptions%', '%webprofiler.only_master_requests%', '@request_stack'] + arguments: ['@profiler', '@request_stack', '@?webprofiler.matcher', '%webprofiler.only_exceptions%', '%webprofiler.only_master_requests%'] tags: - { name: event_subscriber } @@ -187,13 +187,9 @@ services: stopwatch: class: Drupal\webprofiler\Stopwatch - webprofiler.debug.event_dispatcher.default: - class: Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher - arguments: ['@service_container'] - webprofiler.debug.plugin.manager.mail.default: class: Drupal\Core\Mail\MailManager - arguments: ['@container.namespaces', '@cache.discovery', '@module_handler', '@config.factory', '@logger.factory', '@string_translation'] + arguments: ['@container.namespaces', '@cache.discovery', '@module_handler', '@config.factory', '@logger.factory', '@string_translation', '@renderer'] webprofiler.debug.controller_resolver: class: Symfony\Component\HttpKernel\Controller\TraceableControllerResolver @@ -253,7 +249,6 @@ services: # parameter converter service for profile token webprofiler.token_converter: class: Drupal\webprofiler\Routing\TokenConverter - arguments: ['@profiler'] tags: - { name: paramconverter } diff --git a/sites/all/modules/contrib/dev/entity/entity.info.yml b/sites/all/modules/contrib/dev/entity/entity.info.yml index 5f3bdd3e8..f11c0fbd4 100644 --- a/sites/all/modules/contrib/dev/entity/entity.info.yml +++ b/sites/all/modules/contrib/dev/entity/entity.info.yml @@ -5,8 +5,8 @@ type: module dependencies: - system (>=8.1.0) -# Information added by Drupal.org packaging script on 2016-06-23 -version: '8.x-1.0-alpha3+2-dev' +# Information added by Drupal.org packaging script on 2016-12-08 +version: '8.x-1.0-alpha4' core: '8.x' project: 'entity' -datestamp: 1466693538 +datestamp: 1481194986 diff --git a/sites/all/modules/contrib/dev/entity/entity.permissions.yml b/sites/all/modules/contrib/dev/entity/entity.permissions.yml new file mode 100644 index 000000000..1676e880b --- /dev/null +++ b/sites/all/modules/contrib/dev/entity/entity.permissions.yml @@ -0,0 +1,2 @@ +permission_callbacks: + - \Drupal\entity\EntityPermissions::buildPermissions diff --git a/sites/all/modules/contrib/dev/entity/src/EntityAccessControlHandler.php b/sites/all/modules/contrib/dev/entity/src/EntityAccessControlHandler.php new file mode 100644 index 000000000..54d8525ad --- /dev/null +++ b/sites/all/modules/contrib/dev/entity/src/EntityAccessControlHandler.php @@ -0,0 +1,114 @@ +prepareUser($account); + /** @var \Drupal\Core\Access\AccessResult $result */ + $result = parent::checkAccess($entity, $operation, $account); + + if ($result->isNeutral()) { + if ($entity instanceof EntityOwnerInterface) { + $result = $this->checkEntityOwnerPermissions($entity, $operation, $account); + } + else { + $result = $this->checkEntityPermissions($entity, $operation, $account); + } + } + + // Ensure that access is evaluated again when the entity changes. + return $result->addCacheableDependency($entity); + } + + /** + * Checks the entity operation and bundle permissions. + * + * @param \Drupal\Core\Entity\EntityInterface $entity + * The entity for which to check access. + * @param string $operation + * The entity operation. Usually one of 'view', 'view label', 'update' or + * 'delete'. + * @param \Drupal\Core\Session\AccountInterface $account + * The user for which to check access. + * + * @return \Drupal\Core\Access\AccessResultInterface + * The access result. + */ + protected function checkEntityPermissions(EntityInterface $entity, $operation, AccountInterface $account) { + return AccessResult::allowedIfHasPermissions($account, [ + "$operation {$entity->getEntityTypeId()}", + "$operation {$entity->bundle()} {$entity->getEntityTypeId()}", + ], 'OR'); + } + + /** + * Checks the entity operation and bundle permissions, with owners. + * + * @param \Drupal\Core\Entity\EntityInterface $entity + * The entity for which to check access. + * @param string $operation + * The entity operation. Usually one of 'view', 'view label', 'update' or + * 'delete'. + * @param \Drupal\Core\Session\AccountInterface $account + * The user for which to check access. + * + * @return \Drupal\Core\Access\AccessResultInterface + * The access result. + */ + protected function checkEntityOwnerPermissions(EntityInterface $entity, $operation, AccountInterface $account) { + /** @var \Drupal\Core\Entity\EntityInterface|\Drupal\user\EntityOwnerInterface $entity */ + if (($account->id() == $entity->getOwnerId())) { + $result = AccessResult::allowedIfHasPermissions($account, [ + "$operation own {$entity->getEntityTypeId()}", + "$operation any {$entity->getEntityTypeId()}", + "$operation own {$entity->bundle()} {$entity->getEntityTypeId()}", + "$operation any {$entity->bundle()} {$entity->getEntityTypeId()}", + ], 'OR'); + } + else { + $result = AccessResult::allowedIfHasPermissions($account, [ + "$operation any {$entity->getEntityTypeId()}", + "$operation any {$entity->bundle()} {$entity->getEntityTypeId()}", + ], 'OR'); + } + + return $result->cachePerUser(); + } + + /** + * {@inheritdoc} + */ + protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) { + $result = parent::checkCreateAccess($account, $context, $entity_bundle); + if ($result->isNeutral()) { + $permissions = [ + 'administer ' . $this->entityTypeId, + 'create ' . $this->entityTypeId, + ]; + if ($entity_bundle) { + $permissions[] = 'create ' . $entity_bundle . ' ' . $this->entityTypeId; + } + + $result = AccessResult::allowedIfHasPermissions($account, $permissions, 'OR'); + } + + return $result; + } + +} diff --git a/sites/all/modules/contrib/dev/entity/src/EntityPermissionProvider.php b/sites/all/modules/contrib/dev/entity/src/EntityPermissionProvider.php new file mode 100644 index 000000000..13925a0a2 --- /dev/null +++ b/sites/all/modules/contrib/dev/entity/src/EntityPermissionProvider.php @@ -0,0 +1,246 @@ +entityTypeBundleInfo = $entity_type_bundle_info; + } + + /** + * {@inheritdoc} + */ + public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { + return new static( + $container->get('entity_type.bundle.info') + ); + } + + /** + * {@inheritdoc} + */ + public function buildPermissions(EntityTypeInterface $entity_type) { + $entity_type_id = $entity_type->id(); + $has_owner = $entity_type->isSubclassOf(EntityOwnerInterface::class); + $singular_label = $entity_type->getSingularLabel(); + $plural_label = $entity_type->getPluralLabel(); + + $permissions = []; + $permissions["administer {$entity_type_id}"] = [ + 'title' => $this->t('Administer @type', ['@type' => $plural_label]), + 'restrict access' => TRUE, + ]; + $permissions["access {$entity_type_id} overview"] = [ + 'title' => $this->t('Access the @type overview page', ['@type' => $plural_label]), + ]; + // View permissions are the same for both granularities. + if ($has_owner) { + $permissions["view any {$entity_type_id}"] = [ + 'title' => $this->t('View any @type', [ + '@type' => $singular_label, + ]), + ]; + $permissions["view own {$entity_type_id}"] = [ + 'title' => $this->t('View own @type', [ + '@type' => $plural_label, + ]), + ]; + } + else { + $permissions["view {$entity_type_id}"] = [ + 'title' => $this->t('View @type', [ + '@type' => $plural_label, + ]), + ]; + } + // Generate the other permissions based on granularity. + if ($entity_type->getPermissionGranularity() == 'entity_type') { + $permissions += $this->buildEntityTypePermissions($entity_type); + } + else { + $permissions += $this->buildBundlePermissions($entity_type); + } + + foreach ($permissions as $name => $permission) { + // Permissions are grouped by provider on admin/people/permissions. + $permissions[$name]['provider'] = $entity_type->getProvider(); + // TranslatableMarkup objects don't sort properly. + $permissions[$name]['title'] = (string) $permission['title']; + } + + return $permissions; + } + + /** + * Builds permissions for the entity_type granularity. + * + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type + * The entity type. + * + * @return array + * The permissions. + */ + protected function buildEntityTypePermissions(EntityTypeInterface $entity_type) { + $entity_type_id = $entity_type->id(); + $has_owner = $entity_type->isSubclassOf(EntityOwnerInterface::class); + $singular_label = $entity_type->getSingularLabel(); + $plural_label = $entity_type->getPluralLabel(); + + $permissions = []; + $permissions["create {$entity_type_id}"] = [ + 'title' => $this->t('Create @type', [ + '@type' => $plural_label, + ]), + ]; + if ($has_owner) { + $permissions["update any {$entity_type_id}"] = [ + 'title' => $this->t('Update any @type', [ + '@type' => $singular_label, + ]), + ]; + $permissions["update own {$entity_type_id}"] = [ + 'title' => $this->t('Update own @type', [ + '@type' => $plural_label, + ]), + ]; + $permissions["delete any {$entity_type_id}"] = [ + 'title' => $this->t('Delete any @type', [ + '@type' => $singular_label, + ]), + ]; + $permissions["delete own {$entity_type_id}"] = [ + 'title' => $this->t('Delete own @type', [ + '@type' => $plural_label, + ]), + ]; + } + else { + $permissions["update {$entity_type_id}"] = [ + 'title' => $this->t('Update @type', [ + '@type' => $plural_label, + ]), + ]; + $permissions["delete {$entity_type_id}"] = [ + 'title' => $this->t('Delete @type', [ + '@type' => $plural_label, + ]), + ]; + } + + return $permissions; + } + + /** + * Builds permissions for the bundle granularity. + * + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type + * The entity type. + * + * @return array + * The permissions. + */ + protected function buildBundlePermissions(EntityTypeInterface $entity_type) { + $entity_type_id = $entity_type->id(); + $bundles = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id); + $has_owner = $entity_type->isSubclassOf(EntityOwnerInterface::class); + $singular_label = $entity_type->getSingularLabel(); + $plural_label = $entity_type->getPluralLabel(); + + $permissions = []; + foreach ($bundles as $bundle_name => $bundle_info) { + $permissions["create {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: Create @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $plural_label, + ]), + ]; + + if ($has_owner) { + $permissions["update any {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: Update any @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $singular_label, + ]), + ]; + $permissions["update own {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: Update own @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $plural_label, + ]), + ]; + $permissions["delete any {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: Delete any @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $singular_label, + ]), + ]; + $permissions["delete own {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: Delete own @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $plural_label, + ]), + ]; + } + else { + $permissions["update {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: Update @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $plural_label, + ]), + ]; + $permissions["delete {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: Delete @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $plural_label, + ]), + ]; + } + } + + return $permissions; + } + +} diff --git a/sites/all/modules/contrib/dev/entity/src/EntityPermissionProviderInterface.php b/sites/all/modules/contrib/dev/entity/src/EntityPermissionProviderInterface.php new file mode 100644 index 000000000..50f3ccaa9 --- /dev/null +++ b/sites/all/modules/contrib/dev/entity/src/EntityPermissionProviderInterface.php @@ -0,0 +1,23 @@ +entityTypeManager = $entity_type_manager; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container) { + return new static( + $container->get('entity_type.manager') + ); + } + + /** + * Builds a list of permissions for the participating entity types. + * + * @return array + * The permissions. + */ + public function buildPermissions() { + $permissions = []; + /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ + foreach ($this->entityTypeManager->getDefinitions() as $entity_type) { + if ($entity_type->hasHandlerClass('permission_provider')) { + $permission_provider_class = $entity_type->getHandlerClass('permission_provider'); + $permission_provider = $this->entityTypeManager->createHandlerInstance($permission_provider_class, $entity_type); + $permissions += $permission_provider->buildPermissions($entity_type); + } + } + + return $permissions; + } + +} diff --git a/sites/all/modules/contrib/dev/entity/src/Form/RevisionableContentEntityForm.php b/sites/all/modules/contrib/dev/entity/src/Form/RevisionableContentEntityForm.php index 00c67c93b..d4a1b35b3 100644 --- a/sites/all/modules/contrib/dev/entity/src/Form/RevisionableContentEntityForm.php +++ b/sites/all/modules/contrib/dev/entity/src/Form/RevisionableContentEntityForm.php @@ -124,7 +124,7 @@ class RevisionableContentEntityForm extends ContentEntityForm { $insert = $this->entity->isNew(); $this->entity->save(); $context = ['@type' => $this->entity->bundle(), '%info' => $this->entity->label()]; - $logger = $this->logger($this->entity->id()); + $logger = $this->logger('content'); $bundle_entity = $this->getBundleEntity(); $t_args = ['@type' => $bundle_entity ? $bundle_entity->label() : 'None', '%info' => $this->entity->label()]; diff --git a/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.info.yml b/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.info.yml index d25bd5ff4..61c1a3b98 100644 --- a/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.info.yml +++ b/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.info.yml @@ -2,8 +2,8 @@ name: Entity test type: module # core: 8.x -# Information added by Drupal.org packaging script on 2016-06-23 -version: '8.x-1.0-alpha3+2-dev' +# Information added by Drupal.org packaging script on 2016-12-08 +version: '8.x-1.0-alpha4' core: '8.x' project: 'entity' -datestamp: 1466693538 +datestamp: 1481194986 diff --git a/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.permissions.yml b/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.permissions.yml index b9ff91d5b..8aa844ed4 100644 --- a/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.permissions.yml +++ b/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/entity_module_test.permissions.yml @@ -1,7 +1,3 @@ -'administer entity_test_enhanced': - title: 'Administer entity_test_enhanced' - 'restrict access': TRUE - 'view all entity_test_enhanced revisions': title: 'View all entity_test_enhanced revisions' 'restrict access': TRUE diff --git a/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/src/Entity/EnhancedEntity.php b/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/src/Entity/EnhancedEntity.php index c2cd80882..40ef788cb 100644 --- a/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/src/Entity/EnhancedEntity.php +++ b/sites/all/modules/contrib/dev/entity/tests/modules/entity_module_test/src/Entity/EnhancedEntity.php @@ -14,6 +14,8 @@ use Drupal\entity\Revision\RevisionableContentEntityBase; * label = @Translation("Entity test with enhancements"), * handlers = { * "storage" = "\Drupal\Core\Entity\Sql\SqlContentEntityStorage", + * "access" = "\Drupal\entity\EntityAccessControlHandler", + * "permission_provider" = "\Drupal\entity\EntityPermissionProvider", * "form" = { * "add" = "\Drupal\entity\Form\RevisionableContentEntityForm", * "edit" = "\Drupal\entity\Form\RevisionableContentEntityForm", @@ -33,6 +35,7 @@ use Drupal\entity\Revision\RevisionableContentEntityBase; * translatable = TRUE, * revisionable = TRUE, * admin_permission = "administer entity_test_enhanced", + * permission_granularity = "bundle", * entity_keys = { * "id" = "id", * "bundle" = "type", diff --git a/sites/all/modules/contrib/dev/entity/tests/src/Unit/EntityAccessControlHandlerTest.php b/sites/all/modules/contrib/dev/entity/tests/src/Unit/EntityAccessControlHandlerTest.php new file mode 100644 index 000000000..7fb5306f3 --- /dev/null +++ b/sites/all/modules/contrib/dev/entity/tests/src/Unit/EntityAccessControlHandlerTest.php @@ -0,0 +1,205 @@ +prophesize(ModuleHandlerInterface::class); + $module_handler->invokeAll(Argument::any(), Argument::any())->willReturn([]); + $cache_contexts_manager = $this->prophesize(CacheContextsManager::class); + $cache_contexts_manager->assertValidTokens(Argument::any())->willReturn(TRUE); + + $container = new ContainerBuilder(); + $container->set('module_handler', $module_handler->reveal()); + $container->set('cache_contexts_manager', $cache_contexts_manager->reveal()); + \Drupal::setContainer($container); + } + + /** + * @covers ::checkAccess + * @covers ::checkEntityPermissions + * @covers ::checkEntityOwnerPermissions + * @covers ::checkCreateAccess + * + * @dataProvider accessProvider + */ + public function testAccess(EntityInterface $entity, $operation, $account, $allowed) { + $handler = new EntityAccessControlHandler($entity->getEntityType()); + $handler->setStringTranslation($this->getStringTranslationStub()); + $result = $handler->access($entity, $operation, $account); + $this->assertEquals($allowed, $result); + } + + /** + * @covers ::checkCreateAccess + * + * @dataProvider createAccessProvider + */ + public function testCreateAccess(EntityTypeInterface $entity_type, $bundle, $account, $allowed) { + $handler = new EntityAccessControlHandler($entity_type); + $handler->setStringTranslation($this->getStringTranslationStub()); + $result = $handler->createAccess($bundle, $account); + $this->assertEquals($allowed, $result); + } + + /** + * Data provider for testAccess(). + * + * @return array + * A list of testAccess method arguments. + */ + public function accessProvider() { + $data = []; + + $entity_type = $this->prophesize(ContentEntityTypeInterface::class); + $entity_type->id()->willReturn('green_entity'); + $entity_type->getAdminPermission()->willReturn('administer green_entity'); + + // User with the admin permission can do anything. + $entity = $this->buildMockEntity($entity_type->reveal()); + $account = $this->prophesize(AccountInterface::class); + $account->id()->willReturn(6); + $account->hasPermission('administer green_entity')->willReturn(TRUE); + $data[] = [$entity->reveal(), 'view', $account->reveal(), TRUE]; + $data[] = [$entity->reveal(), 'update', $account->reveal(), TRUE]; + $data[] = [$entity->reveal(), 'delete', $account->reveal(), TRUE]; + + // Entity with no owner. + $entity = $this->buildMockEntity($entity_type->reveal()); + // User who has access. + $first_account = $this->prophesize(AccountInterface::class); + $first_account->id()->willReturn(6); + $first_account->hasPermission('view green_entity')->willReturn(TRUE); + $first_account->hasPermission(Argument::any())->willReturn(FALSE); + // User who doesn't have access. + $second_account = $this->prophesize(AccountInterface::class); + $second_account->id()->willReturn(7); + $second_account->hasPermission('view green_entity')->willReturn(FALSE); + $second_account->hasPermission(Argument::any())->willReturn(FALSE); + $data[] = [$entity->reveal(), 'view', $first_account->reveal(), TRUE]; + $data[] = [$entity->reveal(), 'view', $second_account->reveal(), FALSE]; + + // Entity with owner. + $entity = $this->buildMockEntity($entity_type->reveal(), 6); + // Owner. + $first_account = $this->prophesize(AccountInterface::class); + $first_account->id()->willReturn(6); + $first_account->hasPermission('update own green_entity')->willReturn(TRUE); + $first_account->hasPermission(Argument::any())->willReturn(FALSE); + // Non-owner. + $second_account = $this->prophesize(AccountInterface::class); + $second_account->id()->willReturn(7); + $second_account->hasPermission('update own green_entity')->willReturn(TRUE); + $second_account->hasPermission(Argument::any())->willReturn(FALSE); + // User who can update any. + $third_account = $this->prophesize(AccountInterface::class); + $third_account->id()->willReturn(8); + $third_account->hasPermission('update any green_entity')->willReturn(TRUE); + $third_account->hasPermission(Argument::any())->willReturn(FALSE); + $data[] = [$entity->reveal(), 'update', $first_account->reveal(), TRUE]; + $data[] = [$entity->reveal(), 'update', $second_account->reveal(), FALSE]; + $data[] = [$entity->reveal(), 'update', $third_account->reveal(), TRUE]; + + return $data; + } + + /** + * Data provider for testCreateAccess(). + * + * @return array + * A list of testCreateAccess method arguments. + */ + public function createAccessProvider() { + $data = []; + + $entity_type = $this->prophesize(ContentEntityTypeInterface::class); + $entity_type->id()->willReturn('green_entity'); + $entity_type->getAdminPermission()->willReturn('administer green_entity'); + + // User with the admin permission. + $account = $this->prophesize(AccountInterface::class); + $account->id()->willReturn(6); + $account->hasPermission('administer green_entity')->willReturn(TRUE); + $data[] = [$entity_type->reveal(), NULL, $account->reveal(), TRUE]; + + // Ordinary user. + $account = $this->prophesize(AccountInterface::class); + $account->id()->willReturn(6); + $account->hasPermission('create green_entity')->willReturn(TRUE); + $account->hasPermission(Argument::any())->willReturn(FALSE); + $data[] = [$entity_type->reveal(), NULL, $account->reveal(), TRUE]; + + // Ordinary user, entity with a bundle. + $account = $this->prophesize(AccountInterface::class); + $account->id()->willReturn(6); + $account->hasPermission('create first_bundle green_entity')->willReturn(TRUE); + $account->hasPermission(Argument::any())->willReturn(FALSE); + $data[] = [$entity_type->reveal(), 'first_bundle', $account->reveal(), TRUE]; + + // User with no permissions. + $account = $this->prophesize(AccountInterface::class); + $account->id()->willReturn(6); + $account->hasPermission(Argument::any())->willReturn(FALSE); + $data[] = [$entity_type->reveal(), NULL, $account->reveal(), FALSE]; + + return $data; + } + + /** + * Builds a mock entity. + * + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type + * The entity type. + * @param string $owner_id + * The owner ID. + * + * @return \Prophecy\Prophecy\ObjectProphecy + * The entity mock. + */ + protected function buildMockEntity(EntityTypeInterface $entity_type, $owner_id = NULL) { + $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED; + $entity = $this->prophesize(ContentEntityInterface::class); + if ($owner_id) { + $entity->willImplement(EntityOwnerInterface::class); + $entity->getOwnerId()->willReturn($owner_id); + } + $entity->bundle()->willReturn($entity_type->id()); + $entity->isNew()->willReturn(FALSE); + $entity->uuid()->willReturn('fake uuid'); + $entity->language()->willReturn(new Language(['id' => $langcode])); + $entity->getEntityTypeId()->willReturn($entity_type->id()); + $entity->getEntityType()->willReturn($entity_type); + $entity->getCacheContexts()->willReturn([]); + $entity->getCacheTags()->willReturn([]); + $entity->getCacheMaxAge()->willReturn(Cache::PERMANENT); + + return $entity; + } + +} diff --git a/sites/all/modules/contrib/dev/entity/tests/src/Unit/EntityPermissionProviderTest.php b/sites/all/modules/contrib/dev/entity/tests/src/Unit/EntityPermissionProviderTest.php new file mode 100644 index 000000000..d77038013 --- /dev/null +++ b/sites/all/modules/contrib/dev/entity/tests/src/Unit/EntityPermissionProviderTest.php @@ -0,0 +1,150 @@ +prophesize(EntityTypeBundleInfoInterface::class); + $entity_type_bundle_info->getBundleInfo('white_entity')->willReturn([ + 'first' => ['label' => 'First'], + 'second' => ['label' => 'Second'], + ]); + $entity_type_bundle_info->getBundleInfo('black_entity')->willReturn([ + 'third' => ['label' => 'Third'], + ]); + $this->permissionProvider = new EntityPermissionProvider($entity_type_bundle_info->reveal()); + $this->permissionProvider->setStringTranslation($this->getStringTranslationStub()); + } + + /** + * @covers ::buildPermissions + * + * @dataProvider entityTypeProvider + */ + public function testBuildPermissions(EntityTypeInterface $entity_type, array $expected_permissions) { + $permissions = $this->permissionProvider->buildPermissions($entity_type); + $this->assertEquals(array_keys($expected_permissions), array_keys($permissions)); + foreach ($permissions as $name => $permission) { + $this->assertEquals('entity_module_test', $permission['provider']); + $this->assertEquals($expected_permissions[$name], $permission['title']); + } + } + + /** + * Data provider for testBuildPermissions(). + * + * @return array + * A list of testBuildPermissions method arguments. + */ + public function entityTypeProvider() { + $data = []; + // Content entity type. + $entity_type = $this->prophesize(ContentEntityTypeInterface::class); + $entity_type->getProvider()->willReturn('entity_module_test'); + $entity_type->id()->willReturn('green_entity'); + $entity_type->getSingularLabel()->willReturn('green entity'); + $entity_type->getPluralLabel()->willReturn('green entities'); + $entity_type->isSubclassOf(EntityOwnerInterface::class)->willReturn(FALSE); + $entity_type->getPermissionGranularity()->willReturn('entity_type'); + $expected_permissions = [ + 'administer green_entity' => 'Administer green entities', + 'access green_entity overview' => 'Access the green entities overview page', + 'view green_entity' => 'View green entities', + 'create green_entity' => 'Create green entities', + 'update green_entity' => 'Update green entities', + 'delete green_entity' => 'Delete green entities', + ]; + $data[] = [$entity_type->reveal(), $expected_permissions]; + + // Content entity type with owner. + $entity_type = $this->prophesize(ContentEntityTypeInterface::class); + $entity_type->getProvider()->willReturn('entity_module_test'); + $entity_type->id()->willReturn('blue_entity'); + $entity_type->getSingularLabel()->willReturn('blue entity'); + $entity_type->getPluralLabel()->willReturn('blue entities'); + $entity_type->isSubclassOf(EntityOwnerInterface::class)->willReturn(TRUE); + $entity_type->getPermissionGranularity()->willReturn('entity_type'); + $expected_permissions = [ + 'administer blue_entity' => 'Administer blue entities', + 'access blue_entity overview' => 'Access the blue entities overview page', + 'view any blue_entity' => 'View any blue entity', + 'view own blue_entity' => 'View own blue entities', + 'create blue_entity' => 'Create blue entities', + 'update any blue_entity' => 'Update any blue entity', + 'update own blue_entity' => 'Update own blue entities', + 'delete any blue_entity' => 'Delete any blue entity', + 'delete own blue_entity' => 'Delete own blue entities', + ]; + $data[] = [$entity_type->reveal(), $expected_permissions]; + + // Content entity type with bundles. + $entity_type = $this->prophesize(ContentEntityTypeInterface::class); + $entity_type->getProvider()->willReturn('entity_module_test'); + $entity_type->id()->willReturn('white_entity'); + $entity_type->getSingularLabel()->willReturn('white entity'); + $entity_type->getPluralLabel()->willReturn('white entities'); + $entity_type->isSubclassOf(EntityOwnerInterface::class)->willReturn(FALSE); + $entity_type->getPermissionGranularity()->willReturn('bundle'); + $expected_permissions = [ + 'administer white_entity' => 'Administer white entities', + 'access white_entity overview' => 'Access the white entities overview page', + 'view white_entity' => 'View white entities', + 'create first white_entity' => 'First: Create white entities', + 'update first white_entity' => 'First: Update white entities', + 'delete first white_entity' => 'First: Delete white entities', + 'create second white_entity' => 'Second: Create white entities', + 'update second white_entity' => 'Second: Update white entities', + 'delete second white_entity' => 'Second: Delete white entities', + ]; + $data[] = [$entity_type->reveal(), $expected_permissions]; + + // Content entity type with bundles and owner. + $entity_type = $this->prophesize(ContentEntityTypeInterface::class); + $entity_type->getProvider()->willReturn('entity_module_test'); + $entity_type->id()->willReturn('black_entity'); + $entity_type->getSingularLabel()->willReturn('black entity'); + $entity_type->getPluralLabel()->willReturn('black entities'); + $entity_type->isSubclassOf(EntityOwnerInterface::class)->willReturn(TRUE); + $entity_type->getPermissionGranularity()->willReturn('bundle'); + $expected_permissions = [ + 'administer black_entity' => 'Administer black entities', + 'access black_entity overview' => 'Access the black entities overview page', + 'view any black_entity' => 'View any black entity', + 'view own black_entity' => 'View own black entities', + 'create third black_entity' => 'Third: Create black entities', + 'update any third black_entity' => 'Third: Update any black entity', + 'update own third black_entity' => 'Third: Update own black entities', + 'delete any third black_entity' => 'Third: Delete any black entity', + 'delete own third black_entity' => 'Third: Delete own black entities', + ]; + $data[] = [$entity_type->reveal(), $expected_permissions]; + + return $data; + } + +} diff --git a/sites/all/modules/contrib/users/profile/config/schema/profile.schema.yml b/sites/all/modules/contrib/users/profile/config/schema/profile.schema.yml index 000fc746a..05b1ddcc3 100644 --- a/sites/all/modules/contrib/users/profile/config/schema/profile.schema.yml +++ b/sites/all/modules/contrib/users/profile/config/schema/profile.schema.yml @@ -31,6 +31,9 @@ profile.type.*: langcode: type: string label: 'Default language' + use_revisions: + type: boolean + label: 'User revisions' field.field.*.*.*.third_party.profile: type: mapping diff --git a/sites/all/modules/contrib/users/profile/profile.api.php b/sites/all/modules/contrib/users/profile/profile.api.php deleted file mode 100644 index d299016c1..000000000 --- a/sites/all/modules/contrib/users/profile/profile.api.php +++ /dev/null @@ -1,51 +0,0 @@ -getType() == 'secret' && !\Drupal::currentUser()->hasPermission('custom permission')) { - return FALSE; - } - // For profiles other than the default profile grant access. - if ($profile->getType() != 'main' && \Drupal::currentUser()->hasPermission('custom permission')) { - return TRUE; - } - // In other cases do not alter access. - return NULL; -} - -/** - * @} - */ diff --git a/sites/all/modules/contrib/users/profile/profile.info.yml b/sites/all/modules/contrib/users/profile/profile.info.yml index 27e628ab4..e1299050e 100644 --- a/sites/all/modules/contrib/users/profile/profile.info.yml +++ b/sites/all/modules/contrib/users/profile/profile.info.yml @@ -10,8 +10,8 @@ dependencies: - views - system (>=8.1.0) -# Information added by Drupal.org packaging script on 2016-08-31 -version: '8.x-1.0-alpha5+4-dev' +# Information added by Drupal.org packaging script on 2017-06-12 +version: '8.x-1.0-beta1' core: '8.x' project: 'profile' -datestamp: 1472611474 +datestamp: 1497287652 diff --git a/sites/all/modules/contrib/users/profile/profile.install b/sites/all/modules/contrib/users/profile/profile.install new file mode 100644 index 000000000..e4201c440 --- /dev/null +++ b/sites/all/modules/contrib/users/profile/profile.install @@ -0,0 +1,36 @@ +getDefinition('profile'); + + // Allow langcode field to be null. + $schema = \Drupal::database()->schema(); + if ($schema->fieldExists($definition->getBaseTable(), 'langcode')) { + $schema->changeField($definition->getBaseTable(), 'langcode', 'langcode', [ + 'type' => 'varchar', + 'length' => 12, + 'not null' => FALSE, + ]); + + // Set langcode field to null so it can be deleted. + \Drupal::database() + ->update($definition->getBaseTable()) + ->fields(['langcode' => NULL]) + ->execute(); + } + + $entity_definition_update = \Drupal::entityDefinitionUpdateManager(); + if ($storage_definition = $entity_definition_update->getFieldStorageDefinition('langcode', 'profile')) { + $entity_definition_update->uninstallFieldStorageDefinition($storage_definition); + } + + return t('Language code field uninstalled from profile entity.'); +} diff --git a/sites/all/modules/contrib/users/profile/profile.module b/sites/all/modules/contrib/users/profile/profile.module index bc5718924..b37f96715 100644 --- a/sites/all/modules/contrib/users/profile/profile.module +++ b/sites/all/modules/contrib/users/profile/profile.module @@ -5,6 +5,11 @@ * Support for configurable user profiles. */ +use Drupal\Core\Access\AccessResult; +use Drupal\Core\Field\FieldDefinitionInterface; +use Drupal\Core\Field\FieldItemListInterface; +use Drupal\Core\Render\Element; +use Drupal\Core\Session\AccountInterface; use Drupal\user\UserInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Entity\EntityFormDisplay; @@ -16,26 +21,6 @@ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; -/** - * Denotes that the profile is not active. - */ -const PROFILE_NOT_ACTIVE = 0; - -/** - * Denotes that the profile is active. - */ -const PROFILE_ACTIVE = 1; - -/** - * Denotes that the profile is not default. - */ -const PROFILE_NOT_DEFAULT = 0; - -/** - * Denotes that the profile is default. - */ -const PROFILE_DEFAULT = 1; - /** * Implements hook_help(). */ @@ -43,10 +28,10 @@ function profile_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.profile': $output = '

    ' . t('About') . '

    '; - $output .= '

    ' . t('The Profile module provides a fieldable entity, that allows administrators to define different sets of fields for user profiles, which are then displayed in the My Account section. This permits users of a site to share more information about themselves, and can help community-based sites organize users around specific information.', ['!user' => Url::fromRoute('user.page')]) . '

    '; + $output .= '

    ' . t('The Profile module provides a fieldable entity, that allows administrators to define different sets of fields for user profiles, which are then displayed in the My Account section. This permits users of a site to share more information about themselves, and can help community-based sites organize users around specific information.', ['@user' => Url::fromRoute('user.page')->toString()]) . '

    '; $output .= '
    '; $output .= '
    ' . t('Types of profiles') . '
    '; - $output .= '
    ' . t('Profile types provide a way of grouping similar data for user profiles e.g. Personal information, Work etc. A default "Personal information type is provided. You may create more types and manage fields for each type from the Profile types admin page. When creating a new profile type, you will be able to specify whether a user may create multiple profiles or make the profile form available when registering a new user.', ['!profile-types' => Url::fromRoute('entity.profile_type.collection')]) . '
    '; + $output .= '
    ' . t('Profile types provide a way of grouping similar data for user profiles e.g. Personal information, Work etc. A default "Personal information type is provided. You may create more types and manage fields for each type from the Profile types admin page. When creating a new profile type, you will be able to specify whether a user may create multiple profiles or make the profile form available when registering a new user.', ['@profile-types' => Url::fromRoute('entity.profile_type.collection')->toString()]) . '
    '; $output .= '
    ' . t('Creating profiles') . '
    '; $output .= '
    ' . t('A user will see tabs they have access to, when editing their main user account e.g. "Add personal information profile". The visibility of a tab depends on whether they can create multiple profiles or if they haven\'t created a profile of the type that doesn\'t allow multiple instances.') . '
    '; $output .= '
    '; @@ -54,6 +39,29 @@ function profile_help($route_name, RouteMatchInterface $route_match) { } } +/** + * Implements hook_entity_field_access(). + */ +function profile_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) { + if ($operation == 'view' && $items && $field_definition->getTargetEntityTypeId() == 'profile') { + if ($field_definition instanceof FieldConfigInterface) { + $is_private = $field_definition->getThirdPartySetting('profile', 'profile_private', FALSE); + if ($is_private) { + // Users may see their own private profile fields by default, so this + // requires user granularity for caching. + /** @var \Drupal\profile\Entity\ProfileInterface $profile */ + $profile = $items->getEntity(); + if ($account->id() === $profile->getOwnerId()) { + return AccessResult::neutral(); + } + + return AccessResult::forbiddenIf(!$account->hasPermission('administer profile')); + } + } + } + return AccessResult::neutral(); +} + /** * Implements hook_theme(). */ @@ -83,7 +91,7 @@ function template_preprocess_profile(array &$variables) { $variables['url'] = $profile->toUrl(); // Helpful $content variable for templates. $variables['content'] = []; - foreach (\Drupal\Core\Render\Element::children($variables['elements']) as $key) { + foreach (Element::children($variables['elements']) as $key) { $variables['content'][$key] = $variables['elements'][$key]; } } @@ -120,13 +128,16 @@ function profile_user_view(array &$build, UserInterface $account, EntityViewDisp function profile_entity_extra_field_info() { $extra = []; - // Add each profile type as an extra field for display. Enabled by default. + // Add each profile type as an extra field for display. Not enabled by default + // as many sites will not need this and it otherwise also gets added + // automatically to other view modes. + /** @var \Drupal\profile\Entity\ProfileType $bundle */ foreach (ProfileType::loadMultiple() as $bundle) { $extra['user']['user']['display']['profile_' . $bundle->id()] = array( 'label' => $bundle->label(), 'description' => t('Display @type profiles', ['@type' => $bundle->label()]), 'weight' => 10, - 'visible' => TRUE, + 'visible' => FALSE, ); } return $extra; @@ -140,7 +151,7 @@ function profile_user_delete(EntityInterface $entity) { ->getStorage('profile') ->loadByProperties([ 'uid' => $entity->id(), - ]); + ]); foreach ($list as $profile) { $profile->delete(); @@ -209,8 +220,7 @@ function profile_form_user_register_form_alter(&$form, FormStateInterface $form_ if (empty($profile)) { $profile = Profile::create([ 'type' => $profile_type->id(), - 'langcode' => $profile_type->language() ? - $profile_type->language() : \Drupal::languageManager()->getDefaultLanguage()->getId(), + 'langcode' => $profile_type->language() ? $profile_type->language() : \Drupal::languageManager()->getDefaultLanguage()->getId(), ]); // Attach profile entity form. @@ -225,6 +235,22 @@ function profile_form_user_register_form_alter(&$form, FormStateInterface $form_ '#weight' => ++$weight, '#open' => TRUE, ]; + + // @see https://www.drupal.org/node/2871480. + if (\Drupal::moduleHandler()->moduleExists('field_group')) { + $context = [ + 'entity_type' => $profile->getEntityTypeId(), + 'bundle' => $profile->bundle(), + 'entity' => $profile, + 'context' => 'form', + 'display_context' => 'form', + 'mode' => 'default', + ]; + + field_group_attach_groups($form['entity_' . $profile_type->id()], $context); + $form['entity_' . $profile_type->id()]['#pre_render'][] = 'field_group_form_pre_render'; + } + $form_state ->get('form_display_' . $profile_type->id()) ->buildForm($profile, $form['entity_' . $profile_type->id()], $form_state); @@ -248,13 +274,15 @@ function profile_form_user_register_form_validate(array &$form, FormStateInterfa foreach ($profiles as $bundle => $entity) { /** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form_display */ $form_display = $form_state->get('form_display_' . $bundle); - $form_display->extractFormValues($entity, $form['entity_' . $bundle], $form_state); - $form_display->validateFormValues($entity, $form['entity_' . $bundle], $form_state); + if (isset($form['entity_' . $bundle])) { + $form_display->extractFormValues($entity, $form['entity_' . $bundle], $form_state); + $form_display->validateFormValues($entity, $form['entity_' . $bundle], $form_state); + } } } // Entity was validated in entityFormValidate(). This will prevent validation // exception from being thrown. - $form_state->getFormObject()->getEntity()->validate(); + $form_state->getFormObject()->validateForm($form, $form_state); } /** diff --git a/sites/all/modules/contrib/users/profile/profile.permissions.yml b/sites/all/modules/contrib/users/profile/profile.permissions.yml index 2f9ed375f..2243cce2f 100644 --- a/sites/all/modules/contrib/users/profile/profile.permissions.yml +++ b/sites/all/modules/contrib/users/profile/profile.permissions.yml @@ -1,13 +1,3 @@ administer profile types: title: 'Administer profile types' restrict access: true -administer profiles: - title: 'Administer profiles' - restrict access: true -bypass profile access: - title: 'Bypass profile access control' - description: 'View, edit and delete all user profiles, including private field values, regardless of permission restrictions.' - restrict access: true - -permission_callbacks: - - \Drupal\profile\ProfilePermissions::profileTypePermissions diff --git a/sites/all/modules/contrib/users/profile/profile.routing.yml b/sites/all/modules/contrib/users/profile/profile.routing.yml index f655f59b5..25fb761da 100644 --- a/sites/all/modules/contrib/users/profile/profile.routing.yml +++ b/sites/all/modules/contrib/users/profile/profile.routing.yml @@ -5,7 +5,7 @@ entity.profile.collection: _entity_list: 'profile' _title: 'Profiles' requirements: - _permission: 'administer profiles' + _permission: 'administer profile' entity.profile_type.collection: path: '/admin/config/people/profiles/types' @@ -23,14 +23,21 @@ entity.profile_type.add_form: requirements: _permission: 'administer profile types' -entity.profile.add_form: - path: '/user/{user}/profile/{profile_type}' +entity.profile.type.user_profile_form: + path: '/user/{user}/{profile_type}' + defaults: + _controller: '\Drupal\profile\Controller\ProfileController::userProfileForm' + _title_callback: '\Drupal\profile\Controller\ProfileController::addPageTitle' + requirements: + _profile_access_check: 'add' + +entity.profile.type.user_profile_form.add: + path: '/user/{user}/{profile_type}/add' defaults: _controller: '\Drupal\profile\Controller\ProfileController::addProfile' - _title: 'Add new profile' - operation: 'add' + _title_callback: '\Drupal\profile\Controller\ProfileController::addPageTitle' requirements: - _profile_access_check: 'profile:{profile_type}' + _profile_access_check: 'add' entity.profile.canonical: path: '/profile/{profile}' @@ -45,7 +52,7 @@ entity.profile.multiple_delete_confirm: defaults: _form: '\Drupal\profile\Form\DeleteMultiple' requirements: - _permission: 'administer profiles' + _permission: 'administer profile' entity.profile.set_default: path: '/profile/{profile}/set-default' @@ -56,5 +63,5 @@ entity.profile.set_default: profile: type: entity:profile requirements: - _entity_access: 'profile.edit' + _entity_access: 'profile.update' _csrf_token: 'TRUE' diff --git a/sites/all/modules/contrib/users/profile/src/Access/ProfileAccessCheck.php b/sites/all/modules/contrib/users/profile/src/Access/ProfileAccessCheck.php index 90e121063..80e817452 100644 --- a/sites/all/modules/contrib/users/profile/src/Access/ProfileAccessCheck.php +++ b/sites/all/modules/contrib/users/profile/src/Access/ProfileAccessCheck.php @@ -38,35 +38,22 @@ class ProfileAccessCheck implements AccessInterface { * The route to check against. * @param \Drupal\Core\Session\AccountInterface $account * The currently logged in account. + * @param \Drupal\Core\Session\AccountInterface $user + * The user entity. * @param \Drupal\profile\Entity\ProfileTypeInterface $profile_type * The profile type entity. * * @return bool|\Drupal\Core\Access\AccessResultInterface * The access result. */ - public function access(Route $route, AccountInterface $account, ProfileTypeInterface $profile_type = NULL) { - $access_control_handler = $this->entityTypeManager->getAccessControlHandler('profile'); - + public function access(Route $route, AccountInterface $account, AccountInterface $user, ProfileTypeInterface $profile_type) { if ($account->hasPermission('administer profile types')) { return AccessResult::allowed()->cachePerPermissions(); } - $operation = $route->getRequirement('_profile_access_check'); - if ($operation == 'add') { - return $access_control_handler->access($profile_type, $operation, $account, TRUE); - } + $own_any = ($account->id() == $user->id()) ? 'own' : 'any'; + $operation = ($profile_type->getMultiple()) ? 'view' : 'update'; - if ($profile_type) { - return $access_control_handler->createAccess($profile_type->id(), $account, [], TRUE); - } - // If checking whether a profile of any type may be created. - foreach ($this->entityTypeManager->getStorage('profile_type')->loadMultiple() as $profile_type) { - if (($access = $access_control_handler->createAccess($profile_type->id(), $account, [], TRUE)) && $access->isAllowed()) { - return $access; - } - } - - // No opinion. - return AccessResult::neutral(); + return AccessResult::allowedIfHasPermission($account, "$operation $own_any {$profile_type->id()} profile"); } } diff --git a/sites/all/modules/contrib/users/profile/src/Controller/ProfileController.php b/sites/all/modules/contrib/users/profile/src/Controller/ProfileController.php index 915fc3a32..94779c1f4 100644 --- a/sites/all/modules/contrib/users/profile/src/Controller/ProfileController.php +++ b/sites/all/modules/contrib/users/profile/src/Controller/ProfileController.php @@ -76,7 +76,7 @@ class ProfileController extends ControllerBase implements ContainerInjectionInte } /** - * The _title_callback for the entity.profile.add_form route. + * The _title_callback for the add profile form route. * * @param \Drupal\profile\Entity\ProfileTypeInterface $profile_type * The current profile type. @@ -106,8 +106,9 @@ class ProfileController extends ControllerBase implements ContainerInjectionInte /** @var \Drupal\profile\Entity\ProfileType $profile_type */ /** @var \Drupal\profile\Entity\ProfileInterface|bool $active_profile */ - $active_profile = $this->entityTypeManager()->getStorage('profile') - ->loadByUser($user, $profile_type->id()); + $active_profile = $this->entityTypeManager() + ->getStorage('profile') + ->loadByUser($user, $profile_type->id()); // If the profile type does not support multiple, only display an add form // if there are no entities, or an edit for the current. @@ -132,8 +133,8 @@ class ProfileController extends ControllerBase implements ContainerInjectionInte $build['add_profile'] = Link::createFromRoute( $this->t('Add new @type', ['@type' => $profile_type->label()]), - "entity.profile.type.{$profile_type->id()}.user_profile_form.add", - ['user' => \Drupal::currentUser()->id(), 'profile_type' => $profile_type->id()]) + 'entity.profile.type.user_profile_form.add', + ['user' => $this->currentUser()->id(), 'profile_type' => $profile_type->id()]) ->toRenderable(); // Render the active profiles. @@ -164,13 +165,14 @@ class ProfileController extends ControllerBase implements ContainerInjectionInte * A redirect back to the currency listing. */ public function setDefault(RouteMatchInterface $routeMatch) { + /** @var \Drupal\profile\Entity\ProfileInterface $profile */ $profile = $routeMatch->getParameter('profile'); $profile->setDefault(TRUE); $profile->save(); drupal_set_message($this->t('The %label profile has been marked as default.', ['%label' => $profile->label()])); - $url = $profile->urlInfo('collection'); + $url = $profile->toUrl('collection'); return $this->redirect($url->getRouteName(), $url->getRouteParameters(), $url->getOptions()); } diff --git a/sites/all/modules/contrib/users/profile/src/Entity/Profile.php b/sites/all/modules/contrib/users/profile/src/Entity/Profile.php index 6902ec43a..8d38882e7 100644 --- a/sites/all/modules/contrib/users/profile/src/Entity/Profile.php +++ b/sites/all/modules/contrib/users/profile/src/Entity/Profile.php @@ -8,9 +8,11 @@ use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Entity\ContentEntityBase; +use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\profile\Event\ProfileEvents; +use Drupal\profile\Event\ProfileLabelEvent; use Drupal\user\UserInterface; - /** * Defines the profile entity class. * @@ -23,6 +25,7 @@ use Drupal\user\UserInterface; * "view_builder" = "Drupal\profile\ProfileViewBuilder", * "views_data" = "Drupal\profile\ProfileViewsData", * "access" = "Drupal\profile\ProfileAccessControlHandler", + * "permission_provider" = "Drupal\profile\ProfilePermissionProvider", * "list_builder" = "Drupal\profile\ProfileListBuilder", * "form" = { * "default" = "Drupal\profile\Form\ProfileForm", @@ -31,12 +34,13 @@ use Drupal\user\UserInterface; * "delete" = "Drupal\profile\Form\ProfileDeleteForm", * }, * "route_provider" = { - * "html" = "Drupal\profile\ProfileHtmlRouteProvider", + * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider", * }, * }, * bundle_entity_type = "profile_type", * field_ui_base_route = "entity.profile_type.edit_form", - * admin_permission = "administer profiles", + * admin_permission = "administer profile", + * permission_granularity = "bundle", * base_table = "profile", * revision_table = "profile_revision", * fieldable = TRUE, @@ -44,7 +48,6 @@ use Drupal\user\UserInterface; * "id" = "profile_id", * "revision" = "revision_id", * "bundle" = "type", - * "langcode" = "langcode", * "uuid" = "uuid" * }, * links = { @@ -60,78 +63,24 @@ use Drupal\user\UserInterface; class Profile extends ContentEntityBase implements ProfileInterface { use EntityChangedTrait; - - /** - * {@inheritdoc} - */ - public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { - $fields = parent::baseFieldDefinitions($entity_type); - - $fields['uid'] = BaseFieldDefinition::create('entity_reference') - ->setLabel(t('Owner')) - ->setDescription(t('The user that owns this profile.')) - ->setRevisionable(TRUE) - ->setSetting('target_type', 'user') - ->setSetting('handler', 'default'); - - $fields['status'] = BaseFieldDefinition::create('boolean') - ->setLabel(t('Active status')) - ->setDescription(t('A boolean indicating whether the profile is active.')) - ->setDefaultValue(TRUE) - ->setRevisionable(TRUE); - - $fields['is_default'] = BaseFieldDefinition::create('boolean') - ->setLabel(t('Default')) - ->setDescription(t('A boolean indicating whether the profile is the default one.')) - ->setRevisionable(TRUE); - - $fields['created'] = BaseFieldDefinition::create('created') - ->setLabel(t('Created')) - ->setDescription(t('The time that the profile was created.')) - ->setRevisionable(TRUE); - - $fields['changed'] = BaseFieldDefinition::create('changed') - ->setLabel(t('Changed')) - ->setDescription(t('The time that the profile was last edited.')) - ->setRevisionable(TRUE); - - return $fields; - } - - /** - * Overrides Entity::id(). - */ - public function id() { - return $this->get('profile_id')->value; - } + use StringTranslationTrait; /** * {@inheritdoc} */ public function label() { $profile_type = ProfileType::load($this->bundle()); - return - t('@type profile of @username (uid: @uid)', - [ - '@type' => $profile_type->label(), - '@username' => $this->getOwner()->getDisplayName(), - '@uid' => $this->getOwnerId(), - ]); - } + $label = $this->t('@type profile #@id', [ + '@type' => $profile_type->label(), + '@id' => $this->id(), + ]); + // Allow the label to be overridden. + $event = new ProfileLabelEvent($this, $label); + $event_dispatcher = \Drupal::service('event_dispatcher'); + $event_dispatcher->dispatch(ProfileEvents::PROFILE_LABEL, $event); + $label = $event->getLabel(); - /** - * {@inheritdoc} - */ - public function getType() { - return $this->bundle(); - } - - /** - * {@inheritdoc} - */ - public function setType($type) { - $this->set('type', $this->bundle()); - return $this; + return $label; } /** @@ -164,6 +113,36 @@ class Profile extends ContentEntityBase implements ProfileInterface { return $this; } + /** + * {@inheritdoc} + */ + public function isActive() { + return (bool) $this->get('status')->value; + } + + /** + * {@inheritdoc} + */ + public function setActive($active) { + $this->set('status', (bool) $active); + return $this; + } + + /** + * {@inheritdoc} + */ + public function isDefault() { + return (bool) $this->get('is_default')->value; + } + + /** + * {@inheritdoc} + */ + public function setDefault($is_default) { + $this->set('is_default', (bool) $is_default); + return $this; + } + /** * {@inheritdoc} */ @@ -209,36 +188,6 @@ class Profile extends ContentEntityBase implements ProfileInterface { return $this; } - /** - * {@inheritdoc} - */ - public function isActive() { - return (bool) $this->get('status')->value; - } - - /** - * {@inheritdoc} - */ - public function setActive($active) { - $this->set('status', $active ? PROFILE_ACTIVE : PROFILE_NOT_ACTIVE); - return $this; - } - - /** - * {@inheritdoc} - */ - public function isDefault() { - return (bool) $this->get('is_default')->value; - } - - /** - * {@inheritdoc} - */ - public function setDefault($is_default) { - $this->set('is_default', $is_default ? PROFILE_DEFAULT : PROFILE_NOT_DEFAULT); - return $this; - } - /** * {@inheritdoc} */ @@ -250,6 +199,37 @@ class Profile extends ContentEntityBase implements ProfileInterface { ]); } + /** + * {@inheritdoc} + */ + public function preSave(EntityStorageInterface $storage) { + /** @var \Drupal\profile\ProfileStorage $storage */ + parent::preSave($storage); + + // If this profile is active and the owner has no current default profile + // of this type, set this as the default. + if ($this->getOwner()) { + if ($this->isActive() && !$this->isDefault()) { + if (!$storage->loadDefaultByUser($this->getOwner(), $this->bundle())) { + $this->setDefault(TRUE); + } + } + // Only active profiles can be default. + elseif (!$this->isActive()) { + $this->setDefault(FALSE); + } + } + + // Mark a new revision if the profile type supports revisions, and if there + // has been field data changes. + if ($this->hasTranslationChanges()) { + /** @var \Drupal\profile\Entity\ProfileTypeInterface $profile_type */ + $profile_type = \Drupal::entityTypeManager()->getStorage('profile_type')->load($this->bundle()); + $this->setNewRevision($profile_type->shouldCreateNewRevision()); + } + + } + /** * {@inheritdoc} */ @@ -258,18 +238,65 @@ class Profile extends ContentEntityBase implements ProfileInterface { parent::postSave($storage, $update); // Check if this profile is, or became the default. - if ($this->isDefault()) { - /** @var \Drupal\profile\Entity\ProfileInterface[] $profiles */ - $profiles = $storage->loadMultipleByUser($this->getOwner(), $this->getType()); + if ($this->getOwner()) { + if ($this->isDefault()) { + /** @var \Drupal\profile\Entity\ProfileInterface[] $profiles */ + $profiles = $storage->loadMultipleByUser($this->getOwner(), $this->bundle()); - // Ensure that all other profiles are set to not default. - foreach ($profiles as $profile) { - if ($profile->id() != $this->id() && $profile->isDefault()) { - $profile->setDefault(FALSE); + // Ensure that all other profiles are set to not default. + foreach ($profiles as $profile) { + if ($profile->id() != $this->id() && $profile->isDefault()) { + $profile->setDefault(FALSE); + $profile->save(); + } + } + } + // If this isn't the default, try to set a new one. + elseif (!$storage->loadDefaultByUser($this->getOwner(), $this->bundle())) { + /** @var \Drupal\profile\Entity\ProfileInterface $profile */ + if ($profile = $storage->loadByUser($this->getOwner(), $this->bundle())) { + $profile->setDefault(TRUE); $profile->save(); } } } } + /** + * {@inheritdoc} + */ + public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { + $fields = parent::baseFieldDefinitions($entity_type); + + $fields['uid'] = BaseFieldDefinition::create('entity_reference') + ->setLabel(t('Owner')) + ->setDescription(t('The user that owns this profile.')) + ->setRevisionable(TRUE) + ->setSetting('target_type', 'user') + ->setSetting('handler', 'default'); + + $fields['status'] = BaseFieldDefinition::create('boolean') + ->setLabel(t('Active')) + ->setDescription(t('Whether the profile is active.')) + ->setDefaultValue(TRUE) + ->setRevisionable(TRUE); + + $fields['is_default'] = BaseFieldDefinition::create('boolean') + ->setLabel(t('Default')) + ->setDescription(t('Whether this is the default profile.')) + ->setRevisionable(TRUE); + + $fields['created'] = BaseFieldDefinition::create('created') + ->setLabel(t('Created')) + ->setDescription(t('The time when the profile was created.')) + ->setRevisionable(TRUE); + + $fields['changed'] = BaseFieldDefinition::create('changed') + ->setLabel(t('Changed')) + ->setDescription(t('The time when the profile was last edited.')) + ->setRevisionable(TRUE); + + return $fields; + } + } diff --git a/sites/all/modules/contrib/users/profile/src/Entity/ProfileInterface.php b/sites/all/modules/contrib/users/profile/src/Entity/ProfileInterface.php index 0c948bb10..b678e7967 100644 --- a/sites/all/modules/contrib/users/profile/src/Entity/ProfileInterface.php +++ b/sites/all/modules/contrib/users/profile/src/Entity/ProfileInterface.php @@ -7,30 +7,55 @@ use Drupal\Core\Entity\EntityChangedInterface; use Drupal\user\EntityOwnerInterface; /** - * Provides an interface defining a profile entity. + * Provides an interface for profiles. */ interface ProfileInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface { /** - * Returns the profile type. + * Gets whether the profile is active. * - * @return string - * The profile type name. + * Unpublished profiles are only visible to their authors and administrators. + * + * @return bool + * TRUE if the profile is active, FALSE otherwise. */ - public function getType(); + public function isActive(); /** - * Sets the profile type. + * Sets whether the profile is active. * - * @param string $type - * The profile type. + * @param bool $active + * Whether the profile is active. * * @return $this */ - public function setType($type); + public function setActive($active); /** - * Returns the profile creation timestamp. + * Gets whether this is the user's default profile. + * + * A user can have a default profile of each type. + * + * @return bool + * TRUE if this is the user's default profile, FALSE otherwise. + */ + public function isDefault(); + + /** + * Sets whether this is the user's default profile. + * + * @param bool $is_default + * Whether this is the user's default profile. + * + * @return $this + */ + public function setDefault($is_default); + + /** + * Gets the profile creation timestamp. + * + * @return int + * The profile creation timestamp. */ public function getCreatedTime(); @@ -45,7 +70,7 @@ interface ProfileInterface extends ContentEntityInterface, EntityChangedInterfac public function setCreatedTime($timestamp); /** - * Returns the profile revision creation timestamp. + * Gets the profile revision creation timestamp. * * @return int * The UNIX timestamp of when this revision was created. @@ -63,7 +88,7 @@ interface ProfileInterface extends ContentEntityInterface, EntityChangedInterfac public function setRevisionCreationTime($timestamp); /** - * Returns the profile revision author. + * Gets the profile revision author. * * @return \Drupal\user\UserInterface * The user entity for the revision author. @@ -80,47 +105,4 @@ interface ProfileInterface extends ContentEntityInterface, EntityChangedInterfac */ public function setRevisionAuthorId($uid); - /** - * Returns a label for the profile. - */ - public function label(); - - /** - * Returns the node published status indicator. - * - * Unpublished profiles are only visible to their authors and administrators. - * - * @return bool - * TRUE if the profile is active. - */ - public function isActive(); - - /** - * Sets the published status of a profile. - * - * @param bool $active - * TRUE to set this profile to active, FALSE to set it to inactive. - * - * @return $this - */ - public function setActive($active); - - /** - * Returns the profile default status indicator. - * - * @return bool - * TRUE if the profile is default. - */ - public function isDefault(); - - /** - * Sets the default status of a profile. - * - * @param bool $is_default - * TRUE to set this profile to default, FALSE to set it to not default. - * - * @return $this - */ - public function setDefault($is_default); - } diff --git a/sites/all/modules/contrib/users/profile/src/Entity/ProfileType.php b/sites/all/modules/contrib/users/profile/src/Entity/ProfileType.php index db8dc04e4..8b6cb811b 100644 --- a/sites/all/modules/contrib/users/profile/src/Entity/ProfileType.php +++ b/sites/all/modules/contrib/users/profile/src/Entity/ProfileType.php @@ -38,7 +38,8 @@ use Drupal\Core\Entity\EntityStorageInterface; * "roles", * "weight", * "status", - * "langcode" + * "langcode", + * "use_revisions" * }, * links = { * "add-form" = "/admin/config/people/profiles/types/add", @@ -54,7 +55,7 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface /** * The primary identifier of the profile type. * - * @var integer + * @var int */ protected $id; @@ -75,14 +76,14 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface /** * Whether the profile type is shown during registration. * - * @var boolean + * @var bool */ protected $registration = FALSE; /** * Whether the profile type allows multiple profiles. * - * @var boolean + * @var bool */ protected $multiple = FALSE; @@ -96,10 +97,17 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface /** * The weight of the profile type compared to others. * - * @var integer + * @var int */ protected $weight = 0; + /** + * Should profiles of this type always generate revisions. + * + * @var bool + */ + protected $use_revisions = FALSE; + /** * {@inheritdoc} */ @@ -140,7 +148,7 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface /** * {@inheritdoc} */ - public function setRoles($roles) { + public function setRoles(array $roles) { $this->roles = $roles; return $this; } @@ -160,15 +168,23 @@ class ProfileType extends ConfigEntityBundleBase implements ProfileTypeInterface return $this; } + /** + * {@inheritdoc} + */ + public function shouldCreateNewRevision() { + return $this->use_revisions; + } + /** * {@inheritdoc} */ public function postSave(EntityStorageInterface $storage, $update = TRUE) { parent::postSave($storage, $update); - // @todo Setting ->setRebuildNeeded isn't enough. Investigate. - \Drupal::service('router.builder')->rebuild(); + // Rebuild module data to generate bundle permissions and link tasks. + if (!$update) { + system_rebuild_module_data(); + } } - } diff --git a/sites/all/modules/contrib/users/profile/src/Entity/ProfileTypeInterface.php b/sites/all/modules/contrib/users/profile/src/Entity/ProfileTypeInterface.php index d831ddc50..bed0fc0b7 100644 --- a/sites/all/modules/contrib/users/profile/src/Entity/ProfileTypeInterface.php +++ b/sites/all/modules/contrib/users/profile/src/Entity/ProfileTypeInterface.php @@ -3,11 +3,12 @@ namespace Drupal\profile\Entity; use Drupal\Core\Config\Entity\ConfigEntityInterface; +use Drupal\Core\Entity\RevisionableEntityBundleInterface; /** * Provides an interface defining a profile type entity. */ -interface ProfileTypeInterface extends ConfigEntityInterface { +interface ProfileTypeInterface extends ConfigEntityInterface, RevisionableEntityBundleInterface { /** * Return the registration form flag. @@ -50,7 +51,7 @@ interface ProfileTypeInterface extends ConfigEntityInterface { * * @return $this */ - public function setRoles($roles); + public function setRoles(array $roles); /** * Returns the profile type's weight. diff --git a/sites/all/modules/contrib/users/profile/src/Event/ProfileEvents.php b/sites/all/modules/contrib/users/profile/src/Event/ProfileEvents.php new file mode 100644 index 000000000..cb3fc752c --- /dev/null +++ b/sites/all/modules/contrib/users/profile/src/Event/ProfileEvents.php @@ -0,0 +1,19 @@ +profile = $profile; + $this->label = $label; + } + + /** + * Gets the profile. + * + * @return \Drupal\profile\Entity\ProfileInterface + * The profile. + */ + public function getProfile() { + return $this->profile; + } + + /** + * Gets the profile label. + * + * @return string + * The profile label. + */ + public function getLabel() { + return $this->label; + } + + /** + * Sets the profile label. + * + * @param string $label + * The profile label. + * + * @return $this + */ + public function setLabel($label) { + $this->label = $label; + return $this; + } + +} diff --git a/sites/all/modules/contrib/users/profile/src/Form/DeleteMultiple.php b/sites/all/modules/contrib/users/profile/src/Form/DeleteMultiple.php index 52669bcd5..3bf73ecb0 100644 --- a/sites/all/modules/contrib/users/profile/src/Form/DeleteMultiple.php +++ b/sites/all/modules/contrib/users/profile/src/Form/DeleteMultiple.php @@ -84,7 +84,7 @@ class DeleteMultiple extends ConfirmFormBase { * {@inheritdoc} */ public function getConfirmText() { - return t('Delete'); + return $this->t('Delete'); } /** @@ -93,7 +93,7 @@ class DeleteMultiple extends ConfirmFormBase { public function buildForm(array $form, FormStateInterface $form_state) { $this->profiles = $this->privateTempStoreFactory->get('profile_multiple_delete_confirm')->get(\Drupal::currentUser()->id()); if (empty($this->profiles)) { - return new RedirectResponse(\Drupal::url('entity.profile.collection', [], ['absolute' => TRUE])); + return new RedirectResponse(Url::fromRoute('entity.profile.collection', [], ['absolute' => TRUE])); } $form['profiles'] = [ diff --git a/sites/all/modules/contrib/users/profile/src/Form/ProfileDeleteForm.php b/sites/all/modules/contrib/users/profile/src/Form/ProfileDeleteForm.php index e6ef1ff19..9d4dc2787 100644 --- a/sites/all/modules/contrib/users/profile/src/Form/ProfileDeleteForm.php +++ b/sites/all/modules/contrib/users/profile/src/Form/ProfileDeleteForm.php @@ -13,12 +13,36 @@ class ProfileDeleteForm extends ContentEntityDeleteForm { /** * {@inheritdoc} */ - public function getCancelUrl() { - return new Url('entity.user.canonical', [ - 'user' => $this->entity->getOwnerId(), + public function getQuestion() { + return $this->t('Are you sure you want to delete %label?', [ + '%label' => $this->getEntity()->label(), ]); } + /** + * {@inheritdoc} + */ + protected function getDeletionMessage() { + $entity = $this->getEntity(); + return $this->t('%label has been deleted.', [ + '%label' => $entity->label(), + ]); + } + + /** + * {@inheritdoc} + */ + public function getCancelUrl() { + /** @var \Drupal\profile\Entity\ProfileInterface $entity */ + $entity = $this->entity; + if ($entity->getOwnerId()) { + return Url::fromRoute('entity.user.canonical', [ + 'user' => $entity->getOwnerId(), + ]); + } + return Url::fromRoute('entity.profile.collection'); + } + /** * {@inheritdoc} */ diff --git a/sites/all/modules/contrib/users/profile/src/Form/ProfileForm.php b/sites/all/modules/contrib/users/profile/src/Form/ProfileForm.php index ae2ef0768..ce1593a46 100644 --- a/sites/all/modules/contrib/users/profile/src/Form/ProfileForm.php +++ b/sites/all/modules/contrib/users/profile/src/Form/ProfileForm.php @@ -3,25 +3,14 @@ namespace Drupal\profile\Form; use Drupal\Core\Entity\ContentEntityForm; +use Drupal\Core\Entity\RevisionableEntityBundleInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\profile\Entity\ProfileType; /** * Form controller for profile forms. */ class ProfileForm extends ContentEntityForm { - /** - * {@inheritdoc} - */ - public function buildEntity(array $form, FormStateInterface $form_state) { - $entity = parent::buildEntity($form, $form_state); - if ($entity->isNew()) { - $entity->setCreatedTime(REQUEST_TIME); - } - return $entity; - } - /** * {@inheritdoc} */ @@ -30,12 +19,18 @@ class ProfileForm extends ContentEntityForm { /** @var \Drupal\profile\Entity\ProfileInterface $profile */ $profile = $this->entity; - // Add an "Activate" button. - $element['set_default'] = $element['submit']; - $element['set_default']['#value'] = t('Save and make default'); - $element['set_default']['#weight'] = 10; - $element['set_default']['#access'] = !$profile->isDefault(); - array_unshift($element['set_default']['#submit'], [$this, 'setDefault']); + $profile_type_storage = $this->entityTypeManager->getStorage('profile_type'); + /** @var \Drupal\profile\Entity\ProfileTypeInterface $profile_type */ + $profile_type = $profile_type_storage->load($profile->bundle()); + + // Allow the profile to be saved as default if type supports multiple. + if ($profile_type->getMultiple() && !$profile->isDefault()) { + // Add a "make default" button. + $element['set_default'] = $element['submit']; + $element['set_default']['#value'] = $this->t('Save and make default'); + $element['set_default']['#weight'] = 10; + array_unshift($element['set_default']['#submit'], [$this, 'setDefault']); + } return $element; } @@ -62,28 +57,31 @@ class ProfileForm extends ContentEntityForm { */ public function deactivate(array $form, FormStateInterface $form_state) { $form_state->setValue('status', FALSE); - $form_state->setValue('is_default', TRUE); } /** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { - $profile_type = ProfileType::load($this->entity->bundle()); - switch ($this->entity->save()) { case SAVED_NEW: - drupal_set_message($this->t('%label profile has been created.', ['%label' => $profile_type->label()])); + drupal_set_message($this->t('%label has been created.', ['%label' => $this->entity->label()])); break; case SAVED_UPDATED: - drupal_set_message($this->t('%label profile has been updated.', ['%label' => $profile_type->label()])); + drupal_set_message($this->t('%label has been updated.', ['%label' => $this->entity->label()])); break; } - $form_state->setRedirect('entity.user.canonical', [ - 'user' => $this->entity->getOwnerId(), - ]); + if ($this->entity->getOwnerId()) { + $form_state->setRedirect('entity.user.canonical', [ + 'user' => $this->entity->getOwnerId(), + ]); + } + else { + $form_state->setRedirect('entity.profile.collection'); + } + } } diff --git a/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeDeleteForm.php b/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeDeleteForm.php index 5d1def15c..8deebd5e2 100644 --- a/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeDeleteForm.php +++ b/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeDeleteForm.php @@ -48,7 +48,7 @@ class ProfileTypeDeleteForm extends EntityDeleteForm { ->execute(); if ($num_profiles) { $caption = '

    ' . \Drupal::translation() - ->formatPlural($num_profiles, '%type is used by 1 profile on your site. You can not remove this profile type until you have removed all of the %type profiles.', '%type is used by @count profiles on your site. You may not remove %type until you have removed all of the %type profiles.', ['%type' => $this->entity->label()]) . '

    '; + ->formatPlural($num_profiles, '%type is used by 1 profile on your site. You can not remove this profile type until you have removed all of the %type profiles.', '%type is used by @count profiles on your site. You may not remove %type until you have removed all of the %type profiles.', ['%type' => $this->entity->label()]) . '

    '; $form['#title'] = $this->entity->label(); $form['description'] = ['#markup' => $caption]; return $form; diff --git a/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeForm.php b/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeForm.php index 840f16645..37f04765d 100644 --- a/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeForm.php +++ b/sites/all/modules/contrib/users/profile/src/Form/ProfileTypeForm.php @@ -8,7 +8,6 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\field_ui\FieldUI; use Drupal\user\Entity\Role; - /** * Form controller for profile type forms. */ @@ -19,6 +18,7 @@ class ProfileTypeForm extends BundleEntityFormBase { */ public function form(array $form, FormStateInterface $form_state) { $form = parent::form($form, $form_state); + /** @var \Drupal\profile\Entity\ProfileTypeInterface $type */ $type = $this->entity; if ($this->operation == 'add') { @@ -71,6 +71,12 @@ class ProfileTypeForm extends BundleEntityFormBase { } } + $form['use_revisions'] = [ + '#type' => 'checkbox', + '#title' => $this->t('Create a new revision when a profile is modified'), + '#default_value' => $type->shouldCreateNewRevision(), + ]; + return $this->protectBundleIdElement($form); } @@ -83,8 +89,8 @@ class ProfileTypeForm extends BundleEntityFormBase { $this->getEntity()->isNew() ) { $actions['save_continue'] = $actions['submit']; - $actions['save_continue']['#value'] = t('Save and manage fields'); - $actions['save_continue']['#submit'][] = [$this, 'redirectToFieldUI']; + $actions['save_continue']['#value'] = $this->t('Save and manage fields'); + $actions['save_continue']['#submit'][] = [$this, 'redirectToFieldUi']; } return $actions; } @@ -97,10 +103,10 @@ class ProfileTypeForm extends BundleEntityFormBase { $status = $type->save(); if ($status == SAVED_UPDATED) { - drupal_set_message(t('%label profile type has been updated.', ['%label' => $type->label()])); + drupal_set_message($this->t('%label profile type has been updated.', ['%label' => $type->label()])); } else { - drupal_set_message(t('%label profile type has been created.', ['%label' => $type->label()])); + drupal_set_message($this->t('%label profile type has been created.', ['%label' => $type->label()])); } $form_state->setRedirect('entity.profile_type.collection'); } @@ -108,7 +114,7 @@ class ProfileTypeForm extends BundleEntityFormBase { /** * Form submission handler to redirect to Manage fields page of Field UI. */ - public function redirectToFieldUI(array $form, FormStateInterface $form_state) { + public function redirectToFieldUi(array $form, FormStateInterface $form_state) { if ($form_state->getTriggeringElement()['#parents'][0] === 'save_continue' && $route_info = FieldUI::getOverviewRouteInfo('profile', $this->entity->id())) { $form_state->setRedirectUrl($route_info); } diff --git a/sites/all/modules/contrib/users/profile/src/Plugin/Derivative/ProfileLocalTask.php b/sites/all/modules/contrib/users/profile/src/Plugin/Derivative/ProfileLocalTask.php index a74006f72..c5007064f 100644 --- a/sites/all/modules/contrib/users/profile/src/Plugin/Derivative/ProfileLocalTask.php +++ b/sites/all/modules/contrib/users/profile/src/Plugin/Derivative/ProfileLocalTask.php @@ -53,7 +53,7 @@ class ProfileLocalTask extends DeriverBase implements ContainerDeriverInterface foreach ($this->entityTypeManager->getStorage('profile_type')->loadMultiple() as $profile_type_id => $profile_type) { $this->derivatives["profile.type.$profile_type_id"] = [ 'title' => $profile_type->label(), - 'route_name' => "entity.profile.type.$profile_type_id.user_profile_form", + 'route_name' => 'entity.profile.type.user_profile_form', 'base_route' => 'entity.user.canonical', 'route_parameters' => ['profile_type' => $profile_type_id], 'weight' => ++$weight, diff --git a/sites/all/modules/contrib/users/profile/src/Plugin/EntityReferenceSelection/ProfileSelection.php b/sites/all/modules/contrib/users/profile/src/Plugin/EntityReferenceSelection/ProfileSelection.php index 55c5b64ef..a3e4bca68 100644 --- a/sites/all/modules/contrib/users/profile/src/Plugin/EntityReferenceSelection/ProfileSelection.php +++ b/sites/all/modules/contrib/users/profile/src/Plugin/EntityReferenceSelection/ProfileSelection.php @@ -26,4 +26,5 @@ class ProfileSelection extends DefaultSelection { $form['target_bundles']['#title'] = $this->t('Profile types'); return $form; } + } diff --git a/sites/all/modules/contrib/users/profile/src/Plugin/views/field/ProfileBulkForm.php b/sites/all/modules/contrib/users/profile/src/Plugin/views/field/ProfileBulkForm.php index 97294584d..918f14a9a 100644 --- a/sites/all/modules/contrib/users/profile/src/Plugin/views/field/ProfileBulkForm.php +++ b/sites/all/modules/contrib/users/profile/src/Plugin/views/field/ProfileBulkForm.php @@ -15,7 +15,7 @@ class ProfileBulkForm extends BulkForm { * {@inheritdoc} */ protected function emptySelectedMessage() { - return t('No profile selected.'); + return $this->t('No profile selected.'); } } diff --git a/sites/all/modules/contrib/users/profile/src/ProfileAccessControlHandler.php b/sites/all/modules/contrib/users/profile/src/ProfileAccessControlHandler.php index 570003b60..8c4eac463 100644 --- a/sites/all/modules/contrib/users/profile/src/ProfileAccessControlHandler.php +++ b/sites/all/modules/contrib/users/profile/src/ProfileAccessControlHandler.php @@ -3,10 +3,8 @@ namespace Drupal\profile; use Drupal\Core\Access\AccessResult; -use Drupal\Core\Entity\EntityAccessControlHandler; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Session\AccountInterface; -use Drupal\user\Entity\User; +use Drupal\entity\EntityAccessControlHandler as EntityApiAccessControlHandler; use Drupal\profile\Entity\ProfileType; /** @@ -14,99 +12,23 @@ use Drupal\profile\Entity\ProfileType; * * @see \Drupal\profile\Entity\Profile */ -class ProfileAccessControlHandler extends EntityAccessControlHandler { - - /** - * {@inheritdoc} - */ - public function createAccess($entity_bundle = NULL, AccountInterface $account = NULL, array $context = [], $return_as_object = FALSE) { - $account = $this->prepareUser($account); - - if ($account->hasPermission('bypass profile access')) { - $result = AccessResult::allowed()->cachePerPermissions(); - return $return_as_object ? $result : $result->isAllowed(); - } - - $result = parent::createAccess($entity_bundle, $account, $context, TRUE)->cachePerPermissions(); - return $return_as_object ? $result : $result->isAllowed(); - } - - /** - * {@inheritdoc} - * - * When the $operation is 'add' then the $entity is of type 'profile_type', - * otherwise $entity is of type 'profile'. - */ - protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) { - $account = $this->prepareUser($account); - - $user_page = \Drupal::request()->attributes->get('user'); - - // Some times, operation edit is called update. - // Use edit in any case. - if ($operation == 'update') { - $operation = 'edit'; - } - - // Check that if profile type has require roles, the user the profile is - // being added to has any of the required roles. - if ($entity->getEntityTypeId() == 'profile') { - $profile_roles = ProfileType::load($entity->bundle())->getRoles(); - // Retrieve all user roles including locked roles. - $user_roles = $entity->getOwner()->getRoles(); - if (!empty(array_filter($profile_roles)) && !array_intersect($user_roles, $profile_roles)) { - return AccessResult::forbidden(); - } - } - elseif ($entity->getEntityTypeId() == 'profile_type') { - $profile_roles = $entity->getRoles(); - // Retrieve all user roles including locked roles. - $user_roles = User::load($user_page->id())->getRoles(); - if (!empty(array_filter($profile_roles)) && !array_intersect($user_roles, $profile_roles)) { - return AccessResult::forbidden(); - } - } - - if ($account->hasPermission('bypass profile access')) { - return AccessResult::allowed()->cachePerPermissions(); - } - elseif ( - ( - $operation == 'add' - && ( - ( - $user_page->id() == $account->id() - && $account->hasPermission($operation . ' own ' . $entity->id() . ' profile') - ) - || $account->hasPermission($operation . ' any ' . $entity->id() . ' profile') - ) - ) || ( - $operation != 'add' - && ( - ( - $entity->getOwnerId() == $account->id() - && $account->hasPermission($operation . ' own ' . $entity->getType() . ' profile') - ) - || $account->hasPermission($operation . ' any ' . $entity->getType() . ' profile') - ) - ) - ){ - return AccessResult::allowed()->cachePerPermissions(); - } - else { - // No opinion. - return AccessResult::neutral()->cachePerPermissions(); - } - } +class ProfileAccessControlHandler extends EntityApiAccessControlHandler { /** * {@inheritdoc} */ protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) { - return AccessResult::allowedIfHasPermissions($account, [ - 'add any ' . $entity_bundle . ' profile', - 'add own ' . $entity_bundle . ' profile', - ], 'OR'); + $result = parent::checkCreateAccess($account, $context, $entity_bundle); + + // If access is allowed, check role restriction. + if ($result->isAllowed()) { + $bundle = ProfileType::load($entity_bundle); + if (!empty(array_filter($bundle->getRoles()))) { + $result = AccessResult::allowedIf(!empty(array_intersect($account->getRoles(), $bundle->getRoles()))); + } + } + + return $result; } } diff --git a/sites/all/modules/contrib/users/profile/src/ProfileHtmlRouteProvider.php b/sites/all/modules/contrib/users/profile/src/ProfileHtmlRouteProvider.php deleted file mode 100644 index 8f1960dea..000000000 --- a/sites/all/modules/contrib/users/profile/src/ProfileHtmlRouteProvider.php +++ /dev/null @@ -1,59 +0,0 @@ - '\Drupal\profile\Controller\ProfileController::userProfileForm', - '_title_callback' => '\Drupal\profile\Controller\ProfileController::addPageTitle' - ], - ['_profile_access_check' => 'add'], - [ - 'parameters' => [ - 'user' => ['type' => 'entity:user'], - 'profile_type' => ['type' => 'entity:profile_type'], - ], - ]) - ); - $collection->add("entity.profile.type.{$profile_type->id()}.user_profile_form", $route); - - // If the profile type supports multiple, we need an additional route for - // adding new profiles. - if ($profile_type->getMultiple()) { - $route = (new Route( - "/user/{user}/{profile_type}/add", - ['_controller' => '\Drupal\profile\Controller\ProfileController::addProfile'], - ['_profile_access_check' => 'add'], - [ - 'parameters' => [ - 'user' => ['type' => 'entity:user'], - 'profile_type' => ['type' => 'entity:profile_type'], - ], - ]) - ); - $collection->add("entity.profile.type.{$profile_type->id()}.user_profile_form.add", $route); - } - } - - return $collection; - } - -} diff --git a/sites/all/modules/contrib/users/profile/src/ProfileListBuilder.php b/sites/all/modules/contrib/users/profile/src/ProfileListBuilder.php index aef2e5d64..bee1e9f83 100644 --- a/sites/all/modules/contrib/users/profile/src/ProfileListBuilder.php +++ b/sites/all/modules/contrib/users/profile/src/ProfileListBuilder.php @@ -104,7 +104,7 @@ class ProfileListBuilder extends EntityListBuilder { $options += ($langcode != LanguageInterface::LANGCODE_NOT_SPECIFIED && isset($languages[$langcode]) ? ['language' => $languages[$langcode]] : []); $uri->setOptions($options); $row['label'] = $entity->toLink(); - $row['type'] = $entity->getType(); + $row['type'] = $entity->bundle(); $row['owner']['data'] = [ '#theme' => 'username', '#account' => $entity->getOwner(), @@ -126,7 +126,7 @@ class ProfileListBuilder extends EntityListBuilder { public function getOperations(EntityInterface $entity) { $operations = parent::getOperations($entity); - if (!$entity->isDefault()) { + if ($entity->isActive() && !$entity->isDefault()) { $operations['set_default'] = [ 'title' => $this->t('Mark as default'), 'url' => $entity->toUrl('set-default'), diff --git a/sites/all/modules/contrib/users/profile/src/ProfilePermissionProvider.php b/sites/all/modules/contrib/users/profile/src/ProfilePermissionProvider.php new file mode 100644 index 000000000..6fe47b78c --- /dev/null +++ b/sites/all/modules/contrib/users/profile/src/ProfilePermissionProvider.php @@ -0,0 +1,43 @@ +getSingularLabel(); + $entity_type_id = $entity_type->id(); + $bundles = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id); + + foreach ($bundles as $bundle_name => $bundle_info) { + $permissions["view any {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: View any @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $singular_label, + ]), + ]; + $permissions["view own {$bundle_name} {$entity_type_id}"] = [ + 'title' => $this->t('@bundle: View own @type', [ + '@bundle' => $bundle_info['label'], + '@type' => $singular_label, + ]), + ]; + } + + return $permissions; + } + +} diff --git a/sites/all/modules/contrib/users/profile/src/ProfilePermissions.php b/sites/all/modules/contrib/users/profile/src/ProfilePermissions.php deleted file mode 100644 index 22d87258d..000000000 --- a/sites/all/modules/contrib/users/profile/src/ProfilePermissions.php +++ /dev/null @@ -1,72 +0,0 @@ -buildPermissions($type); - } - - return $perms; - } - - /** - * Builds a standard list of permissions for a given profile type. - * - * @param \Drupal\profile\Entity\ProfileType $profile_type - * The machine name of the profile type. - * - * @return array - * An array of permission names and descriptions. - */ - protected function buildPermissions(ProfileType $profile_type) { - $type_id = $profile_type->id(); - $type_params = ['%type' => $profile_type->label()]; - - return [ - "add own $type_id profile" => [ - 'title' => $this->t('%type: Add own profile', $type_params), - ], - "add any $type_id profile" => [ - 'title' => $this->t('%type: Add any profile', $type_params), - ], - "view own $type_id profile" => [ - 'title' => $this->t('%type: View own profile', $type_params), - ], - "view any $type_id profile" => [ - 'title' => $this->t('%type: View any profile', $type_params), - ], - "edit own $type_id profile" => [ - 'title' => $this->t('%type: Edit own profile', $type_params), - ], - "edit any $type_id profile" => [ - 'title' => $this->t('%type: Edit any profile', $type_params), - ], - "delete own $type_id profile" => [ - 'title' => $this->t('%type: Delete own profile', $type_params), - ], - "delete any $type_id profile" => [ - 'title' => $this->t('%type: Delete any profile', $type_params), - ], - ]; - } - -} diff --git a/sites/all/modules/contrib/users/profile/src/ProfileStorage.php b/sites/all/modules/contrib/users/profile/src/ProfileStorage.php index b98694bc2..4ae10cf7e 100644 --- a/sites/all/modules/contrib/users/profile/src/ProfileStorage.php +++ b/sites/all/modules/contrib/users/profile/src/ProfileStorage.php @@ -13,7 +13,7 @@ class ProfileStorage extends SqlContentEntityStorage implements ProfileStorageIn /** * {@inheritdoc} */ - public function loadByUser(AccountInterface $account, $profile_type, $active = PROFILE_ACTIVE) { + public function loadByUser(AccountInterface $account, $profile_type, $active = TRUE) { $result = $this->loadByProperties([ 'uid' => $account->id(), 'type' => $profile_type, @@ -26,12 +26,12 @@ class ProfileStorage extends SqlContentEntityStorage implements ProfileStorageIn /** * {@inheritdoc} */ - public function loadMultipleByUser(AccountInterface $account, $profile_type, $active = PROFILE_ACTIVE) { + public function loadMultipleByUser(AccountInterface $account, $profile_type, $active = TRUE) { return $this->loadByProperties([ - 'uid' => $account->id(), - 'type' => $profile_type, - 'status' => $active, - ]); + 'uid' => $account->id(), + 'type' => $profile_type, + 'status' => $active, + ]); } /** @@ -41,7 +41,7 @@ class ProfileStorage extends SqlContentEntityStorage implements ProfileStorageIn $result = $this->loadByProperties([ 'uid' => $account->id(), 'type' => $profile_type, - 'status' => PROFILE_ACTIVE, + 'status' => TRUE, 'is_default' => TRUE, ]); diff --git a/sites/all/modules/contrib/users/profile/src/ProfileTestTrait.php b/sites/all/modules/contrib/users/profile/src/ProfileTestTrait.php index a4ded32bf..af39329d3 100644 --- a/sites/all/modules/contrib/users/profile/src/ProfileTestTrait.php +++ b/sites/all/modules/contrib/users/profile/src/ProfileTestTrait.php @@ -21,7 +21,7 @@ trait ProfileTestTrait { * The profile type machine name. * @param string $label * The profile type human display name. - * @param bool|FALSE $registration + * @param bool $registration * Boolean if profile type shows on registration form. * @param array $roles * Array of user role machine names. @@ -29,7 +29,7 @@ trait ProfileTestTrait { * @return \Drupal\profile\Entity\ProfileTypeInterface * Returns a profile type entity. */ - protected function createProfileType($id = NULL, $label = NULL, $registration = FALSE, $roles = []) { + protected function createProfileType($id = NULL, $label = NULL, $registration = FALSE, array $roles = []) { $id = !empty($id) ? $id : $this->randomMachineName(); $label = !empty($label) ? $label : $this->randomMachineName(); diff --git a/sites/all/modules/contrib/users/profile/src/ProfileTypeListBuilder.php b/sites/all/modules/contrib/users/profile/src/ProfileTypeListBuilder.php index 836a5d2f4..2782bc7cc 100644 --- a/sites/all/modules/contrib/users/profile/src/ProfileTypeListBuilder.php +++ b/sites/all/modules/contrib/users/profile/src/ProfileTypeListBuilder.php @@ -14,9 +14,9 @@ class ProfileTypeListBuilder extends ConfigEntityListBuilder { * {@inheritdoc} */ public function buildHeader() { - $header['type'] = t('Profile type'); - $header['registration'] = t('Registration'); - $header['multiple'] = t('Allow multiple profiles'); + $header['type'] = $this->t('Profile type'); + $header['registration'] = $this->t('Registration'); + $header['multiple'] = $this->t('Allow multiple profiles'); return $header + parent::buildHeader(); } @@ -25,8 +25,8 @@ class ProfileTypeListBuilder extends ConfigEntityListBuilder { */ public function buildRow(EntityInterface $entity) { $row['type'] = $entity->toLink(NULL, 'edit-form'); - $row['registration'] = $entity->getRegistration() ? t('Yes') : t('No'); - $row['multiple'] = $entity->getMultiple() ? t('Yes') : t('No'); + $row['registration'] = $entity->getRegistration() ? $this->t('Yes') : $this->t('No'); + $row['multiple'] = $entity->getMultiple() ? $this->t('Yes') : $this->t('No'); return $row + parent::buildRow($entity); } @@ -39,14 +39,14 @@ class ProfileTypeListBuilder extends ConfigEntityListBuilder { // which have the weights 15, 20, 25. if (isset($operations['edit'])) { $operations['edit'] = [ - 'title' => t('Edit'), + 'title' => $this->t('Edit'), 'weight' => 30, 'url' => $entity->toUrl('edit-form'), ]; } if (isset($operations['delete'])) { $operations['delete'] = [ - 'title' => t('Delete'), + 'title' => $this->t('Delete'), 'weight' => 35, 'url' => $entity->toUrl('delete-form'), ]; diff --git a/sites/all/modules/contrib/users/profile/src/ProfileViewsData.php b/sites/all/modules/contrib/users/profile/src/ProfileViewsData.php index bf04a3401..5bf65820b 100644 --- a/sites/all/modules/contrib/users/profile/src/ProfileViewsData.php +++ b/sites/all/modules/contrib/users/profile/src/ProfileViewsData.php @@ -14,10 +14,10 @@ class ProfileViewsData extends EntityViewsData { */ public function getViewsData() { $data = parent::getViewsData(); - + $data['profile']['type']['title'] = t('Profile type'); $data['profile']['profile_bulk_form'] = [ - 'title' => t('Profile operations bulk form'), - 'help' => t('Add a form element that lets you run operations on multiple profiles.'), + 'title' => $this->t('Profile operations bulk form'), + 'help' => $this->t('Add a form element that lets you run operations on multiple profiles.'), 'field' => [ 'id' => 'profile_bulk_form', ], diff --git a/sites/all/modules/contrib/users/profile/src/Tests/ProfileDefaultTest.php b/sites/all/modules/contrib/users/profile/src/Tests/ProfileDefaultTest.php deleted file mode 100644 index 04b9d2412..000000000 --- a/sites/all/modules/contrib/users/profile/src/Tests/ProfileDefaultTest.php +++ /dev/null @@ -1,411 +0,0 @@ -adminUser = $this->drupalCreateUser([ - 'access user profiles', - 'administer profiles', - 'administer profile types', - 'bypass profile access', - 'access administration pages', - ]); - - $this->user1 = User::create([ - 'name' => $this->randomMachineName(), - 'mail' => $this->randomMachineName() . '@example.com', - ]); - $this->user1->save(); - $this->user2 = User::create([ - 'name' => $this->randomMachineName(), - 'mail' => $this->randomMachineName() . '@example.com', - ]); - $this->user2->save(); - } - - /** - * Tests profiles are active by default. - */ - public function testProfileActive() { - $profile_type = $this->createProfileType('test_defaults', 'test_defaults'); - - // Create new profiles. - $profile1 = Profile::create($expected = [ - 'type' => $profile_type->id(), - 'uid' => $this->user1->id(), - ]); - $profile1->save(); - - $this->assertTrue($profile1->isActive()); - - $profile1->setActive(PROFILE_NOT_ACTIVE); - $profile1->save(); - - $this->assertFalse($profile1->isActive()); - } - - /** - * Tests default profile functionality. - */ - public function testDefaultProfile() { - $profile_type = $this->createProfileType('test_defaults', 'test_defaults'); - - // Create new profiles. - $profile1 = Profile::create($expected = [ - 'type' => $profile_type->id(), - 'uid' => $this->user1->id(), - ]); - $profile1->save(); - $profile2 = Profile::create($expected = [ - 'type' => $profile_type->id(), - 'uid' => $this->user1->id(), - ]); - $profile2->setDefault(TRUE); - $profile2->save(); - - $this->assertFalse($profile1->isDefault()); - $this->assertTrue($profile2->isDefault()); - - $profile1->setDefault(TRUE)->save(); - - $this->assertFalse(Profile::load($profile2->id())->isDefault()); - $this->assertTrue(Profile::load($profile1->id())->isDefault()); - } - - /** - * Tests loading default from storage handler. - */ - public function testLoadDefaultProfile() { - $profile_type = $this->createProfileType('test_defaults', 'test_defaults'); - - // Create new profiles. - $profile1 = Profile::create($expected = [ - 'type' => $profile_type->id(), - 'uid' => $this->user1->id(), - ]); - $profile1->setActive(TRUE); - $profile1->save(); - $profile2 = Profile::create($expected = [ - 'type' => $profile_type->id(), - 'uid' => $this->user1->id(), - ]); - $profile2->setActive(TRUE); - $profile2->setDefault(TRUE); - $profile2->save(); - - /** @var \Drupal\profile\ProfileStorageInterface $storage */ - $storage = \Drupal::entityTypeManager()->getStorage('profile'); - - $default_profile = $storage->loadDefaultByUser($this->user1, $profile_type->id()); - $this->assertEqual($profile2->id(), $default_profile->id()); - } - - /** - * Tests mark as default action. - */ - public function testDefaultAction() { - $types_data = [ - 'profile_type_0' => [ - 'label' => $this->randomMachineName(), - 'multiple' => TRUE, - ], - 'profile_type_1' => [ - 'label' => $this->randomMachineName(), - 'multiple' => TRUE, - ], - ]; - - /** @var ProfileType[] $types */ - $types = []; - foreach ($types_data as $id => $values) { - $types[$id] = $this->createProfileType($id, $values['label']); - } - - $restricted_user = $this->drupalCreateUser([ - 'administer profiles', - 'edit own ' . $types['profile_type_0']->id() . ' profile', - 'edit own ' . $types['profile_type_1']->id() . ' profile', - ]); - - $admin_user = $this->drupalCreateUser([ - 'administer profiles', - 'edit any ' . $types['profile_type_0']->id() . ' profile', - 'edit any ' . $types['profile_type_1']->id() . ' profile', - ]); - - // Create new profiles. - $profile_profile_type_0_restricted_user = Profile::create($expected = [ - 'type' => $types['profile_type_0']->id(), - 'uid' => $restricted_user->id(), - ]); - $profile_profile_type_0_restricted_user->setActive(TRUE); - $profile_profile_type_0_restricted_user->save(); - $profile_profile_type_0_user1_1 = Profile::create($expected = [ - 'type' => $types['profile_type_0']->id(), - 'uid' => $this->user1->id(), - ]); - $profile_profile_type_0_user1_1->setActive(TRUE); - $profile_profile_type_0_user1_1->save(); - $profile_profile_type_0_user1_2 = Profile::create($expected = [ - 'type' => $types['profile_type_0']->id(), - 'uid' => $this->user1->id(), - ]); - $profile_profile_type_0_user1_2->setActive(TRUE); - $profile_profile_type_0_user1_2->save(); - $profile_profile_type_1_user1 = Profile::create($expected = [ - 'type' => $types['profile_type_1']->id(), - 'uid' => $this->user1->id(), - ]); - $profile_profile_type_1_user1->setActive(TRUE); - $profile_profile_type_1_user1->save(); - $profile_profile_type_1_user2 = Profile::create($expected = [ - 'type' => $types['profile_type_1']->id(), - 'uid' => $this->user2->id(), - ]); - $profile_profile_type_1_user2->setActive(TRUE); - $profile_profile_type_1_user2->save(); - $profile_profile_type_1_user1_inactive = Profile::create($expected = [ - 'type' => $types['profile_type_1']->id(), - 'uid' => $this->user1->id(), - ]); - $profile_profile_type_1_user1_inactive->setActive(FALSE); - $profile_profile_type_1_user1_inactive->save(); - $profile_profile_type_1_user1_active = Profile::create($expected = [ - 'type' => $types['profile_type_1']->id(), - 'uid' => $this->user1->id(), - ]); - $profile_profile_type_1_user1_active->isActive(TRUE); - $profile_profile_type_1_user1_active->save(); - - // Make sure that $restricted_user is allowed to set default his own profile - // and not others'. - $this->drupalLogin($restricted_user); - - $this->drupalGet('admin/config/people/profiles'); - - $this->clickLink('Mark as default', 0); - $this->assertTrue(Profile::load($profile_profile_type_0_restricted_user->id())->isDefault()); - $this->clickLink('Mark as default', 1); - $this->assertResponse(403); - $this->drupalLogout(); - - $this->drupalLogin($admin_user); - - $this->drupalGet('admin/config/people/profiles'); - - // Mark $profile_profile_type_0_user1_1 as default - // $profile_profile_type_0_user1_2 should stay not default. - $this->clickLink('Mark as default', 0); - $this->assertTrue(Profile::load($profile_profile_type_0_user1_1->id())->isDefault()); - $this->assertFalse($profile_profile_type_0_user1_2->isDefault()); - - // Mark $profile_profile_type_0_user1_2 as default - // $profile_profile_type_0_user1_1 should become not default. - $profile_profile_type_0_user1_2->setDefault(TRUE); - $profile_profile_type_0_user1_2->save(); - $this->assertTrue($profile_profile_type_0_user1_2->isDefault()); - $this->assertFalse($profile_profile_type_0_user1_1->isDefault()); - - // Mark $profile_profile_type_1_user1 as default - // $profile_profile_type_1_user2 should stay not default. - $this->clickLink('Mark as default', 1); - $this->assertTrue(Profile::load($profile_profile_type_1_user1->id())->isDefault()); - $this->assertFalse($profile_profile_type_1_user2->isDefault()); - - // Mark $profile_profile_type_1_user2 as default - // $profile_profile_type_1_user1 should stay default. - $profile_profile_type_1_user2->setDefault(TRUE); - $profile_profile_type_1_user2->save(); - $this->assertTrue($profile_profile_type_1_user2->isDefault()); - $this->assertTrue(Profile::load($profile_profile_type_1_user1->id())->isDefault()); - - // Mark $profile_profile_type_1_user1_inactive as default - // $profile_profile_type_1_user1_active should stay not default. - $this->clickLink('Mark as default', 2); - $this->assertTrue(Profile::load($profile_profile_type_1_user1_inactive->id())->isDefault()); - $this->assertFalse($profile_profile_type_1_user1_active->isDefault()); - - // Mark $profile_profile_type_1_user1_active as default - // $profile_profile_type_1_user1_inactive should stay default. - $profile_profile_type_1_user1_active->setDefault(TRUE); - $profile_profile_type_1_user1_active->save(); - $this->assertTrue($profile_profile_type_1_user1_active->isDefault()); - $this->assertTrue(Profile::load($profile_profile_type_1_user1_inactive->id())->isDefault()); - } - - /** - * Tests whether profile default on edit is working. - */ - public function testProfileEdit() { - $types_data = [ - 'profile_type_0' => [ - 'label' => $this->randomMachineName(), - 'multiple' => TRUE, - ], - ]; - - /** @var \Drupal\profile\Entity\ProfileTypeInterface[] $types */ - $types = []; - foreach ($types_data as $id => $values) { - $types[$id] = $this->createProfileType($id, $values['label']); - } - - $admin_user = $this->drupalCreateUser([ - 'administer profiles', - 'administer users', - 'edit any ' . $types['profile_type_0']->id() . ' profile', - ]); - - // Create new profiles. - $profile1 = Profile::create($expected = [ - 'type' => $types['profile_type_0']->id(), - 'uid' => $this->user1->id(), - ]); - $profile1->save(); - $profile2 = Profile::create($expected = [ - 'type' => $types['profile_type_0']->id(), - 'uid' => $this->user1->id(), - ]); - $profile2->setDefault(TRUE); - $profile2->save(); - - $this->assertFalse($profile1->isDefault()); - $this->assertTrue($profile2->isDefault()); - - $this->drupalLogin($admin_user); - - $this->drupalPostForm("profile/{$profile1->id()}/edit", [], 'Save and make default'); - - \Drupal::entityTypeManager()->getStorage('profile')->resetCache([$profile1->id(), $profile2->id()]); - $this->assertTrue(Profile::load($profile1->id())->isDefault()); - $this->assertFalse(Profile::load($profile2->id())->isDefault()); - } - - /** - * Tests administrative-only profiles. - */ - public function testAdminOnlyProfiles() { - $id = $this->type->id(); - $field_name = $this->field->getName(); - - // Create a test user account. - $web_user = $this->drupalCreateUser(['access user profiles']); - $uid = $web_user->id(); - $value = $this->randomMachineName(); - - // Administratively enter profile field values for the new account. - $this->drupalLogin($this->adminUser); - - $edit = [ - "{$this->field->getName()}[0][value]" => $value, - ]; - $this->drupalPostForm("user/$uid/$id", $edit, 'Save and make default'); - - /** @var \Drupal\profile\Entity\ProfileInterface $profile */ - $profile = \Drupal::entityTypeManager() - ->getStorage('profile') - ->loadByUser($web_user, $this->type->id()); - $profile_id = $profile->id(); - - $this->assertEqual($profile->getType(), $this->type->id()); - - /* -// Verify that the administrator can see the profile. -$this->drupalGet("user/$uid"); -$this->assertText($this->type->label()); -$this->assertText($value); -$this->drupalLogout(); - // Verify that the user can not access, create or edit the profile. - $this->drupalLogin($web_user); - $this->drupalGet("user/$uid"); - $this->assertNoText($this->type->label()); - $this->assertNoText($value); - $this->drupalGet("user/$uid/edit/profile/$id/$profile_id"); - $this->assertResponse(403); - - // Check edit link isn't displayed. - $this->assertNoLinkByHref("user/$uid/edit/profile/$id/$profile_id"); - // Check delete link isn't displayed. - $this->assertNoLinkByHref("user/$uid/delete/profile/$id/$profile_id"); - - - // Allow users to edit own profiles. - user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ["edit own $id profile"]); - - // Verify that the user is able to edit the own profile. - $value = $this->randomMachineName(); - $edit = [ - "{$field_name}[0][value]" => $value, - ]; - $this->drupalPostForm("user/$uid/edit/profile/$id/$profile_id", $edit, t('Save')); - $this->assertText(new FormattableMarkup('profile has been updated.', [])); - - - // Verify that the own profile is still not visible on the account page. - $this->drupalGet("user/$uid"); - $this->assertNoText($this->type->label()); - $this->assertNoText($value); - - // Allow users to view own profiles. - user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ["view own $id profile"]); - - // Verify that the own profile is visible on the account page. - $this->drupalGet("user/$uid"); - $this->assertText($this->type->label()); - $this->assertText($value); - - // Allow users to delete own profiles. - user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ["delete own $id profile"]); - - // Verify that the user can delete the own profile. - $this->drupalGet("user/$uid/edit/profile/$id/$profile_id"); - $this->clickLink(t('Delete')); - $this->drupalPostForm(NULL, [], t('Delete')); - $this->assertRaw(new FormattableMarkup('@label profile deleted.', ['@label' => $this->type->label()])); - $this->assertUrl("user/$uid"); - - // Verify that the profile is gone. - $this->drupalGet("user/$uid"); - $this->assertNoText($this->type->label()); - $this->assertNoText($value); - $this->drupalGet("user/$uid/edit/profile/$id"); - $this->assertNoText($value); -*/ - } - -} diff --git a/sites/all/modules/contrib/users/profile/src/Tests/ProfileFieldAccessTest.php b/sites/all/modules/contrib/users/profile/src/Tests/ProfileFieldAccessTest.php deleted file mode 100644 index 6c7a11bdb..000000000 --- a/sites/all/modules/contrib/users/profile/src/Tests/ProfileFieldAccessTest.php +++ /dev/null @@ -1,91 +0,0 @@ -adminUser = $this->drupalCreateUser([ - 'access user profiles', - 'administer profile types', - 'administer profile fields', - 'administer profile display', - 'bypass profile access', - ]); - - $user_permissions = [ - 'access user profiles', - "add own {$this->type->id()} profile", - "edit own {$this->type->id()} profile", - "view own {$this->type->id()} profile", - ]; - - $this->webUser = $this->drupalCreateUser($user_permissions); - $this->otherUser = $this->drupalCreateUser($user_permissions); - } - - /** - * Tests private profile field access. - */ - public function testPrivateField() { - $this->drupalLogin($this->adminUser); - - // Create a private profile field. - $edit = [ - 'new_storage_type' => 'string', - 'label' => 'Secret', - 'field_name' => 'secret', - ]; - $this->drupalPostForm("admin/config/people/profiles/types/manage/{$this->type->id()}/fields/add-field", $edit, t('Save and continue')); - $this->drupalPostForm(NULL, [], t('Save field settings')); - $edit = [ - 'profile_private' => 1, - ]; - $this->drupalPostForm(NULL, $edit, t('Save settings')); - - // Fill in a field value. - $this->drupalLogin($this->webUser); - $uid = $this->webUser->id(); - $secret = $this->randomMachineName(); - $edit = [ - 'field_secret[0][value]' => $secret, - ]; - $this->drupalPostForm("user/$uid/{$this->type->id()}", $edit, t('Save')); - - // User cache page need to be cleared to see new profile. - Cache::invalidateTags([ - 'user:' . $uid, - 'user_view', - ]); - - // Verify that the private field value appears for the profile owner. - $this->drupalGet("user/$uid"); - $this->assertText($secret); - - // Verify that the private field value appears for the administrator. - $this->drupalLogin($this->adminUser); - $this->drupalGet("user/$uid"); - $this->assertText($secret); - - // Verify that the private field value does not appear for other users. - $this->drupalLogin($this->otherUser); - $this->drupalGet("user/$uid"); - $this->assertNoText($secret); - } - -} diff --git a/sites/all/modules/contrib/users/profile/src/Tests/ProfileRoleAccessTest.php b/sites/all/modules/contrib/users/profile/src/Tests/ProfileRoleAccessTest.php deleted file mode 100644 index 15b1a79ff..000000000 --- a/sites/all/modules/contrib/users/profile/src/Tests/ProfileRoleAccessTest.php +++ /dev/null @@ -1,165 +0,0 @@ -role1 = $this->drupalCreateRole([]); - $this->role2 = $this->drupalCreateRole([]); - $this->type2 = $this->createProfileType(NULL, NULL, FALSE, [$this->role2]); - $this->type3 = $this->createProfileType(NULL, NULL, FALSE, [$this->role1, $this->role2]); - } - - /** - * Tests add profile form access for a profile type that does not require - * users to have a role. - */ - public function testProfileWithNoRoles() { - // Create user with add own profile permissions. - $web_user1 = $this->drupalCreateUser(["add own {$this->type->id()} profile"]); - $this->drupalLogin($web_user1); - - // Test user without role can access add profile form. - // Expected: User can access form. - $this->drupalGet("user/{$web_user1->id()}/{$this->type->id()}"); - $this->assertResponse(200); - } - - public function testLockedRoles() { - $locked_role_type = $this->createProfileType(NULL, NULL, FALSE, [AccountInterface::AUTHENTICATED_ROLE]); - - // Create user with add own profile permissions. - $web_user1 = $this->drupalCreateUser(["add own {$locked_role_type->id()} profile"]); - $this->drupalLogin($web_user1); - - // Test user without role can access add profile form. - // Expected: User can access form. - $this->drupalGet("user/{$web_user1->id()}/{$locked_role_type->id()}"); - $this->assertResponse(200); - } - - /** - * Tests add profile form access for a profile type that requires users to - * have a single role. - */ - public function testProfileWithSingleRole() { - // Create user with add own profile permissions. - $web_user1 = $this->drupalCreateUser(["add own {$this->type2->id()} profile"]); - $this->drupalLogin($web_user1); - - // Test user without role can access add profile form. - // Expected: User cannot access form. - $this->drupalGet("user/{$web_user1->id()}/{$this->type2->id()}"); - $this->assertResponse(403); - - // Test user with wrong role can access add profile form. - // Expected: User cannot access form. - $web_user1->addRole($this->role1); - $web_user1->save(); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type2->id()}"); - $this->assertResponse(403); - - // Test user with correct role can access add profile form. - // Expected: User can access form. - $web_user1->removeRole($this->role1); - $web_user1->addRole($this->role2); - $web_user1->save(); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type2->id()}"); - $this->assertResponse(200); - } - - /** - * Tests add profile form access for a profile type that requires users to - * have one of multiple roles. - */ - public function testProfileWithAllRoles() { - // Create user with add own profile permissions. - $web_user1 = $this->drupalCreateUser(["add own {$this->type3->id()} profile"]); - $this->drupalLogin($web_user1); - - // Test user without role can access add profile form. - // Expected: User cannot access form. - $this->drupalGet("user/{$web_user1->id()}/{$this->type3->id()}"); - $this->assertResponse(403); - - // Test user with role 1 can access add profile form. - // Expected: User can access form. - $web_user1->addRole($this->role1); - $web_user1->save(); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type3->id()}"); - $this->assertResponse(200); - - // Test user with both roles can access add profile form. - // Expected: User can access form. - $web_user1->addRole($this->role2); - $web_user1->save(); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type3->id()}"); - $this->assertResponse(200); - - // Test user with role 2 can access add profile form. - // Expected: User can access form. - $web_user1->removeRole($this->role1); - $web_user1->save(); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type3->id()}"); - $this->assertResponse(200); - - // Test user without role can access add profile form. - // Expected: User cannot access form. - $web_user1->removeRole($this->role2); - $web_user1->save(); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type3->id()}"); - $this->assertResponse(403); - } - -} diff --git a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTestBase.php b/sites/all/modules/contrib/users/profile/src/Tests/ProfileTestBase.php deleted file mode 100644 index 3a91f994d..000000000 --- a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTestBase.php +++ /dev/null @@ -1,139 +0,0 @@ -drupalPlaceBlock('local_tasks_block'); - $this->drupalPlaceBlock('local_actions_block'); - $this->drupalPlaceBlock('page_title_block'); - - $this->type = $this->createProfileType('test', 'Test profile', TRUE); - - $id = $this->type->id(); - - $field_storage = FieldStorageConfig::create([ - 'field_name' => 'profile_fullname', - 'entity_type' => 'profile', - 'type' => 'text', - ]); - $field_storage->save(); - - $this->field = FieldConfig::create([ - 'field_storage' => $field_storage, - 'bundle' => $this->type->id(), - 'label' => 'Full name', - ]); - $this->field->save(); - - // Configure the default display. - $this->display = EntityViewDisplay::load("profile.{$this->type->id()}.default"); - if (!$this->display) { - $this->display = EntityViewDisplay::create([ - 'targetEntityType' => 'profile', - 'bundle' => $this->type->id(), - 'mode' => 'default', - 'status' => TRUE, - ]); - $this->display->save(); - } - $this->display - ->setComponent($this->field->getName(), ['type' => 'string']) - ->save(); - - // Configure rhe default form. - $this->form = EntityFormDisplay::load("profile.{$this->type->id()}.default"); - if (!$this->form) { - $this->form = EntityFormDisplay::create([ - 'targetEntityType' => 'profile', - 'bundle' => $this->type->id(), - 'mode' => 'default', - 'status' => TRUE, - ]); - $this->form->save(); - } - $this->form - ->setComponent($this->field->getName(), [ - 'type' => 'string_textfield', - ])->save(); - - $this->checkPermissions([ - 'administer profile types', - "view own $id profile", - "view any $id profile", - "add own $id profile", - "add any $id profile", - "edit own $id profile", - "edit any $id profile", - "delete own $id profile", - "delete any $id profile", - ]); - - user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ['access user profiles']); - $this->adminUser = $this->drupalCreateUser([ - 'administer profile types', - 'administer profiles', - "view any $id profile", - "add any $id profile", - "edit any $id profile", - "delete any $id profile", - ]); - } - -} diff --git a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTypeMultipleTest.php b/sites/all/modules/contrib/users/profile/src/Tests/ProfileTypeMultipleTest.php deleted file mode 100644 index c21a1d335..000000000 --- a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTypeMultipleTest.php +++ /dev/null @@ -1,95 +0,0 @@ -drupalLogin($this->adminUser); - - $edit = [ - 'multiple' => 1, - ]; - $this->drupalPostForm("admin/config/people/profiles/types/manage/{$this->type->id()}", $edit, t('Save')); - $this->assertRaw(new FormattableMarkup('%type profile type has been updated.', [ - '%type' => $this->type->label(), - ])); - - $web_user1 = $this->drupalCreateUser( - [ - "view own {$this->type->id()} profile", - "add own {$this->type->id()} profile", - "edit own {$this->type->id()} profile", - ] - ); - $this->drupalLogin($web_user1); - $value = $this->randomMachineName(); - - $edit = [ - "{$this->field->getName()}[0][value]" => $value, - ]; - $this->drupalPostForm("user/{$web_user1->id()}/{$this->type->id()}", $edit, t('Save')); - $this->assertRaw(new FormattableMarkup('%type profile has been created.', [ - '%type' => $this->type->label(), - ])); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type->id()}"); - $this->assertLinkByHref("user/{$web_user1->id()}/{$this->type->id()}/add"); - $this->assertText($value); - - $value2 = $this->randomMachineName(); - $edit = [ - "{$this->field->getName()}[0][value]" => $value2, - ]; - $this->drupalPostForm("user/{$web_user1->id()}/{$this->type->id()}/add", $edit, t('Save')); - $this->assertRaw(new FormattableMarkup('%type profile has been created.', [ - '%type' => $this->type->label(), - ])); - - Cache::invalidateTags(['profile_view']); - - $this->drupalGet("user/{$web_user1->id()}/{$this->type->id()}"); - $this->assertText($value2); - } - - /** - * Tests the non-multiple profile type create and edit flow. - */ - public function testProfileNotMultipleFlow() { - $web_user1 = $this->createUser([ - "add own {$this->type->id()} profile", - "edit own {$this->type->id()} profile", - ]); - $this->drupalLogin($web_user1); - - // Create the profile. - $edit = [ - "{$this->field->getName()}[0][value]" => $this->randomString(), - ]; - $this->drupalPostForm("user/{$web_user1->id()}/{$this->type->id()}", $edit, 'Save and make default'); - $this->assertRaw(new FormattableMarkup('%type profile has been created.', [ - '%type' => $this->type->label(), - ])); - - // Update the profile. - $edit = [ - "{$this->field->getName()}[0][value]" => $this->randomString(), - ]; - $this->drupalPostForm("user/{$web_user1->id()}/{$this->type->id()}", $edit, t('Save')); - $this->assertRaw(new FormattableMarkup('%type profile has been updated.', [ - '%type' => $this->type->label(), - ])); - } - -} diff --git a/sites/all/modules/contrib/users/profile/tests/profile_test/profile_test.info.yml b/sites/all/modules/contrib/users/profile/tests/profile_test/profile_test.info.yml index 4ecc56353..89e3ae8a9 100644 --- a/sites/all/modules/contrib/users/profile/tests/profile_test/profile_test.info.yml +++ b/sites/all/modules/contrib/users/profile/tests/profile_test/profile_test.info.yml @@ -5,8 +5,8 @@ description: 'Test module for Profile.' dependencies: - profile -# Information added by Drupal.org packaging script on 2016-08-31 -version: '8.x-1.0-alpha5+4-dev' +# Information added by Drupal.org packaging script on 2017-06-12 +version: '8.x-1.0-beta1' core: '8.x' project: 'profile' -datestamp: 1472611474 +datestamp: 1497287652 diff --git a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileDefaultTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileDefaultTest.php new file mode 100644 index 000000000..cd006f4ba --- /dev/null +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileDefaultTest.php @@ -0,0 +1,148 @@ +adminUser = $this->drupalCreateUser([ + 'access user profiles', + 'administer profile', + 'administer profile types', + 'access administration pages', + ]); + + $this->user1 = User::create([ + 'name' => $this->randomMachineName(), + 'mail' => $this->randomMachineName() . '@example.com', + ]); + $this->user1->save(); + $this->user2 = User::create([ + 'name' => $this->randomMachineName(), + 'mail' => $this->randomMachineName() . '@example.com', + ]); + $this->user2->save(); + } + + /** + * Tests whether profile default on edit is working. + */ + public function testProfileEdit() { + $type = ProfileType::create([ + 'id' => $this->randomMachineName(), + 'label' => $this->randomMachineName(), + 'registration' => FALSE, + 'roles' => [], + 'multiple' => TRUE, + ]); + $type->save(); + + $admin_user = $this->drupalCreateUser([ + 'administer profile', + 'administer users', + ]); + + // Create new profiles. + $profile1 = Profile::create([ + 'type' => $type->id(), + 'uid' => $this->user1->id(), + ]); + $profile1->save(); + $profile2 = Profile::create([ + 'type' => $type->id(), + 'uid' => $this->user1->id(), + ]); + $profile2->save(); + + // Verify that the first profile of this type is default. + $this->assertTrue($profile1->isDefault()); + $this->assertFalse($profile2->isDefault()); + + $this->drupalLogin($admin_user); + + $this->drupalGet($profile1->toUrl('edit-form')->toString()); + $this->assertSession()->buttonNotExists('Save and make default'); + $this->assertSession()->buttonExists('Save'); + + $this->drupalGet($profile2->toUrl('edit-form')->toString()); + $this->assertSession()->buttonExists('Save'); + $this->assertSession()->buttonExists('Save and make default'); + $this->submitForm([], 'Save and make default'); + + \Drupal::entityTypeManager()->getStorage('profile')->resetCache([$profile1->id(), $profile2->id()]); + $this->assertFalse(Profile::load($profile1->id())->isDefault()); + $this->assertTrue(Profile::load($profile2->id())->isDefault()); + } + + /** + * Tests the entity.profile.set_default route. + */ + public function testSetDefaultRoute() { + $this->type->setMultiple(TRUE)->save(); + $id = $this->type->id(); + $test_user = $this->drupalCreateUser([ + "view own $id profile", + "create $id profile", + "update own $id profile", + "delete own $id profile", + ]); + + $profile1 = Profile::create([ + 'type' => $id, + 'uid' => $test_user->id(), + 'profile_fullname' => 'Frederick Pabst', + ]); + $profile1->save(); + $profile2 = Profile::create([ + 'type' => $id, + 'uid' => $test_user->id(), + 'profile_fullname' => 'Frederick Miller', + ]); + $profile2->save(); + + $this->drupalLogin($test_user); + $this->drupalGet(Url::fromRoute('entity.profile.type.user_profile_form', ['user' => $test_user->id(), 'profile_type' => $id])); + $this->assertSession()->pageTextContains('Frederick Pabst'); + $this->assertSession()->pageTextContains('Frederick Miller'); + $this->assertSession()->linkExists('Mark as default'); + $this->getSession()->getPage()->clickLink('Mark as default'); + $this->assertSession()->responseContains(new FormattableMarkup('The %label profile has been marked as default.', ['%label' => $profile2->label()])); + } + +} diff --git a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileFieldAccessTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileFieldAccessTest.php new file mode 100644 index 000000000..1206be667 --- /dev/null +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileFieldAccessTest.php @@ -0,0 +1,121 @@ +adminUser = $this->drupalCreateUser([ + 'access user profiles', + 'administer profile', + 'administer profile types', + 'administer profile fields', + 'administer profile display', + ]); + + $user_permissions = [ + 'access user profiles', + "create {$this->type->id()} profile", + "update own {$this->type->id()} profile", + "view any {$this->type->id()} profile", + ]; + + $this->webUser = $this->drupalCreateUser($user_permissions); + $this->otherUser = $this->drupalCreateUser($user_permissions); + } + + /** + * Tests private profile field access. + */ + public function testPrivateField() { + $this->field->setThirdPartySetting('profile', 'profile_private', TRUE); + $this->field->save(); + + $field_storage = FieldStorageConfig::create([ + 'field_name' => 'profile_bio', + 'entity_type' => 'profile', + 'type' => 'text', + ]); + $field_storage->save(); + + $bio_field = FieldConfig::create([ + 'field_storage' => $field_storage, + 'bundle' => $this->type->id(), + 'label' => 'Bio', + ]); + $bio_field->save(); + + $this->display + ->setComponent($bio_field->getName(), [ + 'type' => 'string', + 'label' => 'above', + ]) + ->save(); + $this->form + ->setComponent($bio_field->getName(), [ + 'type' => 'text_default', + 'settings' => [], + ])->save(); + + // Fill in a field value. + $this->drupalLogin($this->webUser); + $secret = $this->randomMachineName(); + $not_secret = $this->randomMachineName(); + $this->drupalGet("user/{$this->webUser->id()}/{$this->type->id()}"); + $edit = [ + 'profile_fullname[0][value]' => $secret, + 'profile_bio[0][value]' => $not_secret, + ]; + $this->assertSession()->buttonNotExists('Save and make default'); + $this->submitForm($edit, 'Save'); + + /** @var \Drupal\profile\ProfileStorageInterface $storage */ + $storage = $this->container->get('entity_type.manager')->getStorage('profile'); + $web_user_profile = $storage->loadDefaultByUser($this->webUser, $this->type->id()); + + // Verify that the private field value appears for the profile owner. + $this->drupalGet($web_user_profile->toUrl()); + $this->assertSession()->pageTextContains($secret); + $this->assertSession()->pageTextContains($not_secret); + + // Verify that the private field value does not appear for other users. + $this->drupalLogin($this->otherUser); + $this->drupalGet($web_user_profile->toUrl()); + $this->assertSession()->pageTextNotContains($secret); + $this->assertSession()->pageTextContains($not_secret); + + // Verify that the private field value appears for the administrator. + $this->drupalLogin($this->adminUser); + $this->drupalGet($web_user_profile->toUrl()); + $this->assertSession()->pageTextContains($secret); + $this->assertSession()->pageTextContains($not_secret); + } + +} diff --git a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileHelpTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileHelpTest.php new file mode 100644 index 000000000..1d91a8744 --- /dev/null +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileHelpTest.php @@ -0,0 +1,26 @@ +createUser(['access administration pages']); + $this->drupalLogin($user); + $this->drupalGet(Url::fromRoute('help.page', ['name' => 'profile'])->toString()); + $this->assertSession()->pageTextContains('Types of profiles'); + $this->assertSession()->pageTextContains('Creating profiles'); + } + +} diff --git a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileRegisterFormTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileRegisterFormTest.php index 10adc20a3..32b1a64a7 100644 --- a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileRegisterFormTest.php +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileRegisterFormTest.php @@ -30,36 +30,44 @@ class ProfileRegisterFormTest extends ProfileTestBase { ->save(); user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ['view own test profile']); + $this->drupalGet('user/register'); // Verify that the additional profile field is attached and required. $name = $this->randomMachineName(); $pass_raw = $this->randomMachineName(); + // Use existing email to verify normal validation happens. $edit = [ 'name' => $name, - 'mail' => $this->randomMachineName() . '@example.com', + 'mail' => $this->adminUser->getEmail(), 'pass[pass1]' => $pass_raw, 'pass[pass2]' => $pass_raw, ]; - $this->drupalPostForm('user/register', $edit, t('Create new account')); + $this->submitForm($edit, t('Create new account')); $this->assertSession()->pageTextContains(new FormattableMarkup('@name field is required.', ['@name' => $this->field->getLabel()])); + $this->assertSession()->pageTextContains(new FormattableMarkup('The email address @email is already taken.', ['@email' => $this->adminUser->getEmail()])); // Verify that we can register. + $edit['mail'] = $this->randomMachineName() . '@example.com'; $edit["entity_" . $id . "[$field_name][0][value]"] = $this->randomMachineName(); - $this->drupalPostForm(NULL, $edit, t('Create new account')); + $this->submitForm($edit, t('Create new account')); $this->assertSession()->pageTextContains(new FormattableMarkup('Registration successful. You are now logged in.', [])); $new_user = user_load_by_name($name); $this->assertTrue($new_user->isActive(), 'New account is active after registration.'); + /** @var \Drupal\profile\ProfileStorageInterface $storage */ + $storage = $this->container->get('entity_type.manager')->getStorage('profile'); + // Verify that a new profile was created for the new user ID. - $profile = $this->container->get('entity_type.manager') - ->getStorage('profile') - ->loadByUser($new_user, $this->type->id()); + $profile = $storage->loadDefaultByUser($new_user, $this->type->id()); $this->assertEquals($profile->get($field_name)->value, $edit["entity_" . $id . "[$field_name][0][value]"], 'Field value found in loaded profile.'); + // Verify that, as the first profile of this type for the user, it was set + // as default. + $this->assertTrue($profile->isDefault()); // Verify that the profile field value appears on the user account page. - $this->drupalGet('user'); + $this->drupalGet($profile->toUrl()->toString()); $this->assertSession()->pageTextContains($edit["entity_" . $id . "[$field_name][0][value]"]); } diff --git a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileRevisionTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileRevisionTest.php new file mode 100644 index 000000000..8d72ea67d --- /dev/null +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileRevisionTest.php @@ -0,0 +1,160 @@ + $this->randomMachineName(), + 'label' => $this->randomMachineName(), + 'use_revisions' => TRUE, + ]); + $use_revisions_type->save(); + $this->useRevisionsType = $use_revisions_type; + + $use_revisions_fullname_field = FieldConfig::create([ + 'field_storage' => $this->field->getFieldStorageDefinition(), + 'bundle' => $this->useRevisionsType->id(), + 'label' => 'Full name', + ]); + $use_revisions_fullname_field->save(); + + // Configure the default display. + $use_revisions_display = EntityViewDisplay::load("profile.{$this->useRevisionsType->id()}.default"); + if (!$use_revisions_display) { + $use_revisions_display = EntityViewDisplay::create([ + 'targetEntityType' => 'profile', + 'bundle' => $this->useRevisionsType->id(), + 'mode' => 'default', + 'status' => TRUE, + ]); + $use_revisions_display->save(); + } + $use_revisions_display + ->setComponent($this->field->getName(), ['type' => 'string']) + ->save(); + + // Configure the default form. + $use_revisions_form = EntityFormDisplay::load("profile.{$this->useRevisionsType->id()}.default"); + if (!$use_revisions_form) { + $use_revisions_form = EntityFormDisplay::create([ + 'targetEntityType' => 'profile', + 'bundle' => $this->useRevisionsType->id(), + 'mode' => 'default', + 'status' => TRUE, + ]); + $this->form->save(); + } + $use_revisions_form + ->setComponent($this->field->getName(), [ + 'type' => 'string_textfield', + ])->save(); + + } + + /** + * Tests revision handling. + */ + public function testProfileRevisions() { + /** @var \Drupal\profile\ProfileStorageInterface $storage */ + $storage = $this->container->get('entity_type.manager')->getStorage('profile'); + + $user = $this->createUser([ + "create {$this->type->id()} profile", + "view own {$this->type->id()} profile", + "update own {$this->type->id()} profile", + ]); + $this->drupalLogin($user); + + $create_url = Url::fromRoute('entity.profile.type.user_profile_form', [ + 'user' => $this->loggedInUser->id(), + 'profile_type' => $this->type->id(), + ]); + $this->drupalGet($create_url); + $edit = [ + 'profile_fullname[0][value]' => $this->getRandomGenerator()->word(10), + ]; + $this->submitForm($edit, 'Save'); + + $profile = $storage->loadDefaultByUser($this->loggedInUser, $this->type->id()); + $existing_profile_id = $profile->id(); + $existing_revision_id = $profile->getRevisionId(); + + $create_url = Url::fromRoute('entity.profile.type.user_profile_form', [ + 'user' => $this->loggedInUser->id(), + 'profile_type' => $this->type->id(), + ]); + $this->drupalGet($create_url); + $edit = [ + 'profile_fullname[0][value]' => $this->getRandomGenerator()->word(10), + ]; + $this->submitForm($edit, 'Save'); + + $storage->resetCache([$profile->id()]); + $profile = $storage->loadDefaultByUser($this->loggedInUser, $this->type->id()); + $this->assertEquals($existing_profile_id, $profile->id()); + $this->assertEquals($existing_revision_id, $profile->getRevisionId()); + + + $user = $this->createUser([ + "create {$this->useRevisionsType->id()} profile", + "view own {$this->useRevisionsType->id()} profile", + "update own {$this->useRevisionsType->id()} profile", + ]); + $this->drupalLogin($user); + + $create_url = Url::fromRoute('entity.profile.type.user_profile_form', [ + 'user' => $this->loggedInUser->id(), + 'profile_type' => $this->useRevisionsType->id(), + ]); + $this->drupalGet($create_url); + $edit = [ + 'profile_fullname[0][value]' => $this->getRandomGenerator()->word(10), + ]; + $this->submitForm($edit, 'Save'); + + $profile = $storage->loadDefaultByUser($this->loggedInUser, $this->useRevisionsType->id()); + $existing_profile_id = $profile->id(); + $existing_revision_id = $profile->getRevisionId(); + + $create_url = Url::fromRoute('entity.profile.type.user_profile_form', [ + 'user' => $this->loggedInUser->id(), + 'profile_type' => $this->useRevisionsType->id(), + ]); + $this->drupalGet($create_url); + $edit = [ + 'profile_fullname[0][value]' => $this->getRandomGenerator()->word(10), + ]; + $this->submitForm($edit, 'Save'); + + $storage->resetCache([$profile->id()]); + $profile = $storage->loadDefaultByUser($this->loggedInUser, $this->useRevisionsType->id()); + $this->assertEquals($existing_profile_id, $profile->id()); + $this->assertNotEquals($existing_revision_id, $profile->getRevisionId()); + } + +} diff --git a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTabTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTabTest.php similarity index 92% rename from sites/all/modules/contrib/users/profile/src/Tests/ProfileTabTest.php rename to sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTabTest.php index 637a17981..87dd2e24d 100644 --- a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTabTest.php +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTabTest.php @@ -1,6 +1,6 @@ adminUser = $this->drupalCreateUser([ 'access user profiles', - 'administer profiles', + 'administer profile', 'administer profile types', - 'bypass profile access', 'access administration pages', ]); } @@ -116,17 +115,17 @@ class ProfileTabTest extends ProfileTestBase { * secondary. Defaults to 0. */ protected function assertLocalTasks(array $routes, $level = 0) { - $elements = $this->xpath('//*[contains(@class, :class)]//a', array( + $elements = $this->xpath('//*[contains(@class, :class)]//a', [ ':class' => $level == 0 ? 'tabs primary' : 'tabs secondary', - )); + ]); $this->assertTrue(count($elements), 'Local tasks found.'); foreach ($routes as $index => $route_info) { list($route_name, $route_parameters) = $route_info; $expected = Url::fromRoute($route_name, $route_parameters)->toString(); - $method = ($elements[$index]['href'] == $expected ? 'pass' : 'fail'); + $method = ($elements[$index]->getAttribute('href') == $expected ? 'pass' : 'fail'); $this->{$method}(new FormattableMarkup('Task @number href @value equals @expected.', [ '@number' => $index + 1, - '@value' => (string) $elements[$index]['href'], + '@value' => (string) $elements[$index]->getAttribute('href'), '@expected' => $expected, ])); } diff --git a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTest.php new file mode 100644 index 000000000..480cbbbd2 --- /dev/null +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTest.php @@ -0,0 +1,127 @@ +drupalLogin($this->adminUser); + + $profile_fullname = $this->randomString(); + $create_url = Url::fromRoute('entity.profile.type.user_profile_form', [ + 'user' => $this->loggedInUser->id(), + 'profile_type' => $this->type->id(), + ]); + $this->drupalGet($create_url->toString()); + $this->assertSession()->titleEquals("Create {$this->type->label()} | Drupal"); + $this->assertSession()->buttonNotExists('Save and make default'); + $edit = [ + 'profile_fullname[0][value]' => $profile_fullname, + ]; + $this->submitForm($edit, 'Save'); + + /** @var \Drupal\profile\ProfileStorageInterface $storage */ + $storage = $this->container->get('entity_type.manager')->getStorage('profile'); + + $profile = $storage->loadDefaultByUser($this->loggedInUser, $this->type->id()); + $this->assertEquals($profile_fullname, $profile->get('profile_fullname')->value); + + $this->drupalGet($profile->toUrl('edit-form')->toString()); + $this->assertSession()->titleEquals("Edit {$this->type->label()} profile #{$profile->id()} | Drupal"); + + $profile_fullname = $this->randomString(); + $edit = [ + 'profile_fullname[0][value]' => $profile_fullname, + ]; + $this->submitForm($edit, 'Save'); + + $storage->resetCache([$profile->id()]); + $profile = $storage->loadDefaultByUser($this->loggedInUser, $this->type->id()); + $this->assertEquals($profile_fullname, $profile->get('profile_fullname')->value); + } + + /** + * Tests that a profile belonging to an anonymous user can be edited. + */ + public function testAnonymousProfileEdit() { + $profile = $this->createProfile($this->type, User::getAnonymousUser()); + + $this->drupalLogin($this->adminUser); + $this->drupalGet($profile->toUrl('edit-form')->toString()); + $profile_fullname = $this->randomString(); + $edit = [ + 'profile_fullname[0][value]' => $profile_fullname, + ]; + $this->submitForm($edit, 'Save'); + $this->assertSession()->addressEquals($profile->toUrl('collection')->toString()); + } + + /** + * Tests entity.profile.type.user_profile_form route access. + */ + public function testUserProfileFormAccess() { + $id = $this->type->id(); + $test_user1 = $this->drupalCreateUser([ + "view own $id profile", + "create $id profile", + "update own $id profile", + "delete own $id profile", + ]); + $test_user2 = $this->drupalCreateUser([ + "view own $id profile", + "create $id profile", + "update own $id profile", + "delete own $id profile", + ]); + + $this->drupalLogin($this->adminUser); + $this->drupalGet(Url::fromRoute('entity.profile.type.user_profile_form', ['user' => $test_user1->id(), 'profile_type' => $id])); + $this->assertSession()->statusCodeEquals(200); + $this->drupalLogin($test_user1); + $this->drupalGet(Url::fromRoute('entity.profile.type.user_profile_form', ['user' => $test_user1->id(), 'profile_type' => $id])); + $this->assertSession()->statusCodeEquals(200); + $this->drupalGet(Url::fromRoute('entity.profile.type.user_profile_form', ['user' => $test_user2->id(), 'profile_type' => $id])); + $this->assertSession()->statusCodeEquals(403); + + $this->type->setMultiple(TRUE)->save(); + + // Add link only appears if there are existing profiles. + Profile::create([ + 'type' => $this->type->id(), + 'uid' => $test_user1->id(), + 'profile_fullname' => $this->randomMachineName(), + ])->save(); + Profile::create([ + 'type' => $this->type->id(), + 'uid' => $test_user2->id(), + 'profile_fullname' => $this->randomMachineName(), + ])->save(); + + $this->drupalLogin($this->adminUser); + $this->drupalGet(Url::fromRoute('entity.profile.type.user_profile_form', ['user' => $test_user1->id(), 'profile_type' => $id])); + $this->assertSession()->linkExists(new FormattableMarkup('Add new @type', ['@type' => $this->type->label()])); + $this->assertSession()->statusCodeEquals(200); + $this->drupalLogin($test_user1); + $this->drupalGet(Url::fromRoute('entity.profile.type.user_profile_form', ['user' => $test_user1->id(), 'profile_type' => $id])); + $this->assertSession()->linkExists(new FormattableMarkup('Add new @type', ['@type' => $this->type->label()])); + $this->assertSession()->statusCodeEquals(200); + $this->drupalGet(Url::fromRoute('entity.profile.type.user_profile_form', ['user' => $test_user2->id(), 'profile_type' => $id])); + $this->assertSession()->linkNotExists(new FormattableMarkup('Add new @type', ['@type' => $this->type->label()])); + $this->assertSession()->statusCodeEquals(403); + + } + +} diff --git a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTestBase.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTestBase.php index 87070439d..69c0ca0b2 100644 --- a/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTestBase.php +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTestBase.php @@ -8,7 +8,6 @@ use Drupal\Core\Session\AccountInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\profile\ProfileTestTrait; -use Drupal\simpletest\WebTestBase; use Drupal\Tests\BrowserTestBase; /** @@ -30,14 +29,14 @@ abstract class ProfileTestBase extends BrowserTestBase { /** * Testing profile type entity view display. * - * @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display + * @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface */ protected $display; /** * Testing profile type entity form display. * - * @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $form + * @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface */ protected $form; @@ -98,7 +97,7 @@ abstract class ProfileTestBase extends BrowserTestBase { ->setComponent($this->field->getName(), ['type' => 'string']) ->save(); - // Configure rhe default form. + // Configure the default form. $this->form = EntityFormDisplay::load("profile.{$this->type->id()}.default"); if (!$this->form) { $this->form = EntityFormDisplay::create([ @@ -116,12 +115,11 @@ abstract class ProfileTestBase extends BrowserTestBase { $this->checkPermissions([ 'administer profile types', + "create $id profile", "view own $id profile", "view any $id profile", - "add own $id profile", - "add any $id profile", - "edit own $id profile", - "edit any $id profile", + "update own $id profile", + "update any $id profile", "delete own $id profile", "delete any $id profile", ]); @@ -129,10 +127,10 @@ abstract class ProfileTestBase extends BrowserTestBase { user_role_grant_permissions(AccountInterface::AUTHENTICATED_ROLE, ['access user profiles']); $this->adminUser = $this->drupalCreateUser([ 'administer profile types', - 'administer profiles', + 'administer profile', "view any $id profile", - "add any $id profile", - "edit any $id profile", + "create $id profile", + "update any $id profile", "delete any $id profile", ]); } diff --git a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTypeCRUDTest.php b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTypeCRUDTest.php similarity index 60% rename from sites/all/modules/contrib/users/profile/src/Tests/ProfileTypeCRUDTest.php rename to sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTypeCRUDTest.php index 3e40b4d18..30f25e0e3 100644 --- a/sites/all/modules/contrib/users/profile/src/Tests/ProfileTypeCRUDTest.php +++ b/sites/all/modules/contrib/users/profile/tests/src/Functional/ProfileTypeCRUDTest.php @@ -1,9 +1,10 @@ drupalLogin($this->adminUser); // Create a new profile type. @@ -51,7 +51,7 @@ class ProfileTypeCRUDTest extends ProfileTestBase { $this->assertUrl('admin/config/people/profiles/types/add'); $id = Unicode::strtolower($this->randomMachineName()); - $label = $this->randomString(); + $label = $this->getRandomGenerator()->word(10); $edit = [ 'id' => $id, 'label' => $label, @@ -67,37 +67,16 @@ class ProfileTypeCRUDTest extends ProfileTestBase { // Edit the new profile type. $this->drupalGet("admin/config/people/profiles/types/manage/$id"); $this->assertRaw(new FormattableMarkup('Edit %label profile type', ['%label' => $label])); - $edit = [ - 'registration' => 1, - ]; - $this->drupalPostForm(NULL, $edit, t('Save')); + $this->getSession()->getPage()->checkField('Include in user registration form'); + $this->getSession()->getPage()->checkField('Create a new revision when a profile is modified'); + $this->submitForm([], 'Save'); $this->assertUrl('admin/config/people/profiles/types'); $this->assertRaw(new FormattableMarkup('%label profile type has been updated.', ['%label' => $label])); - \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); - - // Add a field to the profile type. - $this->drupalGet("admin/config/people/profiles/types/manage/$id/fields/add-field"); - $field_name = Unicode::strtolower($this->randomMachineName()); - $field_label = $this->randomString(); - $edit = [ - 'new_storage_type' => 'string', - 'label' => $field_label, - 'field_name' => $field_name, - ]; - $this->drupalPostForm(NULL, $edit, t('Save and continue')); - $this->drupalPostForm(NULL, [], t('Save field settings')); - $this->drupalPostForm(NULL, [], t('Save settings')); - $this->assertRaw(new FormattableMarkup('Saved %label configuration.', ['%label' => $field_label])); - - // Verify that the field is still associated with it. - $this->drupalGet("admin/config/people/profiles/types/manage/$id/fields"); - // @todo D8 core: This assertion fails for an unknown reason. Database - // contains the right values, so field_attach_rename_bundle() works - // correctly. The pre-existing field does not appear on the Manage - // fields page of the renamed bundle. Not even flushing all caches - // helps. Can be reproduced manually. - // $this->assertText(check_plain($field_label)); + $profile_type = ProfileType::load($id); + $this->assertEquals($label, $profile_type->label()); + $this->assertTrue($profile_type->getRegistration()); + $this->assertTrue($profile_type->shouldCreateNewRevision()); } } diff --git a/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileAccessTest.php b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileAccessTest.php index c71476b9b..46b10fcf5 100644 --- a/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileAccessTest.php +++ b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileAccessTest.php @@ -1,10 +1,12 @@ installEntitySchema('profile'); $this->installEntitySchema('view'); $this->installConfig(['profile']); - $this->accessControlHandler = $this->container->get('entity_type.manager')->getAccessControlHandler('profile'); + $this->accessControlHandler = $this->container->get('entity_type.manager') + ->getAccessControlHandler('profile'); $this->accessManager = $this->container->get('access_manager'); $this->type = $this->createProfileType('test', 'Test profile', TRUE); $this->createUser(); @@ -71,14 +78,16 @@ class ProfileAccessTest extends EntityKernelTestBase { // Verify access through route. $this->assertFalse($this->accessManager->checkNamedRoute( - 'entity.profile.add_form', + 'entity.profile.type.user_profile_form.add', ['user' => $web_user1->id(), 'profile_type' => $this->type->id()], $web_user1 )); - - // Test user with permission to only add own profile. - $web_user2 = $this->createUser([], ["add own {$this->type->id()} profile"]); + // Test user with permission to only add a profile. + $web_user2 = $this->createUser([], [ + "create {$this->type->id()} profile", + "update own {$this->type->id()} profile", + ]); $web_user1->addRole($web_user2->get('roles')->first()->target_id); $web_user1->save(); @@ -86,15 +95,15 @@ class ProfileAccessTest extends EntityKernelTestBase { $access = $this->accessControlHandler->createAccess($this->type->id(), $web_user2); $this->assertTrue($access); - // User 2 can create own profile of type. + // User 2 can create profile of type. $this->assertTrue($this->accessManager->checkNamedRoute( - 'entity.profile.add_form', + 'entity.profile.type.user_profile_form.add', ['user' => $web_user2->id(), 'profile_type' => $this->type->id()], $web_user2 )); // User 1 cannot create a profile for User 2. $this->assertFalse($this->accessManager->checkNamedRoute( - 'entity.profile.add_form', + 'entity.profile.type.user_profile_form.add', ['user' => $web_user2->id(), 'profile_type' => $this->type->id()], $web_user1 )); @@ -103,23 +112,26 @@ class ProfileAccessTest extends EntityKernelTestBase { $second_type = $this->createProfileType('test2', 'Test2 profile', TRUE); $this->assertFalse($this->accessControlHandler->createAccess('test2', $web_user2)); $this->assertFalse($this->accessManager->checkNamedRoute( - 'entity.profile.add_form', + 'entity.profile.type.user_profile_form.add', ['user' => $web_user2->id(), 'profile_type' => $second_type->id()], $web_user2 )); // Test user with permission to only add any profile. - $web_user3 = $this->createUser([], ["add any {$this->type->id()} profile"]); + $web_user3 = $this->createUser([], [ + "create {$this->type->id()} profile", + "update own {$this->type->id()} profile", + ]); $this->assertTrue($this->accessControlHandler->createAccess($this->type->id(), $web_user3)); // Verify access through route. $this->assertTrue($this->accessManager->checkNamedRoute( - 'entity.profile.add_form', + 'entity.profile.type.user_profile_form.add', ['user' => $web_user3->id(), 'profile_type' => $this->type->id()], $web_user3 )); - $this->assertTrue($this->accessManager->checkNamedRoute( - 'entity.profile.add_form', + $this->assertFalse($this->accessManager->checkNamedRoute( + 'entity.profile.type.user_profile_form.add', ['user' => $web_user2->id(), 'profile_type' => $this->type->id()], $web_user3 )); @@ -159,17 +171,14 @@ class ProfileAccessTest extends EntityKernelTestBase { $this->assertTrue($profile1->access('view', $web_user2)); $this->assertTrue($profile2->access('view', $web_user2)); - $user_view_builder = $this->container->get('entity_type.manager')->getViewBuilder('user'); + user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, ["view own {$this->type->id()} profile"]); + $this->assertFalse($profile1->access('view', User::getAnonymousUser())); + $this->assertFalse($profile2->access('view', User::getAnonymousUser())); - $this->container->get('current_user')->setAccount($web_user1); - $user2_view = $user_view_builder->view($web_user2); - $this->render($user2_view); - $this->assertNoText($this->type->label()); - - $this->container->get('current_user')->setAccount($web_user2); - $user1_view = $user_view_builder->view($web_user1); - $this->render($user1_view); - $this->assertText($this->type->label()); + // @todo Fix in https://www.drupal.org/node/2820209 + user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, ["view any {$this->type->id()} profile"]); + // $this->assertTrue($profile1->access('view', User::getAnonymousUser())); + // $this->assertTrue($profile2->access('view', User::getAnonymousUser())); } /** @@ -178,12 +187,12 @@ class ProfileAccessTest extends EntityKernelTestBase { public function testProfileEditAccess() { // Setup users. $web_user1 = $this->createUser([], [ - "add own {$this->type->id()} profile", - "edit own {$this->type->id()} profile", + "create {$this->type->id()} profile", + "update own {$this->type->id()} profile", ]); $web_user2 = $this->createUser([], [ - "add any {$this->type->id()} profile", - "edit any {$this->type->id()} profile", + "create {$this->type->id()} profile", + "update any {$this->type->id()} profile", ]); // Setup profiles. @@ -199,12 +208,12 @@ class ProfileAccessTest extends EntityKernelTestBase { $profile2->save(); // Test user1 can only edit own profiles. - $this->assertTrue($profile1->access('edit', $web_user1)); - $this->assertFalse($profile2->access('edit', $web_user1)); + $this->assertTrue($profile1->access('update', $web_user1)); + $this->assertFalse($profile2->access('update', $web_user1)); // Test user2 can edit any profiles. - $this->assertTrue($profile1->access('edit', $web_user2)); - $this->assertTrue($profile2->access('edit', $web_user2)); + $this->assertTrue($profile1->access('update', $web_user2)); + $this->assertTrue($profile2->access('update', $web_user2)); } } diff --git a/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileRoleAccessTest.php b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileRoleAccessTest.php new file mode 100644 index 000000000..9c476c2ce --- /dev/null +++ b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileRoleAccessTest.php @@ -0,0 +1,201 @@ +role1 = Role::create([ + 'id' => strtolower($this->randomMachineName(8)), + 'label' => $this->randomMachineName(8), + ]); + $this->role1->save(); + $this->role2 = Role::create([ + 'id' => strtolower($this->randomMachineName(8)), + 'label' => $this->randomMachineName(8), + ]); + $this->role2->save(); + $this->type1 = $this->createProfileType(NULL, NULL, FALSE, []); + $this->type2 = $this->createProfileType(NULL, NULL, FALSE, [$this->role2->id()]); + $this->type3 = $this->createProfileType(NULL, NULL, FALSE, [ + $this->role1->id(), + $this->role2->id(), + ]); + + $this->accessHandler = $this->container->get('entity_type.manager') + ->getAccessControlHandler('profile'); + + // Do not allow uid == 1 to skew tests. + $this->createUser(); + } + + /** + * Tests profile form access for a type that has no role requirement. + */ + public function testProfileWithNoRoles() { + // Create user with add profile permissions. + $web_user1 = $this->createUser([], ["create {$this->type1->id()} profile"]); + $this->assertTrue($this->accessHandler->createAccess($this->type1->id(), $web_user1)); + } + + /** + * Tests profile form access for a type that has the locked role requirement. + */ + public function testLockedRoles() { + $locked_role_type = $this->createProfileType(NULL, NULL, FALSE, [AccountInterface::AUTHENTICATED_ROLE]); + // Create user with add profile permissions. + $web_user1 = $this->createUser([], ["create {$locked_role_type->id()} profile"]); + $this->assertTrue($this->accessHandler->createAccess($locked_role_type->id(), $web_user1)); + } + + /** + * Tests profile form access for a type that requires a role. + */ + public function testProfileWithSingleRole() { + // Create user with add own profile permissions. + $web_user1 = $this->createUser([], ["create {$this->type2->id()} profile"]); + + // Test user without role can access add profile form. + // Expected: User cannot access form. + $this->assertFalse($this->accessHandler->createAccess($this->type2->id(), $web_user1)); + $this->accessHandler->resetCache(); + + // Test user with wrong role can access add profile form. + // Expected: User cannot access form. + $web_user1->addRole($this->role1->id()); + $web_user1->save(); + + $this->assertFalse($this->accessHandler->createAccess($this->type2->id(), $web_user1)); + $this->accessHandler->resetCache(); + + // Test user with correct role can access add profile form. + // Expected: User can access form. + $web_user1->removeRole($this->role1->id()); + $web_user1->addRole($this->role2->id()); + $web_user1->save(); + $this->reloadEntity($web_user1); + + $this->assertTrue($this->accessHandler->createAccess($this->type2->id(), $web_user1)); + } + + /** + * Tests profile form access for a type that requires multiple roles. + */ + public function testProfileWithAllRoles() { + // Create user with add own profile permissions. + $web_user1 = $this->createUser([], ["create {$this->type3->id()} profile"]); + + // Test user without role can access add profile form. + // Expected: User cannot access form. + $this->assertFalse($this->accessHandler->createAccess($this->type3->id(), $web_user1)); + $this->accessHandler->resetCache(); + + // Test user with role 1 can access add profile form. + // Expected: User can access form. + $web_user1->addRole($this->role1->id()); + $web_user1->save(); + + $this->assertTrue($this->accessHandler->createAccess($this->type3->id(), $web_user1)); + $this->accessHandler->resetCache(); + + // Test user with both roles can access add profile form. + // Expected: User can access form. + $web_user1->addRole($this->role2->id()); + $web_user1->save(); + + $this->assertTrue($this->accessHandler->createAccess($this->type3->id(), $web_user1)); + $this->accessHandler->resetCache(); + + // Test user with role 2 can access add profile form. + // Expected: User can access form. + $web_user1->removeRole($this->role1->id()); + $web_user1->save(); + + $this->assertTrue($this->accessHandler->createAccess($this->type3->id(), $web_user1)); + $this->accessHandler->resetCache(); + + // Test user without role can access add profile form. + // Expected: User cannot access form. + $web_user1->removeRole($this->role2->id()); + $web_user1->save(); + + $this->assertFalse($this->accessHandler->createAccess($this->type3->id(), $web_user1)); + } + +} diff --git a/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileTest.php b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileTest.php index 878762a05..3b998e6ed 100644 --- a/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileTest.php +++ b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileTest.php @@ -3,9 +3,11 @@ namespace Drupal\Tests\profile\Kernel; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\field\Entity\FieldConfig; +use Drupal\field\Entity\FieldStorageConfig; use Drupal\KernelTests\Core\Entity\EntityKernelTestBase; +use Drupal\profile\Entity\Profile; use Drupal\profile\Entity\ProfileType; -use Drupal\profile\ProfileTestTrait; /** * Tests basic functionality of profiles. @@ -20,10 +22,7 @@ class ProfileTest extends EntityKernelTestBase { * @var array */ public static $modules = [ - 'user', - 'system', - 'field', - 'text', + 'entity', 'profile', 'views', ]; @@ -38,7 +37,7 @@ class ProfileTest extends EntityKernelTestBase { /** * Testing demo user 2. * - * @var \Drupal\user\UserInterface; + * @var \Drupal\user\UserInterface */ public $user2; @@ -80,21 +79,13 @@ class ProfileTest extends EntityKernelTestBase { $types[$id]->save(); } - // Create a new profile. /** @var \Drupal\profile\Entity\ProfileInterface $profile */ - $profile = $this->profileStorage->create($expected = [ + $profile = $this->profileStorage->create([ 'type' => $types['profile_type_0']->id(), 'uid' => $this->user1->id(), ]); - $expected_label = new TranslatableMarkup('@type profile of @username (uid: @uid)', [ - '@type' => $types['profile_type_0']->label(), - '@username' => $this->user1->getDisplayName(), - '@uid' => $this->user1->id(), - ]); - - $this->assertEquals($expected_label, $profile->label()); $this->assertEquals($profile->getOwnerId(), $this->user1->id()); $this->assertEquals($profile->getCreatedTime(), REQUEST_TIME); $this->assertEquals($profile->getChangedTime(), REQUEST_TIME); @@ -102,6 +93,11 @@ class ProfileTest extends EntityKernelTestBase { // Save the profile. $profile->save(); $this->assertEquals(REQUEST_TIME, $profile->getChangedTime()); + $expected_label = new TranslatableMarkup('@type profile #@id', [ + '@type' => $types['profile_type_0']->label(), + '@id' => $profile->id(), + ]); + $this->assertEquals($expected_label, $profile->label()); // List profiles for the user and verify that the new profile appears. $list = $this->profileStorage->loadByProperties(['uid' => $this->user1->id()]); @@ -146,4 +142,190 @@ class ProfileTest extends EntityKernelTestBase { $this->assertEquals($list_ids, [$user2_profile1->id()]); } + /** + * Tests profiles are active by default. + */ + public function testProfileActive() { + $profile_type = ProfileType::create([ + 'id' => 'test_defaults', + 'label' => 'test_defaults', + ]); + $profile_type->save(); + + // Create new profiles. + $profile1 = Profile::create([ + 'type' => $profile_type->id(), + 'uid' => $this->user1->id(), + ]); + $profile1->save(); + $this->assertTrue($profile1->isActive()); + + $profile1->setActive(FALSE); + $profile1->save(); + + $this->assertFalse($profile1->isActive()); + } + + /** + * Tests default profile functionality. + */ + public function testDefaultProfile() { + $profile_type = ProfileType::create([ + 'id' => 'test_defaults', + 'label' => 'test_defaults', + ]); + $profile_type->save(); + + // Create a new profile. + $profile1 = Profile::create([ + 'type' => $profile_type->id(), + 'uid' => $this->user1->id(), + ]); + $profile1->save(); + + // Verify that the first profile of this type is default. + $this->assertTrue($profile1->isDefault()); + + // Create a second new profile. + $profile2 = Profile::create([ + 'type' => $profile_type->id(), + 'uid' => $this->user1->id(), + ]); + $profile2->setDefault(TRUE); + $profile2->save(); + + $this->assertFalse($this->reloadEntity($profile1)->isDefault()); + $this->assertTrue($this->reloadEntity($profile2)->isDefault()); + + $profile1->setDefault(TRUE)->save(); + $this->assertFalse($this->reloadEntity($profile2)->isDefault()); + $this->assertTrue($this->reloadEntity($profile1)->isDefault()); + + // Verify that a deactivated profile cannot be the default and that if the + // current default is disactivated another default is set. + $profile2->setActive(FALSE); + $profile2->save(); + + $this->assertFalse($this->reloadEntity($profile2)->isDefault()); + $this->assertTrue($this->reloadEntity($profile1)->isDefault()); + } + + /** + * Tests loading default from storage handler. + */ + public function testLoadDefaultProfile() { + $profile_type = ProfileType::create([ + 'id' => 'test_defaults', + 'label' => 'test_defaults', + ]); + $profile_type->save(); + + // Create new profiles. + $profile1 = Profile::create([ + 'type' => $profile_type->id(), + 'uid' => $this->user1->id(), + ]); + $profile1->setActive(TRUE); + $profile1->save(); + $profile2 = Profile::create([ + 'type' => $profile_type->id(), + 'uid' => $this->user1->id(), + ]); + $profile2->setActive(TRUE); + $profile2->setDefault(TRUE); + $profile2->save(); + + /** @var \Drupal\profile\ProfileStorageInterface $storage */ + $storage = \Drupal::entityTypeManager()->getStorage('profile'); + + $default_profile = $storage->loadDefaultByUser($this->user1, $profile_type->id()); + $this->assertEquals($profile2->id(), $default_profile->id()); + + // Ensure that \Drupal\profile\Entity\Profile::preSave doesn't crash. + $anonymous_profile = Profile::create(['type' => $profile_type->id()]); + $anonymous_profile->save(); + $this->assertTrue(empty($anonymous_profile->getOwner())); + } + + /** + * Tests revisions. + */ + public function testProfileRevisions() { + $profile_type = ProfileType::create([ + 'id' => 'test_defaults', + 'label' => 'test_defaults', + ]); + $profile_type->save(); + + $field_storage = FieldStorageConfig::create([ + 'field_name' => 'profile_fullname', + 'entity_type' => 'profile', + 'type' => 'text', + ]); + $field_storage->save(); + + $field = FieldConfig::create([ + 'field_storage' => $field_storage, + 'bundle' => $profile_type->id(), + 'label' => 'Full name', + ]); + $field->save(); + + + // Create new profiles. + /** @var \Drupal\profile\Entity\Profile $profile1 */ + $profile1 = Profile::create([ + 'type' => $profile_type->id(), + 'uid' => $this->user1->id(), + 'profile_fullname' => $this->randomMachineName(), + ]); + $profile1->save(); + + $profile1 = $this->reloadEntity($profile1); + $existing_profile_id = $profile1->id(); + $existing_revision_id = $profile1->getRevisionId(); + + $profile1->get('profile_fullname')->setValue($this->randomMachineName()); + $profile1->save(); + + $profile1 = $this->reloadEntity($profile1); + $this->assertEquals($existing_profile_id, $profile1->id()); + $this->assertEquals($existing_revision_id, $profile1->getRevisionId()); + + $profile_type->set('use_revisions', TRUE); + $profile_type->save(); + + // Create new profiles. + /** @var \Drupal\profile\Entity\Profile $profile2 */ + $profile2 = Profile::create([ + 'type' => $profile_type->id(), + 'uid' => $this->user1->id(), + 'profile_fullname' => $this->randomMachineName(), + ]); + $profile2->setDefault(TRUE); + $profile2->save(); + + $profile2 = $this->reloadEntity($profile2); + $existing_profile_id = $profile2->id(); + $existing_revision_id = $profile2->getRevisionId(); + + // Changing field creates revision. + $profile2->get('profile_fullname')->setValue($this->randomMachineName()); + $profile2->save(); + + $profile2 = $this->reloadEntity($profile2); + $this->assertEquals($existing_profile_id, $profile2->id()); + $this->assertNotEquals($existing_revision_id, $profile2->getRevisionId()); + + $existing_profile_id = $profile2->id(); + $existing_revision_id = $profile2->getRevisionId(); + + // Random save does not create a revision. + $profile2->save(); + $profile2 = $this->reloadEntity($profile2); + $this->assertEquals($existing_profile_id, $profile2->id()); + $this->assertEquals($existing_revision_id, $profile2->getRevisionId()); + + } + } diff --git a/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileViewTest.php b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileViewTest.php index e820b0808..632424220 100644 --- a/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileViewTest.php +++ b/sites/all/modules/contrib/users/profile/tests/src/Kernel/ProfileViewTest.php @@ -29,6 +29,9 @@ class ProfileViewTest extends ViewsKernelTestBase { 'users', ]; + /** + * {@inheritdoc} + */ protected function setUp($import_test_views = TRUE) { parent::setUp($import_test_views); diff --git a/sites/all/themes/contrib/adminimal_theme/adminimal_theme.info.yml b/sites/all/themes/contrib/adminimal_theme/adminimal_theme.info.yml index 88b98ee49..6ec1d58aa 100644 --- a/sites/all/themes/contrib/adminimal_theme/adminimal_theme.info.yml +++ b/sites/all/themes/contrib/adminimal_theme/adminimal_theme.info.yml @@ -20,8 +20,8 @@ regions: regions_hidden: - sidebar_first -# Information added by Drupal.org packaging script on 2015-12-05 -version: '8.x-1.1' +# Information added by Drupal.org packaging script on 2016-11-30 +version: '8.x-1.3' core: '8.x' project: 'adminimal_theme' -datestamp: 1449335040 +datestamp: 1480507087 diff --git a/sites/all/themes/contrib/adminimal_theme/config/install/block.block.adminimal_theme_help.yml b/sites/all/themes/contrib/adminimal_theme/config/optional/block.block.adminimal_theme_help.yml similarity index 100% rename from sites/all/themes/contrib/adminimal_theme/config/install/block.block.adminimal_theme_help.yml rename to sites/all/themes/contrib/adminimal_theme/config/optional/block.block.adminimal_theme_help.yml diff --git a/sites/all/themes/contrib/adminimal_theme/css/adminimal.css b/sites/all/themes/contrib/adminimal_theme/css/adminimal.css index 929cb155f..ff8147841 100644 --- a/sites/all/themes/contrib/adminimal_theme/css/adminimal.css +++ b/sites/all/themes/contrib/adminimal_theme/css/adminimal.css @@ -20,6 +20,15 @@ src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNShsxEYwM7FgeyaSgU71cLG0.woff) format('woff'); } +/*html { + zoom: 1.1; +}*/ + +/* Fix drag and drop offset in ckeditor toolbar configuration */ +/*.adminimal .ckeditor-toolbar-configuration.js-form-wrapper.form-wrapper { + zoom: 0.9; +}*/ + body.adminimal { font: normal 81.3%/1.538em "Open Sans", sans-serif; } @@ -168,8 +177,8 @@ body.adminimal { .adminimal .vertical-tabs { border-radius: 0; - border: none; - background: transparent; + border: 1px solid #b5b5b5; + background: #f2f2f0; } .adminimal .vertical-tabs__panes { @@ -716,7 +725,6 @@ body.adminimal { } /* Main menu icons. */ - .adminimal .toolbar-icon-system-admin-content:active:before, .adminimal .toolbar-icon-system-admin-content.is-active:before { background-image: url(/core/themes/stable/images/core/icons/787878/file.svg); @@ -756,8 +764,45 @@ body.adminimal { .adminimal .toolbar-icon-help-main.is-active:before { background-image: url(/core/themes/stable/images/core/icons/787878/questionmark-disc.svg); } -/* Main menu icons end. */ +/* Main menu icons end. */ .adminimal.path-batch .layout-container { padding-top: 1.3rem; } + +/* Module: Views */ +.adminimal .views-display-top { + background-color: #fafafa; + border-bottom: 1px solid #f2f2f2; +} + +.adminimal .views-displays { + border: 1px solid #e8e8e8; +} + +.adminimal .views-admin .form-edit .form-actions { + border-color: #e8e8e8; + background-color: #fafafa; +} + +.adminimal .views-ui-display-tab-bucket .views-display-setting:nth-of-type(even) { + background-color: inherit; +} + +.adminimal .views-displays .tabs.secondary a { + border-radius: 0; +} + +.adminimal .view-preview-form__title { + background-color: #fafdfe; + border-bottom: 1px solid #e8e8e8; + font-size: 1.2em; +} + +.adminimal .views-preview-wrapper { + border: 1px solid #e8e8e8; +} + +.adminimal .views-ui-dialog .views-override { + background-color: #f6f6f6; +} diff --git a/update.php b/update.php index 42adef25d..59e808ed2 100644 --- a/update.php +++ b/update.php @@ -13,6 +13,15 @@ use Symfony\Component\HttpFoundation\Request; $autoloader = require_once 'autoload.php'; +// Disable garbage collection during test runs. Under certain circumstances the +// update path will create so many objects that garbage collection causes +// segmentation faults. +require_once 'core/includes/bootstrap.inc'; +if (drupal_valid_test_ua()) { + gc_collect_cycles(); + gc_disable(); +} + $kernel = new UpdateKernel('prod', $autoloader, FALSE); $request = Request::createFromGlobals(); diff --git a/vendor/asm89/stack-cors/.gitignore b/vendor/asm89/stack-cors/.gitignore new file mode 100644 index 000000000..8844fdc45 --- /dev/null +++ b/vendor/asm89/stack-cors/.gitignore @@ -0,0 +1,4 @@ +phpunit.xml +composer.lock +composer.phar +/vendor/ diff --git a/vendor/asm89/stack-cors/.travis.yml b/vendor/asm89/stack-cors/.travis.yml new file mode 100644 index 000000000..7eb55a913 --- /dev/null +++ b/vendor/asm89/stack-cors/.travis.yml @@ -0,0 +1,13 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + +before_script: composer install --dev + +script: phpunit diff --git a/vendor/asm89/stack-cors/README.md b/vendor/asm89/stack-cors/README.md new file mode 100644 index 000000000..dea18a8e7 --- /dev/null +++ b/vendor/asm89/stack-cors/README.md @@ -0,0 +1,59 @@ +# Stack/Cors + +Library and middleware enabling cross-origin resource sharing for your +http-{foundation,kernel} using application. It attempts to implement the +[W3C Candidate Recommendation] for cross-origin resource sharing. + +[W3C Candidate Recommendation]: http://www.w3.org/TR/cors/ + +Master [![Build Status](https://secure.travis-ci.org/asm89/stack-cors.png?branch=master)](http://travis-ci.org/asm89/stack-cors) +Develop [![Build Status](https://secure.travis-ci.org/asm89/stack-cors.png?branch=develop)](http://travis-ci.org/asm89/stack-cors) + +## Installation + +Require `asm89/stack-cors` using composer. + +## Usage + +Stack middleware: + +```php + array('x-allowed-header', 'x-other-allowed-header'), + // you can use array('*') to allow any methods + 'allowedMethods' => array('DELETE', 'GET', 'POST', 'PUT'), + // you can use array('*') to allow requests from any origin + 'allowedOrigins' => array('localhost'), + 'exposedHeaders' => false, + 'maxAge' => false, + 'supportsCredentials' => false, +)); +``` + +Or use the library: + +```php + array('x-allowed-header', 'x-other-allowed-header'), + 'allowedMethods' => array('DELETE', 'GET', 'POST', 'PUT'), + 'allowedOrigins' => array('localhost'), + 'exposedHeaders' => false, + 'maxAge' => false, + 'supportsCredentials' => false, +)); + +$cors->addActualRequestHeaders(Response $response, $origin); +$cors->handlePreflightRequest(Request $request); +$cors->isActualRequestAllowed(Request $request); +$cors->isCorsRequest(Request $request); +$cors->isPreflightRequest(Request $request); +``` diff --git a/vendor/asm89/stack-cors/composer.json b/vendor/asm89/stack-cors/composer.json new file mode 100644 index 000000000..02296c616 --- /dev/null +++ b/vendor/asm89/stack-cors/composer.json @@ -0,0 +1,22 @@ +{ + "name": "asm89/stack-cors", + "description": "Cross-origin resource sharing library and stack middleware", + "keywords": ["stack", "cors"], + "homepage": "https://github.com/asm89/stack-cors", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Alexander", + "email": "iam.asm89@gmail.com" + } + ], + "require": { + "php": ">=5.3.2", + "symfony/http-foundation": "~2.1|~3.0", + "symfony/http-kernel": "~2.1|~3.0" + }, + "autoload": { + "psr-0": { "Asm89\\Stack": "src/" } + } +} diff --git a/vendor/asm89/stack-cors/phpunit.xml.dist b/vendor/asm89/stack-cors/phpunit.xml.dist new file mode 100644 index 000000000..1959e537e --- /dev/null +++ b/vendor/asm89/stack-cors/phpunit.xml.dist @@ -0,0 +1,26 @@ + + + + + + ./test/Asm89/ + + + + + + ./src/ + + + + diff --git a/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php b/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php new file mode 100755 index 000000000..a5e81ce21 --- /dev/null +++ b/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php @@ -0,0 +1,55 @@ + array(), + 'allowedMethods' => array(), + 'allowedOrigins' => array(), + 'exposedHeaders' => false, + 'maxAge' => false, + 'supportsCredentials' => false, + ); + + public function __construct(HttpKernelInterface $app, array $options = array()) + { + $this->app = $app; + $this->cors = new CorsService(array_merge($this->defaultOptions, $options)); + + } + + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + if ( ! $this->cors->isCorsRequest($request)) { + return $this->app->handle($request, $type, $catch); + } + + if ($this->cors->isPreflightRequest($request)) { + return $this->cors->handlePreflightRequest($request); + } + + if ( ! $this->cors->isActualRequestAllowed($request)) { + return new Response('Not allowed.', 403); + } + + $response = $this->app->handle($request, $type, $catch); + + return $this->cors->addActualRequestHeaders($response, $request); + } +} diff --git a/vendor/asm89/stack-cors/src/Asm89/Stack/CorsService.php b/vendor/asm89/stack-cors/src/Asm89/Stack/CorsService.php new file mode 100755 index 000000000..339256b3c --- /dev/null +++ b/vendor/asm89/stack-cors/src/Asm89/Stack/CorsService.php @@ -0,0 +1,178 @@ +options = $this->normalizeOptions($options); + } + + private function normalizeOptions(array $options = array()) + { + + $options += array( + 'allowedOrigins' => array(), + 'supportsCredentials' => false, + 'allowedHeaders' => array(), + 'exposedHeaders' => array(), + 'allowedMethods' => array(), + 'maxAge' => 0, + ); + + // normalize array('*') to true + if (in_array('*', $options['allowedOrigins'])) { + $options['allowedOrigins'] = true; + } + if (in_array('*', $options['allowedHeaders'])) { + $options['allowedHeaders'] = true; + } else { + $options['allowedHeaders'] = array_map('strtolower', $options['allowedHeaders']); + } + + if (in_array('*', $options['allowedMethods'])) { + $options['allowedMethods'] = true; + } else { + $options['allowedMethods'] = array_map('strtoupper', $options['allowedMethods']); + } + + return $options; + } + + public function isActualRequestAllowed(Request $request) + { + return $this->checkOrigin($request); + } + + public function isCorsRequest(Request $request) + { + return $request->headers->has('Origin'); + } + + public function isPreflightRequest(Request $request) + { + return $this->isCorsRequest($request) + &&$request->getMethod() === 'OPTIONS' + && $request->headers->has('Access-Control-Request-Method'); + } + + public function addActualRequestHeaders(Response $response, Request $request) + { + if ( ! $this->checkOrigin($request)) { + return $response; + } + + $response->headers->set('Access-Control-Allow-Origin', $request->headers->get('Origin')); + + if ( ! $response->headers->has('Vary')) { + $response->headers->set('Vary', 'Origin'); + } else { + $response->headers->set('Vary', $response->headers->get('Vary') . ', Origin'); + } + + if ($this->options['supportsCredentials']) { + $response->headers->set('Access-Control-Allow-Credentials', 'true'); + } + + if ($this->options['exposedHeaders']) { + $response->headers->set('Access-Control-Expose-Headers', implode(', ', $this->options['exposedHeaders'])); + } + + return $response; + } + + public function handlePreflightRequest(Request $request) + { + if (true !== $check = $this->checkPreflightRequestConditions($request)) { + return $check; + } + + return $this->buildPreflightCheckResponse($request); + } + + private function buildPreflightCheckResponse(Request $request) + { + $response = new Response(); + + if ($this->options['supportsCredentials']) { + $response->headers->set('Access-Control-Allow-Credentials', 'true'); + } + + $response->headers->set('Access-Control-Allow-Origin', $request->headers->get('Origin')); + + if ($this->options['maxAge']) { + $response->headers->set('Access-Control-Max-Age', $this->options['maxAge']); + } + + $allowMethods = $this->options['allowedMethods'] === true + ? strtoupper($request->headers->get('Access-Control-Request-Method')) + : implode(', ', $this->options['allowedMethods']); + $response->headers->set('Access-Control-Allow-Methods', $allowMethods); + + $allowHeaders = $this->options['allowedHeaders'] === true + ? strtoupper($request->headers->get('Access-Control-Request-Headers')) + : implode(', ', $this->options['allowedHeaders']); + $response->headers->set('Access-Control-Allow-Headers', $allowHeaders); + + return $response; + } + + private function checkPreflightRequestConditions(Request $request) + { + if ( ! $this->checkOrigin($request)) { + return $this->createBadRequestResponse(403, 'Origin not allowed'); + } + + if ( ! $this->checkMethod($request)) { + return $this->createBadRequestResponse(405, 'Method not allowed'); + } + + $requestHeaders = array(); + // if allowedHeaders has been set to true ('*' allow all flag) just skip this check + if ($this->options['allowedHeaders'] !== true && $request->headers->has('Access-Control-Request-Headers')) { + $headers = strtolower($request->headers->get('Access-Control-Request-Headers')); + $requestHeaders = explode(',', $headers); + + foreach ($requestHeaders as $header) { + if ( ! in_array(trim($header), $this->options['allowedHeaders'])) { + return $this->createBadRequestResponse(403, 'Header not allowed'); + } + } + } + + return true; + } + + private function createBadRequestResponse($code, $reason = '') + { + return new Response($reason, $code); + } + + private function checkOrigin(Request $request) { + if ($this->options['allowedOrigins'] === true) { + // allow all '*' flag + return true; + } + $origin = $request->headers->get('Origin'); + + return in_array($origin, $this->options['allowedOrigins']); + } + + private function checkMethod(Request $request) { + if ($this->options['allowedMethods'] === true) { + // allow all '*' flag + return true; + } + + $requestMethod = strtoupper($request->headers->get('Access-Control-Request-Method')); + return in_array($requestMethod, $this->options['allowedMethods']); + } + +} diff --git a/vendor/asm89/stack-cors/test/Asm89/Stack/CorsTest.php b/vendor/asm89/stack-cors/test/Asm89/Stack/CorsTest.php new file mode 100755 index 000000000..1493c46c5 --- /dev/null +++ b/vendor/asm89/stack-cors/test/Asm89/Stack/CorsTest.php @@ -0,0 +1,395 @@ +createStackedApp(); + $unmodifiedResponse = new Response(); + + $response = $app->handle(new Request()); + + $this->assertEquals($unmodifiedResponse->headers, $response->headers); + } + + /** + * @test + */ + public function it_returns_403_on_valid_actual_request_with_origin_not_allowed() + { + $app = $this->createStackedApp(array('allowedOrigins' => array('notlocalhost'))); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertEquals(403, $response->getStatusCode()); + } + + /** + * @test + */ + public function it_returns_allow_origin_header_on_valid_actual_request() + { + $app = $this->createStackedApp(); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Origin')); + $this->assertEquals('localhost', $response->headers->get('Access-Control-Allow-Origin')); + } + + /** + * @test + */ + public function it_returns_allow_origin_header_on_allow_all_origin_request() + { + $app = $this->createStackedApp(array('allowedOrigins' => array('*'))); + $request = new Request(); + $request->headers->set('Origin', 'http://localhost'); + + $response = $app->handle($request); + + $this->assertEquals(200, $response->getStatusCode()); + $this->assertTrue($response->headers->has('Access-Control-Allow-Origin')); + $this->assertEquals('http://localhost', $response->headers->get('Access-Control-Allow-Origin')); + } + + /** + * @test + */ + public function it_returns_allow_headers_header_on_allow_all_headers_request() + { + $app = $this->createStackedApp(array('allowedHeaders' => array('*'))); + $request = $this->createValidPreflightRequest(); + $request->headers->set('Access-Control-Request-Headers', 'Foo, BAR'); + + $response = $app->handle($request); + + $this->assertEquals(200, $response->getStatusCode()); + $this->assertEquals('FOO, BAR', $response->headers->get('Access-Control-Allow-Headers')); + } + + /** + * @test + */ + public function it_does_not_return_allow_origin_header_on_valid_actual_request_with_origin_not_allowed() + { + $app = $this->createStackedApp(array('allowedOrigins' => array('notlocalhost'))); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertFalse($response->headers->has('Access-Control-Allow-Origin')); + } + + /** + * @test + */ + public function it_sets_allow_credentials_header_when_flag_is_set_on_valid_actual_request() + { + $app = $this->createStackedApp(array('supportsCredentials' => true)); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Credentials')); + $this->assertEquals('true', $response->headers->get('Access-Control-Allow-Credentials')); + } + + /** + * @test + */ + public function it_does_not_set_allow_credentials_header_when_flag_is_not_set_on_valid_actual_request() + { + $app = $this->createStackedApp(); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertFalse($response->headers->has('Access-Control-Allow-Credentials')); + } + + /** + * @test + */ + public function it_sets_exposed_headers_when_configured_on_actual_request() + { + $app = $this->createStackedApp(array('exposedHeaders' => array('x-exposed-header', 'x-another-exposed-header'))); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Expose-Headers')); + $this->assertEquals('x-exposed-header, x-another-exposed-header', $response->headers->get('Access-Control-Expose-Headers')); + } + + /** + * @test + * @see http://www.w3.org/TR/cors/index.html#resource-implementation + */ + public function it_adds_a_vary_header() + { + $app = $this->createStackedApp(); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Vary')); + $this->assertEquals('Origin', $response->headers->get('Vary')); + } + + /** + * @test + * @see http://www.w3.org/TR/cors/index.html#resource-implementation + */ + public function it_appends_an_existing_vary_header() + { + $app = $this->createStackedApp(array(), array('Vary' => 'Content-Type')); + $request = $this->createValidActualRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Vary')); + $this->assertEquals('Content-Type, Origin', $response->headers->get('Vary')); + } + + /** + * @test + */ + public function it_returns_access_control_headers_on_cors_request() + { + $app = $this->createStackedApp(); + $request = new Request(); + $request->headers->set('Origin', 'localhost'); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Origin')); + $this->assertEquals('localhost', $response->headers->get('Access-Control-Allow-Origin')); + } + + /** + * @test + */ + public function it_returns_access_control_headers_on_valid_preflight_request() + { + $app = $this->createStackedApp(); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Origin')); + $this->assertEquals('localhost', $response->headers->get('Access-Control-Allow-Origin')); + } + + /** + * @test + */ + public function it_returns_403_on_valid_preflight_request_with_origin_not_allowed() + { + $app = $this->createStackedApp(array('allowedOrigins' => array('notlocalhost'))); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertEquals(403, $response->getStatusCode()); + } + + /** + * @test + */ + public function it_does_not_modify_request_with_origin_not_allowed() + { + $passedOptions = array( + 'allowedOrigins' => array('notlocalhost'), + ); + + $service = new CorsService($passedOptions); + $request = $this->createValidActualRequest(); + $response = new Response(); + $service->addActualRequestHeaders($response, $request); + + $this->assertEquals($response, new Response()); + } + + /** + * @test + */ + public function it_returns_405_on_valid_preflight_request_with_method_not_allowed() + { + $app = $this->createStackedApp(array('allowedMethods' => array('put'))); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertEquals(405, $response->getStatusCode()); + } + + /** + * @test + */ + public function it_allow_methods_on_valid_preflight_request() + { + $app = $this->createStackedApp(array('allowedMethods' => array('get', 'put'))); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Methods')); + // it will uppercase the methods + $this->assertEquals('GET, PUT', $response->headers->get('Access-Control-Allow-Methods')); + } + + /** + * @test + */ + public function it_returns_valid_preflight_request_with_allow_methods_all() + { + $app = $this->createStackedApp(array('allowedMethods' => array('*'))); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Methods')); + // it will return the Access-Control-Request-Method pass in the request + $this->assertEquals('GET', $response->headers->get('Access-Control-Allow-Methods')); + } + + /** + * @test + */ + public function it_returns_403_on_valid_preflight_request_with_one_of_the_requested_headers_not_allowed() + { + $app = $this->createStackedApp(); + $request = $this->createValidPreflightRequest(); + $request->headers->set('Access-Control-Request-Headers', 'x-not-allowed-header'); + + $response = $app->handle($request); + + $this->assertEquals(403, $response->getStatusCode()); + } + + /** + * @test + */ + public function it_returns_ok_on_valid_preflight_request_with_requested_headers_allowed() + { + $app = $this->createStackedApp(); + $requestHeaders = 'X-Allowed-Header, x-other-allowed-header'; + $request = $this->createValidPreflightRequest(); + $request->headers->set('Access-Control-Request-Headers', $requestHeaders); + + $response = $app->handle($request); + + $this->assertEquals(200, $response->getStatusCode()); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Headers')); + // the response will have the "allowedHeaders" value passed to Cors rather than the request one + $this->assertEquals('x-allowed-header, x-other-allowed-header', $response->headers->get('Access-Control-Allow-Headers')); + } + + /** + * @test + */ + public function it_sets_allow_credentials_header_when_flag_is_set_on_valid_preflight_request() + { + $app = $this->createStackedApp(array('supportsCredentials' => true)); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Allow-Credentials')); + $this->assertEquals('true', $response->headers->get('Access-Control-Allow-Credentials')); + } + + /** + * @test + */ + public function it_does_not_set_allow_credentials_header_when_flag_is_not_set_on_valid_preflight_request() + { + $app = $this->createStackedApp(); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertFalse($response->headers->has('Access-Control-Allow-Credentials')); + } + + /** + * @test + */ + public function it_sets_max_age_when_set() + { + $app = $this->createStackedApp(array('maxAge' => 42)); + $request = $this->createValidPreflightRequest(); + + $response = $app->handle($request); + + $this->assertTrue($response->headers->has('Access-Control-Max-Age')); + $this->assertEquals(42, $response->headers->get('Access-Control-Max-Age')); + } + + private function createValidActualRequest() + { + $request = new Request(); + $request->headers->set('Origin', 'localhost'); + + return $request; + } + + private function createValidPreflightRequest() + { + $request = new Request(); + $request->headers->set('Origin', 'localhost'); + $request->headers->set('Access-Control-Request-Method', 'get'); + $request->setMethod('OPTIONS'); + + return $request; + } + + private function createStackedApp(array $options = array(), array $responseHeaders = array()) + { + $passedOptions = array_merge(array( + 'allowedHeaders' => array('x-allowed-header', 'x-other-allowed-header'), + 'allowedMethods' => array('delete', 'get', 'post', 'put'), + 'allowedOrigins' => array('localhost'), + 'exposedHeaders' => false, + 'maxAge' => false, + 'supportsCredentials' => false, + ), + $options + ); + + return new Cors(new MockApp($responseHeaders), $passedOptions); + } +} + +class MockApp implements HttpKernelInterface +{ + private $responseHeaders; + + public function __construct(array $responseHeaders) + { + $this->responseHeaders = $responseHeaders; + } + + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $response = new Response(); + + $response->headers->add($this->responseHeaders); + + return $response; + } +} diff --git a/vendor/asm89/stack-cors/test/bootstrap.php b/vendor/asm89/stack-cors/test/bootstrap.php new file mode 100644 index 000000000..deb617fb8 --- /dev/null +++ b/vendor/asm89/stack-cors/test/bootstrap.php @@ -0,0 +1,10 @@ +add('Asm89\Stack', __DIR__); + $loader->add('Asm89\Stack', __DIR__ . '/../src'); +} else { + throw new RuntimeException('Install dependencies to run test suite.'); +} + diff --git a/vendor/autoload.php b/vendor/autoload.php index 5111b1b9c..012b79ac8 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -2,6 +2,6 @@ // autoload.php @generated by Composer -require_once __DIR__ . '/composer' . '/autoload_real.php'; +require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInitDrupal8::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index ff6ecfb82..2c72175e7 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -53,8 +53,9 @@ class ClassLoader private $useIncludePath = false; private $classMap = array(); - private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; public function getPrefixes() { @@ -271,6 +272,26 @@ class ClassLoader return $this->classMapAuthoritative; } + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + /** * Registers this instance as an autoloader. * @@ -313,29 +334,34 @@ class ClassLoader */ public function findFile($class) { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - // class map lookup if (isset($this->classMap[$class])) { return $this->classMap[$class]; } - if ($this->classMapAuthoritative) { + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { return false; } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } $file = $this->findFileWithExtension($class, '.php'); // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { + if (false === $file && defined('HHVM_VERSION')) { $file = $this->findFileWithExtension($class, '.hh'); } - if ($file === null) { + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { // Remember that this class does not exist. - return $this->classMap[$class] = false; + $this->missingClasses[$class] = true; } return $file; @@ -348,9 +374,13 @@ class ClassLoader $first = $class[0]; if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath.'\\'; + if (isset($this->prefixDirsPsr4[$search])) { + foreach ($this->prefixDirsPsr4[$search] as $dir) { + $length = $this->prefixLengthsPsr4[$first][$search]; if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { return $file; } @@ -399,6 +429,8 @@ class ClassLoader if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { return $file; } + + return false; } } diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE index 1a2812488..f27399a04 100644 --- a/vendor/composer/LICENSE +++ b/vendor/composer/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2016 Nils Adermann, Jordi Boggiano +Copyright (c) Nils Adermann, Jordi Boggiano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index a1dc5016a..6bd4f40c3 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -14,440 +14,7 @@ return array( 'Drupal\\Core\\DrupalKernel' => $baseDir . '/core/lib/Drupal/Core/DrupalKernel.php', 'Drupal\\Core\\DrupalKernelInterface' => $baseDir . '/core/lib/Drupal/Core/DrupalKernelInterface.php', 'Drupal\\Core\\Site\\Settings' => $baseDir . '/core/lib/Drupal/Core/Site/Settings.php', - 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', - 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', - 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', - 'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', - 'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', - 'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', - 'PHPUnit_Extensions_PhptTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', - 'PHPUnit_Extensions_RepeatedTest' => $vendorDir . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', - 'PHPUnit_Extensions_TestDecorator' => $vendorDir . '/phpunit/phpunit/src/Extensions/TestDecorator.php', - 'PHPUnit_Extensions_TicketListener' => $vendorDir . '/phpunit/phpunit/src/Extensions/TicketListener.php', - 'PHPUnit_Framework_Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php', - 'PHPUnit_Framework_AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', - 'PHPUnit_Framework_BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/BaseTestListener.php', - 'PHPUnit_Framework_CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', - 'PHPUnit_Framework_Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint.php', - 'PHPUnit_Framework_Constraint_And' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/And.php', - 'PHPUnit_Framework_Constraint_ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', - 'PHPUnit_Framework_Constraint_ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', - 'PHPUnit_Framework_Constraint_Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', - 'PHPUnit_Framework_Constraint_Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', - 'PHPUnit_Framework_Constraint_ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', - 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', - 'PHPUnit_Framework_Constraint_Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', - 'PHPUnit_Framework_Constraint_Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php', - 'PHPUnit_Framework_Constraint_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', - 'PHPUnit_Framework_Constraint_ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', - 'PHPUnit_Framework_Constraint_ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', - 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', - 'PHPUnit_Framework_Constraint_FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', - 'PHPUnit_Framework_Constraint_GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', - 'PHPUnit_Framework_Constraint_IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', - 'PHPUnit_Framework_Constraint_IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', - 'PHPUnit_Framework_Constraint_IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', - 'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', - 'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', - 'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', - 'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', - 'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', - 'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', - 'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', - 'PHPUnit_Framework_Constraint_JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', - 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', - 'PHPUnit_Framework_Constraint_LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', - 'PHPUnit_Framework_Constraint_Not' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Not.php', - 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', - 'PHPUnit_Framework_Constraint_Or' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Or.php', - 'PHPUnit_Framework_Constraint_PCREMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', - 'PHPUnit_Framework_Constraint_SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', - 'PHPUnit_Framework_Constraint_StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', - 'PHPUnit_Framework_Constraint_StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', - 'PHPUnit_Framework_Constraint_StringMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', - 'PHPUnit_Framework_Constraint_StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', - 'PHPUnit_Framework_Constraint_TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', - 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', - 'PHPUnit_Framework_Constraint_Xor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', - 'PHPUnit_Framework_Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error.php', - 'PHPUnit_Framework_Error_Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', - 'PHPUnit_Framework_Error_Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php', - 'PHPUnit_Framework_Error_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php', - 'PHPUnit_Framework_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php', - 'PHPUnit_Framework_ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', - 'PHPUnit_Framework_ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', - 'PHPUnit_Framework_IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php', - 'PHPUnit_Framework_IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', - 'PHPUnit_Framework_IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', - 'PHPUnit_Framework_InvalidCoversTargetError' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', - 'PHPUnit_Framework_InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', - 'PHPUnit_Framework_MockObject_BadMethodCallException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', - 'PHPUnit_Framework_MockObject_Builder_Identity' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', - 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Builder_Match' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', - 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Namespace' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', - 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', - 'PHPUnit_Framework_MockObject_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', - 'PHPUnit_Framework_MockObject_Generator' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', - 'PHPUnit_Framework_MockObject_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', - 'PHPUnit_Framework_MockObject_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Invocation_Object' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', - 'PHPUnit_Framework_MockObject_Invocation_Static' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', - 'PHPUnit_Framework_MockObject_Invokable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', - 'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', - 'PHPUnit_Framework_MockObject_Matcher_MethodName' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', - 'PHPUnit_Framework_MockObject_Matcher_Parameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', - 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', - 'PHPUnit_Framework_MockObject_MockBuilder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', - 'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', - 'PHPUnit_Framework_MockObject_RuntimeException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', - 'PHPUnit_Framework_MockObject_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', - 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', - 'PHPUnit_Framework_MockObject_Stub_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', - 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', - 'PHPUnit_Framework_MockObject_Stub_Return' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', - 'PHPUnit_Framework_MockObject_Verifiable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', - 'PHPUnit_Framework_OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php', - 'PHPUnit_Framework_RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php', - 'PHPUnit_Framework_RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php', - 'PHPUnit_Framework_SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php', - 'PHPUnit_Framework_SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php', - 'PHPUnit_Framework_SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', - 'PHPUnit_Framework_SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php', - 'PHPUnit_Framework_SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', - 'PHPUnit_Framework_SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php', - 'PHPUnit_Framework_Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php', - 'PHPUnit_Framework_TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php', - 'PHPUnit_Framework_TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php', - 'PHPUnit_Framework_TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php', - 'PHPUnit_Framework_TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php', - 'PHPUnit_Framework_TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', - 'PHPUnit_Framework_TestSuite_DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', - 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', - 'PHPUnit_Framework_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php', - 'PHPUnit_Runner_BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', - 'PHPUnit_Runner_Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php', - 'PHPUnit_Runner_Filter_Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', - 'PHPUnit_Runner_Filter_GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group.php', - 'PHPUnit_Runner_Filter_Group_Exclude' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', - 'PHPUnit_Runner_Filter_Group_Include' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', - 'PHPUnit_Runner_Filter_Test' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Test.php', - 'PHPUnit_Runner_StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', - 'PHPUnit_Runner_TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', - 'PHPUnit_Runner_Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', - 'PHPUnit_TextUI_Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php', - 'PHPUnit_TextUI_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', - 'PHPUnit_TextUI_TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php', - 'PHPUnit_Util_Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php', - 'PHPUnit_Util_Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php', - 'PHPUnit_Util_ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php', - 'PHPUnit_Util_Fileloader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php', - 'PHPUnit_Util_Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', - 'PHPUnit_Util_Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', - 'PHPUnit_Util_Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php', - 'PHPUnit_Util_GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', - 'PHPUnit_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', - 'PHPUnit_Util_Log_JSON' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JSON.php', - 'PHPUnit_Util_Log_JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php', - 'PHPUnit_Util_Log_TAP' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TAP.php', - 'PHPUnit_Util_PHP' => $vendorDir . '/phpunit/phpunit/src/Util/PHP.php', - 'PHPUnit_Util_PHP_Default' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Default.php', - 'PHPUnit_Util_PHP_Windows' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Windows.php', - 'PHPUnit_Util_Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', - 'PHPUnit_Util_Regex' => $vendorDir . '/phpunit/phpunit/src/Util/Regex.php', - 'PHPUnit_Util_String' => $vendorDir . '/phpunit/phpunit/src/Util/String.php', - 'PHPUnit_Util_Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', - 'PHPUnit_Util_TestDox_NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', - 'PHPUnit_Util_TestDox_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', - 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', - 'PHPUnit_Util_TestDox_ResultPrinter_Text' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', - 'PHPUnit_Util_TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', - 'PHPUnit_Util_Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php', - 'PHPUnit_Util_XML' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php', - 'PHP_CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', - 'PHP_CodeCoverage_Driver' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', - 'PHP_CodeCoverage_Driver_HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', - 'PHP_CodeCoverage_Driver_PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', - 'PHP_CodeCoverage_Driver_Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', - 'PHP_CodeCoverage_Exception' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', - 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', - 'PHP_CodeCoverage_Filter' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', - 'PHP_CodeCoverage_Report_Clover' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', - 'PHP_CodeCoverage_Report_Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', - 'PHP_CodeCoverage_Report_Factory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', - 'PHP_CodeCoverage_Report_HTML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', - 'PHP_CodeCoverage_Report_HTML_Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', - 'PHP_CodeCoverage_Report_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', - 'PHP_CodeCoverage_Report_Node_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', - 'PHP_CodeCoverage_Report_Node_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', - 'PHP_CodeCoverage_Report_Node_Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', - 'PHP_CodeCoverage_Report_PHP' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', - 'PHP_CodeCoverage_Report_Text' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', - 'PHP_CodeCoverage_Report_XML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', - 'PHP_CodeCoverage_Report_XML_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', - 'PHP_CodeCoverage_Report_XML_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', - 'PHP_CodeCoverage_Report_XML_File_Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', - 'PHP_CodeCoverage_Report_XML_File_Method' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', - 'PHP_CodeCoverage_Report_XML_File_Report' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', - 'PHP_CodeCoverage_Report_XML_File_Unit' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', - 'PHP_CodeCoverage_Report_XML_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', - 'PHP_CodeCoverage_Report_XML_Project' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', - 'PHP_CodeCoverage_Report_XML_Tests' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', - 'PHP_CodeCoverage_Report_XML_Totals' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', - 'PHP_CodeCoverage_Util' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', - 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', - 'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php', - 'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ASYNC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AWAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMPILER_HALT_OFFSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENUM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EQUALS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_JOIN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_CP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_OP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ONUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SHAPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php', - 'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', - 'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPELIST_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPELIST_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHERE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_ATTRIBUTE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CATEGORY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CATEGORY_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CHILDREN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_REQUIRED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TAG_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TAG_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TEXT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'RecursiveCallbackFilterIterator' => $vendorDir . '/symfony/polyfill-php54/Resources/stubs/RecursiveCallbackFilterIterator.php', - 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', - 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', - 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php', - 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php', - 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php', - 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php', - 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php', - 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php', - 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php', - 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php', - 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php', - 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php', - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php', - 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php', - 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php', - 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php', - 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php', - 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => $vendorDir . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', - 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php', - 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', - 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', - 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', - 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', - 'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php', - 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/Exception.php', - 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php', - 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/RuntimeException.php', - 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php', - 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', - 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php', - 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', - 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', 'SessionHandlerInterface' => $vendorDir . '/symfony/polyfill-php54/Resources/stubs/SessionHandlerInterface.php', 'Symfony\\Component\\HttpFoundation\\FileBag' => $vendorDir . '/symfony/http-foundation/FileBag.php', 'Symfony\\Component\\HttpFoundation\\HeaderBag' => $vendorDir . '/symfony/http-foundation/HeaderBag.php', @@ -457,5 +24,4 @@ return array( 'Symfony\\Component\\HttpKernel\\HttpKernel' => $vendorDir . '/symfony/http-kernel/HttpKernel.php', 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => $vendorDir . '/symfony/http-kernel/HttpKernelInterface.php', 'Symfony\\Component\\HttpKernel\\TerminableInterface' => $vendorDir . '/symfony/http-kernel/TerminableInterface.php', - 'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 38c57fb76..947fa0107 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -11,8 +11,8 @@ return array( 'edc6464955a37aa4d5fbf39d40fb6ee7' => $vendorDir . '/symfony/polyfill-php55/bootstrap.php', '3e2471375464aac821502deb0ac64275' => $vendorDir . '/symfony/polyfill-php54/bootstrap.php', '32dcc8afd4335739640db7d200c1971d' => $vendorDir . '/symfony/polyfill-apcu/bootstrap.php', - 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', + 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => $vendorDir . '/symfony/polyfill-iconv/bootstrap.php', diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index bb43043a3..d39f067f1 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,19 +6,13 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'phpDocumentor' => array($vendorDir . '/phpdocumentor/reflection-docblock/src'), - 'org\\bovigo\\vfs\\' => array($vendorDir . '/mikey179/vfsStream/src/main/php'), 'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Stack' => array($vendorDir . '/stack/builder/src'), - 'Psr\\Log\\' => array($vendorDir . '/psr/log'), - 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'), 'Egulias\\' => array($vendorDir . '/egulias/email-validator/src'), 'EasyRdf_' => array($vendorDir . '/easyrdf/easyrdf/lib'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), - 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), - 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), - 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'), + 'Asm89\\Stack' => array($vendorDir . '/asm89/stack-cors/src'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index df706e45d..902e082f5 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,10 +6,7 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'Zumba\\Mink\\Driver\\' => array($vendorDir . '/jcalderonzumba/mink-phantomjs-driver/src'), - 'Zumba\\GastonJS\\' => array($vendorDir . '/jcalderonzumba/gastonjs/src'), 'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib/src'), - 'Zend\\Hydrator\\' => array($vendorDir . '/zendframework/zend-hydrator/src'), 'Zend\\Feed\\' => array($vendorDir . '/zendframework/zend-feed/src'), 'Zend\\Escaper\\' => array($vendorDir . '/zendframework/zend-escaper/src'), 'Zend\\Diactoros\\' => array($vendorDir . '/zendframework/zend-diactoros/src'), @@ -27,27 +24,24 @@ return array( 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), - 'Symfony\\Component\\DomCrawler\\' => array($vendorDir . '/symfony/dom-crawler'), 'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'), 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), - 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), 'Symfony\\Component\\ClassLoader\\' => array($vendorDir . '/symfony/class-loader'), - 'Symfony\\Component\\BrowserKit\\' => array($vendorDir . '/symfony/browser-kit'), 'Symfony\\Cmf\\Component\\Routing\\' => array($vendorDir . '/symfony-cmf/routing'), 'Symfony\\Bridge\\PsrHttpMessage\\' => array($vendorDir . '/symfony/psr-http-message-bridge'), + 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), 'Masterminds\\' => array($vendorDir . '/masterminds/html5/src'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), - 'Goutte\\' => array($vendorDir . '/fabpot/goutte/Goutte'), 'Drupal\\Driver\\' => array($baseDir . '/drivers/lib/Drupal/Driver'), 'Drupal\\Core\\Composer\\' => array($baseDir . '/core/lib/Drupal/Core/Composer'), 'Drupal\\Core\\' => array($baseDir . '/core/lib/Drupal/Core'), 'Drupal\\Component\\' => array($baseDir . '/core/lib/Drupal/Component'), - 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib/Doctrine/Common/Cache'), + 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib/Doctrine/Common'), 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'), - 'Behat\\Mink\\Driver\\' => array($vendorDir . '/behat/mink-browserkit-driver/src', $vendorDir . '/behat/mink-goutte-driver/src'), - 'Behat\\Mink\\' => array($vendorDir . '/behat/mink/src'), + 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index e81d587d5..3295ebf54 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -23,7 +23,7 @@ class ComposerAutoloaderInitDrupal8 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInitDrupal8', 'loadClassLoader')); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 6d89083ef..87034d1f8 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -12,8 +12,8 @@ class ComposerStaticInitDrupal8 'edc6464955a37aa4d5fbf39d40fb6ee7' => __DIR__ . '/..' . '/symfony/polyfill-php55/bootstrap.php', '3e2471375464aac821502deb0ac64275' => __DIR__ . '/..' . '/symfony/polyfill-php54/bootstrap.php', '32dcc8afd4335739640db7d200c1971d' => __DIR__ . '/..' . '/symfony/polyfill-apcu/bootstrap.php', - 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', 'def43f6c87e4f8dfd0c9e1b1bab14fe8' => __DIR__ . '/..' . '/symfony/polyfill-iconv/bootstrap.php', @@ -22,10 +22,7 @@ class ComposerStaticInitDrupal8 public static $prefixLengthsPsr4 = array ( 'Z' => array ( - 'Zumba\\Mink\\Driver\\' => 18, - 'Zumba\\GastonJS\\' => 15, 'Zend\\Stdlib\\' => 12, - 'Zend\\Hydrator\\' => 14, 'Zend\\Feed\\' => 10, 'Zend\\Escaper\\' => 13, 'Zend\\Diactoros\\' => 15, @@ -49,18 +46,16 @@ class ComposerStaticInitDrupal8 'Symfony\\Component\\HttpKernel\\' => 29, 'Symfony\\Component\\HttpFoundation\\' => 33, 'Symfony\\Component\\EventDispatcher\\' => 34, - 'Symfony\\Component\\DomCrawler\\' => 29, 'Symfony\\Component\\DependencyInjection\\' => 38, 'Symfony\\Component\\Debug\\' => 24, - 'Symfony\\Component\\CssSelector\\' => 30, 'Symfony\\Component\\Console\\' => 26, 'Symfony\\Component\\ClassLoader\\' => 30, - 'Symfony\\Component\\BrowserKit\\' => 29, 'Symfony\\Cmf\\Component\\Routing\\' => 30, 'Symfony\\Bridge\\PsrHttpMessage\\' => 30, ), 'P' => array ( + 'Psr\\Log\\' => 8, 'Psr\\Http\\Message\\' => 17, ), 'M' => @@ -72,7 +67,6 @@ class ComposerStaticInitDrupal8 'GuzzleHttp\\Psr7\\' => 16, 'GuzzleHttp\\Promise\\' => 19, 'GuzzleHttp\\' => 11, - 'Goutte\\' => 7, ), 'D' => array ( @@ -80,36 +74,21 @@ class ComposerStaticInitDrupal8 'Drupal\\Core\\Composer\\' => 21, 'Drupal\\Core\\' => 12, 'Drupal\\Component\\' => 17, - 'Doctrine\\Instantiator\\' => 22, + 'Doctrine\\Common\\Cache\\' => 22, + 'Doctrine\\Common\\' => 16, ), 'C' => array ( 'Composer\\Semver\\' => 16, - ), - 'B' => - array ( - 'Behat\\Mink\\Driver\\' => 18, - 'Behat\\Mink\\' => 11, + 'Composer\\Installers\\' => 20, ), ); public static $prefixDirsPsr4 = array ( - 'Zumba\\Mink\\Driver\\' => - array ( - 0 => __DIR__ . '/..' . '/jcalderonzumba/mink-phantomjs-driver/src', - ), - 'Zumba\\GastonJS\\' => - array ( - 0 => __DIR__ . '/..' . '/jcalderonzumba/gastonjs/src', - ), 'Zend\\Stdlib\\' => array ( 0 => __DIR__ . '/..' . '/zendframework/zend-stdlib/src', ), - 'Zend\\Hydrator\\' => - array ( - 0 => __DIR__ . '/..' . '/zendframework/zend-hydrator/src', - ), 'Zend\\Feed\\' => array ( 0 => __DIR__ . '/..' . '/zendframework/zend-feed/src', @@ -178,10 +157,6 @@ class ComposerStaticInitDrupal8 array ( 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', ), - 'Symfony\\Component\\DomCrawler\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/dom-crawler', - ), 'Symfony\\Component\\DependencyInjection\\' => array ( 0 => __DIR__ . '/..' . '/symfony/dependency-injection', @@ -190,10 +165,6 @@ class ComposerStaticInitDrupal8 array ( 0 => __DIR__ . '/..' . '/symfony/debug', ), - 'Symfony\\Component\\CssSelector\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/css-selector', - ), 'Symfony\\Component\\Console\\' => array ( 0 => __DIR__ . '/..' . '/symfony/console', @@ -202,10 +173,6 @@ class ComposerStaticInitDrupal8 array ( 0 => __DIR__ . '/..' . '/symfony/class-loader', ), - 'Symfony\\Component\\BrowserKit\\' => - array ( - 0 => __DIR__ . '/..' . '/symfony/browser-kit', - ), 'Symfony\\Cmf\\Component\\Routing\\' => array ( 0 => __DIR__ . '/..' . '/symfony-cmf/routing', @@ -214,6 +181,10 @@ class ComposerStaticInitDrupal8 array ( 0 => __DIR__ . '/..' . '/symfony/psr-http-message-bridge', ), + 'Psr\\Log\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', + ), 'Psr\\Http\\Message\\' => array ( 0 => __DIR__ . '/..' . '/psr/http-message/src', @@ -234,10 +205,6 @@ class ComposerStaticInitDrupal8 array ( 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', ), - 'Goutte\\' => - array ( - 0 => __DIR__ . '/..' . '/fabpot/goutte/Goutte', - ), 'Drupal\\Driver\\' => array ( 0 => __DIR__ . '/../..' . '/drivers/lib/Drupal/Driver', @@ -254,40 +221,25 @@ class ComposerStaticInitDrupal8 array ( 0 => __DIR__ . '/../..' . '/core/lib/Drupal/Component', ), - 'Doctrine\\Instantiator\\' => + 'Doctrine\\Common\\Cache\\' => array ( - 0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator', + 0 => __DIR__ . '/..' . '/doctrine/cache/lib/Doctrine/Common/Cache', + ), + 'Doctrine\\Common\\' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/common/lib/Doctrine/Common', ), 'Composer\\Semver\\' => array ( 0 => __DIR__ . '/..' . '/composer/semver/src', ), - 'Behat\\Mink\\Driver\\' => + 'Composer\\Installers\\' => array ( - 0 => __DIR__ . '/..' . '/behat/mink-browserkit-driver/src', - 1 => __DIR__ . '/..' . '/behat/mink-goutte-driver/src', - ), - 'Behat\\Mink\\' => - array ( - 0 => __DIR__ . '/..' . '/behat/mink/src', + 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', ), ); public static $prefixesPsr0 = array ( - 'p' => - array ( - 'phpDocumentor' => - array ( - 0 => __DIR__ . '/..' . '/phpdocumentor/reflection-docblock/src', - ), - ), - 'o' => - array ( - 'org\\bovigo\\vfs\\' => - array ( - 0 => __DIR__ . '/..' . '/mikey179/vfsStream/src/main/php', - ), - ), 'T' => array ( 'Twig_' => @@ -302,17 +254,6 @@ class ComposerStaticInitDrupal8 0 => __DIR__ . '/..' . '/stack/builder/src', ), ), - 'P' => - array ( - 'Psr\\Log\\' => - array ( - 0 => __DIR__ . '/..' . '/psr/log', - ), - 'Prophecy\\' => - array ( - 0 => __DIR__ . '/..' . '/phpspec/prophecy/src', - ), - ), 'E' => array ( 'Egulias\\' => @@ -338,24 +279,16 @@ class ComposerStaticInitDrupal8 array ( 0 => __DIR__ . '/..' . '/doctrine/collections/lib', ), - 'Doctrine\\Common\\Cache\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/cache/lib', - ), 'Doctrine\\Common\\Annotations\\' => array ( 0 => __DIR__ . '/..' . '/doctrine/annotations/lib', ), - 'Doctrine\\Common\\' => - array ( - 0 => __DIR__ . '/..' . '/doctrine/common/lib', - ), ), - 'C' => + 'A' => array ( - 'Composer\\Installers\\' => + 'Asm89\\Stack' => array ( - 0 => __DIR__ . '/..' . '/composer/installers/src', + 0 => __DIR__ . '/..' . '/asm89/stack-cors/src', ), ), ); @@ -369,440 +302,7 @@ class ComposerStaticInitDrupal8 'Drupal\\Core\\DrupalKernel' => __DIR__ . '/../..' . '/core/lib/Drupal/Core/DrupalKernel.php', 'Drupal\\Core\\DrupalKernelInterface' => __DIR__ . '/../..' . '/core/lib/Drupal/Core/DrupalKernelInterface.php', 'Drupal\\Core\\Site\\Settings' => __DIR__ . '/../..' . '/core/lib/Drupal/Core/Site/Settings.php', - 'File_Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php', - 'File_Iterator_Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php', - 'File_Iterator_Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php', - 'PHPUnit_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php', - 'PHPUnit_Extensions_GroupTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', - 'PHPUnit_Extensions_PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', - 'PHPUnit_Extensions_PhptTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', - 'PHPUnit_Extensions_RepeatedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', - 'PHPUnit_Extensions_TestDecorator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TestDecorator.php', - 'PHPUnit_Extensions_TicketListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Extensions/TicketListener.php', - 'PHPUnit_Framework_Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php', - 'PHPUnit_Framework_AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', - 'PHPUnit_Framework_BaseTestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/BaseTestListener.php', - 'PHPUnit_Framework_CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', - 'PHPUnit_Framework_Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint.php', - 'PHPUnit_Framework_Constraint_And' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/And.php', - 'PHPUnit_Framework_Constraint_ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', - 'PHPUnit_Framework_Constraint_ArraySubset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', - 'PHPUnit_Framework_Constraint_Attribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', - 'PHPUnit_Framework_Constraint_Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', - 'PHPUnit_Framework_Constraint_ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', - 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', - 'PHPUnit_Framework_Constraint_Composite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', - 'PHPUnit_Framework_Constraint_Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Count.php', - 'PHPUnit_Framework_Constraint_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', - 'PHPUnit_Framework_Constraint_ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', - 'PHPUnit_Framework_Constraint_ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', - 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', - 'PHPUnit_Framework_Constraint_FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', - 'PHPUnit_Framework_Constraint_GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', - 'PHPUnit_Framework_Constraint_IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', - 'PHPUnit_Framework_Constraint_IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', - 'PHPUnit_Framework_Constraint_IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', - 'PHPUnit_Framework_Constraint_IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', - 'PHPUnit_Framework_Constraint_IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', - 'PHPUnit_Framework_Constraint_IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', - 'PHPUnit_Framework_Constraint_IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', - 'PHPUnit_Framework_Constraint_IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', - 'PHPUnit_Framework_Constraint_IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', - 'PHPUnit_Framework_Constraint_IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', - 'PHPUnit_Framework_Constraint_JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', - 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', - 'PHPUnit_Framework_Constraint_LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', - 'PHPUnit_Framework_Constraint_Not' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Not.php', - 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', - 'PHPUnit_Framework_Constraint_Or' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Or.php', - 'PHPUnit_Framework_Constraint_PCREMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', - 'PHPUnit_Framework_Constraint_SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', - 'PHPUnit_Framework_Constraint_StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', - 'PHPUnit_Framework_Constraint_StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', - 'PHPUnit_Framework_Constraint_StringMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', - 'PHPUnit_Framework_Constraint_StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', - 'PHPUnit_Framework_Constraint_TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', - 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', - 'PHPUnit_Framework_Constraint_Xor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', - 'PHPUnit_Framework_Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error.php', - 'PHPUnit_Framework_Error_Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', - 'PHPUnit_Framework_Error_Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php', - 'PHPUnit_Framework_Error_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php', - 'PHPUnit_Framework_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception.php', - 'PHPUnit_Framework_ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', - 'PHPUnit_Framework_ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', - 'PHPUnit_Framework_IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php', - 'PHPUnit_Framework_IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', - 'PHPUnit_Framework_IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', - 'PHPUnit_Framework_InvalidCoversTargetError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', - 'PHPUnit_Framework_InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', - 'PHPUnit_Framework_MockObject_BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', - 'PHPUnit_Framework_MockObject_Builder_Identity' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', - 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Builder_Match' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', - 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Namespace' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', - 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', - 'PHPUnit_Framework_MockObject_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', - 'PHPUnit_Framework_MockObject_Generator' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', - 'PHPUnit_Framework_MockObject_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', - 'PHPUnit_Framework_MockObject_InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Invocation_Object' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', - 'PHPUnit_Framework_MockObject_Invocation_Static' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', - 'PHPUnit_Framework_MockObject_Invokable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', - 'PHPUnit_Framework_MockObject_Matcher' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_Invocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', - 'PHPUnit_Framework_MockObject_Matcher_MethodName' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', - 'PHPUnit_Framework_MockObject_Matcher_Parameters' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', - 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', - 'PHPUnit_Framework_MockObject_MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', - 'PHPUnit_Framework_MockObject_MockObject' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', - 'PHPUnit_Framework_MockObject_RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', - 'PHPUnit_Framework_MockObject_Stub' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', - 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', - 'PHPUnit_Framework_MockObject_Stub_Exception' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', - 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', - 'PHPUnit_Framework_MockObject_Stub_Return' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', - 'PHPUnit_Framework_MockObject_Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', - 'PHPUnit_Framework_OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/OutputError.php', - 'PHPUnit_Framework_RiskyTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTest.php', - 'PHPUnit_Framework_RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/RiskyTestError.php', - 'PHPUnit_Framework_SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php', - 'PHPUnit_Framework_SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php', - 'PHPUnit_Framework_SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', - 'PHPUnit_Framework_SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestError.php', - 'PHPUnit_Framework_SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', - 'PHPUnit_Framework_SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SyntheticError.php', - 'PHPUnit_Framework_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php', - 'PHPUnit_Framework_TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php', - 'PHPUnit_Framework_TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php', - 'PHPUnit_Framework_TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php', - 'PHPUnit_Framework_TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php', - 'PHPUnit_Framework_TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php', - 'PHPUnit_Framework_TestSuite_DataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', - 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', - 'PHPUnit_Framework_Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Warning.php', - 'PHPUnit_Runner_BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', - 'PHPUnit_Runner_Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php', - 'PHPUnit_Runner_Filter_Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', - 'PHPUnit_Runner_Filter_GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group.php', - 'PHPUnit_Runner_Filter_Group_Exclude' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', - 'PHPUnit_Runner_Filter_Group_Include' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', - 'PHPUnit_Runner_Filter_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Test.php', - 'PHPUnit_Runner_StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', - 'PHPUnit_Runner_TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', - 'PHPUnit_Runner_Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php', - 'PHPUnit_TextUI_Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php', - 'PHPUnit_TextUI_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', - 'PHPUnit_TextUI_TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php', - 'PHPUnit_Util_Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php', - 'PHPUnit_Util_Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Configuration.php', - 'PHPUnit_Util_ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php', - 'PHPUnit_Util_Fileloader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Fileloader.php', - 'PHPUnit_Util_Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', - 'PHPUnit_Util_Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', - 'PHPUnit_Util_Getopt' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Getopt.php', - 'PHPUnit_Util_GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', - 'PHPUnit_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', - 'PHPUnit_Util_Log_JSON' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JSON.php', - 'PHPUnit_Util_Log_JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php', - 'PHPUnit_Util_Log_TAP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TAP.php', - 'PHPUnit_Util_PHP' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP.php', - 'PHPUnit_Util_PHP_Default' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Default.php', - 'PHPUnit_Util_PHP_Windows' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/Windows.php', - 'PHPUnit_Util_Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php', - 'PHPUnit_Util_Regex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Regex.php', - 'PHPUnit_Util_String' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/String.php', - 'PHPUnit_Util_Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php', - 'PHPUnit_Util_TestDox_NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', - 'PHPUnit_Util_TestDox_ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', - 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', - 'PHPUnit_Util_TestDox_ResultPrinter_Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', - 'PHPUnit_Util_TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', - 'PHPUnit_Util_Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php', - 'PHPUnit_Util_XML' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XML.php', - 'PHP_CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php', - 'PHP_CodeCoverage_Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', - 'PHP_CodeCoverage_Driver_HHVM' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', - 'PHP_CodeCoverage_Driver_PHPDBG' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', - 'PHP_CodeCoverage_Driver_Xdebug' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', - 'PHP_CodeCoverage_Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', - 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', - 'PHP_CodeCoverage_Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', - 'PHP_CodeCoverage_Report_Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', - 'PHP_CodeCoverage_Report_Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', - 'PHP_CodeCoverage_Report_Factory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', - 'PHP_CodeCoverage_Report_HTML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', - 'PHP_CodeCoverage_Report_HTML_Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', - 'PHP_CodeCoverage_Report_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', - 'PHP_CodeCoverage_Report_Node_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', - 'PHP_CodeCoverage_Report_Node_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', - 'PHP_CodeCoverage_Report_Node_Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', - 'PHP_CodeCoverage_Report_PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', - 'PHP_CodeCoverage_Report_Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', - 'PHP_CodeCoverage_Report_XML' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', - 'PHP_CodeCoverage_Report_XML_Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', - 'PHP_CodeCoverage_Report_XML_File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', - 'PHP_CodeCoverage_Report_XML_File_Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', - 'PHP_CodeCoverage_Report_XML_File_Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', - 'PHP_CodeCoverage_Report_XML_File_Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', - 'PHP_CodeCoverage_Report_XML_File_Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', - 'PHP_CodeCoverage_Report_XML_Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', - 'PHP_CodeCoverage_Report_XML_Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', - 'PHP_CodeCoverage_Report_XML_Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', - 'PHP_CodeCoverage_Report_XML_Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', - 'PHP_CodeCoverage_Util' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', - 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', - 'PHP_Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php', - 'PHP_Token' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScope' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScopeAndVisibility' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ABSTRACT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AMPERSAND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AND_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ASYNC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AWAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BACKTICK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BAD_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOL_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BREAK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CALLABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CARET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CASE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CATCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CHARACTER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_NAME_CONSTANT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLONE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COALESCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMA' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMPILER_HALT_OFFSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONCAT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONSTANT_ENCAPSED_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONTINUE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CURLY_OPEN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEFAULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOC_COMMENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_COLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_QUOTES' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELLIPSIS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSEIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EMPTY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENCAPSED_AND_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDDECLARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDIF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDSWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDWHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_END_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENUM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EQUALS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EVAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXCLAMATION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXTENDS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINALLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOREACH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNCTION' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNC_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GLOBAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GOTO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_HALT_COMPILER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IMPLEMENTS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INLINE_HTML' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTANCEOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTEADOF' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INTERFACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ISSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_GREATER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_IDENTICAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_SMALLER_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Includes' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_JOIN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_ARROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_CP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_OP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LINE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LIST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LNUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_AND' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_OR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_XOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_METHOD_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MOD_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MULT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MUL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NAMESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NEW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_SEPARATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NUM_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_OPERATOR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ONUMBER' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_BRACKET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_CURLY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_SQUARE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG_WITH_ECHO' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PERCENT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PIPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRINT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRIVATE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PROTECTED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PUBLIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_QUESTION_MARK' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE_ONCE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_RETURN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SEMICOLON' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SHAPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SPACESHIP' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_START_HEREDOC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STATIC' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_VARNAME' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SWITCH' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Stream' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream.php', - 'PHP_Token_Stream_CachingFactory' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', - 'PHP_Token_THROW' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TILDE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT_C' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPELIST_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPELIST_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET_CAST' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_USE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VAR' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VARIABLE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHERE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHILE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHITESPACE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_ATTRIBUTE' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CATEGORY' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CATEGORY_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CHILDREN' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_LABEL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_REQUIRED' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TAG_GT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TAG_LT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TEXT' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XOR_EQUAL' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_YIELD' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_YIELD_FROM' => __DIR__ . '/..' . '/phpunit/php-token-stream/src/Token.php', 'RecursiveCallbackFilterIterator' => __DIR__ . '/..' . '/symfony/polyfill-php54/Resources/stubs/RecursiveCallbackFilterIterator.php', - 'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php', - 'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php', - 'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php', - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php', - 'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php', - 'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php', - 'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php', - 'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php', - 'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php', - 'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php', - 'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php', - 'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php', - 'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php', - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php', - 'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php', - 'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php', - 'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php', - 'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php', - 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', - 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => __DIR__ . '/..' . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php', - 'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php', - 'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php', - 'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php', - 'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php', - 'SebastianBergmann\\GlobalState\\Blacklist' => __DIR__ . '/..' . '/sebastian/global-state/src/Blacklist.php', - 'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/Exception.php', - 'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php', - 'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/RuntimeException.php', - 'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php', - 'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php', - 'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php', - 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php', - 'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php', 'SessionHandlerInterface' => __DIR__ . '/..' . '/symfony/polyfill-php54/Resources/stubs/SessionHandlerInterface.php', 'Symfony\\Component\\HttpFoundation\\FileBag' => __DIR__ . '/..' . '/symfony/http-foundation/FileBag.php', 'Symfony\\Component\\HttpFoundation\\HeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/HeaderBag.php', @@ -812,7 +312,6 @@ class ComposerStaticInitDrupal8 'Symfony\\Component\\HttpKernel\\HttpKernel' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernel.php', 'Symfony\\Component\\HttpKernel\\HttpKernelInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpKernelInterface.php', 'Symfony\\Component\\HttpKernel\\TerminableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/TerminableInterface.php', - 'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 6d189a7e6..de5a1f662 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,19 +1,22 @@ [ { "name": "composer/installers", - "version": "v1.0.21", - "version_normalized": "1.0.21.0", + "version": "v1.2.0", + "version_normalized": "1.2.0.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45" + "reference": "d78064c68299743e0161004f2de3a0204e33b804" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", + "url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804", + "reference": "d78064c68299743e0161004f2de3a0204e33b804", "shasum": "" }, + "require": { + "composer-plugin-api": "^1.0" + }, "replace": { "roundcube/plugin-installer": "*", "shama/baton": "*" @@ -22,18 +25,18 @@ "composer/composer": "1.0.*@dev", "phpunit/phpunit": "4.1.*" }, - "time": "2015-02-18 17:17:01", - "type": "composer-installer", + "time": "2016-08-13T20:53:52+00:00", + "type": "composer-plugin", "extra": { - "class": "Composer\\Installers\\Installer", + "class": "Composer\\Installers\\Plugin", "branch-alias": { "dev-master": "1.0-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Composer\\Installers\\": "src/" + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" } }, "notification-url": "https://packagist.org/downloads/", @@ -48,28 +51,35 @@ } ], "description": "A multi-framework Composer library installer", - "homepage": "http://composer.github.com/installers/", + "homepage": "https://composer.github.io/installers/", "keywords": [ "Craft", "Dolibarr", "Hurad", + "ImageCMS", "MODX Evo", + "Mautic", "OXID", + "Plentymarkets", + "RadPHP", "SMF", "Thelia", "WolfCMS", "agl", "aimeos", "annotatecms", + "attogram", "bitrix", "cakephp", "chef", + "cockpit", "codeigniter", "concrete5", "croogo", "dokuwiki", "drupal", "elgg", + "expressionengine", "fuelphp", "grav", "installer", @@ -86,29 +96,31 @@ "piwik", "ppi", "puppet", + "reindex", "roundcube", "shopware", "silverstripe", "symfony", "typo3", "wordpress", + "yawik", "zend", "zikula" ] }, { "name": "wikimedia/composer-merge-plugin", - "version": "v1.3.1", - "version_normalized": "1.3.1.0", + "version": "v1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", "url": "https://github.com/wikimedia/composer-merge-plugin.git", - "reference": "0bdf8543d445ee067c9ba7d5d4a5dde70b9785f4" + "reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/0bdf8543d445ee067c9ba7d5d4a5dde70b9785f4", - "reference": "0bdf8543d445ee067c9ba7d5d4a5dde70b9785f4", + "url": "https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/ca453f9f13d8b05f86f20ea10be992a782e6f78c", + "reference": "ca453f9f13d8b05f86f20ea10be992a782e6f78c", "shasum": "" }, "require": { @@ -116,12 +128,12 @@ "php": ">=5.3.2" }, "require-dev": { - "composer/composer": "1.0.*@dev", + "composer/composer": "~1.0.0", "jakub-onderka/php-parallel-lint": "~0.8", "phpunit/phpunit": "~4.8|~5.0", "squizlabs/php_codesniffer": "~2.1.0" }, - "time": "2016-03-08 17:11:37", + "time": "2017-03-13T16:52:55+00:00", "type": "composer-plugin", "extra": { "branch-alias": { @@ -148,32 +160,611 @@ "description": "Composer plugin to merge multiple composer.json files" }, { - "name": "composer/semver", + "name": "ircmaxell/password-compat", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/password_compat.git", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "time": "2014-11-20T16:49:30+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "lib/password.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@php.net", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", + "homepage": "https://github.com/ircmaxell/password_compat", + "keywords": [ + "hashing", + "password" + ] + }, + { + "name": "symfony/polyfill-php55", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php55.git", + "reference": "03e3f0350bca2220e3623a0e340eef194405fc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/03e3f0350bca2220e3623a0e340eef194405fc67", + "reference": "03e3f0350bca2220e3623a0e340eef194405fc67", + "shasum": "" + }, + "require": { + "ircmaxell/password-compat": "~1.0", + "php": ">=5.3.3" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php55\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 5.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-php54", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php54.git", + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0", + "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php54\\": "" + }, + "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 5.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2016-11-14T01:06:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/http-foundation", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "88af747e7af17d8d7d439ad4639dc3e23ddd3edd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/88af747e7af17d8d7d439ad4639dc3e23ddd3edd", + "reference": "88af747e7af17d8d7d439ad4639dc3e23ddd3edd", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php54": "~1.0", + "symfony/polyfill-php55": "~1.0" + }, + "require-dev": { + "symfony/expression-language": "~2.4|~3.0.0" + }, + "time": "2017-03-04T12:20:59+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bb4ec47e8e109c1c1172145732d0aa468d967cd0", + "reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^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": "" + }, + "time": "2017-02-21T08:33:48+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com" + }, + { + "name": "psr/log", + "version": "1.0.2", + "version_normalized": "1.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-10-10T12:19:37+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ] + }, + { + "name": "symfony/debug", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/e90099a2958d4833a02d05b504cc06e1c234abcc", + "reference": "e90099a2958d4833a02d05b504cc06e1c234abcc", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + }, + "time": "2017-02-18T19:13:35+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/http-kernel", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "18d7a01ac14ffa5a652a635c402b9777f858fc1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/18d7a01ac14ffa5a652a635c402b9777f858fc1a", + "reference": "18d7a01ac14ffa5a652a635c402b9777f858fc1a", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0", + "symfony/debug": "^2.6.2", + "symfony/event-dispatcher": "^2.6.7|~3.0.0", + "symfony/http-foundation": "~2.7.20|~2.8.13|~3.1.6" + }, + "conflict": { + "symfony/config": "<2.7" + }, + "require-dev": { + "symfony/browser-kit": "~2.3|~3.0.0", + "symfony/class-loader": "~2.1|~3.0.0", + "symfony/config": "~2.8", + "symfony/console": "~2.3|~3.0.0", + "symfony/css-selector": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.8|~3.0.0", + "symfony/dom-crawler": "^2.0.5|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/finder": "^2.0.5|~3.0.0", + "symfony/process": "^2.0.5|~3.0.0", + "symfony/routing": "~2.8|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0", + "symfony/templating": "~2.2|~3.0.0", + "symfony/translation": "^2.0.5|~3.0.0", + "symfony/var-dumper": "~2.6|~3.0.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "time": "2017-03-06T03:54:35+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com" + }, + { + "name": "asm89/stack-cors", "version": "1.0.0", "version_normalized": "1.0.0.0", "source": { "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "d0e1ccc6d44ab318b758d709e19176037da6b1ba" + "url": "https://github.com/asm89/stack-cors.git", + "reference": "3ae8ef219bb4c9a6caf857421719aa07fa7776cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/d0e1ccc6d44ab318b758d709e19176037da6b1ba", - "reference": "d0e1ccc6d44ab318b758d709e19176037da6b1ba", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/3ae8ef219bb4c9a6caf857421719aa07fa7776cc", + "reference": "3ae8ef219bb4c9a6caf857421719aa07fa7776cc", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.3.2", + "symfony/http-foundation": "~2.1|~3.0", + "symfony/http-kernel": "~2.1|~3.0" + }, + "time": "2016-08-01T12:05:04+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Asm89\\Stack": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexander", + "email": "iam.asm89@gmail.com" + } + ], + "description": "Cross-origin resource sharing library and stack middleware", + "homepage": "https://github.com/asm89/stack-cors", + "keywords": [ + "cors", + "stack" + ] + }, + { + "name": "composer/semver", + "version": "1.4.2", + "version_normalized": "1.4.2.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573", + "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "~2.3" + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" }, - "time": "2015-09-21 09:42:36", + "time": "2016-08-30T16:08:34+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "0.1-dev" + "dev-master": "1.x-dev" } }, "installation-source": "dist", @@ -187,10 +778,6 @@ "MIT" ], "authors": [ - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com" - }, { "name": "Nils Adermann", "email": "naderman@naderman.de", @@ -200,6 +787,11 @@ "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], "description": "Semver library that offers utilities, version constraint parsing and validation.", @@ -228,7 +820,7 @@ "require": { "php": ">=5.3.2" }, - "time": "2014-09-09 13:34:57", + "time": "2014-09-09T13:34:57+00:00", "type": "library", "extra": { "branch-alias": { @@ -268,17 +860,17 @@ }, { "name": "doctrine/inflector", - "version": "v1.0.1", - "version_normalized": "1.0.1.0", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604" + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/0bcb2e79d8571787f18b7eb036ed3d004908e604", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", "shasum": "" }, "require": { @@ -287,11 +879,11 @@ "require-dev": { "phpunit/phpunit": "4.*" }, - "time": "2014-12-20 21:24:13", + "time": "2015-11-06T14:35:42+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "installation-source": "dist", @@ -356,7 +948,7 @@ "require-dev": { "phpunit/phpunit": "~4.0" }, - "time": "2015-04-14 22:21:58", + "time": "2015-04-14T22:21:58+00:00", "type": "library", "extra": { "branch-alias": { @@ -405,41 +997,41 @@ }, { "name": "doctrine/cache", - "version": "v1.4.2", - "version_normalized": "1.4.2.0", + "version": "v1.6.1", + "version_normalized": "1.6.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca" + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/8c434000f420ade76a07c64cbe08ca47e5c101ca", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca", + "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "~5.5|~7.0" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "phpunit/phpunit": ">=3.7", + "phpunit/phpunit": "~4.8|~5.0", "predis/predis": "~1.0", "satooshi/php-coveralls": "~0.6" }, - "time": "2015-08-31 12:36:41", + "time": "2016-10-29T11:16:17+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "1.6.x-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "lib/" + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } }, "notification-url": "https://packagist.org/downloads/", @@ -498,7 +1090,7 @@ "doctrine/cache": "1.*", "phpunit/phpunit": "4.*" }, - "time": "2015-08-31 12:32:49", + "time": "2015-08-31T12:32:49+00:00", "type": "library", "extra": { "branch-alias": { @@ -547,17 +1139,17 @@ }, { "name": "doctrine/common", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", + "version": "v2.6.2", + "version_normalized": "2.6.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9" + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/0009b8f0d4a917aabc971fb089eba80e872f83f9", - "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9", + "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", "shasum": "" }, "require": { @@ -566,22 +1158,22 @@ "doctrine/collections": "1.*", "doctrine/inflector": "1.*", "doctrine/lexer": "1.*", - "php": ">=5.3.2" + "php": "~5.5|~7.0" }, "require-dev": { - "phpunit/phpunit": "~3.7" + "phpunit/phpunit": "~4.8|~5.0" }, - "time": "2015-08-31 13:00:22", + "time": "2016-11-30T16:50:46+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6.x-dev" + "dev-master": "2.7.x-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Doctrine\\Common\\": "lib/" + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" } }, "notification-url": "https://packagist.org/downloads/", @@ -648,7 +1240,7 @@ "suggest": { "ml/json-ld": "~1.0" }, - "time": "2015-02-27 09:45:49", + "time": "2015-02-27T09:45:49+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -686,28 +1278,27 @@ }, { "name": "egulias/email-validator", - "version": "1.2.9", - "version_normalized": "1.2.9.0", + "version": "1.2.14", + "version_normalized": "1.2.14.0", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "af864423f50ea59f96c87bb1eae147a70bcf67a1" + "reference": "5642614492f0ca2064c01d60cc33284cc2f731a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/af864423f50ea59f96c87bb1eae147a70bcf67a1", - "reference": "af864423f50ea59f96c87bb1eae147a70bcf67a1", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/5642614492f0ca2064c01d60cc33284cc2f731a9", + "reference": "5642614492f0ca2064c01d60cc33284cc2f731a9", "shasum": "" }, "require": { - "doctrine/lexer": "~1.0,>=1.0.1", + "doctrine/lexer": "^1.0.1", "php": ">= 5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.4", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^4.8.24" }, - "time": "2015-06-22 21:07:51", + "time": "2017-02-03T22:48:59+00:00", "type": "library", "extra": { "branch-alias": { @@ -740,31 +1331,150 @@ ] }, { - "name": "guzzlehttp/promises", - "version": "1.2.0", - "version_normalized": "1.2.0.0", + "name": "psr/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "version_normalized": "1.4.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "time": "2017-03-20T17:10:46+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "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 that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ] + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "version_normalized": "1.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "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" }, - "time": "2016-05-18 16:56:05", + "time": "2016-12-20T10:07:11+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } }, "installation-source": "dist", @@ -793,96 +1503,45 @@ ] }, { - "name": "psr/http-message", - "version": "1.0", - "version_normalized": "1.0.0.0", + "name": "guzzlehttp/guzzle", + "version": "6.2.3", + "version_normalized": "6.2.3.0", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", "shasum": "" }, "require": { - "php": ">=5.3.0" - }, - "time": "2015-05-04 20:22:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "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", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ] - }, - { - "name": "guzzlehttp/psr7", - "version": "1.3.1", - "version_normalized": "1.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "ext-curl": "*", + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" }, - "time": "2016-06-24 23:00:38", + "time": "2017-02-28T22:50:30+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "6.2-dev" } }, "installation-source": "dist", "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -895,71 +1554,31 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "PSR-7 message implementation", + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", "keywords": [ + "client", + "curl", + "framework", "http", - "message", - "stream", - "uri" - ] - }, - { - "name": "ircmaxell/password-compat", - "version": "v1.0.4", - "version_normalized": "1.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "time": "2014-11-20 16:49:30", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" + "http client", + "rest", + "web service" ] }, { "name": "masterminds/html5", - "version": "2.2.1", - "version_normalized": "2.2.1.0", + "version": "2.2.2", + "version_normalized": "2.2.2.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "170aa5cb35b29fccafbf5ea63487c013f396fdc9" + "reference": "7866e93dcf0245de22378414e0c2c7350abc45af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/170aa5cb35b29fccafbf5ea63487c013f396fdc9", - "reference": "170aa5cb35b29fccafbf5ea63487c013f396fdc9", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/7866e93dcf0245de22378414e0c2c7350abc45af", + "reference": "7866e93dcf0245de22378414e0c2c7350abc45af", "shasum": "" }, "require": { @@ -971,11 +1590,11 @@ "sami/sami": "~2.0", "satooshi/php-coveralls": "1.0.*" }, - "time": "2016-05-10 14:11:45", + "time": "2016-09-22T11:01:11+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "installation-source": "dist", @@ -1016,17 +1635,17 @@ }, { "name": "paragonie/random_compat", - "version": "1.1.1", - "version_normalized": "1.1.1.0", + "version": "v2.0.10", + "version_normalized": "2.0.10.0", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "a208865a5aeffc2dbbef2a5b3409887272d93f32" + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/a208865a5aeffc2dbbef2a5b3409887272d93f32", - "reference": "a208865a5aeffc2dbbef2a5b3409887272d93f32", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", "shasum": "" }, "require": { @@ -1038,7 +1657,7 @@ "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, - "time": "2015-12-01 02:52:15", + "time": "2017-03-13T16:27:32+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1064,508 +1683,30 @@ "random" ] }, - { - "name": "symfony/polyfill-php55", - "version": "v1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "b4f3f07d91702f8f926339fc4fcf81671d8c27e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/b4f3f07d91702f8f926339fc4fcf81671d8c27e6", - "reference": "b4f3f07d91702f8f926339fc4fcf81671d8c27e6", - "shasum": "" - }, - "require": { - "ircmaxell/password-compat": "~1.0", - "php": ">=5.3.3" - }, - "time": "2016-01-20 09:13:37", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php55\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "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 5.5+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/polyfill-php54", - "version": "v1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php54.git", - "reference": "74663d5a2ff3c530c1bc0571500e0feec9094054" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/74663d5a2ff3c530c1bc0571500e0feec9094054", - "reference": "74663d5a2ff3c530c1bc0571500e0feec9094054", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2016-01-20 09:13:37", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php54\\": "" - }, - "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 5.4+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.1.0", - "version_normalized": "1.1.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "1289d16209491b584839022f29257ad859b8532d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", - "reference": "1289d16209491b584839022f29257ad859b8532d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "time": "2016-01-20 09:13:37", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "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 for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ] - }, - { - "name": "symfony/http-foundation", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "06d6b2c755b2f34ce21e688b62072e9c625709c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/06d6b2c755b2f34ce21e688b62072e9c625709c4", - "reference": "06d6b2c755b2f34ce21e688b62072e9c625709c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php54": "~1.0", - "symfony/polyfill-php55": "~1.0" - }, - "require-dev": { - "symfony/expression-language": "~2.4|~3.0.0" - }, - "time": "2016-03-27 12:57:53", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "47d2d8cade9b1c3987573d2943bb9352536cdb87" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/47d2d8cade9b1c3987573d2943bb9352536cdb87", - "reference": "47d2d8cade9b1c3987573d2943bb9352536cdb87", - "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": "" - }, - "time": "2016-03-07 14:04:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com" - }, - { - "name": "psr/log", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "1.0.0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/1.0.0", - "reference": "1.0.0", - "shasum": "" - }, - "time": "2012-12-21 11:40:51", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ] - }, - { - "name": "symfony/debug", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fb9e6887db716939f41af0ba8ef38a1582eb501b", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/class-loader": "~2.2", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/http-kernel", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "2c45576fee2eb228d4771342a05b0565e4711ba2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2c45576fee2eb228d4771342a05b0565e4711ba2", - "reference": "2c45576fee2eb228d4771342a05b0565e4711ba2", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0", - "symfony/debug": "~2.6,>=2.6.2", - "symfony/event-dispatcher": "~2.6,>=2.6.7|~3.0.0", - "symfony/http-foundation": "~2.5,>=2.5.4|~3.0.0" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "symfony/browser-kit": "~2.3|~3.0.0", - "symfony/class-loader": "~2.1|~3.0.0", - "symfony/config": "~2.8", - "symfony/console": "~2.3|~3.0.0", - "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.8|~3.0.0", - "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", - "symfony/expression-language": "~2.4|~3.0.0", - "symfony/finder": "~2.0,>=2.0.5|~3.0.0", - "symfony/process": "~2.0,>=2.0.5|~3.0.0", - "symfony/routing": "~2.8|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0", - "symfony/templating": "~2.2|~3.0.0", - "symfony/translation": "~2.0,>=2.0.5|~3.0.0", - "symfony/var-dumper": "~2.6|~3.0.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "", - "symfony/var-dumper": "" - }, - "time": "2016-03-25 01:40:30", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "https://symfony.com" - }, { "name": "stack/builder", - "version": "v1.0.3", - "version_normalized": "1.0.3.0", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", "source": { "type": "git", "url": "https://github.com/stackphp/builder.git", - "reference": "c1f8a4693b55c563405024f708a76ef576c3b276" + "reference": "59fcc9b448a8ce5e338a04c4e2e4aca893e83425" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stackphp/builder/zipball/c1f8a4693b55c563405024f708a76ef576c3b276", - "reference": "c1f8a4693b55c563405024f708a76ef576c3b276", + "url": "https://api.github.com/repos/stackphp/builder/zipball/59fcc9b448a8ce5e338a04c4e2e4aca893e83425", + "reference": "59fcc9b448a8ce5e338a04c4e2e4aca893e83425", "shasum": "" }, "require": { "php": ">=5.3.0", - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" + "symfony/http-foundation": "~2.1|~3.0", + "symfony/http-kernel": "~2.1|~3.0" }, "require-dev": { "silex/silex": "~1.0" }, - "time": "2014-11-23 20:37:11", + "time": "2016-06-02T06:58:42+00:00", "type": "library", "extra": { "branch-alias": { @@ -1595,17 +1736,17 @@ }, { "name": "symfony/routing", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "d7d4a20cb55a90a06c0070d1a360e5ac606306ef" + "reference": "d145cd396f702c497cb24b21785ddac90a23fe71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d7d4a20cb55a90a06c0070d1a360e5ac606306ef", - "reference": "d7d4a20cb55a90a06c0070d1a360e5ac606306ef", + "url": "https://api.github.com/repos/symfony/routing/zipball/d145cd396f702c497cb24b21785ddac90a23fe71", + "reference": "d145cd396f702c497cb24b21785ddac90a23fe71", "shasum": "" }, "require": { @@ -1621,7 +1762,7 @@ "symfony/config": "~2.7|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", "symfony/http-foundation": "~2.3|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + "symfony/yaml": "^2.0.5|~3.0.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -1631,7 +1772,7 @@ "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" }, - "time": "2016-03-23 13:11:46", + "time": "2017-03-02T15:56:34+00:00", "type": "library", "extra": { "branch-alias": { @@ -1672,38 +1813,40 @@ }, { "name": "symfony-cmf/routing", - "version": "1.3.0", - "version_normalized": "1.3.0.0", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", "url": "https://github.com/symfony-cmf/Routing.git", - "reference": "8e87981d72c6930a27585dcd3119f3199f6cb2a6" + "reference": "b93704ca098334f56e9b317932f21a4362e620db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/8e87981d72c6930a27585dcd3119f3199f6cb2a6", - "reference": "8e87981d72c6930a27585dcd3119f3199f6cb2a6", + "url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/b93704ca098334f56e9b317932f21a4362e620db", + "reference": "b93704ca098334f56e9b317932f21a4362e620db", "shasum": "" }, "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/http-kernel": "~2.2", - "symfony/routing": "~2.2" + "php": "^5.3.9|^7.0", + "psr/log": "1.*", + "symfony/http-kernel": "^2.2|3.*", + "symfony/routing": "^2.2|3.*" }, "require-dev": { - "symfony/config": "~2.2", - "symfony/dependency-injection": "~2.0@stable", - "symfony/event-dispatcher": "~2.1" + "friendsofsymfony/jsrouting-bundle": "^1.1", + "symfony-cmf/testing": "^1.3", + "symfony/config": "^2.2|3.*", + "symfony/dependency-injection": "^2.0.5|3.*", + "symfony/event-dispatcher": "^2.1|3.*" }, "suggest": { - "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ~2.1" + "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)" }, - "time": "2014-10-20 20:55:17", + "time": "2016-03-31T09:11:39+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "installation-source": "dist", @@ -1718,7 +1861,7 @@ ], "authors": [ { - "name": "Symfony CMF community", + "name": "Symfony CMF Community", "homepage": "https://github.com/symfony-cmf/Routing/contributors" } ], @@ -1731,27 +1874,27 @@ }, { "name": "symfony/polyfill-apcu", - "version": "v1.1.1", - "version_normalized": "1.1.1.0", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-apcu.git", - "reference": "0c901e4e65a2f7ece68f0fd249b56d6ad3adc214" + "reference": "5d4474f447403c3348e37b70acc2b95475b7befa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/0c901e4e65a2f7ece68f0fd249b56d6ad3adc214", - "reference": "0c901e4e65a2f7ece68f0fd249b56d6ad3adc214", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/5d4474f447403c3348e37b70acc2b95475b7befa", + "reference": "5d4474f447403c3348e37b70acc2b95475b7befa", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2016-03-03 16:49:40", + "time": "2016-11-14T01:06:16+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "installation-source": "dist", @@ -1786,17 +1929,17 @@ }, { "name": "symfony/class-loader", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "7d362c22710980730d46a5d039e788946a2938cb" + "reference": "2c8de07a8a4cc4da9c018ab7a81888b80e762f93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/7d362c22710980730d46a5d039e788946a2938cb", - "reference": "7d362c22710980730d46a5d039e788946a2938cb", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/2c8de07a8a4cc4da9c018ab7a81888b80e762f93", + "reference": "2c8de07a8a4cc4da9c018ab7a81888b80e762f93", "shasum": "" }, "require": { @@ -1804,9 +1947,9 @@ "symfony/polyfill-apcu": "~1.1" }, "require-dev": { - "symfony/finder": "~2.0,>=2.0.5|~3.0.0" + "symfony/finder": "^2.0.5|~3.0.0" }, - "time": "2016-03-10 19:33:53", + "time": "2017-02-18T19:13:35+00:00", "type": "library", "extra": { "branch-alias": { @@ -1841,21 +1984,22 @@ }, { "name": "symfony/console", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9a5aef5fc0d4eff86853d44202b02be8d5a20154" + "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9a5aef5fc0d4eff86853d44202b02be8d5a20154", - "reference": "9a5aef5fc0d4eff86853d44202b02be8d5a20154", + "url": "https://api.github.com/repos/symfony/console/zipball/81508e6fac4476771275a3f4f53c3fee9b956bfa", + "reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa", "shasum": "" }, "require": { "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { @@ -1868,7 +2012,7 @@ "symfony/event-dispatcher": "", "symfony/process": "" }, - "time": "2016-03-17 09:19:04", + "time": "2017-03-04T11:00:12+00:00", "type": "library", "extra": { "branch-alias": { @@ -1903,17 +2047,17 @@ }, { "name": "symfony/dependency-injection", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f7b4a498e679fa440b16facb934680a1527ed48c" + "reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f7b4a498e679fa440b16facb934680a1527ed48c", - "reference": "f7b4a498e679fa440b16facb934680a1527ed48c", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/efdbeefa454a41154fd99a6f0489f0e9cb46c497", + "reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497", "shasum": "" }, "require": { @@ -1925,14 +2069,15 @@ "require-dev": { "symfony/config": "~2.2|~3.0.0", "symfony/expression-language": "~2.6|~3.0.0", - "symfony/yaml": "~2.1|~3.0.0" + "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7" }, "suggest": { "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", "symfony/yaml": "" }, - "time": "2016-03-21 07:27:21", + "time": "2017-02-28T12:31:05+00:00", "type": "library", "extra": { "branch-alias": { @@ -1967,17 +2112,17 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.1.1", - "version_normalized": "1.1.1.0", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "08e3b8768d785ba7f271ef94906d50f7efe72ce8" + "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/08e3b8768d785ba7f271ef94906d50f7efe72ce8", - "reference": "08e3b8768d785ba7f271ef94906d50f7efe72ce8", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/cba36f3616d9866b3e52662e88da5c090fac1e97", + "reference": "cba36f3616d9866b3e52662e88da5c090fac1e97", "shasum": "" }, "require": { @@ -1986,11 +2131,11 @@ "suggest": { "ext-iconv": "For best performance" }, - "time": "2016-02-26 11:31:02", + "time": "2016-11-14T01:06:16+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "installation-source": "dist", @@ -2028,23 +2173,23 @@ }, { "name": "symfony/process", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "fb467471952ef5cf8497c029980e556b47545333" + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/fb467471952ef5cf8497c029980e556b47545333", - "reference": "fb467471952ef5cf8497c029980e556b47545333", + "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "time": "2016-03-23 13:11:46", + "time": "2017-03-04T12:20:59+00:00", "type": "library", "extra": { "branch-alias": { @@ -2079,17 +2224,17 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v0.2", - "version_normalized": "0.2.0.0", + "version": "v1.0.0", + "version_normalized": "1.0.0.0", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "dc7e308e1dc2898a46776e2221a643cb08315453" + "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/dc7e308e1dc2898a46776e2221a643cb08315453", - "reference": "dc7e308e1dc2898a46776e2221a643cb08315453", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/66085f246d3893cbdbcec5f5ad15ac60546cf0de", + "reference": "66085f246d3893cbdbcec5f5ad15ac60546cf0de", "shasum": "" }, "require": { @@ -2101,10 +2246,16 @@ "symfony/phpunit-bridge": "~2.7|~3.0" }, "suggest": { + "psr/http-message-implementation": "To use the HttpFoundation factory", "zendframework/zend-diactoros": "To use the Zend Diactoros factory" }, - "time": "2015-05-29 17:57:12", + "time": "2016-09-14T18:37:20+00:00", "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "installation-source": "dist", "autoload": { "psr-4": { @@ -2135,17 +2286,17 @@ }, { "name": "symfony/serializer", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "e848750ceffdc4af374844c338c299627a98196a" + "reference": "df3d919f00177f599c8970e86112c7582b08a582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/e848750ceffdc4af374844c338c299627a98196a", - "reference": "e848750ceffdc4af374844c338c299627a98196a", + "url": "https://api.github.com/repos/symfony/serializer/zipball/df3d919f00177f599c8970e86112c7582b08a582", + "reference": "df3d919f00177f599c8970e86112c7582b08a582", "shasum": "" }, "require": { @@ -2157,7 +2308,7 @@ "doctrine/cache": "~1.0", "symfony/config": "~2.2|~3.0.0", "symfony/property-access": "~2.3|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + "symfony/yaml": "^2.0.5|~3.0.0" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", @@ -2166,7 +2317,7 @@ "symfony/property-access": "For using the ObjectNormalizer.", "symfony/yaml": "For using the default YAML mapping loader." }, - "time": "2016-03-07 14:04:32", + "time": "2017-03-05T17:40:13+00:00", "type": "library", "extra": { "branch-alias": { @@ -2201,17 +2352,17 @@ }, { "name": "symfony/translation", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "d60b8e076d22953aabebeebda53bf334438e7aca" + "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/d60b8e076d22953aabebeebda53bf334438e7aca", - "reference": "d60b8e076d22953aabebeebda53bf334438e7aca", + "url": "https://api.github.com/repos/symfony/translation/zipball/b538355bc99db2ec7cc35284ec76d92ae7d1d256", + "reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256", "shasum": "" }, "require": { @@ -2224,7 +2375,7 @@ "require-dev": { "psr/log": "~1.0", "symfony/config": "~2.8", - "symfony/intl": "~2.4|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", "symfony/yaml": "~2.2|~3.0.0" }, "suggest": { @@ -2232,7 +2383,7 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2016-03-25 01:40:30", + "time": "2017-03-04T12:20:59+00:00", "type": "library", "extra": { "branch-alias": { @@ -2267,33 +2418,34 @@ }, { "name": "symfony/validator", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "ea0ce99531c9eb82abf21011da4e111932f8ce81" + "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/ea0ce99531c9eb82abf21011da4e111932f8ce81", - "reference": "ea0ce99531c9eb82abf21011da4e111932f8ce81", + "url": "https://api.github.com/repos/symfony/validator/zipball/8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", + "reference": "8d4bfa7ec24e70ebc28d0cea5f2702d3f1257a63", "shasum": "" }, "require": { "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0", "symfony/translation": "~2.4|~3.0.0" }, "require-dev": { "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", - "egulias/email-validator": "~1.2,>=1.2.1", + "egulias/email-validator": "^1.2.1", "symfony/config": "~2.2|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", - "symfony/http-foundation": "~2.1|~3.0.0", - "symfony/intl": "~2.7.4|~2.8|~3.0.0", + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", "symfony/property-access": "~2.3|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + "symfony/yaml": "^2.0.5|~3.0.0" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", @@ -2306,7 +2458,7 @@ "symfony/property-access": "For using the 2.4 Validator API", "symfony/yaml": "" }, - "time": "2016-03-27 12:57:53", + "time": "2017-02-28T02:24:56+00:00", "type": "library", "extra": { "branch-alias": { @@ -2340,355 +2492,24 @@ "homepage": "https://symfony.com" }, { - "name": "zendframework/zend-diactoros", - "version": "1.1.3", - "version_normalized": "1.1.3.0", + "name": "symfony/yaml", + "version": "v2.8.18", + "version_normalized": "2.8.18.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "e2f5c12916c74da384058d0dfbc7fbc0b03d1181" + "url": "https://github.com/symfony/yaml.git", + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/e2f5c12916c74da384058d0dfbc7fbc0b03d1181", - "reference": "e2f5c12916c74da384058d0dfbc7fbc0b03d1181", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "~1.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.6", - "squizlabs/php_codesniffer": "^2.3.1" - }, - "time": "2015-08-10 20:04:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev", - "dev-develop": "1.1-dev" - } - }, - "installation-source": "dist", - "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" - ] - }, - { - "name": "zendframework/zend-stdlib", - "version": "2.7.3", - "version_normalized": "2.7.3.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8ac0c77ff567fcf49b58689ee3bfa7595be102bc", - "reference": "8ac0c77ff567fcf49b58689ee3bfa7595be102bc", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "zendframework/zend-hydrator": "~1.0" - }, - "require-dev": { - "athletic/athletic": "~0.1", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-inputfilter": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-filter": "To support naming strategy hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" - }, - "time": "2015-09-25 04:06:33", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Zend\\Stdlib\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-stdlib", - "keywords": [ - "stdlib", - "zf2" - ] - }, - { - "name": "zendframework/zend-hydrator", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-hydrator.git", - "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/f3ed8b833355140350bbed98d8a7b8b66875903f", - "reference": "f3ed8b833355140350bbed98d8a7b8b66875903f", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "zendframework/zend-stdlib": "^2.5.1" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "^2.0@dev", - "zendframework/zend-eventmanager": "^2.5.1", - "zendframework/zend-filter": "^2.5.1", - "zendframework/zend-inputfilter": "^2.5.1", - "zendframework/zend-serializer": "^2.5.1", - "zendframework/zend-servicemanager": "^2.5.1" - }, - "suggest": { - "zendframework/zend-eventmanager": "^2.5.1, to support aggregate hydrator usage", - "zendframework/zend-filter": "^2.5.1, to support naming strategy hydrator usage", - "zendframework/zend-serializer": "^2.5.1, to use the SerializableStrategy", - "zendframework/zend-servicemanager": "^2.5.1, to support hydrator plugin manager usage" - }, - "time": "2015-09-17 14:06:43", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev", - "dev-develop": "1.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Zend\\Hydrator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-hydrator", - "keywords": [ - "hydrator", - "zf2" - ] - }, - { - "name": "zendframework/zend-escaper", - "version": "2.5.1", - "version_normalized": "2.5.1.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73", - "reference": "a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" - }, - "time": "2015-06-03 14:05:37", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Zend\\Escaper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-escaper", - "keywords": [ - "escaper", - "zf2" - ] - }, - { - "name": "zendframework/zend-feed", - "version": "2.5.2", - "version_normalized": "2.5.2.0", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-feed.git", - "reference": "0661345b82b51428619e05d3aadd3de65b57fa54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/0661345b82b51428619e05d3aadd3de65b57fa54", - "reference": "0661345b82b51428619e05d3aadd3de65b57fa54", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "zendframework/zend-escaper": "~2.5", - "zendframework/zend-stdlib": "~2.5" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-cache": "~2.5", - "zendframework/zend-db": "~2.5", - "zendframework/zend-http": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-validator": "~2.5" - }, - "suggest": { - "zendframework/zend-cache": "Zend\\Cache component", - "zendframework/zend-db": "Zend\\Db component", - "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations", - "zendframework/zend-validator": "Zend\\Validator component" - }, - "time": "2015-08-04 21:39:18", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Zend\\Feed\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides functionality for consuming RSS and Atom feeds", - "homepage": "https://github.com/zendframework/zend-feed", - "keywords": [ - "feed", - "zf2" - ] - }, - { - "name": "symfony/dom-crawler", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5fef7d8b80d8f9992df99d8ee283f420484c9612", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", + "reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "require-dev": { - "symfony/css-selector": "~2.3" - }, - "suggest": { - "symfony/css-selector": "" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\DomCrawler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/css-selector", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/css-selector.git", - "reference": "07b7ced3ae0c12918477c095453ea8595000810e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/07b7ced3ae0c12918477c095453ea8595000810e", - "reference": "07b7ced3ae0c12918477c095453ea8595000810e", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "time": "2016-03-04 07:54:35", + "time": "2017-03-01T18:13:50+00:00", "type": "library", "extra": { "branch-alias": { @@ -2698,7 +2519,7 @@ "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\CssSelector\\": "" + "Symfony\\Component\\Yaml\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -2709,10 +2530,6 @@ "MIT" ], "authors": [ - { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" @@ -2722,368 +2539,22 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony CssSelector Component", + "description": "Symfony Yaml Component", "homepage": "https://symfony.com" }, - { - "name": "symfony/browser-kit", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/browser-kit.git", - "reference": "07d664a052572ccc28eb2ab7dbbe82155b1ad367" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/07d664a052572ccc28eb2ab7dbbe82155b1ad367", - "reference": "07d664a052572ccc28eb2ab7dbbe82155b1ad367", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/dom-crawler": "~2.0,>=2.0.5" - }, - "require-dev": { - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/process": "~2.3.34|~2.7,>=2.7.6" - }, - "suggest": { - "symfony/process": "" - }, - "time": "2015-10-23 14:47:27", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\BrowserKit\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "https://symfony.com" - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.2.1", - "version_normalized": "6.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "time": "2016-07-15 17:22:37", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ] - }, - { - "name": "fabpot/goutte", - "version": "v3.1.2", - "version_normalized": "3.1.2.0", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/Goutte.git", - "reference": "3cbc6ed222422a28400e470050f14928a153207e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/3cbc6ed222422a28400e470050f14928a153207e", - "reference": "3cbc6ed222422a28400e470050f14928a153207e", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "symfony/browser-kit": "~2.1|~3.0", - "symfony/css-selector": "~2.1|~3.0", - "symfony/dom-crawler": "~2.1|~3.0" - }, - "time": "2015-11-05 12:58:44", - "type": "application", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Goutte\\": "Goutte" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "A simple PHP Web Scraper", - "homepage": "https://github.com/FriendsOfPHP/Goutte", - "keywords": [ - "scraper" - ] - }, - { - "name": "behat/mink", - "version": "v1.7.1", - "version_normalized": "1.7.1.0", - "source": { - "type": "git", - "url": "https://github.com/minkphp/Mink.git", - "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/Mink/zipball/e6930b9c74693dff7f4e58577e1b1743399f3ff9", - "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9", - "shasum": "" - }, - "require": { - "php": ">=5.3.1", - "symfony/css-selector": "~2.1|~3.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "suggest": { - "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", - "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation", - "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)", - "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)" - }, - "time": "2016-03-05 08:26:18", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.7.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Behat\\Mink\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Browser controller/emulator abstraction for PHP", - "homepage": "http://mink.behat.org/", - "keywords": [ - "browser", - "testing", - "web" - ] - }, - { - "name": "behat/mink-browserkit-driver", - "version": "v1.3.2", - "version_normalized": "1.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/minkphp/MinkBrowserKitDriver.git", - "reference": "10e67fb4a295efcd62ea0bf16025a85ea19534fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/10e67fb4a295efcd62ea0bf16025a85ea19534fb", - "reference": "10e67fb4a295efcd62ea0bf16025a85ea19534fb", - "shasum": "" - }, - "require": { - "behat/mink": "^1.7.1@dev", - "php": ">=5.3.6", - "symfony/browser-kit": "~2.3|~3.0", - "symfony/dom-crawler": "~2.3|~3.0" - }, - "require-dev": { - "silex/silex": "~1.2", - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "time": "2016-03-05 08:59:47", - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Behat\\Mink\\Driver\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Symfony2 BrowserKit driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "Mink", - "Symfony2", - "browser", - "testing" - ] - }, - { - "name": "behat/mink-goutte-driver", - "version": "v1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/minkphp/MinkGoutteDriver.git", - "reference": "8b9ad6d2d95bc70b840d15323365f52fcdaea6ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/8b9ad6d2d95bc70b840d15323365f52fcdaea6ca", - "reference": "8b9ad6d2d95bc70b840d15323365f52fcdaea6ca", - "shasum": "" - }, - "require": { - "behat/mink": "~1.6@dev", - "behat/mink-browserkit-driver": "~1.2@dev", - "fabpot/goutte": "~1.0.4|~2.0|~3.1", - "php": ">=5.3.1" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "time": "2016-03-05 09:04:22", - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Behat\\Mink\\Driver\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Goutte driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "browser", - "goutte", - "headless", - "testing" - ] - }, { "name": "twig/twig", - "version": "v1.23.1", - "version_normalized": "1.23.1.0", + "version": "v1.25.0", + "version_normalized": "1.25.0.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6" + "reference": "f16a634ab08d87e520da5671ec52153d627f10f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/d9b6333ae8dd2c8e3fd256e127548def0bc614c6", - "reference": "d9b6333ae8dd2c8e3fd256e127548def0bc614c6", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/f16a634ab08d87e520da5671ec52153d627f10f6", + "reference": "f16a634ab08d87e520da5671ec52153d627f10f6", "shasum": "" }, "require": { @@ -3093,11 +2564,11 @@ "symfony/debug": "~2.7", "symfony/phpunit-bridge": "~2.7" }, - "time": "2015-11-05 12:49:06", + "time": "2016-09-21T23:05:12+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.23-dev" + "dev-master": "1.25-dev" } }, "installation-source": "dist", @@ -3135,1160 +2606,211 @@ ] }, { - "name": "jcalderonzumba/gastonjs", - "version": "v1.0.2", - "version_normalized": "1.0.2.0", + "name": "zendframework/zend-diactoros", + "version": "1.3.10", + "version_normalized": "1.3.10.0", "source": { "type": "git", - "url": "https://github.com/jcalderonzumba/gastonjs.git", - "reference": "21bebb8ca03eb0f93ec2f3fad61192fb079e2622" + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jcalderonzumba/gastonjs/zipball/21bebb8ca03eb0f93ec2f3fad61192fb079e2622", - "reference": "21bebb8ca03eb0f93ec2f3fad61192fb079e2622", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/83e8d98b9915de76c659ce27d683c02a0f99fa90", + "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "~5.0|~6.0", - "php": ">=5.4" + "php": "^5.4 || ^7.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "~1.0.0" }, "require-dev": { - "phpunit/phpunit": "~4.6", - "silex/silex": "~1.2", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" + "phpunit/phpunit": "^4.6 || ^5.5", + "zendframework/zend-coding-standard": "~1.0.0" }, - "time": "2016-01-18 09:21:03", - "type": "phantomjs-api", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Zumba\\GastonJS\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Juan Francisco Calderón Zumba", - "email": "juanfcz@gmail.com", - "homepage": "http://github.com/jcalderonzumba" - } - ], - "description": "PhantomJS API based server for webpage automation", - "homepage": "https://github.com/jcalderonzumba/gastonjs", - "keywords": [ - "api", - "automation", - "browser", - "headless", - "phantomjs" - ] - }, - { - "name": "jcalderonzumba/mink-phantomjs-driver", - "version": "v0.3.1", - "version_normalized": "0.3.1.0", - "source": { - "type": "git", - "url": "https://github.com/jcalderonzumba/MinkPhantomJSDriver.git", - "reference": "782892dbea4af7d04024374672b3790b6c008def" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jcalderonzumba/MinkPhantomJSDriver/zipball/782892dbea4af7d04024374672b3790b6c008def", - "reference": "782892dbea4af7d04024374672b3790b6c008def", - "shasum": "" - }, - "require": { - "behat/mink": "~1.6", - "jcalderonzumba/gastonjs": "~1.0", - "php": ">=5.4", - "twig/twig": "~1.20|~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.6", - "silex/silex": "~1.2", - "symfony/css-selector": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.3" - }, - "time": "2015-12-04 13:55:02", - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "0.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Zumba\\Mink\\Driver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Juan Francisco Calderón Zumba", - "email": "juanfcz@gmail.com", - "homepage": "http://github.com/jcalderonzumba" - } - ], - "description": "PhantomJS driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "ajax", - "browser", - "headless", - "javascript", - "phantomjs", - "testing" - ] - }, - { - "name": "mikey179/vfsStream", - "version": "v1.6.0", - "version_normalized": "1.6.0.0", - "source": { - "type": "git", - "url": "https://github.com/mikey179/vfsStream.git", - "reference": "73bcb605b741a7d5044b47592338c633788b0eb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/73bcb605b741a7d5044b47592338c633788b0eb7", - "reference": "73bcb605b741a7d5044b47592338c633788b0eb7", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.5" - }, - "time": "2015-10-06 16:59:57", + "time": "2017-01-23T04:53:24+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.3-dev", + "dev-develop": "1.4-dev" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" + "psr-4": { + "Zend\\Diactoros\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "BSD-2-Clause" ], - "authors": [ - { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" - } - ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/" + "description": "PSR HTTP Message implementations", + "homepage": "https://github.com/zendframework/zend-diactoros", + "keywords": [ + "http", + "psr", + "psr-7" + ] }, { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "version_normalized": "2.0.4.0", + "name": "zendframework/zend-stdlib", + "version": "3.0.1", + "version_normalized": "3.0.1.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "8bafa58574204bdff03c275d1d618aaa601588ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/8bafa58574204bdff03c275d1d618aaa601588ae", + "reference": "8bafa58574204bdff03c275d1d618aaa601588ae", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.5 || ^7.0" }, "require-dev": { + "athletic/athletic": "~0.1", + "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "time": "2015-02-03 12:10:50", + "time": "2016-04-12T21:19:36+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ] - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.8", - "version_normalized": "1.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2015-09-15 10:49:45", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ] - }, - { - "name": "symfony/yaml", - "version": "v2.8.4", - "version_normalized": "2.8.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "584e52cb8f788a887553ba82db6caacb1d6260bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/584e52cb8f788a887553ba82db6caacb1d6260bb", - "reference": "584e52cb8f788a887553ba82db6caacb1d6260bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "time": "2016-03-04 07:54:35", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "Zend\\Stdlib\\": "src/" } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "version_normalized": "1.0.6.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "time": "2015-06-21 13:59:46", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version" - }, - { - "name": "sebastian/global-state", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "time": "2014-10-06 09:23:50", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "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", + "homepage": "https://github.com/zendframework/zend-stdlib", "keywords": [ - "global state" + "stdlib", + "zf2" ] }, { - "name": "sebastian/recursion-context", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "name": "zendframework/zend-escaper", + "version": "2.5.2", + "version_normalized": "2.5.2.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "url": "https://github.com/zendframework/zend-escaper.git", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" }, - "time": "2015-06-21 08:04:50", + "time": "2016-06-30T19:48:38+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" } }, "installation-source": "dist", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Zend\\Escaper\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "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" - }, - { - "name": "sebastian/exporter", - "version": "1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2015-06-21 07:55:53", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "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" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://github.com/zendframework/zend-escaper", "keywords": [ - "export", - "exporter" + "escaper", + "zf2" ] }, { - "name": "sebastian/environment", - "version": "1.3.2", - "version_normalized": "1.3.2.0", + "name": "zendframework/zend-feed", + "version": "2.7.0", + "version_normalized": "2.7.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "url": "https://github.com/zendframework/zend-feed.git", + "reference": "12b328d382aa5200f1de53d4147033b885776b67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/zendframework/zend-feed/zipball/12b328d382aa5200f1de53d4147033b885776b67", + "reference": "12b328d382aa5200f1de53d4147033b885776b67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.5 || ^7.0", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2015-08-03 06:14:51", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "installation-source": "dist", - "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" - ] - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2015-02-22 15:13:53", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "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": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ] - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2015-07-26 15:48:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "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" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ] - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2015-06-21 13:50:34", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ] - }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "version_normalized": "1.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", + "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "psr/http-message": "^1.0", + "zendframework/zend-cache": "^2.5", + "zendframework/zend-db": "^2.5", + "zendframework/zend-http": "^2.5", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-validator": "^2.5" }, - "time": "2015-06-14 21:17:01", + "suggest": { + "psr/http-message": "PSR-7 ^1.0, if you wish to use Zend\\Feed\\Reader\\Http\\Psr7ResponseDecorator", + "zendframework/zend-cache": "Zend\\Cache component, for optionally caching feeds between requests", + "zendframework/zend-db": "Zend\\Db component, for use with PubSubHubbub", + "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for easily extending ExtensionManager implementations", + "zendframework/zend-validator": "Zend\\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent" + }, + "time": "2016-02-11T18:54:29+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "Zend\\Feed\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ] - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "version_normalized": "2.3.8.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" - }, - "time": "2015-10-02 06:51:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "provides functionality for consuming RSS and Atom feeds", + "homepage": "https://github.com/zendframework/zend-feed", "keywords": [ - "mock", - "xunit" - ] - }, - { - "name": "phpunit/php-timer", - "version": "1.0.7", - "version_normalized": "1.0.7.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2015-06-21 08:01:12", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ] - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.1", - "version_normalized": "1.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2015-06-21 13:08:43", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ] - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "version_normalized": "2.2.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "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" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "time": "2015-10-06 15:47:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ] - }, - { - "name": "phpspec/prophecy", - "version": "v1.5.0", - "version_normalized": "1.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "time": "2015-08-13 10:07:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ] - }, - { - "name": "phpunit/phpunit", - "version": "4.8.11", - "version_normalized": "4.8.11.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bdd199472410fd7e32751f9c814c7e06f2c21bd5", - "reference": "bdd199472410fd7e32751f9c814c7e06f2c21bd5", - "shasum": "" - }, - "require": { - "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" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "time": "2015-10-07 10:39:46", - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.8.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" + "feed", + "zf2" ] } ] diff --git a/vendor/composer/installers/.travis.yml b/vendor/composer/installers/.travis.yml index 81ca8e101..f359e214d 100644 --- a/vendor/composer/installers/.travis.yml +++ b/vendor/composer/installers/.travis.yml @@ -5,10 +5,17 @@ php: - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm -before_script: - - curl -s http://getcomposer.org/installer | php -- --quiet - - php composer.phar install --dev +matrix: + fast_finish: true + allow_failures: + - php: 7.0 -script: phpunit +before_script: + - composer self-update + - composer install + +script: + - composer test diff --git a/vendor/composer/installers/README.md b/vendor/composer/installers/README.md index b33177198..ed38d2262 100644 --- a/vendor/composer/installers/README.md +++ b/vendor/composer/installers/README.md @@ -35,31 +35,39 @@ is not needed to install packages with these frameworks: | --------- | ----- | Aimeos | `aimeos-extension` | Asgard | `asgard-module`
    `asgard-theme` +| Attogram | `attogram-module` | AGL | `agl-module` +| Bonefish | `bonefish-package` | AnnotateCms | `annotatecms-module`
    `annotatecms-component`
    `annotatecms-service` -| Bitrix | `bitrix-module`
    `bitrix-component`
    `bitrix-theme` +| Bitrix | `bitrix-module` (deprecated)
    `bitrix-component` (deprecated)
    `bitrix-theme` (deprecated)

    `bitrix-d7-module`
    `bitrix-d7-component`
    `bitrix-d7-template` | CakePHP 2+ | **`cakephp-plugin`** | Chef | `chef-cookbook`
    `chef-role` | CCFramework | `ccframework-ship`
    `ccframework-theme` +| Cockpit | `cockpit-module` | CodeIgniter | `codeigniter-library`
    `codeigniter-third-party`
    `codeigniter-module` | concrete5 | `concrete5-block`
    `concrete5-package`
    `concrete5-theme`
    `concrete5-update` | Craft | `craft-plugin` | Croogo | `croogo-plugin`
    `croogo-theme` +| Decibel | `decibel-app` | DokuWiki | `dokuwiki-plugin`
    `dokuwiki-template` | Dolibarr | `dolibarr-module` -| Drupal | `drupal-module`
    `drupal-theme`

    `drupal-library`
    `drupal-profile`
    `drupal-drush` +| Drupal | `drupal-core`
    `drupal-module`
    `drupal-theme`

    `drupal-library`
    `drupal-profile`
    `drupal-drush` | Elgg | `elgg-plugin` +| ExpressionEngine 3 | `ee3-addon`
    `ee3-theme` | FuelPHP v1.x | `fuel-module`
    `fuel-package`
    `fuel-theme` | FuelPHP v2.x | `fuelphp-component` | Grav | `grav-plugin`
    `grav-theme` | Hurad | `hurad-plugin`
    `hurad-theme` +| ImageCMS | `imagecms-template`
    `imagecms-module`
    `imagecms-library` | Joomla | `joomla-component`
    `joomla-module`
    `joomla-template`
    `joomla-plugin`
    `joomla-library` -| Kirby | **`kirby-plugin`** +| Kirby | **`kirby-plugin`**
    `kirby-field`
    `kirby-tag` +| KodiCMS | `kodicms-plugin`
    `kodicms-media` | Kohana | **`kohana-module`** | Laravel | `laravel-library` | Lithium | **`lithium-library`
    `lithium-source`** | Magento | `magento-library`
    `magento-skin`
    `magento-theme` | Mako | `mako-package` +| Mautic | `mautic-plugin`
    `mautic-theme` | MODX Evo | `modxevo-snippet`
    `modxevo-plugin`
    `modxevo-module`
    `modxevo-template`
    `modxevo-lib` | MediaWiki | `mediawiki-extension` | October | **`october-module`
    `october-plugin`
    `october-theme`** @@ -69,22 +77,28 @@ is not needed to install packages with these frameworks: | Piwik | `piwik-plugin` | phpBB | `phpbb-extension`
    `phpbb-style`
    `phpbb-language` | Pimcore | `pimcore-plugin` +| Plentymarkets | `plentymarkets-plugin` | PPI | **`ppi-module`** | Puppet | `puppet-module` +| RadPHP | `radphp-bundle` | REDAXO | `redaxo-addon` +| ReIndex | **`reindex-plugin`**
    **`reindex-theme`** | Roundcube | `roundcube-plugin` -| shopware | `shopware-backend-plugin`
    `shopware-core-plugin`
    `shopware-frontend-plugin`
    `shopware-theme` +| shopware | `shopware-backend-plugin`
    `shopware-core-plugin`
    `shopware-frontend-plugin`
    `shopware-theme`
    `shopware-plugin`
    `shopware-frontend-theme` | SilverStripe | `silverstripe-module`
    `silverstripe-theme` | SMF | `smf-module`
    `smf-theme` | symfony1 | **`symfony1-plugin`** | Tusk | `tusk-task`
    `tusk-command`
    `tusk-asset` | TYPO3 Flow | `typo3-flow-package`
    `typo3-flow-framework`
    `typo3-flow-plugin`
    `typo3-flow-site`
    `typo3-flow-boilerplate`
    `typo3-flow-build` -| TYPO3 CMS | `typo3-cms-extension` +| TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead) +| Vanilla | `vanilla-plugin`
    `vanilla-theme` | Wolf CMS | `wolfcms-plugin` | WordPress | `wordpress-plugin`
    `wordpress-theme`

    `wordpress-muplugin` +| YAWIK | `yawik-module` | Zend | `zend-library`
    `zend-extra`
    `zend-module` | Zikula | `zikula-module`
    `zikula-theme` | Prestashop | `prestashop-module`
    `prestashop-theme` +| Phifty | `phifty-bundle`
    `phifty-framework`
    `phifty-library` ## Example `composer.json` File @@ -135,7 +149,20 @@ A package type can have a custom installation path with a `type:` prefix. } ``` -This would use your custom path for each of the listed packages. The available +You can also have the same vendor packages with a custom installation path by +using the `vendor:` prefix. + +``` json +{ + "extra": { + "installer-paths": { + "your/custom/path/{$name}/": ["vendor:my_organization"] + } + } +} +``` + +These would use your custom path for each of the listed packages. The available variables to use in your paths are: `{$name}`, `{$vendor}`, `{$type}`. ## Custom Install Names @@ -166,8 +193,8 @@ not be inflected. ## Contribute! * [Fork and clone](https://help.github.com/articles/fork-a-repo). -* Run the command `php composer.phar install --dev` to install the dev - dependencies. See [Composer](https://github.com/composer/composer#installation--usage). +* Run the command `php composer.phar install` to install the dependencies. + This will also install the dev dependencies. See [Composer](https://getcomposer.org/doc/03-cli.md#install). * Use the command `phpunit` to run the tests. See [PHPUnit](http://phpunit.de). * Create a branch, commit, push and send us a [pull request](https://help.github.com/articles/using-pull-requests). @@ -189,3 +216,5 @@ It has been proposed many times. Even implemented once early on and then removed. `installers` won't do this because it would allow a single package author to wipe out entire folders without the user's consent. That user would then come here to yell at us. + +Anyone still wanting this capability should consider requiring https://github.com/oomphinc/composer-installers-extender. diff --git a/vendor/composer/installers/composer.json b/vendor/composer/installers/composer.json index 6ee931ee9..3b12fa51e 100644 --- a/vendor/composer/installers/composer.json +++ b/vendor/composer/installers/composer.json @@ -1,6 +1,6 @@ { "name": "composer/installers", - "type": "composer-installer", + "type": "composer-plugin", "license": "MIT", "description": "A multi-framework Composer library installer", "keywords": [ @@ -8,9 +8,11 @@ "Aimeos", "AGL", "AnnotateCms", + "Attogram", "Bitrix", "CakePHP", "Chef", + "Cockpit", "CodeIgniter", "concrete5", "Craft", @@ -19,15 +21,18 @@ "Dolibarr", "Drupal", "Elgg", + "ExpressionEngine", "FuelPHP", "Grav", "Hurad", + "ImageCMS", "Joomla", "Kohana", "Laravel", "Lithium", "Magento", "Mako", + "Mautic", "MODX Evo", "MediaWiki", "OXID", @@ -35,8 +40,11 @@ "Moodle", "Piwik", "phpBB", + "Plentymarkets", "PPI", "Puppet", + "RadPHP", + "ReIndex", "Roundcube", "shopware", "SilverStripe", @@ -46,10 +54,11 @@ "TYPO3", "WolfCMS", "WordPress", + "YAWIK", "Zend", "Zikula" ], - "homepage": "http://composer.github.com/installers/", + "homepage": "https://composer.github.io/installers/", "authors": [ { "name": "Kyle Robinson Young", @@ -58,10 +67,10 @@ } ], "autoload": { - "psr-0": { "Composer\\Installers\\": "src/" } + "psr-4": { "Composer\\Installers\\": "src/Composer/Installers" } }, "extra": { - "class": "Composer\\Installers\\Installer", + "class": "Composer\\Installers\\Plugin", "branch-alias": { "dev-master": "1.0-dev" } @@ -70,8 +79,14 @@ "shama/baton": "*", "roundcube/plugin-installer": "*" }, + "require": { + "composer-plugin-api": "^1.0" + }, "require-dev": { "composer/composer": "1.0.*@dev", "phpunit/phpunit": "4.1.*" + }, + "scripts": { + "test": "phpunit" } } diff --git a/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php b/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php index 995ee2b49..22dad1b9a 100644 --- a/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php @@ -31,14 +31,18 @@ class AsgardInstaller extends BaseInstaller protected function inflectPluginVars($vars) { - $vars['name'] = ucfirst(preg_replace('/-module/', '', $vars['name'])); + $vars['name'] = preg_replace('/-module$/', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); return $vars; } protected function inflectThemeVars($vars) { - $vars['name'] = ucfirst(preg_replace('/-theme$/', '', $vars['name'])); + $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); return $vars; } diff --git a/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php b/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php new file mode 100644 index 000000000..d62fd8fd1 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php @@ -0,0 +1,9 @@ + 'modules/{$name}/', + ); +} diff --git a/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php b/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php index cc27d3e28..7082bf2cb 100644 --- a/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php @@ -1,6 +1,7 @@ composer = $composer; $this->package = $package; + $this->io = $io; } /** @@ -51,7 +55,7 @@ abstract class BaseInstaller if ($this->composer->getPackage()) { $extra = $this->composer->getPackage()->getExtra(); if (!empty($extra['installer-paths'])) { - $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type); + $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor); if ($customPath !== false) { return $this->templatePath($customPath, $availableVars); } @@ -116,12 +120,13 @@ abstract class BaseInstaller * @param array $paths * @param string $name * @param string $type + * @param string $vendor = NULL * @return string */ - protected function mapCustomInstallPaths(array $paths, $name, $type) + protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL) { foreach ($paths as $path => $names) { - if (in_array($name, $names) || in_array('type:' . $type, $names)) { + if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) { return $path; } } diff --git a/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php b/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php index 48a8367ab..e80cd1e10 100644 --- a/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php @@ -1,11 +1,126 @@ .`. + * - `bitrix-d7-component` — copy the component to directory `bitrix/components//`. + * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/_`. + * + * You can set custom path to directory with Bitrix kernel in `composer.json`: + * + * ```json + * { + * "extra": { + * "bitrix-dir": "s1/bitrix" + * } + * } + * ``` + * + * @author Nik Samokhvalov + * @author Denis Kulichkin + */ class BitrixInstaller extends BaseInstaller { protected $locations = array( - 'module' => 'local/modules/{$name}/', - 'component' => 'local/components/{$name}/', - 'theme' => 'local/templates/{$name}/' + 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) + 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) + 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) + 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/', + 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/', + 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/', ); + + /** + * @var array Storage for informations about duplicates at all the time of installation packages. + */ + private static $checkedDuplicates = array(); + + /** + * {@inheritdoc} + */ + public function inflectPackageVars($vars) + { + if ($this->composer->getPackage()) { + $extra = $this->composer->getPackage()->getExtra(); + + if (isset($extra['bitrix-dir'])) { + $vars['bitrix_dir'] = $extra['bitrix-dir']; + } + } + + if (!isset($vars['bitrix_dir'])) { + $vars['bitrix_dir'] = 'bitrix'; + } + + return parent::inflectPackageVars($vars); + } + + /** + * {@inheritdoc} + */ + protected function templatePath($path, array $vars = array()) + { + $templatePath = parent::templatePath($path, $vars); + $this->checkDuplicates($templatePath, $vars); + + return $templatePath; + } + + /** + * Duplicates search packages. + * + * @param string $path + * @param array $vars + */ + protected function checkDuplicates($path, array $vars = array()) + { + $packageType = substr($vars['type'], strlen('bitrix') + 1); + $localDir = explode('/', $vars['bitrix_dir']); + array_pop($localDir); + $localDir[] = 'local'; + $localDir = implode('/', $localDir); + + $oldPath = str_replace( + array('{$bitrix_dir}', '{$name}'), + array($localDir, $vars['name']), + $this->locations[$packageType] + ); + + if (in_array($oldPath, static::$checkedDuplicates)) { + return; + } + + if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) { + + $this->io->writeError(' Duplication of packages:'); + $this->io->writeError(' Package ' . $oldPath . ' will be called instead package ' . $path . ''); + + while (true) { + switch ($this->io->ask(' Delete ' . $oldPath . ' [y,n,?]? ', '?')) { + case 'y': + $fs = new Filesystem(); + $fs->removeDirectory($oldPath); + break 2; + + case 'n': + break 2; + + case '?': + default: + $this->io->writeError(array( + ' y - delete package ' . $oldPath . ' and to continue with the installation', + ' n - don\'t delete and to continue with the installation', + )); + $this->io->writeError(' ? - print help'); + break; + } + } + } + + static::$checkedDuplicates[] = $oldPath; + } } diff --git a/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php b/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php new file mode 100644 index 000000000..da3aad2a3 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php @@ -0,0 +1,9 @@ + 'Packages/{$vendor}/{$name}/' + ); +} diff --git a/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php b/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php index cbeb60b80..176c91a9d 100644 --- a/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php @@ -3,8 +3,6 @@ namespace Composer\Installers; use Composer\DependencyResolver\Pool; use Composer\Package\PackageInterface; -use Composer\Package\LinkConstraint\MultiConstraint; -use Composer\Package\LinkConstraint\VersionConstraint; class CakePHPInstaller extends BaseInstaller { @@ -52,21 +50,29 @@ class CakePHPInstaller extends BaseInstaller */ protected function matchesCakeVersion($matcher, $version) { + if (class_exists('Composer\Semver\Constraint\MultiConstraint')) { + $multiClass = 'Composer\Semver\Constraint\MultiConstraint'; + $constraintClass = 'Composer\Semver\Constraint\Constraint'; + } else { + $multiClass = 'Composer\Package\LinkConstraint\MultiConstraint'; + $constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint'; + } + $repositoryManager = $this->composer->getRepositoryManager(); if ($repositoryManager) { $repos = $repositoryManager->getLocalRepository(); if (!$repos) { return false; } - $cake3 = new MultiConstraint(array( - new VersionConstraint($matcher, $version), - new VersionConstraint('!=', '9999999-dev'), + $cake3 = new $multiClass(array( + new $constraintClass($matcher, $version), + new $constraintClass('!=', '9999999-dev'), )); $pool = new Pool('dev'); $pool->addRepository($repos); $packages = $pool->whatProvides('cakephp/cakephp'); foreach ($packages as $package) { - $installed = new VersionConstraint('=', $package->getVersion()); + $installed = new $constraintClass('=', $package->getVersion()); if ($cake3->matches($installed)) { return true; break; diff --git a/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php b/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php new file mode 100644 index 000000000..c7816dfce --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php @@ -0,0 +1,34 @@ + 'cockpit/modules/addons/{$name}/', + ); + + /** + * Format module name. + * + * Strip `module-` prefix from package name. + * + * @param array @vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] == 'cockpit-module') { + return $this->inflectModuleVars($vars); + } + + return $vars; + } + + public function inflectModuleVars($vars) + { + $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name'])); + + return $vars; + } +} diff --git a/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php b/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php index dc3be8d1a..d37a77ae2 100644 --- a/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php @@ -1,9 +1,35 @@ 'craft/plugins/{$name}/', ); + + /** + * Strip `craft-` prefix and/or `-plugin` suffix from package names + * + * @param array $vars + * + * @return array + */ + final public function inflectPackageVars($vars) + { + return $this->inflectPluginVars($vars); + } + + private function inflectPluginVars($vars) + { + $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']); + $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']); + + return $vars; + } } diff --git a/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php b/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php new file mode 100644 index 000000000..f4837a6c1 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php @@ -0,0 +1,10 @@ + 'app/{$name}/', + ); +} diff --git a/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php b/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php index 179413145..a41ee2e15 100644 --- a/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php @@ -10,5 +10,7 @@ class DrupalInstaller extends BaseInstaller 'library' => 'libraries/{$name}/', 'profile' => 'profiles/{$name}/', 'drush' => 'drush/{$name}/', + 'custom-theme' => 'themes/custom/{$name}/', + 'custom-module' => 'modules/custom/{$name}', ); } diff --git a/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php b/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php new file mode 100644 index 000000000..d5321a8ca --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php @@ -0,0 +1,29 @@ + 'system/expressionengine/third_party/{$name}/', + 'theme' => 'themes/third_party/{$name}/', + ); + + private $ee3Locations = array( + 'addon' => 'system/user/addons/{$name}/', + 'theme' => 'themes/user/{$name}/', + ); + + public function getInstallPath(PackageInterface $package, $frameworkType = '') + { + + $version = "{$frameworkType}Locations"; + $this->locations = $this->$version; + + return parent::getInstallPath($package, $frameworkType); + } +} diff --git a/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php b/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php new file mode 100644 index 000000000..5e2142ea5 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php @@ -0,0 +1,11 @@ + 'templates/{$name}/', + 'module' => 'application/modules/{$name}/', + 'library' => 'application/libraries/{$name}/', + ); +} diff --git a/vendor/composer/installers/src/Composer/Installers/Installer.php b/vendor/composer/installers/src/Composer/Installers/Installer.php index 63ba64ce3..5b6c553a8 100644 --- a/vendor/composer/installers/src/Composer/Installers/Installer.php +++ b/vendor/composer/installers/src/Composer/Installers/Installer.php @@ -1,6 +1,7 @@ 'AimeosInstaller', 'asgard' => 'AsgardInstaller', + 'attogram' => 'AttogramInstaller', 'agl' => 'AglInstaller', 'annotatecms' => 'AnnotateCmsInstaller', 'bitrix' => 'BitrixInstaller', + 'bonefish' => 'BonefishInstaller', 'cakephp' => 'CakePHPInstaller', 'chef' => 'ChefInstaller', 'ccframework' => 'ClanCatsFrameworkInstaller', + 'cockpit' => 'CockpitInstaller', 'codeigniter' => 'CodeIgniterInstaller', 'concrete5' => 'Concrete5Installer', 'craft' => 'CraftInstaller', 'croogo' => 'CroogoInstaller', 'dokuwiki' => 'DokuWikiInstaller', 'dolibarr' => 'DolibarrInstaller', + 'decibel' => 'DecibelInstaller', 'drupal' => 'DrupalInstaller', 'elgg' => 'ElggInstaller', + 'ee3' => 'ExpressionEngineInstaller', + 'ee2' => 'ExpressionEngineInstaller', 'fuel' => 'FuelInstaller', 'fuelphp' => 'FuelphpInstaller', 'grav' => 'GravInstaller', 'hurad' => 'HuradInstaller', + 'imagecms' => 'ImageCMSInstaller', 'joomla' => 'JoomlaInstaller', 'kirby' => 'KirbyInstaller', + 'kodicms' => 'KodiCMSInstaller', 'kohana' => 'KohanaInstaller', 'laravel' => 'LaravelInstaller', 'lithium' => 'LithiumInstaller', 'magento' => 'MagentoInstaller', 'mako' => 'MakoInstaller', + 'mautic' => 'MauticInstaller', 'mediawiki' => 'MediaWikiInstaller', - 'microweber' => 'MicroweberInstaller', + 'microweber' => 'MicroweberInstaller', 'modulework' => 'MODULEWorkInstaller', 'modxevo' => 'MODXEvoInstaller', 'moodle' => 'MoodleInstaller', @@ -50,9 +60,13 @@ class Installer extends LibraryInstaller 'phpbb' => 'PhpBBInstaller', 'pimcore' => 'PimcoreInstaller', 'piwik' => 'PiwikInstaller', + 'plentymarkets'=> 'PlentymarketsInstaller', 'ppi' => 'PPIInstaller', 'puppet' => 'PuppetInstaller', + 'radphp' => 'RadPHPInstaller', + 'phifty' => 'PhiftyInstaller', 'redaxo' => 'RedaxoInstaller', + 'reindex' => 'ReIndexInstaller', 'roundcube' => 'RoundcubeInstaller', 'shopware' => 'ShopwareInstaller', 'silverstripe' => 'SilverStripeInstaller', @@ -62,12 +76,14 @@ class Installer extends LibraryInstaller 'tusk' => 'TuskInstaller', 'typo3-cms' => 'TYPO3CmsInstaller', 'typo3-flow' => 'TYPO3FlowInstaller', + 'vanilla' => 'VanillaInstaller', 'whmcs' => 'WHMCSInstaller', 'wolfcms' => 'WolfCMSInstaller', 'wordpress' => 'WordPressInstaller', + 'yawik' => 'YawikInstaller', 'zend' => 'ZendInstaller', 'zikula' => 'ZikulaInstaller', - 'prestashop' => 'PrestashopInstaller', + 'prestashop' => 'PrestashopInstaller' ); /** @@ -85,7 +101,7 @@ class Installer extends LibraryInstaller } $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType]; - $installer = new $class($package, $this->composer); + $installer = new $class($package, $this->composer, $this->getIO()); return $installer->getInstallPath($package, $frameworkType); } @@ -153,11 +169,21 @@ class Installer extends LibraryInstaller if (!empty($this->supportedTypes[$frameworkType])) { $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType]; /** @var BaseInstaller $framework */ - $framework = new $frameworkClass(null, $this->composer); + $framework = new $frameworkClass(null, $this->composer, $this->getIO()); $locations = array_keys($framework->getLocations()); $pattern = $locations ? '(' . implode('|', $locations) . ')' : false; } return $pattern ? : '(\w+)'; } + + /** + * Get I/O object + * + * @return IOInterface + */ + private function getIO() + { + return $this->io; + } } diff --git a/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php b/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php index ae7ba8a4b..36b2f84a7 100644 --- a/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php @@ -5,5 +5,7 @@ class KirbyInstaller extends BaseInstaller { protected $locations = array( 'plugin' => 'site/plugins/{$name}/', + 'field' => 'site/fields/{$name}/', + 'tag' => 'site/tags/{$name}/' ); } diff --git a/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php b/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php new file mode 100644 index 000000000..7143e232b --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php @@ -0,0 +1,10 @@ + 'cms/plugins/{$name}/', + 'media' => 'cms/media/vendor/{$name}/' + ); +} \ No newline at end of file diff --git a/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php b/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php new file mode 100644 index 000000000..3e1ce2b2d --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php @@ -0,0 +1,25 @@ + 'plugins/{$name}/', + 'theme' => 'themes/{$name}/', + ); + + /** + * Format package name of mautic-plugins to CamelCase + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] == 'mautic-plugin') { + $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) { + return strtoupper($matches[0][1]); + }, ucfirst($vars['name'])); + } + + return $vars; + } + +} diff --git a/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php b/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php index 04be73c2a..3cdda6ca5 100644 --- a/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php @@ -6,6 +6,7 @@ class MoodleInstaller extends BaseInstaller protected $locations = array( 'mod' => 'mod/{$name}/', 'admin_report' => 'admin/report/{$name}/', + 'atto' => 'lib/editor/atto/plugins/{$name}/', 'tool' => 'admin/tool/{$name}/', 'assignment' => 'mod/assignment/type/{$name}/', 'assignsubmission' => 'mod/assign/submission/{$name}/', @@ -13,6 +14,9 @@ class MoodleInstaller extends BaseInstaller 'auth' => 'auth/{$name}/', 'availability' => 'availability/condition/{$name}/', 'block' => 'blocks/{$name}/', + 'booktool' => 'mod/book/tool/{$name}/', + 'cachestore' => 'cache/stores/{$name}/', + 'cachelock' => 'cache/locks/{$name}/', 'calendartype' => 'calendar/type/{$name}/', 'format' => 'course/format/{$name}/', 'coursereport' => 'course/report/{$name}/', @@ -26,7 +30,11 @@ class MoodleInstaller extends BaseInstaller 'gradereport' => 'grade/report/{$name}/', 'gradingform' => 'grade/grading/form/{$name}/', 'local' => 'local/{$name}/', + 'logstore' => 'admin/tool/log/store/{$name}/', + 'ltisource' => 'mod/lti/source/{$name}/', + 'ltiservice' => 'mod/lti/service/{$name}/', 'message' => 'message/output/{$name}/', + 'mnetservice' => 'mnet/service/{$name}/', 'plagiarism' => 'plagiarism/{$name}/', 'portfolio' => 'portfolio/{$name}/', 'qbehaviour' => 'question/behaviour/{$name}/', @@ -38,6 +46,7 @@ class MoodleInstaller extends BaseInstaller 'repository' => 'repository/{$name}/', 'scormreport' => 'mod/scorm/report/{$name}/', 'theme' => 'theme/{$name}/', + 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/', 'profilefield' => 'user/profile/field/{$name}/', 'webservice' => 'webservice/{$name}/', 'workshopallocation' => 'mod/workshop/allocation/{$name}/', diff --git a/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php b/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php index 22fb56aa1..49940ff6d 100644 --- a/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php @@ -1,11 +1,59 @@ .+)\/.+/'; + protected $locations = array( 'module' => 'modules/{$name}/', 'theme' => 'application/views/{$name}/', 'out' => 'out/{$name}/', ); + + /** + * getInstallPath + * + * @param PackageInterface $package + * @param string $frameworkType + * @return void + */ + public function getInstallPath(PackageInterface $package, $frameworkType = '') + { + $installPath = parent::getInstallPath($package, $frameworkType); + $type = $this->package->getType(); + if ($type === 'oxid-module') { + $this->prepareVendorDirectory($installPath); + } + return $installPath; + } + + /** + * prepareVendorDirectory + * + * Makes sure there is a vendormetadata.php file inside + * the vendor folder if there is a vendor folder. + * + * @param string $installPath + * @return void + */ + protected function prepareVendorDirectory($installPath) + { + $matches = ''; + $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches); + if (!$hasVendorDirectory) { + return; + } + + $vendorDirectory = $matches['vendor']; + $vendorPath = getcwd() . '/modules/' . $vendorDirectory; + if (!file_exists($vendorPath)) { + mkdir($vendorPath, 0755, true); + } + + $vendorMetaDataPath = $vendorPath . '/vendormetadata.php'; + touch($vendorMetaDataPath); + } } diff --git a/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php b/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php new file mode 100644 index 000000000..4e59a8a74 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php @@ -0,0 +1,11 @@ + 'bundles/{$name}/', + 'library' => 'libraries/{$name}/', + 'framework' => 'frameworks/{$name}/', + ); +} diff --git a/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php b/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php new file mode 100644 index 000000000..903e55f62 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php @@ -0,0 +1,29 @@ + '{$name}/' + ); + + /** + * Remove hyphen, "plugin" and format to camelcase + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + $vars['name'] = explode("-", $vars['name']); + foreach ($vars['name'] as $key => $name) { + $vars['name'][$key] = ucfirst($vars['name'][$key]); + if (strcasecmp($name, "Plugin") == 0) { + unset($vars['name'][$key]); + } + } + $vars['name'] = implode("",$vars['name']); + + return $vars; + } +} diff --git a/vendor/composer/installers/src/Composer/Installers/Plugin.php b/vendor/composer/installers/src/Composer/Installers/Plugin.php new file mode 100644 index 000000000..5eb04af17 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/Plugin.php @@ -0,0 +1,17 @@ +getInstallationManager()->addInstaller($installer); + } +} diff --git a/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php b/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php new file mode 100644 index 000000000..0f78b5ca6 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php @@ -0,0 +1,24 @@ + 'src/{$name}/' + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $nameParts = explode('/', $vars['name']); + foreach ($nameParts as &$value) { + $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); + $value = str_replace(array('-', '_'), ' ', $value); + $value = str_replace(' ', '', ucwords($value)); + } + $vars['name'] = implode('/', $nameParts); + return $vars; + } +} diff --git a/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php b/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php new file mode 100644 index 000000000..252c7339f --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php @@ -0,0 +1,10 @@ + 'themes/{$name}/', + 'plugin' => 'plugins/{$name}/' + ); +} diff --git a/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php b/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php index 673f1fc1f..d0193cba3 100644 --- a/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php @@ -11,7 +11,9 @@ class ShopwareInstaller extends BaseInstaller 'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/', 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/', 'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/', - 'theme' => 'templates/{$name}/' + 'theme' => 'templates/{$name}/', + 'plugin' => 'custom/plugins/{$name}/', + 'frontend-theme' => 'themes/Frontend/{$name}/', ); /** diff --git a/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php b/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php index 8220b40df..b1663e843 100644 --- a/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +++ b/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php @@ -4,6 +4,8 @@ namespace Composer\Installers; /** * Extension installer for TYPO3 CMS * + * @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead + * * @author Sascha Egerer */ class TYPO3CmsInstaller extends BaseInstaller diff --git a/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php b/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php new file mode 100644 index 000000000..24ca64512 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php @@ -0,0 +1,10 @@ + 'plugins/{$name}/', + 'theme' => 'themes/{$name}/', + ); +} diff --git a/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php b/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php new file mode 100644 index 000000000..27f429ff2 --- /dev/null +++ b/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php @@ -0,0 +1,32 @@ + 'module/{$name}/', + ); + + /** + * Format package name to CamelCase + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} \ No newline at end of file diff --git a/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php b/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php index 71480eca5..f6e834104 100644 --- a/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php +++ b/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php @@ -8,7 +8,7 @@ use Composer\Composer; class AsgardInstallerTest extends \PHPUnit_Framework_TestCase { /** - * @var OctoberInstaller + * @var AsgardInstaller */ private $installer; @@ -26,14 +26,20 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase public function testInflectPackageVars($type, $name, $expected) { $this->assertEquals( - $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)), - array('name' => $expected, 'type' => $type) + array('name' => $expected, 'type' => $type), + $this->installer->inflectPackageVars(array('name' => $name, 'type' => $type)) ); } public function packageNameInflectionProvider() { return array( + // Should keep module name StudlyCase + array( + 'asgard-module', + 'user-profile', + 'UserProfile' + ), array( 'asgard-module', 'asgard-module', @@ -44,11 +50,17 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase 'blog', 'Blog' ), + // tests that exactly one '-module' is cut off + array( + 'asgard-module', + 'some-module-module', + 'SomeModule', + ), // tests that exactly one '-theme' is cut off array( 'asgard-theme', 'some-theme-theme', - 'Some-theme', + 'SomeTheme', ), // tests that names without '-theme' suffix stay valid array( @@ -56,6 +68,12 @@ class AsgardInstallerTest extends \PHPUnit_Framework_TestCase 'someothertheme', 'Someothertheme', ), + // Should keep theme name StudlyCase + array( + 'asgard-theme', + 'adminlte-advanced', + 'AdminlteAdvanced' + ), ); } } diff --git a/vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php b/vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php new file mode 100644 index 000000000..e909bb426 --- /dev/null +++ b/vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php @@ -0,0 +1,76 @@ +composer = new Composer(); + } + + /** + * @param string $vars + * @param string $expectedVars + * + * @covers ::inflectPackageVars + * + * @dataProvider provideExpectedInflectionResults + */ + final public function testInflectPackageVars($vars, $expectedVars) + { + + $this->installer = new BitrixInstaller( + new Package($vars['name'], '4.2', '4.2'), + $this->composer + ); + $actual = $this->installer->inflectPackageVars($vars); + $this->assertEquals($actual, $expectedVars); + } + + /** + * Provides various parameters for packages and the expected result after inflection + * + * @return array + */ + final public function provideExpectedInflectionResults() + { + return array( + //check bitrix-dir is correct + array( + array('name' => 'Nyan/Cat'), + array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix') + ), + array( + array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix'), + array('name' => 'Nyan/Cat', 'bitrix_dir' => 'bitrix') + ), + array( + array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local'), + array('name' => 'Nyan/Cat', 'bitrix_dir' => 'local') + ), + ); + } +} \ No newline at end of file diff --git a/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php b/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php index 976bd9be8..523e84762 100644 --- a/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php +++ b/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php @@ -100,7 +100,7 @@ class CakePHPInstallerTest extends TestCase $this->setCakephpVersion($rm, '~8.8'); $result = $installer->getLocations(); - $this->assertEquals('vendor/{$vendor}/{$name}/', $result['plugin']); + $this->assertContains('vendor/{$vendor}/{$name}/', $result['plugin']); } protected function setCakephpVersion($rm, $version) { diff --git a/vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php b/vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php new file mode 100644 index 000000000..31ccecdbc --- /dev/null +++ b/vendor/composer/installers/tests/Composer/Installers/Test/CraftInstallerTest.php @@ -0,0 +1,83 @@ +installer = new CraftInstaller(); + } + + /** + * @param string $packageName + * @param string $expectedName + * + * @covers ::inflectPackageVars + * + * @dataProvider provideExpectedInflectionResults + */ + final public function testInflectPackageVars($packageName, $expectedName) + { + $installer = $this->installer; + + $vars = array('name' => $packageName); + $expected = array('name' => $expectedName); + + $actual = $installer->inflectPackageVars($vars); + + $this->assertEquals($actual, $expected); + } + + /** + * Provides various names for packages and the expected result after inflection + * + * @return array + */ + final public function provideExpectedInflectionResults() + { + return array( + // lowercase + array('foo', 'foo'), + array('craftfoo', 'craftfoo'), + array('fooplugin', 'fooplugin'), + array('craftfooplugin', 'craftfooplugin'), + // lowercase - dash + array('craft-foo', 'foo'), + array('foo-plugin', 'foo'), + array('craft-foo-plugin', 'foo'), + // lowercase - underscore + array('craft_foo', 'craft_foo'), + array('foo_plugin', 'foo_plugin'), + array('craft_foo_plugin', 'craft_foo_plugin'), + // CamelCase + array('Foo', 'Foo'), + array('CraftFoo', 'CraftFoo'), + array('FooPlugin', 'FooPlugin'), + array('CraftFooPlugin', 'CraftFooPlugin'), + // CamelCase - Dash + array('Craft-Foo', 'Foo'), + array('Foo-Plugin', 'Foo'), + array('Craft-Foo-Plugin', 'Foo'), + // CamelCase - underscore + array('Craft_Foo', 'Craft_Foo'), + array('Foo_Plugin', 'Foo_Plugin'), + array('Craft_Foo_Plugin', 'Craft_Foo_Plugin'), + ); + } +} diff --git a/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php b/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php index a516daf07..df699da3b 100644 --- a/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php +++ b/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php @@ -89,15 +89,18 @@ class InstallerTest extends TestCase array('annotatecms-module', true), array('annotatecms-component', true), array('annotatecms-service', true), + array('attogram-module', true), array('bitrix-module', true), array('bitrix-component', true), array('bitrix-theme', true), + array('bonefish-package', true), array('cakephp', false), array('cakephp-', false), array('cakephp-app', false), array('cakephp-plugin', true), array('chef-cookbook', true), array('chef-role', true), + array('cockpit-module', true), array('codeigniter-app', false), array('codeigniter-library', true), array('codeigniter-third-party', true), @@ -109,10 +112,15 @@ class InstallerTest extends TestCase array('craft-plugin', true), array('croogo-plugin', true), array('croogo-theme', true), + array('decibel-app', true), array('dokuwiki-plugin', true), array('dokuwiki-template', true), array('drupal-module', true), array('dolibarr-module', true), + array('ee3-theme', true), + array('ee3-addon', true), + array('ee2-theme', true), + array('ee2-addon', true), array('elgg-plugin', true), array('fuel-module', true), array('fuel-package', true), @@ -120,6 +128,9 @@ class InstallerTest extends TestCase array('fuelphp-component', true), array('hurad-plugin', true), array('hurad-theme', true), + array('imagecms-template', true), + array('imagecms-module', true), + array('imagecms-library', true), array('joomla-library', true), array('kirby-plugin', true), array('kohana-module', true), @@ -142,17 +153,23 @@ class InstallerTest extends TestCase array('piwik-plugin', true), array('phpbb-extension', true), array('pimcore-plugin', true), + array('plentymarkets-plugin', true), array('ppi-module', true), array('prestashop-module', true), array('prestashop-theme', true), array('puppet-module', true), + array('radphp-bundle', true), array('redaxo-addon', true), array('redaxo-bestyle-plugin', true), + array('reindex-theme', true), + array('reindex-plugin', true), array('roundcube-plugin', true), array('shopware-backend-plugin', true), array('shopware-core-plugin', true), array('shopware-frontend-plugin', true), array('shopware-theme', true), + array('shopware-plugin', true), + array('shopware-frontend-theme', true), array('silverstripe-module', true), array('silverstripe-theme', true), array('smf-module', true), @@ -166,13 +183,21 @@ class InstallerTest extends TestCase array('tusk-asset', true), array('typo3-flow-plugin', true), array('typo3-cms-extension', true), + array('vanilla-plugin', true), + array('vanilla-theme', true), array('whmcs-gateway', true), array('wolfcms-plugin', true), array('wordpress-plugin', true), array('wordpress-core', false), + array('yawik-module', true), array('zend-library', true), array('zikula-module', true), array('zikula-theme', true), + array('kodicms-plugin', true), + array('kodicms-media', true), + array('phifty-bundle', true), + array('phifty-library', true), + array('phifty-framework', true), ); } @@ -202,12 +227,18 @@ class InstallerTest extends TestCase array('annotatecms-module', 'addons/modules/my_module/', 'vysinsky/my_module'), array('annotatecms-component', 'addons/components/my_component/', 'vysinsky/my_component'), array('annotatecms-service', 'addons/services/my_service/', 'vysinsky/my_service'), - array('bitrix-module', 'local/modules/my_module/', 'author/my_module'), - array('bitrix-component', 'local/components/my_component/', 'author/my_component'), - array('bitrix-theme', 'local/templates/my_theme/', 'author/my_theme'), + array('attogram-module', 'modules/my_module/', 'author/my_module'), + array('bitrix-module', 'bitrix/modules/my_module/', 'author/my_module'), + array('bitrix-component', 'bitrix/components/my_component/', 'author/my_component'), + array('bitrix-theme', 'bitrix/templates/my_theme/', 'author/my_theme'), + array('bitrix-d7-module', 'bitrix/modules/author.my_module/', 'author/my_module'), + array('bitrix-d7-component', 'bitrix/components/author/my_component/', 'author/my_component'), + array('bitrix-d7-template', 'bitrix/templates/author_my_template/', 'author/my_template'), + array('bonefish-package', 'Packages/bonefish/package/', 'bonefish/package'), array('cakephp-plugin', 'Plugin/Ftp/', 'shama/ftp'), array('chef-cookbook', 'Chef/mre/my_cookbook/', 'mre/my_cookbook'), array('chef-role', 'Chef/roles/my_role/', 'mre/my_role'), + array('cockpit-module', 'cockpit/modules/addons/My_module/', 'piotr-cz/cockpit-my_module'), array('codeigniter-library', 'application/libraries/my_package/', 'shama/my_package'), array('codeigniter-module', 'application/modules/my_package/', 'shama/my_package'), array('concrete5-block', 'blocks/concrete5_block/', 'remo/concrete5_block'), @@ -217,6 +248,7 @@ class InstallerTest extends TestCase array('craft-plugin', 'craft/plugins/my_plugin/', 'mdcpepper/my_plugin'), array('croogo-plugin', 'Plugin/Sitemaps/', 'fahad19/sitemaps'), array('croogo-theme', 'View/Themed/Readable/', 'rchavik/readable'), + array('decibel-app', 'app/someapp/', 'author/someapp'), array('dokuwiki-plugin', 'lib/plugins/someplugin/', 'author/someplugin'), array('dokuwiki-template', 'lib/tpl/sometemplate/', 'author/sometemplate'), array('dolibarr-module', 'htdocs/custom/my_module/', 'shama/my_module'), @@ -225,12 +257,19 @@ class InstallerTest extends TestCase array('drupal-profile', 'profiles/my_module/', 'shama/my_module'), array('drupal-drush', 'drush/my_module/', 'shama/my_module'), array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'), + array('ee3-addon', 'system/user/addons/ee_theme/', 'author/ee_theme'), + array('ee3-theme', 'themes/user/ee_package/', 'author/ee_package'), + array('ee2-addon', 'system/expressionengine/third_party/ee_theme/', 'author/ee_theme'), + array('ee2-theme', 'themes/third_party/ee_package/', 'author/ee_package'), array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'), array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'), array('fuel-theme', 'fuel/app/themes/theme/', 'fuel/theme'), array('fuelphp-component', 'components/demo/', 'fuelphp/demo'), array('hurad-plugin', 'plugins/Akismet/', 'atkrad/akismet'), array('hurad-theme', 'plugins/Hurad2013/', 'atkrad/Hurad2013'), + array('imagecms-template', 'templates/my_template/', 'shama/my_template'), + array('imagecms-module', 'application/modules/my_module/', 'shama/my_module'), + array('imagecms-library', 'application/libraries/my_library/', 'shama/my_library'), array('joomla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'), array('kirby-plugin', 'site/plugins/my_plugin/', 'shama/my_plugin'), array('kohana-module', 'modules/my_package/', 'shama/my_package'), @@ -262,16 +301,22 @@ class InstallerTest extends TestCase array('phpbb-style', 'styles/foo/', 'test/foo'), array('phpbb-language', 'language/foo/', 'test/foo'), array('pimcore-plugin', 'plugins/MyPlugin/', 'ubikz/my_plugin'), + array('plentymarkets-plugin', 'HelloWorld/', 'plugin-hello-world'), array('ppi-module', 'modules/foo/', 'test/foo'), array('puppet-module', 'modules/puppet-name/', 'puppet/puppet-name'), + array('radphp-bundle', 'src/Migration/', 'atkrad/migration'), array('redaxo-addon', 'redaxo/include/addons/my_plugin/', 'shama/my_plugin'), array('redaxo-bestyle-plugin', 'redaxo/include/addons/be_style/plugins/my_plugin/', 'shama/my_plugin'), + array('reindex-theme', 'themes/my_module/', 'author/my_module'), + array('reindex-plugin', 'plugins/my_module/', 'author/my_module'), array('roundcube-plugin', 'plugins/base/', 'test/base'), array('roundcube-plugin', 'plugins/replace_dash/', 'test/replace-dash'), array('shopware-backend-plugin', 'engine/Shopware/Plugins/Local/Backend/ShamaMyBackendPlugin/', 'shama/my-backend-plugin'), array('shopware-core-plugin', 'engine/Shopware/Plugins/Local/Core/ShamaMyCorePlugin/', 'shama/my-core-plugin'), array('shopware-frontend-plugin', 'engine/Shopware/Plugins/Local/Frontend/ShamaMyFrontendPlugin/', 'shama/my-frontend-plugin'), array('shopware-theme', 'templates/my_theme/', 'shama/my-theme'), + array('shopware-frontend-theme', 'themes/Frontend/ShamaMyFrontendTheme/', 'shama/my-frontend-theme'), + array('shopware-plugin', 'custom/plugins/ShamaMyPlugin/', 'shama/my-plugin'), array('silverstripe-module', 'my_module/', 'shama/my_module'), array('silverstripe-module', 'sapphire/', 'silverstripe/framework', '2.4.0'), array('silverstripe-module', 'framework/', 'silverstripe/framework', '3.0.0'), @@ -290,6 +335,8 @@ class InstallerTest extends TestCase array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'), array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'), array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'), + array('vanilla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'), + array('vanilla-theme', 'themes/my_theme/', 'shama/my_theme'), array('whmcs-gateway', 'modules/gateways/gateway_name/', 'vendor/gateway_name'), array('wolfcms-plugin', 'wolf/plugins/my_plugin/', 'shama/my_plugin'), array('wordpress-plugin', 'wp-content/plugins/my_plugin/', 'shama/my_plugin'), @@ -297,6 +344,12 @@ class InstallerTest extends TestCase array('zend-extra', 'extras/library/zend_test/', 'shama/zend_test'), array('zikula-module', 'modules/my-test_module/', 'my/test_module'), array('zikula-theme', 'themes/my-test_theme/', 'my/test_theme'), + array('kodicms-media', 'cms/media/vendor/my_media/', 'shama/my_media'), + array('kodicms-plugin', 'cms/plugins/my_plugin/', 'shama/my_plugin'), + array('phifty-bundle', 'bundles/core/', 'shama/core'), + array('phifty-library', 'libraries/my-lib/', 'shama/my-lib'), + array('phifty-framework', 'frameworks/my-framework/', 'shama/my-framework'), + array('yawik-module', 'module/MyModule/', 'shama/my_module'), ); } @@ -374,6 +427,27 @@ class InstallerTest extends TestCase $this->assertEquals('my/custom/path/my_plugin/', $result); } + /** + * testVendorPath + */ + public function testVendorPath() + { + $installer = new Installer($this->io, $this->composer); + $package = new Package('penyaskito/my_module', '1.0.0', '1.0.0'); + $package->setType('drupal-module'); + $consumerPackage = new RootPackage('drupal/drupal', '1.0.0', '1.0.0'); + $this->composer->setPackage($consumerPackage); + $consumerPackage->setExtra(array( + 'installer-paths' => array( + 'modules/custom/{$name}/' => array( + 'vendor:penyaskito' + ), + ), + )); + $result = $installer->getInstallPath($package); + $this->assertEquals('modules/custom/my_module/', $result); + } + /** * testNoVendorName */ diff --git a/vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php b/vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php new file mode 100644 index 000000000..d8d35ff24 --- /dev/null +++ b/vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php @@ -0,0 +1,64 @@ +package = new Package('YawikCompanyRegistration', '1.0', '1.0'); + $this->io = $this->getMock('Composer\IO\PackageInterface'); + $this->composer = new Composer(); + } + + /** + * testInflectPackageVars + * + * @dataProvider packageNameProvider + * @return void + */ + public function testInflectPackageVars($input) + { + $installer = new YawikInstaller($this->package, $this->composer); + $result = $installer->inflectPackageVars(array('name' => $input)); + $this->assertEquals($result, array('name' => 'YawikCompanyRegistration')); + } + + public function packageNameProvider() + { + return array( + array('yawik-company-registration'), + array('yawik_company_registration'), + array('YawikCompanyRegistration') + ); + } +} diff --git a/vendor/composer/semver/CHANGELOG.md b/vendor/composer/semver/CHANGELOG.md index 8352cb72d..febedc973 100644 --- a/vendor/composer/semver/CHANGELOG.md +++ b/vendor/composer/semver/CHANGELOG.md @@ -3,6 +3,36 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### [1.4.2] 2016-08-30 + + * Fixed: collapsing of complex constraints lead to buggy constraints + +### [1.4.1] 2016-06-02 + + * Changed: branch-like requirements no longer strip build metadata - [composer/semver#38](https://github.com/composer/semver/pull/38). + +### [1.4.0] 2016-03-30 + + * Added: getters on MultiConstraint - [composer/semver#35](https://github.com/composer/semver/pull/35). + +### [1.3.0] 2016-02-25 + + * Fixed: stability parsing - [composer/composer#1234](https://github.com/composer/composer/issues/4889). + * Changed: collapse contiguous constraints when possible. + +### [1.2.0] 2015-11-10 + + * Changed: allow multiple numerical identifiers in 'pre-release' version part. + * Changed: add more 'v' prefix support. + +### [1.1.0] 2015-11-03 + + * Changed: dropped redundant `test` namespace. + * Changed: minor adjustment in datetime parsing normalization. + * Changed: `ConstraintInterface` relaxed, setPrettyString is not required anymore. + * Changed: `AbstractConstraint` marked deprecated, will be removed in 2.0. + * Changed: `Constraint` is now extensible. + ### [1.0.0] 2015-09-21 * Break: `VersionConstraint` renamed to `Constraint`. @@ -13,7 +43,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). * Changed: `VersionParser::parseConstraints` allows (but ignores) prefixing numeric versions with a 'v' now. * Changed: Fixed namespace(s) of test files. * Changed: `Comparator::compare` no longer throws `InvalidArgumentException`. - * Changed: `VersionConstraint` now throws `InvalidArgumentException`. + * Changed: `Constraint` now throws `InvalidArgumentException`. ### [0.1.0] 2015-07-23 @@ -26,3 +56,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Namespace: `Composer\Test\Package\Version` -> `Composer\Test\Semver` - Namespace: `Composer\Test\Package\LinkConstraint` -> `Composer\Test\Semver\Constraint` * Changed: code style using php-cs-fixer. + +[1.4.1]: https://github.com/composer/semver/compare/1.4.0...1.4.1 +[1.4.0]: https://github.com/composer/semver/compare/1.3.0...1.4.0 +[1.3.0]: https://github.com/composer/semver/compare/1.2.0...1.3.0 +[1.2.0]: https://github.com/composer/semver/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/composer/semver/compare/1.0.0...1.1.0 +[1.0.0]: https://github.com/composer/semver/compare/0.1.0...1.0.0 +[0.1.0]: https://github.com/composer/semver/compare/5e0b9a4da...0.1.0 diff --git a/vendor/composer/semver/README.md b/vendor/composer/semver/README.md index c8b697984..143daa0d6 100644 --- a/vendor/composer/semver/README.md +++ b/vendor/composer/semver/README.md @@ -56,10 +56,10 @@ Comparator::greaterThan('1.25.0', '1.24.0'); // 1.25.0 > 1.24.0 ### Semver -The `Composer\Semver\Semver` class providers the following methods: +The `Composer\Semver\Semver` class provides the following methods: * satisfies($version, $constraints) -* satisfiedBy($constraint, array $versions) +* satisfiedBy(array $versions, $constraint) * sort($versions) * rsort($versions) diff --git a/vendor/composer/semver/composer.json b/vendor/composer/semver/composer.json index b996186f2..b0400cd7b 100644 --- a/vendor/composer/semver/composer.json +++ b/vendor/composer/semver/composer.json @@ -22,7 +22,8 @@ }, { "name": "Rob Bast", - "email": "rob.bast@gmail.com" + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" } ], "support": { @@ -30,11 +31,11 @@ "issues": "https://github.com/composer/semver/issues" }, "require": { - "php": ">=5.3.2" + "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "~2.3" + "phpunit/phpunit": "^4.5 || ^5.0.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" }, "autoload": { "psr-4": { @@ -43,12 +44,12 @@ }, "autoload-dev": { "psr-4": { - "Composer\\Semver\\Test\\": "tests" + "Composer\\Semver\\": "tests" } }, "extra": { "branch-alias": { - "dev-master": "0.1-dev" + "dev-master": "1.x-dev" } }, "scripts": { diff --git a/vendor/composer/semver/src/Constraint/AbstractConstraint.php b/vendor/composer/semver/src/Constraint/AbstractConstraint.php index ccd834f6b..be83f750b 100644 --- a/vendor/composer/semver/src/Constraint/AbstractConstraint.php +++ b/vendor/composer/semver/src/Constraint/AbstractConstraint.php @@ -11,6 +11,8 @@ namespace Composer\Semver\Constraint; +trigger_error('The ' . __CLASS__ . ' abstract class is deprecated, there is no replacement for it, it will be removed in the next major version.', E_USER_DEPRECATED); + /** * Base constraint class. */ @@ -26,17 +28,13 @@ abstract class AbstractConstraint implements ConstraintInterface */ public function matches(ConstraintInterface $provider) { - if ($provider instanceof MultiConstraint) { - // turn matching around to find a match - return $provider->matches($this); - } - if ($provider instanceof $this) { // see note at bottom of this class declaration return $this->matchSpecific($provider); } - return true; + // turn matching around to find a match + return $provider->matches($this); } /** diff --git a/vendor/composer/semver/src/Constraint/Constraint.php b/vendor/composer/semver/src/Constraint/Constraint.php index 8bc68db7b..7a21eb47f 100644 --- a/vendor/composer/semver/src/Constraint/Constraint.php +++ b/vendor/composer/semver/src/Constraint/Constraint.php @@ -14,7 +14,7 @@ namespace Composer\Semver\Constraint; /** * Defines a constraint. */ -class Constraint extends AbstractConstraint +class Constraint implements ConstraintInterface { /* operator integer values */ const OP_EQ = 0; @@ -55,10 +55,48 @@ class Constraint extends AbstractConstraint ); /** @var string */ - private $operator; + protected $operator; /** @var string */ - private $version; + protected $version; + + /** @var string */ + protected $prettyString; + + /** + * @param ConstraintInterface $provider + * + * @return bool + */ + public function matches(ConstraintInterface $provider) + { + if ($provider instanceof $this) { + return $this->matchSpecific($provider); + } + + // turn matching around to find a match + return $provider->matches($this); + } + + /** + * @param string $prettyString + */ + public function setPrettyString($prettyString) + { + $this->prettyString = $prettyString; + } + + /** + * @return string + */ + public function getPrettyString() + { + if ($this->prettyString) { + return $this->prettyString; + } + + return $this->__toString(); + } /** * Get all supported comparison operators. diff --git a/vendor/composer/semver/src/Constraint/ConstraintInterface.php b/vendor/composer/semver/src/Constraint/ConstraintInterface.php index 78c099cec..7cb13b6a8 100644 --- a/vendor/composer/semver/src/Constraint/ConstraintInterface.php +++ b/vendor/composer/semver/src/Constraint/ConstraintInterface.php @@ -20,11 +20,6 @@ interface ConstraintInterface */ public function matches(ConstraintInterface $provider); - /** - * @param string $prettyString - */ - public function setPrettyString($prettyString); - /** * @return string */ diff --git a/vendor/composer/semver/src/Constraint/MultiConstraint.php b/vendor/composer/semver/src/Constraint/MultiConstraint.php index 0d769b7c1..0c547afd4 100644 --- a/vendor/composer/semver/src/Constraint/MultiConstraint.php +++ b/vendor/composer/semver/src/Constraint/MultiConstraint.php @@ -35,6 +35,30 @@ class MultiConstraint implements ConstraintInterface $this->conjunctive = $conjunctive; } + /** + * @return ConstraintInterface[] + */ + public function getConstraints() + { + return $this->constraints; + } + + /** + * @return bool + */ + public function isConjunctive() + { + return $this->conjunctive; + } + + /** + * @return bool + */ + public function isDisjunctive() + { + return !$this->conjunctive; + } + /** * @param ConstraintInterface $provider * diff --git a/vendor/composer/semver/src/VersionParser.php b/vendor/composer/semver/src/VersionParser.php index 269aee948..359c18c46 100644 --- a/vendor/composer/semver/src/VersionParser.php +++ b/vendor/composer/semver/src/VersionParser.php @@ -23,13 +23,23 @@ use Composer\Semver\Constraint\Constraint; */ class VersionParser { - /** @var string */ - private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)(?:[.-]?(\d+))?)?([.-]?dev)?'; + /** + * Regex to match pre-release data (sort of). + * + * Due to backwards compatibility: + * - Instead of enforcing hyphen, an underscore, dot or nothing at all are also accepted. + * - Only stabilities as recognized by Composer are allowed to precede a numerical identifier. + * - Numerical-only pre-release identifiers are not supported, see tests. + * + * |--------------| + * [major].[minor].[patch] -[pre-release] +[build-metadata] + * + * @var string + */ + private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\d+)*+)?)?([.-]?dev)?'; /** @var array */ - private static $stabilities = array( - 'stable', 'RC', 'beta', 'alpha', 'dev', - ); + private static $stabilities = array('stable', 'RC', 'beta', 'alpha', 'dev'); /** * Returns the stability of a version. @@ -46,7 +56,7 @@ class VersionParser return 'dev'; } - preg_match('{' . self::$modifierRegex . '$}i', strtolower($version), $match); + preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match); if (!empty($match[3])) { return 'dev'; } @@ -96,12 +106,7 @@ class VersionParser } // strip off aliasing - if (preg_match('{^([^,\s]+) +as +([^,\s]+)$}', $version, $match)) { - $version = $match[1]; - } - - // strip off build metadata - if (preg_match('{^([^,\s+]+)\+[^\s]+$}', $version, $match)) { + if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $version, $match)) { $version = $match[1]; } @@ -110,12 +115,18 @@ class VersionParser return '9999999-dev'; } + // if requirement is branch-like, use full name if ('dev-' === strtolower(substr($version, 0, 4))) { return 'dev-' . substr($version, 4); } + // strip off build metadata + if (preg_match('{^([^,\s+]++)\+[^\s]++$}', $version, $match)) { + $version = $match[1]; + } + // match classical versioning - if (preg_match('{^v?(\d{1,5})(\.\d+)?(\.\d+)?(\.\d+)?' . self::$modifierRegex . '$}i', $version, $matches)) { + if (preg_match('{^v?(\d{1,5})(\.\d++)?(\.\d++)?(\.\d++)?' . self::$modifierRegex . '$}i', $version, $matches)) { $version = $matches[1] . (!empty($matches[2]) ? $matches[2] : '.0') . (!empty($matches[3]) ? $matches[3] : '.0') @@ -123,7 +134,7 @@ class VersionParser $index = 5; // match date(time) based versioning } elseif (preg_match('{^v?(\d{4}(?:[.:-]?\d{2}){1,6}(?:[.:-]?\d{1,3})?)' . self::$modifierRegex . '$}i', $version, $matches)) { - $version = preg_replace('{\D}', '-', $matches[1]); + $version = preg_replace('{\D}', '.', $matches[1]); $index = 2; } @@ -133,7 +144,7 @@ class VersionParser if ('stable' === $matches[$index]) { return $version; } - $version .= '-' . $this->expandStability($matches[$index]) . (!empty($matches[$index + 1]) ? $matches[$index + 1] : ''); + $version .= '-' . $this->expandStability($matches[$index]) . (!empty($matches[$index + 1]) ? ltrim($matches[$index + 1], '.-') : ''); } if (!empty($matches[$index + 2])) { @@ -170,7 +181,7 @@ class VersionParser */ public function parseNumericAliasPrefix($branch) { - if (preg_match('{^(?P(\d+\\.)*\d+)(?:\.x)?-dev$}i', $branch, $matches)) { + if (preg_match('{^(?P(\d++\\.)*\d++)(?:\.x)?-dev$}i', $branch, $matches)) { return $matches['version'] . '.'; } @@ -192,7 +203,7 @@ class VersionParser return $this->normalize($name); } - if (preg_match('{^v?(\d+)(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?(\.(?:\d+|[xX*]))?$}i', $name, $matches)) { + if (preg_match('{^v?(\d++)(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?$}i', $name, $matches)) { $version = ''; for ($i = 1; $i < 5; ++$i) { $version .= isset($matches[$i]) ? str_replace(array('*', 'X'), 'x', $matches[$i]) : '.x'; @@ -205,7 +216,7 @@ class VersionParser } /** - * Parses as constraint string into LinkConstraint objects. + * Parses a constraint string into MultiConstraint and/or Constraint objects. * * @param string $constraints * @@ -249,6 +260,23 @@ class VersionParser if (1 === count($orGroups)) { $constraint = $orGroups[0]; + } elseif (2 === count($orGroups) + // parse the two OR groups and if they are contiguous we collapse + // them into one constraint + && $orGroups[0] instanceof MultiConstraint + && $orGroups[1] instanceof MultiConstraint + && 2 === count($orGroups[0]->getConstraints()) + && 2 === count($orGroups[1]->getConstraints()) + && ($a = (string) $orGroups[0]) + && substr($a, 0, 3) === '[>=' && (false !== ($posA = strpos($a, '<', 4))) + && ($b = (string) $orGroups[1]) + && substr($b, 0, 3) === '[>=' && (false !== ($posB = strpos($b, '<', 4))) + && substr($a, $posA + 2, -1) === substr($b, 4, $posB - 5) + ) { + $constraint = new MultiConstraint(array( + new Constraint('>=', substr($a, 4, $posA - 5)), + new Constraint('<', substr($b, $posB + 2, -1)), + )); } else { $constraint = new MultiConstraint($orGroups, false); } @@ -274,11 +302,11 @@ class VersionParser } } - if (preg_match('{^[xX*](\.[xX*])*$}i', $constraint)) { + if (preg_match('{^v?[xX*](\.[xX*])*$}i', $constraint)) { return array(new EmptyConstraint()); } - $versionRegex = 'v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.(\d+))?' . self::$modifierRegex . '(?:\+[^\s]+)?'; + $versionRegex = 'v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.(\d++))?' . self::$modifierRegex . '(?:\+[^\s]+)?'; // Tilde Range // @@ -372,7 +400,7 @@ class VersionParser // // Any of X, x, or * may be used to "stand in" for one of the numeric values in the [major, minor, patch] tuple. // A partial version range is treated as an X-Range, so the special character is in fact optional. - if (preg_match('{^(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\.[xX*])+$}', $constraint, $matches)) { + if (preg_match('{^v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.[xX*])++$}', $constraint, $matches)) { if (isset($matches[3]) && '' !== $matches[3]) { $position = 3; } elseif (isset($matches[2]) && '' !== $matches[2]) { diff --git a/vendor/doctrine/cache/.travis.yml b/vendor/doctrine/cache/.travis.yml index 2952a4817..a16fd9d93 100644 --- a/vendor/doctrine/cache/.travis.yml +++ b/vendor/doctrine/cache/.travis.yml @@ -1,11 +1,17 @@ language: php +sudo: false + +cache: + directories: + - vendor + - $HOME/.composer/cache + php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm + - 5.5 + - 5.6 + - 7.0 + - hhvm services: - riak @@ -14,13 +20,14 @@ services: - redis-server before_install: - - sh -c "if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then pecl install riak-beta; fi" - - sh -c "if [[ $TRAVIS_PHP_VERSION != 'hhvm' && `php-config --vernum` -ge 50500 ]] ; then pecl config-set preferred_state beta; printf "yes\n" | pecl install apcu ; else echo 'extension="apc.so"' >> ./tests/travis/php.ini ;fi" - - composer self-update - - sh -c "if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then phpenv config-add ./tests/travis/php.ini; fi" + - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]] ; then pecl channel-update pecl.php.net; fi; + - if [[ $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then pecl install riak-beta; fi; + - if [[ $TRAVIS_PHP_VERSION =~ 5.[56] ]] ; then echo yes | pecl install apcu-4.0.10; fi; + - if [[ $TRAVIS_PHP_VERSION = 7.* ]] ; then pecl config-set preferred_state beta; echo yes | pecl install apcu; fi; + - if [[ $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-add ./tests/travis/php.ini; fi; install: - - composer --prefer-source --dev install + - travis_retry composer install script: - ./vendor/bin/phpunit -c ./tests/travis/phpunit.travis.xml -v @@ -29,5 +36,7 @@ after_script: - php vendor/bin/coveralls -v matrix: - allow_failures: - - php: hhvm + fast_finish: true + allow_failures: + - php: hhvm + - php: 7.0 diff --git a/vendor/doctrine/cache/LICENSE b/vendor/doctrine/cache/LICENSE index 4a91f0bf2..8c38cc1bc 100644 --- a/vendor/doctrine/cache/LICENSE +++ b/vendor/doctrine/cache/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2012 Doctrine Project +Copyright (c) 2006-2015 Doctrine Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/vendor/doctrine/cache/composer.json b/vendor/doctrine/cache/composer.json index f3caa7a88..7ef1727a1 100644 --- a/vendor/doctrine/cache/composer.json +++ b/vendor/doctrine/cache/composer.json @@ -13,10 +13,10 @@ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { - "php": ">=5.3.2" + "php": "~5.5|~7.0" }, "require-dev": { - "phpunit/phpunit": ">=3.7", + "phpunit/phpunit": "~4.8|~5.0", "satooshi/php-coveralls": "~0.6", "predis/predis": "~1.0" }, @@ -24,11 +24,14 @@ "doctrine/common": ">2.2,<2.4" }, "autoload": { - "psr-0": { "Doctrine\\Common\\Cache\\": "lib/" } + "psr-4": { "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } + }, + "autoload-dev": { + "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine/Tests" } }, "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "1.6.x-dev" } } } diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php index abd5e71c2..0dfbd6a1d 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php @@ -22,13 +22,14 @@ namespace Doctrine\Common\Cache; /** * APC cache provider. * - * @link www.doctrine-project.org - * @since 2.0 - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - * @author David Abdemoulaie + * @link www.doctrine-project.org + * @deprecated since version 1.6, use ApcuCache instead + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + * @author David Abdemoulaie */ class ApcCache extends CacheProvider { @@ -53,7 +54,7 @@ class ApcCache extends CacheProvider */ protected function doSave($id, $data, $lifeTime = 0) { - return (bool) apc_store($id, $data, (int) $lifeTime); + return apc_store($id, $data, $lifeTime); } /** @@ -61,7 +62,8 @@ class ApcCache extends CacheProvider */ protected function doDelete($id) { - return apc_delete($id); + // apc_delete returns false if the id does not exist + return apc_delete($id) || ! apc_exists($id); } /** @@ -77,7 +79,17 @@ class ApcCache extends CacheProvider */ protected function doFetchMultiple(array $keys) { - return apc_fetch($keys); + return apc_fetch($keys) ?: []; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $result = apc_store($keysAndValues, null, $lifetime); + + return empty($result); } /** diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php new file mode 100644 index 000000000..2a91752ba --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcuCache.php @@ -0,0 +1,106 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * APCu cache provider. + * + * @link www.doctrine-project.org + * @since 1.6 + * @author Kévin Dunglas + */ +class ApcuCache extends CacheProvider +{ + /** + * {@inheritdoc} + */ + protected function doFetch($id) + { + return apcu_fetch($id); + } + + /** + * {@inheritdoc} + */ + protected function doContains($id) + { + return apcu_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doSave($id, $data, $lifeTime = 0) + { + return apcu_store($id, $data, $lifeTime); + } + + /** + * {@inheritdoc} + */ + protected function doDelete($id) + { + // apcu_delete returns false if the id does not exist + return apcu_delete($id) || ! apcu_exists($id); + } + + /** + * {@inheritdoc} + */ + protected function doFlush() + { + return apcu_clear_cache(); + } + + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + return apcu_fetch($keys) ?: []; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $result = apcu_store($keysAndValues, null, $lifetime); + + return empty($result); + } + + /** + * {@inheritdoc} + */ + protected function doGetStats() + { + $info = apcu_cache_info(true); + $sma = apcu_sma_info(); + + return array( + Cache::STATS_HITS => $info['num_hits'], + Cache::STATS_MISSES => $info['num_misses'], + Cache::STATS_UPTIME => $info['start_time'], + Cache::STATS_MEMORY_USAGE => $info['mem_size'], + Cache::STATS_MEMORY_AVAILABLE => $sma['avail_mem'], + ); + } +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php index 31a072901..6610cc217 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ArrayCache.php @@ -33,16 +33,47 @@ namespace Doctrine\Common\Cache; class ArrayCache extends CacheProvider { /** - * @var array $data + * @var array[] $data each element being a tuple of [$data, $expiration], where the expiration is int|bool */ - private $data = array(); + private $data = []; + + /** + * @var int + */ + private $hitsCount = 0; + + /** + * @var int + */ + private $missesCount = 0; + + /** + * @var int + */ + private $upTime; + + /** + * {@inheritdoc} + */ + public function __construct() + { + $this->upTime = time(); + } /** * {@inheritdoc} */ protected function doFetch($id) { - return $this->doContains($id) ? $this->data[$id] : false; + if (! $this->doContains($id)) { + $this->missesCount += 1; + + return false; + } + + $this->hitsCount += 1; + + return $this->data[$id][0]; } /** @@ -50,8 +81,19 @@ class ArrayCache extends CacheProvider */ protected function doContains($id) { - // isset() is required for performance optimizations, to avoid unnecessary function calls to array_key_exists. - return isset($this->data[$id]) || array_key_exists($id, $this->data); + if (! isset($this->data[$id])) { + return false; + } + + $expiration = $this->data[$id][1]; + + if ($expiration && $expiration < time()) { + $this->doDelete($id); + + return false; + } + + return true; } /** @@ -59,7 +101,7 @@ class ArrayCache extends CacheProvider */ protected function doSave($id, $data, $lifeTime = 0) { - $this->data[$id] = $data; + $this->data[$id] = [$data, $lifeTime ? time() + $lifeTime : false]; return true; } @@ -79,7 +121,7 @@ class ArrayCache extends CacheProvider */ protected function doFlush() { - $this->data = array(); + $this->data = []; return true; } @@ -89,6 +131,12 @@ class ArrayCache extends CacheProvider */ protected function doGetStats() { - return null; + return [ + Cache::STATS_HITS => $this->hitsCount, + Cache::STATS_MISSES => $this->missesCount, + Cache::STATS_UPTIME => $this->upTime, + Cache::STATS_MEMORY_USAGE => null, + Cache::STATS_MEMORY_AVAILABLE => null, + ]; } } diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php index 205a12327..89fe32307 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Cache.php @@ -59,19 +59,22 @@ interface Cache * * @param string $id The cache id of the entry to check for. * - * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise. + * @return bool TRUE if a cache entry exists for the given cache id, FALSE otherwise. */ public function contains($id); /** * Puts data into the cache. * + * If a cache entry with the given id already exists, its data will be replaced. + * * @param string $id The cache id. * @param mixed $data The cache entry/data. - * @param int $lifeTime The cache lifetime. - * If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime). + * @param int $lifeTime The lifetime in number of seconds for this cache entry. + * If zero (the default), the entry never expires (although it may be deleted from the cache + * to make place for other entries). * - * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise. + * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise. */ public function save($id, $data, $lifeTime = 0); @@ -80,7 +83,8 @@ interface Cache * * @param string $id The cache id. * - * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. + * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise. + * Deleting a non-existing entry is considered successful. */ public function delete($id); diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php index a172a4ceb..9f579237a 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php @@ -29,7 +29,7 @@ namespace Doctrine\Common\Cache; * @author Roman Borschel * @author Fabio B. Silva */ -abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, MultiGetCache +abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, MultiGetCache, MultiPutCache { const DOCTRINE_NAMESPACE_CACHEKEY = 'DoctrineNamespaceCacheKey[%s]'; @@ -83,6 +83,10 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M */ public function fetchMultiple(array $keys) { + if (empty($keys)) { + return array(); + } + // note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys $namespacedKeys = array_combine($keys, array_map(array($this, 'getNamespacedId'), $keys)); $items = $this->doFetchMultiple($namespacedKeys); @@ -91,7 +95,7 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M // no internal array function supports this sort of mapping: needs to be iterative // this filters and combines keys in one pass foreach ($namespacedKeys as $requestedKey => $namespacedKey) { - if (isset($items[$namespacedKey])) { + if (isset($items[$namespacedKey]) || array_key_exists($namespacedKey, $items)) { $foundItems[$requestedKey] = $items[$namespacedKey]; } } @@ -99,6 +103,19 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M return $foundItems; } + /** + * {@inheritdoc} + */ + public function saveMultiple(array $keysAndValues, $lifetime = 0) + { + $namespacedKeysAndValues = array(); + foreach ($keysAndValues as $key => $value) { + $namespacedKeysAndValues[$this->getNamespacedId($key)] = $value; + } + + return $this->doSaveMultiple($namespacedKeysAndValues, $lifetime); + } + /** * {@inheritdoc} */ @@ -147,9 +164,13 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M $namespaceCacheKey = $this->getNamespaceCacheKey(); $namespaceVersion = $this->getNamespaceVersion() + 1; - $this->namespaceVersion = $namespaceVersion; + if ($this->doSave($namespaceCacheKey, $namespaceVersion)) { + $this->namespaceVersion = $namespaceVersion; - return $this->doSave($namespaceCacheKey, $namespaceVersion); + return true; + } + + return false; } /** @@ -188,15 +209,7 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M } $namespaceCacheKey = $this->getNamespaceCacheKey(); - $namespaceVersion = $this->doFetch($namespaceCacheKey); - - if (false === $namespaceVersion) { - $namespaceVersion = 1; - - $this->doSave($namespaceCacheKey, $namespaceVersion); - } - - $this->namespaceVersion = $namespaceVersion; + $this->namespaceVersion = $this->doFetch($namespaceCacheKey) ?: 1; return $this->namespaceVersion; } @@ -211,8 +224,8 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M { $returnValues = array(); - foreach ($keys as $index => $key) { - if (false !== ($item = $this->doFetch($key))) { + foreach ($keys as $key) { + if (false !== ($item = $this->doFetch($key)) || $this->doContains($key)) { $returnValues[$key] = $item; } } @@ -225,7 +238,7 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M * * @param string $id The id of the cache entry to fetch. * - * @return mixed|boolean The cached data or FALSE, if no cache entry exists for the given id. + * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id. */ abstract protected function doFetch($id); @@ -234,10 +247,32 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M * * @param string $id The cache id of the entry to check for. * - * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise. + * @return bool TRUE if a cache entry exists for the given cache id, FALSE otherwise. */ abstract protected function doContains($id); + /** + * Default implementation of doSaveMultiple. Each driver that supports multi-put should override it. + * + * @param array $keysAndValues Array of keys and values to save in cache + * @param int $lifetime The lifetime. If != 0, sets a specific lifetime for these + * cache entries (0 => infinite lifeTime). + * + * @return bool TRUE if the operation was successful, FALSE if it wasn't. + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $success = true; + + foreach ($keysAndValues as $key => $value) { + if (!$this->doSave($key, $value, $lifetime)) { + $success = false; + } + } + + return $success; + } + /** * Puts data into the cache. * @@ -246,7 +281,7 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this * cache entry (0 => infinite lifeTime). * - * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise. + * @return bool TRUE if the entry was successfully stored in the cache, FALSE otherwise. */ abstract protected function doSave($id, $data, $lifeTime = 0); @@ -255,14 +290,14 @@ abstract class CacheProvider implements Cache, FlushableCache, ClearableCache, M * * @param string $id The cache id. * - * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise. + * @return bool TRUE if the cache entry was successfully deleted, FALSE otherwise. */ abstract protected function doDelete($id); /** * Flushes all cache entries. * - * @return boolean TRUE if the cache entries were successfully flushed, FALSE otherwise. + * @return bool TRUE if the cache entries were successfully flushed, FALSE otherwise. */ abstract protected function doFlush(); diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php index d7b4358de..3a91eaf3a 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ClearableCache.php @@ -34,7 +34,7 @@ interface ClearableCache /** * Deletes all cache entries in the current cache namespace. * - * @return boolean TRUE if the cache entries were successfully deleted, FALSE otherwise. + * @return bool TRUE if the cache entries were successfully deleted, FALSE otherwise. */ public function deleteAll(); } diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php index 9ad3ce2c0..b2e0427e5 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php @@ -24,6 +24,7 @@ namespace Doctrine\Common\Cache; * * @since 2.3 * @author Fabio B. Silva + * @author Tobias Schultze */ abstract class FileCache extends CacheProvider { @@ -42,22 +43,24 @@ abstract class FileCache extends CacheProvider private $extension; /** - * @var string[] regular expressions for replacing disallowed characters in file name + * @var int */ - private $disallowedCharacterPatterns = array( - '/\-/', // replaced to disambiguate original `-` and `-` derived from replacements - '/[^a-zA-Z0-9\-_\[\]]/' // also excludes non-ascii chars (not supported, depending on FS) - ); - - /** - * @var string[] replacements for disallowed file characters - */ - private $replacementCharacters = array('__', '-'); + private $umask; /** * @var int */ - private $umask; + private $directoryStringLength; + + /** + * @var int + */ + private $extensionStringLength; + + /** + * @var bool + */ + private $isRunningOnWindows; /** * Constructor. @@ -95,6 +98,10 @@ abstract class FileCache extends CacheProvider // YES, this needs to be *after* createPathIfNeeded() $this->directory = realpath($directory); $this->extension = (string) $extension; + + $this->directoryStringLength = strlen($this->directory); + $this->extensionStringLength = strlen($this->extension); + $this->isRunningOnWindows = defined('PHP_WINDOWS_VERSION_BUILD'); } /** @@ -110,7 +117,7 @@ abstract class FileCache extends CacheProvider /** * Gets the cache file extension. * - * @return string|null + * @return string */ public function getExtension() { @@ -124,11 +131,29 @@ abstract class FileCache extends CacheProvider */ protected function getFilename($id) { + $hash = hash('sha256', $id); + + // This ensures that the filename is unique and that there are no invalid chars in it. + if ( + '' === $id + || ((strlen($id) * 2 + $this->extensionStringLength) > 255) + || ($this->isRunningOnWindows && ($this->directoryStringLength + 4 + strlen($id) * 2 + $this->extensionStringLength) > 258) + ) { + // Most filesystems have a limit of 255 chars for each path component. On Windows the the whole path is limited + // to 260 chars (including terminating null char). Using long UNC ("\\?\" prefix) does not work with the PHP API. + // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259. + // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents + // collisions between the hash and bin2hex. + $filename = '_' . $hash; + } else { + $filename = bin2hex($id); + } + return $this->directory . DIRECTORY_SEPARATOR - . implode(str_split(hash('sha256', $id), 2), DIRECTORY_SEPARATOR) + . substr($hash, 0, 2) . DIRECTORY_SEPARATOR - . preg_replace($this->disallowedCharacterPatterns, $this->replacementCharacters, $id) + . $filename . $this->extension; } @@ -137,7 +162,9 @@ abstract class FileCache extends CacheProvider */ protected function doDelete($id) { - return @unlink($this->getFilename($id)); + $filename = $this->getFilename($id); + + return @unlink($filename) || ! file_exists($filename); } /** @@ -146,7 +173,16 @@ abstract class FileCache extends CacheProvider protected function doFlush() { foreach ($this->getIterator() as $name => $file) { - @unlink($name); + if ($file->isDir()) { + // Remove the intermediate directories which have been created to balance the tree. It only takes effect + // if the directory is empty. If several caches share the same directory but with different file extensions, + // the other ones are not removed. + @rmdir($name); + } elseif ($this->isFilenameEndingWithExtension($name)) { + // If an extension is set, only remove files which end with the given extension. + // If no extension is set, we have no other choice than removing everything. + @unlink($name); + } } return true; @@ -158,8 +194,10 @@ abstract class FileCache extends CacheProvider protected function doGetStats() { $usage = 0; - foreach ($this->getIterator() as $file) { - $usage += $file->getSize(); + foreach ($this->getIterator() as $name => $file) { + if (! $file->isDir() && $this->isFilenameEndingWithExtension($name)) { + $usage += $file->getSize(); + } } $free = disk_free_space($this->directory); @@ -229,9 +267,20 @@ abstract class FileCache extends CacheProvider */ private function getIterator() { - return new \RegexIterator( - new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->directory)), - '/^.+' . preg_quote($this->extension, '/') . '$/i' + return new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($this->directory, \FilesystemIterator::SKIP_DOTS), + \RecursiveIteratorIterator::CHILD_FIRST ); } + + /** + * @param string $name The filename + * + * @return bool + */ + private function isFilenameEndingWithExtension($name) + { + return '' === $this->extension + || strrpos($name, $this->extension) === (strlen($name) - $this->extensionStringLength); + } } diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php index 29d5e0746..d988294f6 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FilesystemCache.php @@ -53,7 +53,7 @@ class FilesystemCache extends FileCache $resource = fopen($filename, "r"); if (false !== ($line = fgets($resource))) { - $lifetime = (integer) $line; + $lifetime = (int) $line; } if ($lifetime !== 0 && $lifetime < time()) { @@ -86,7 +86,7 @@ class FilesystemCache extends FileCache $resource = fopen($filename, "r"); if (false !== ($line = fgets($resource))) { - $lifetime = (integer) $line; + $lifetime = (int) $line; } fclose($resource); diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php index e4e606b17..4311d4f59 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/FlushableCache.php @@ -31,7 +31,7 @@ interface FlushableCache /** * Flushes all cache entries, globally. * - * @return boolean TRUE if the cache entries were successfully flushed, FALSE otherwise. + * @return bool TRUE if the cache entries were successfully flushed, FALSE otherwise. */ public function flushAll(); } diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php index c5098fd97..8afaeeacc 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcacheCache.php @@ -97,7 +97,8 @@ class MemcacheCache extends CacheProvider */ protected function doDelete($id) { - return $this->memcache->delete($id); + // Memcache::delete() returns false if entry does not exist + return $this->memcache->delete($id) || ! $this->doContains($id); } /** diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php index 040c26c02..dc4016b59 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MemcachedCache.php @@ -74,7 +74,19 @@ class MemcachedCache extends CacheProvider */ protected function doFetchMultiple(array $keys) { - return $this->memcached->getMulti($keys); + return $this->memcached->getMulti($keys) ?: []; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + if ($lifetime > 30 * 24 * 3600) { + $lifetime = time() + $lifetime; + } + + return $this->memcached->setMulti($keysAndValues, $lifetime); } /** @@ -82,7 +94,8 @@ class MemcachedCache extends CacheProvider */ protected function doContains($id) { - return (false !== $this->memcached->get($id)); + return false !== $this->memcached->get($id) + || $this->memcached->getResultCode() !== Memcached::RES_NOTFOUND; } /** @@ -101,7 +114,8 @@ class MemcachedCache extends CacheProvider */ protected function doDelete($id) { - return $this->memcached->delete($id); + return $this->memcached->delete($id) + || $this->memcached->getResultCode() === Memcached::RES_NOTFOUND; } /** diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php index 0c7ac0a09..75fe0ca11 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php @@ -21,6 +21,7 @@ namespace Doctrine\Common\Cache; use MongoBinData; use MongoCollection; +use MongoCursorException; use MongoDate; /** @@ -41,7 +42,7 @@ class MongoDBCache extends CacheProvider * cache entry should expire. * * With MongoDB 2.2+, entries can be automatically deleted by MongoDB by - * indexing this field wit the "expireAfterSeconds" option equal to zero. + * indexing this field with the "expireAfterSeconds" option equal to zero. * This will direct MongoDB to regularly query for and delete any entries * whose date is older than the current time. Entries without a date value * in this field will be ignored. @@ -119,14 +120,18 @@ class MongoDBCache extends CacheProvider */ protected function doSave($id, $data, $lifeTime = 0) { - $result = $this->collection->update( - array('_id' => $id), - array('$set' => array( - self::EXPIRATION_FIELD => ($lifeTime > 0 ? new MongoDate(time() + $lifeTime) : null), - self::DATA_FIELD => new MongoBinData(serialize($data), MongoBinData::BYTE_ARRAY), - )), - array('upsert' => true, 'multiple' => false) - ); + try { + $result = $this->collection->update( + array('_id' => $id), + array('$set' => array( + self::EXPIRATION_FIELD => ($lifeTime > 0 ? new MongoDate(time() + $lifeTime) : null), + self::DATA_FIELD => new MongoBinData(serialize($data), MongoBinData::BYTE_ARRAY), + )), + array('upsert' => true, 'multiple' => false) + ); + } catch (MongoCursorException $e) { + return false; + } return isset($result['ok']) ? $result['ok'] == 1 : true; } @@ -138,7 +143,7 @@ class MongoDBCache extends CacheProvider { $result = $this->collection->remove(array('_id' => $id)); - return isset($result['n']) ? $result['n'] == 1 : true; + return isset($result['ok']) ? $result['ok'] == 1 : true; } /** @@ -170,8 +175,8 @@ class MongoDBCache extends CacheProvider return array( Cache::STATS_HITS => null, Cache::STATS_MISSES => null, - Cache::STATS_UPTIME => (isset($serverStatus['uptime']) ? (integer) $serverStatus['uptime'] : null), - Cache::STATS_MEMORY_USAGE => (isset($collStats['size']) ? (integer) $collStats['size'] : null), + Cache::STATS_UPTIME => (isset($serverStatus['uptime']) ? (int) $serverStatus['uptime'] : null), + Cache::STATS_MEMORY_USAGE => (isset($collStats['size']) ? (int) $collStats['size'] : null), Cache::STATS_MEMORY_AVAILABLE => null, ); } @@ -180,7 +185,8 @@ class MongoDBCache extends CacheProvider * Check if the document is expired. * * @param array $document - * @return boolean + * + * @return bool */ private function isExpired(array $document) { diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php new file mode 100644 index 000000000..bf87ea9f1 --- /dev/null +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MultiPutCache.php @@ -0,0 +1,41 @@ +. + */ + +namespace Doctrine\Common\Cache; + +/** + * Interface for cache drivers that allows to put many items at once. + * + * @link www.doctrine-project.org + * @since 1.6 + * @author Daniel Gorgan + */ +interface MultiPutCache +{ + /** + * Returns a boolean value indicating if the operation succeeded. + * + * @param array $keysAndValues Array of keys and values to save in cache + * @param int $lifetime The lifetime. If != 0, sets a specific lifetime for these + * cache entries (0 => infinite lifeTime). + * + * @return bool TRUE if the operation was successful, FALSE if it wasn't. + */ + function saveMultiple(array $keysAndValues, $lifetime = 0); +} diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php index 823477e6c..bcd27497e 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/PredisCache.php @@ -2,7 +2,7 @@ namespace Doctrine\Common\Cache; -use Predis\Client; +use Predis\ClientInterface; /** * Predis cache provider. @@ -12,16 +12,16 @@ use Predis\Client; class PredisCache extends CacheProvider { /** - * @var Client + * @var ClientInterface */ private $client; /** - * @param Client $client + * @param ClientInterface $client * * @return void */ - public function __construct(Client $client) + public function __construct(ClientInterface $client) { $this->client = $client; } @@ -46,14 +46,43 @@ class PredisCache extends CacheProvider { $fetchedItems = call_user_func_array(array($this->client, 'mget'), $keys); - return array_filter(array_combine($keys, array_map('unserialize', $fetchedItems))); + return array_map('unserialize', array_filter(array_combine($keys, $fetchedItems))); } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + if ($lifetime) { + $success = true; + + // Keys have lifetime, use SETEX for each of them + foreach ($keysAndValues as $key => $value) { + $response = $this->client->setex($key, $lifetime, serialize($value)); + + if ((string) $response != 'OK') { + $success = false; + } + } + + return $success; + } + + // No lifetime, use MSET + $response = $this->client->mset(array_map(function ($value) { + return serialize($value); + }, $keysAndValues)); + + return (string) $response == 'OK'; + } + /** * {@inheritdoc} */ protected function doContains($id) { - return $this->client->exists($id); + return (bool) $this->client->exists($id); } /** @@ -76,7 +105,7 @@ class PredisCache extends CacheProvider */ protected function doDelete($id) { - return $this->client->del($id) > 0; + return $this->client->del($id) >= 0; } /** diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php index 50d7c917e..22add6679 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RedisCache.php @@ -71,7 +71,40 @@ class RedisCache extends CacheProvider */ protected function doFetchMultiple(array $keys) { - return array_filter(array_combine($keys, $this->redis->mget($keys))); + $fetchedItems = array_combine($keys, $this->redis->mget($keys)); + + // Redis mget returns false for keys that do not exist. So we need to filter those out unless it's the real data. + $foundItems = array(); + + foreach ($fetchedItems as $key => $value) { + if (false !== $value || $this->redis->exists($key)) { + $foundItems[$key] = $value; + } + } + + return $foundItems; + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + if ($lifetime) { + $success = true; + + // Keys have lifetime, use SETEX for each of them + foreach ($keysAndValues as $key => $value) { + if (!$this->redis->setex($key, $lifetime, $value)) { + $success = false; + } + } + + return $success; + } + + // No lifetime, use MSET + return (bool) $this->redis->mset($keysAndValues); } /** @@ -99,7 +132,7 @@ class RedisCache extends CacheProvider */ protected function doDelete($id) { - return $this->redis->delete($id) > 0; + return $this->redis->delete($id) >= 0; } /** @@ -137,6 +170,11 @@ class RedisCache extends CacheProvider if (defined('HHVM_VERSION')) { return Redis::SERIALIZER_PHP; } - return defined('Redis::SERIALIZER_IGBINARY') ? Redis::SERIALIZER_IGBINARY : Redis::SERIALIZER_PHP; + + if (defined('Redis::SERIALIZER_IGBINARY') && extension_loaded('igbinary')) { + return Redis::SERIALIZER_IGBINARY; + } + + return Redis::SERIALIZER_PHP; } } diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php index 8bb6b4bf9..0baa3f253 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php @@ -202,7 +202,7 @@ class RiakCache extends CacheProvider * * @param \Riak\Object $object * - * @return boolean + * @return bool */ private function isExpired(Object $object) { diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php index b12978c49..0bf6e4d44 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/SQLite3Cache.php @@ -98,7 +98,7 @@ class SQLite3Cache extends CacheProvider */ protected function doContains($id) { - return (boolean) $this->findById($id, false); + return null !== $this->findById($id, false); } /** @@ -157,7 +157,7 @@ class SQLite3Cache extends CacheProvider * Find a single row by ID. * * @param mixed $id - * @param boolean $includeData + * @param bool $includeData * * @return array|null */ @@ -208,7 +208,8 @@ class SQLite3Cache extends CacheProvider * Check if the item is expired. * * @param array $item - * @return boolean + * + * @return bool */ private function isExpired(array $item) { diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php index d742fa080..a6399ecc1 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/Version.php @@ -21,5 +21,5 @@ namespace Doctrine\Common\Cache; class Version { - const VERSION = '1.4.0-DEV'; + const VERSION = '1.6.1-DEV'; } diff --git a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php index ae3277293..8a250b29a 100644 --- a/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/WinCacheCache.php @@ -53,7 +53,7 @@ class WinCacheCache extends CacheProvider */ protected function doSave($id, $data, $lifeTime = 0) { - return (bool) wincache_ucache_set($id, $data, (int) $lifeTime); + return wincache_ucache_set($id, $data, $lifeTime); } /** @@ -72,6 +72,24 @@ class WinCacheCache extends CacheProvider return wincache_ucache_clear(); } + /** + * {@inheritdoc} + */ + protected function doFetchMultiple(array $keys) + { + return wincache_ucache_get($keys); + } + + /** + * {@inheritdoc} + */ + protected function doSaveMultiple(array $keysAndValues, $lifetime = 0) + { + $result = wincache_ucache_set($keysAndValues, null, $lifetime); + + return empty($result); + } + /** * {@inheritdoc} */ diff --git a/vendor/doctrine/cache/phpunit.xml.dist b/vendor/doctrine/cache/phpunit.xml.dist index 34d7f4c87..40cc24dee 100644 --- a/vendor/doctrine/cache/phpunit.xml.dist +++ b/vendor/doctrine/cache/phpunit.xml.dist @@ -1,16 +1,16 @@ - + + + + ./tests/Doctrine/ diff --git a/vendor/doctrine/common/LICENSE b/vendor/doctrine/common/LICENSE index 4a91f0bf2..8c38cc1bc 100644 --- a/vendor/doctrine/common/LICENSE +++ b/vendor/doctrine/common/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2012 Doctrine Project +Copyright (c) 2006-2015 Doctrine Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/vendor/doctrine/common/composer.json b/vendor/doctrine/common/composer.json index be42e7fed..a12495ab1 100644 --- a/vendor/doctrine/common/composer.json +++ b/vendor/doctrine/common/composer.json @@ -13,26 +13,24 @@ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { - "php": ">=5.3.2", + "php": "~5.5|~7.0", "doctrine/inflector": "1.*", "doctrine/cache": "1.*", "doctrine/collections": "1.*", "doctrine/lexer": "1.*", "doctrine/annotations": "1.*" }, - "minimum-stability": "dev", "require-dev": { - "phpunit/phpunit": "~3.7" + "phpunit/phpunit": "~4.8|~5.0" }, "autoload": { - "psr-0": { "Doctrine\\Common\\": "lib/" } + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } }, "extra": { "branch-alias": { - "dev-master": "2.6.x-dev" + "dev-master": "2.7.x-dev" } - }, - "archive": { - "exclude": ["!vendor", "tests", "*phpunit.xml", ".travis.yml", "build.xml", "build.properties", "composer.phar"] } } diff --git a/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php b/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php index d65b9a631..78eeb35d3 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php @@ -153,7 +153,7 @@ class ClassLoader */ public function register() { - spl_autoload_register(array($this, 'loadClass')); + spl_autoload_register([$this, 'loadClass']); } /** @@ -163,7 +163,7 @@ class ClassLoader */ public function unregister() { - spl_autoload_unregister(array($this, 'loadClass')); + spl_autoload_unregister([$this, 'loadClass']); } /** @@ -275,6 +275,6 @@ class ClassLoader { return class_exists($type, $autoload) || interface_exists($type, $autoload) - || (function_exists('trait_exists') && trait_exists($type, $autoload)); + || trait_exists($type, $autoload); } } diff --git a/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php b/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php index 69eb17ec6..0ee04a15a 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php @@ -38,7 +38,7 @@ class EventManager * * @var array */ - private $_listeners = array(); + private $_listeners = []; /** * Dispatches an event to all registered listeners. diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php index 33770f901..6da542236 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php @@ -141,7 +141,7 @@ abstract class AbstractManagerRegistry implements ManagerRegistry */ public function getConnections() { - $connections = array(); + $connections = []; foreach ($this->connections as $name => $id) { $connections[$name] = $this->getService($id); } @@ -195,8 +195,13 @@ abstract class AbstractManagerRegistry implements ManagerRegistry } $proxyClass = new \ReflectionClass($class); + if ($proxyClass->implementsInterface($this->proxyInterfaceName)) { - $class = $proxyClass->getParentClass()->getName(); + if (! $parentClass = $proxyClass->getParentClass()) { + return null; + } + + $class = $parentClass->getName(); } foreach ($this->managers as $id) { @@ -221,7 +226,7 @@ abstract class AbstractManagerRegistry implements ManagerRegistry */ public function getManagers() { - $dms = array(); + $dms = []; foreach ($this->managers as $name => $id) { $dms[$name] = $this->getService($id); } @@ -253,5 +258,7 @@ abstract class AbstractManagerRegistry implements ManagerRegistry // force the creation of a new document manager // if the current one is closed $this->resetService($this->managers[$name]); + + return $this->getManager($name); } } diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php index 404fea91a..cba424b06 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php @@ -53,7 +53,7 @@ abstract class AbstractClassMetadataFactory implements ClassMetadataFactory /** * @var ClassMetadata[] */ - private $loadedMetadata = array(); + private $loadedMetadata = []; /** * @var bool @@ -110,7 +110,7 @@ abstract class AbstractClassMetadataFactory implements ClassMetadataFactory } $driver = $this->getDriver(); - $metadata = array(); + $metadata = []; foreach ($driver->getAllClassNames() as $className) { $metadata[] = $this->getMetadataFor($className); } @@ -208,7 +208,7 @@ abstract class AbstractClassMetadataFactory implements ClassMetadataFactory try { if ($this->cacheDriver) { - if (($cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt)) !== false) { + if (($cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt)) instanceof ClassMetadata) { $this->loadedMetadata[$realClassName] = $cached; $this->wakeupReflection($cached, $this->getReflectionService()); @@ -277,7 +277,7 @@ abstract class AbstractClassMetadataFactory implements ClassMetadataFactory protected function getParentClasses($name) { // Collect parent classes, ignoring transient (not-mapped) classes. - $parentClasses = array(); + $parentClasses = []; foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) { if ( ! $this->getDriver()->isTransient($parentClass)) { $parentClasses[] = $parentClass; @@ -306,7 +306,7 @@ abstract class AbstractClassMetadataFactory implements ClassMetadataFactory $this->initialize(); } - $loaded = array(); + $loaded = []; $parentClasses = $this->getParentClasses($name); $parentClasses[] = $name; @@ -314,7 +314,7 @@ abstract class AbstractClassMetadataFactory implements ClassMetadataFactory // Move down the hierarchy of parent classes, starting from the topmost class $parent = null; $rootEntityFound = false; - $visited = array(); + $visited = []; $reflService = $this->getReflectionService(); foreach ($parentClasses as $className) { if (isset($this->loadedMetadata[$className])) { diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php index 8bb574d92..deb82c0c9 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php @@ -45,14 +45,14 @@ abstract class AnnotationDriver implements MappingDriver * * @var array */ - protected $paths = array(); + protected $paths = []; /** * The paths excluded from path where to look for mapping files. * * @var array */ - protected $excludePaths = array(); + protected $excludePaths = []; /** * The file extension of mapping documents. @@ -73,7 +73,7 @@ abstract class AnnotationDriver implements MappingDriver * * @var array */ - protected $entityAnnotationClasses = array(); + protected $entityAnnotationClasses = []; /** * Initializes a new AnnotationDriver that uses the given AnnotationReader for reading @@ -200,8 +200,8 @@ abstract class AnnotationDriver implements MappingDriver throw MappingException::pathRequired(); } - $classes = array(); - $includedFiles = array(); + $classes = []; + $includedFiles = []; foreach ($this->paths as $path) { if ( ! is_dir($path)) { diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php index 58a740b57..6ed7f6d0d 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php @@ -37,7 +37,7 @@ class DefaultFileLocator implements FileLocator * * @var array */ - protected $paths = array(); + protected $paths = []; /** * The file extension of mapping documents. @@ -125,7 +125,7 @@ class DefaultFileLocator implements FileLocator */ public function getAllClassNames($globalBasename) { - $classes = array(); + $classes = []; if ($this->paths) { foreach ($this->paths as $path) { diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php index ccc64faf8..dc799d5cc 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php @@ -145,11 +145,14 @@ abstract class FileDriver implements MappingDriver $this->initialize(); } - $classNames = (array)$this->locator->getAllClassNames($this->globalBasename); - if ($this->classCache) { - $classNames = array_merge(array_keys($this->classCache), $classNames); + if (! $this->classCache) { + return (array) $this->locator->getAllClassNames($this->globalBasename); } - return $classNames; + + return array_merge( + array_keys($this->classCache), + (array) $this->locator->getAllClassNames($this->globalBasename) + ); } /** @@ -175,7 +178,7 @@ abstract class FileDriver implements MappingDriver */ protected function initialize() { - $this->classCache = array(); + $this->classCache = []; if (null !== $this->globalBasename) { foreach ($this->locator->getPaths() as $path) { $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension(); diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php index 26a9f3e2c..50d9785bc 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php @@ -39,12 +39,12 @@ class MappingDriverChain implements MappingDriver * * @var MappingDriver|null */ - private $defaultDriver = null; + private $defaultDriver; /** * @var array */ - private $drivers = array(); + private $drivers = []; /** * Gets the default driver. @@ -117,8 +117,8 @@ class MappingDriverChain implements MappingDriver */ public function getAllClassNames() { - $classNames = array(); - $driverClasses = array(); + $classNames = []; + $driverClasses = []; /* @var $driver MappingDriver */ foreach ($this->drivers AS $namespace => $driver) { diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php index 6df54b0f7..efffa6aa4 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php @@ -44,8 +44,7 @@ class PHPDriver extends FileDriver */ public function __construct($locator, $fileExtension = null) { - $fileExtension = ".php"; - parent::__construct($locator, $fileExtension); + parent::__construct($locator, '.php'); } /** @@ -54,6 +53,7 @@ class PHPDriver extends FileDriver public function loadMetadataForClass($className, ClassMetadata $metadata) { $this->metadata = $metadata; + $this->loadMappingFile($this->locator->findMappingFile($className)); } @@ -65,6 +65,6 @@ class PHPDriver extends FileDriver $metadata = $this->metadata; include $file; - return array($metadata->getName() => $metadata); + return [$metadata->getName() => $metadata]; } } diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php index df8f47700..8e37e5a7a 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php @@ -40,7 +40,7 @@ class StaticPHPDriver implements MappingDriver * * @var array */ - private $paths = array(); + private $paths = []; /** * Map of all class names. @@ -93,8 +93,8 @@ class StaticPHPDriver implements MappingDriver throw MappingException::pathRequired(); } - $classes = array(); - $includedFiles = array(); + $classes = []; + $includedFiles = []; foreach ($this->paths as $path) { if (!is_dir($path)) { diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php index f33426560..4588cfec8 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php @@ -37,14 +37,14 @@ class SymfonyFileLocator implements FileLocator * * @var array */ - protected $paths = array(); + protected $paths = []; /** * A map of mapping directory path to namespace prefix used to expand class shortnames. * * @var array */ - protected $prefixes = array(); + protected $prefixes = []; /** * File extension that is searched for. @@ -153,7 +153,9 @@ class SymfonyFileLocator implements FileLocator } $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', $this->nsSeparator).$this->fileExtension; - return is_file($filename); + if (is_file($filename)) { + return true; + } } return false; @@ -164,7 +166,7 @@ class SymfonyFileLocator implements FileLocator */ public function getAllClassNames($globalBasename = null) { - $classes = array(); + $classes = []; if ($this->paths) { foreach ((array) $this->paths as $path) { @@ -194,7 +196,7 @@ class SymfonyFileLocator implements FileLocator '\\' ); - $classes[] = $this->prefixes[$path] . $nsSuffix . '\\' .str_replace($this->nsSeparator, '\\', $fileName); + $classes[] = $this->prefixes[$path] . str_replace(DIRECTORY_SEPARATOR, '\\', $nsSuffix) . '\\' .str_replace($this->nsSeparator, '\\', $fileName); } else { $classes[] = str_replace($this->nsSeparator, '\\', $fileName); } @@ -230,8 +232,6 @@ class SymfonyFileLocator implements FileLocator if (is_file($filename)) { return $filename; } - - throw MappingException::mappingFileNotFound($className, $filename); } throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->fileExtension); diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php index e5bcb06e7..7d0176649 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php @@ -31,7 +31,7 @@ class StaticReflectionService implements ReflectionService */ public function getParentClasses($class) { - return array(); + return []; } /** diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php index a35b71a28..990642e78 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php @@ -198,7 +198,7 @@ abstract class PersistentObject implements ObjectManagerAware throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'"); } if (!($this->$field instanceof Collection)) { - $this->$field = new ArrayCollection($this->$field ?: array()); + $this->$field = new ArrayCollection($this->$field ?: []); } $this->$field->add($args[0]); $this->completeOwningSide($field, $targetClass, $args[0]); diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php index bc546902e..7eb216bfc 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php @@ -87,7 +87,7 @@ abstract class AbstractProxyFactory /** * @var \Doctrine\Common\Proxy\ProxyDefinition[] */ - private $definitions = array(); + private $definitions = []; /** * @param \Doctrine\Common\Proxy\ProxyGenerator $proxyGenerator diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php index c9d0e2cf9..925dcd1b7 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php @@ -58,10 +58,10 @@ class ProxyGenerator * * @var string[]|callable[] */ - protected $placeholders = array( - 'baseProxyInterface' => 'Doctrine\Common\Proxy\Proxy', + protected $placeholders = [ + 'baseProxyInterface' => Proxy::class, 'additionalProperties' => '', - ); + ]; /** * Template used as a blueprint to generate proxies. @@ -106,7 +106,7 @@ class extends \ implements \); + public static $lazyPropertiesDefaults = []; @@ -129,7 +129,7 @@ class extends \ implements \__initializer__ && $this->__initializer__->__invoke($this, \'__load\', array()); + $this->__initializer__ && $this->__initializer__->__invoke($this, \'__load\', []); } /** @@ -263,12 +263,12 @@ class extends \ implements \)', $this->proxyClassTemplate, $placeholderMatches); $placeholderMatches = array_combine($placeholderMatches[0], $placeholderMatches[1]); - $placeholders = array(); + $placeholders = []; foreach ($placeholderMatches as $placeholder => $name) { $placeholders[$placeholder] = isset($this->placeholders[$name]) ? $this->placeholders[$name] - : array($this, 'generate' . $name); + : [$this, 'generate' . $name]; } foreach ($placeholders as & $placeholder) { @@ -302,7 +302,7 @@ class extends \ implements \ extends \ implements \getLazyLoadedPublicProperties($class); - $values = array(); + $values = []; foreach ($lazyPublicProperties as $key => $value) { $values[] = var_export($key, true) . ' => ' . var_export($value, true); @@ -385,7 +385,7 @@ class extends \ implements \getLazyLoadedPublicProperties($class) as $lazyPublicProperty => $unused) { $toUnset[] = '$this->' . $lazyPublicProperty; @@ -443,7 +443,7 @@ EOT; if ( ! empty($lazyPublicProperties)) { $magicGet .= <<<'EOT' if (array_key_exists($name, $this->__getLazyProperties())) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', array($name)); + $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); return $this->$name; } @@ -454,7 +454,7 @@ EOT; if ($hasParentGet) { $magicGet .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', array($name)); + $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); return parent::__get($name); @@ -502,7 +502,7 @@ EOT; if ( ! empty($lazyPublicProperties)) { $magicSet .= <<<'EOT' if (array_key_exists($name, $this->__getLazyProperties())) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', array($name, $value)); + $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); $this->$name = $value; @@ -515,7 +515,7 @@ EOT; if ($hasParentSet) { $magicSet .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', array($name, $value)); + $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); return parent::__set($name, $value); EOT; @@ -559,7 +559,7 @@ EOT; if ( ! empty($lazyPublicProperties)) { $magicIsset .= <<<'EOT' if (array_key_exists($name, $this->__getLazyProperties())) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', array($name)); + $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); return isset($this->$name); } @@ -570,7 +570,7 @@ EOT; if ($hasParentIsset) { $magicIsset .= <<<'EOT' - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', array($name)); + $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); return parent::__isset($name); @@ -605,7 +605,7 @@ EOT; if ($hasParentSleep) { return $sleepImpl . <<<'EOT' - $properties = array_merge(array('__isInitialized__'), parent::__sleep()); + $properties = array_merge(['__isInitialized__'], parent::__sleep()); if ($this->__isInitialized__) { $properties = array_diff($properties, array_keys($this->__getLazyProperties())); @@ -616,7 +616,7 @@ EOT; EOT; } - $allProperties = array('__isInitialized__'); + $allProperties = ['__isInitialized__']; /* @var $prop \ReflectionProperty */ foreach ($class->getReflectionClass()->getProperties() as $prop) { @@ -645,10 +645,10 @@ EOT; return $sleepImpl . <<__isInitialized__) { - return array($allProperties); + return [$allProperties]; } - return array($protectedProperties); + return [$protectedProperties]; } EOT; } @@ -662,7 +662,7 @@ EOT; */ private function generateWakeupImpl(ClassMetadata $class) { - $unsetPublicProperties = array(); + $unsetPublicProperties = []; $hasWakeup = $class->getReflectionClass()->hasMethod('__wakeup'); foreach (array_keys($this->getLazyLoadedPublicProperties($class)) as $lazyPublicProperty) { @@ -727,7 +727,7 @@ EOT; */ public function __clone() { - \$this->__cloner__ && \$this->__cloner__->__invoke(\$this, '__clone', array()); + \$this->__cloner__ && \$this->__cloner__->__invoke(\$this, '__clone', []); $callParentClone } EOT; } @@ -742,16 +742,16 @@ EOT; private function generateMethods(ClassMetadata $class) { $methods = ''; - $methodNames = array(); + $methodNames = []; $reflectionMethods = $class->getReflectionClass()->getMethods(\ReflectionMethod::IS_PUBLIC); - $skippedMethods = array( + $skippedMethods = [ '__sleep' => true, '__clone' => true, '__wakeup' => true, '__get' => true, '__set' => true, '__isset' => true, - ); + ]; foreach ($reflectionMethods as $method) { $name = $method->getName(); @@ -778,12 +778,13 @@ EOT; } $methods .= $name . '(' . $this->buildParametersString($class, $method, $method->getParameters()) . ')'; + $methods .= $this->getMethodReturnType($method); $methods .= "\n" . ' {' . "\n"; if ($this->isShortIdentifierGetter($method, $class)) { $identifier = lcfirst(substr($name, 3)); $fieldType = $class->getTypeOfField($identifier); - $cast = in_array($fieldType, array('integer', 'smallint')) ? '(int) ' : ''; + $cast = in_array($fieldType, ['integer', 'smallint']) ? '(int) ' : ''; $methods .= ' if ($this->__isInitialized__ === false) {' . "\n"; $methods .= ' return ' . $cast . ' parent::' . $method->getName() . "();\n"; @@ -795,7 +796,7 @@ EOT; $methods .= "\n \$this->__initializer__ " . "&& \$this->__initializer__->__invoke(\$this, " . var_export($name, true) - . ", array(" . $invokeParamsString . "));" + . ", [" . $invokeParamsString . "]);" . "\n\n return parent::" . $name . '(' . $callParamsString . ');' . "\n" . ' }' . "\n"; } @@ -872,7 +873,7 @@ EOT; private function getLazyLoadedPublicProperties(ClassMetadata $class) { $defaultProperties = $class->getReflectionClass()->getDefaultProperties(); - $properties = array(); + $properties = []; foreach ($class->getReflectionClass()->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { $name = $property->getName(); @@ -894,7 +895,7 @@ EOT; */ private function buildParametersString(ClassMetadata $class, \ReflectionMethod $method, array $parameters) { - $parameterDefinitions = array(); + $parameterDefinitions = []; /* @var $param \ReflectionParameter */ foreach ($parameters as $param) { @@ -908,10 +909,8 @@ EOT; $parameterDefinition .= '&'; } - if (method_exists($param, 'isVariadic')) { - if ($param->isVariadic()) { - $parameterDefinition .= '...'; - } + if (method_exists($param, 'isVariadic') && $param->isVariadic()) { + $parameterDefinition .= '...'; } $parameters[] = '$' . $param->getName(); @@ -942,10 +941,14 @@ EOT; return 'array'; } - if (method_exists($parameter, 'isCallable') && $parameter->isCallable()) { + if ($parameter->isCallable()) { return 'callable'; } + if (method_exists($parameter, 'hasType') && $parameter->hasType() && $parameter->getType()->isBuiltin()) { + return (string) $parameter->getType(); + } + try { $parameterClass = $parameter->getClass(); @@ -990,10 +993,8 @@ EOT; function (\ReflectionParameter $parameter) { $name = ''; - if (method_exists($parameter, 'isVariadic')) { - if ($parameter->isVariadic()) { - $name .= '...'; - } + if (method_exists($parameter, 'isVariadic') && $parameter->isVariadic()) { + $name .= '...'; } $name .= '$' . $parameter->getName(); @@ -1003,4 +1004,34 @@ EOT; $parameters ); } + + /** + * @Param \ReflectionMethod $method + * + * @return string + */ + private function getMethodReturnType(\ReflectionMethod $method) + { + if (! (method_exists($method, 'hasReturnType') && $method->hasReturnType())) { + return ''; + } + + $returnType = $method->getReturnType(); + + if ($returnType->isBuiltin()) { + return ': ' . $returnType; + } + + $nameLower = strtolower((string) $returnType); + + if ('self' === $nameLower) { + return ': \\' . $method->getDeclaringClass()->getName(); + } + + if ('parent' === $nameLower) { + return ': \\' . $method->getDeclaringClass()->getParentClass()->getName(); + } + + return ': \\' . (string) $returnType; + } } diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php index b65979add..2d0f5b007 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php @@ -402,7 +402,7 @@ class StaticReflectionClass extends ReflectionClass /** * {@inheritDoc} */ - public function newInstanceArgs(array $args = array()) + public function newInstanceArgs(array $args = []) { throw new ReflectionException('Method not implemented'); } diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php index 922404d98..c48e9ba73 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionParser.php @@ -69,18 +69,18 @@ class StaticReflectionParser implements ReflectionProviderInterface * * @var array */ - protected $useStatements = array(); + protected $useStatements = []; /** * The docComment of the class. * * @var string */ - protected $docComment = array( + protected $docComment = [ 'class' => '', - 'property' => array(), - 'method' => array() - ); + 'property' => [], + 'method' => [] + ]; /** * The name of the class this class extends, if any. diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php index 79b40d4a0..7f6522bba 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionProperty.php @@ -91,7 +91,7 @@ class StaticReflectionProperty extends ReflectionProperty /** * {@inheritDoc} */ - public static function export ($class, $name, $return = false) + public static function export($class, $name, $return = false) { throw new ReflectionException('Method not implemented'); } @@ -155,7 +155,7 @@ class StaticReflectionProperty extends ReflectionProperty /** * {@inheritDoc} */ - public function setAccessible ($accessible) + public function setAccessible($accessible) { throw new ReflectionException('Method not implemented'); } @@ -163,7 +163,7 @@ class StaticReflectionProperty extends ReflectionProperty /** * {@inheritDoc} */ - public function setValue ($object, $value = null) + public function setValue($object, $value = null) { throw new ReflectionException('Method not implemented'); } diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php index 0959ce5d5..7f675328f 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php @@ -19,6 +19,7 @@ namespace Doctrine\Common\Util; +use Doctrine\Common\Collections\Collection; use Doctrine\Common\Persistence\Proxy; /** @@ -95,13 +96,13 @@ final class Debug $return = null; $isObj = is_object($var); - if ($isObj && in_array('Doctrine\Common\Collections\Collection', class_implements($var))) { + if ($var instanceof Collection) { $var = $var->toArray(); } if ($maxDepth) { if (is_array($var)) { - $return = array(); + $return = []; foreach ($var as $k => $v) { $return[$k] = self::export($v, $maxDepth - 1); diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Version.php b/vendor/doctrine/common/lib/Doctrine/Common/Version.php index 80c1fbf76..872f169ac 100644 --- a/vendor/doctrine/common/lib/Doctrine/Common/Version.php +++ b/vendor/doctrine/common/lib/Doctrine/Common/Version.php @@ -34,7 +34,7 @@ class Version /** * Current Doctrine Version. */ - const VERSION = '2.6.0-DEV'; + const VERSION = '2.6.2-DEV'; /** * Compares a Doctrine version with the current one. diff --git a/vendor/doctrine/inflector/.travis.yml b/vendor/doctrine/inflector/.travis.yml index 6b1d8ffd8..9ec68f765 100644 --- a/vendor/doctrine/inflector/.travis.yml +++ b/vendor/doctrine/inflector/.travis.yml @@ -1,11 +1,21 @@ language: php +sudo: false + +cache: + directory: + - $HOME/.composer/cache + php: - 5.3 - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm install: - - composer --prefer-source install + - composer install -n + +script: + - phpunit diff --git a/vendor/doctrine/inflector/LICENSE b/vendor/doctrine/inflector/LICENSE index 5e781fce4..8c38cc1bc 100644 --- a/vendor/doctrine/inflector/LICENSE +++ b/vendor/doctrine/inflector/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2013 Doctrine Project +Copyright (c) 2006-2015 Doctrine Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/vendor/doctrine/inflector/composer.json b/vendor/doctrine/inflector/composer.json index a29c68cfb..7e5b2efbf 100644 --- a/vendor/doctrine/inflector/composer.json +++ b/vendor/doctrine/inflector/composer.json @@ -23,7 +23,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } } } diff --git a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php index b007b2179..a53828aba 100644 --- a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php +++ b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -56,11 +56,12 @@ class Inflector '/(p)erson$/i' => '\1eople', '/(m)an$/i' => '\1en', '/(c)hild$/i' => '\1hildren', - '/(buffal|tomat)o$/i' => '\1\2oes', + '/(f)oot$/i' => '\1eet', + '/(buffal|her|potat|tomat|volcan)o$/i' => '\1\2oes', '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i', '/us$/i' => 'uses', '/(alias)$/i' => '\1es', - '/(ax|cris|test)is$/i' => '\1es', + '/(analys|ax|cris|test|thes)is$/i' => '\1es', '/s$/' => 's', '/^$/' => '', '/$/' => 's', @@ -70,27 +71,42 @@ class Inflector ), 'irregular' => array( 'atlas' => 'atlases', + 'axe' => 'axes', 'beef' => 'beefs', 'brother' => 'brothers', 'cafe' => 'cafes', + 'chateau' => 'chateaux', 'child' => 'children', 'cookie' => 'cookies', 'corpus' => 'corpuses', 'cow' => 'cows', - 'criteria' => 'criterion', + 'criterion' => 'criteria', + 'curriculum' => 'curricula', + 'demo' => 'demos', + 'domino' => 'dominoes', + 'echo' => 'echoes', + 'foot' => 'feet', + 'fungus' => 'fungi', 'ganglion' => 'ganglions', 'genie' => 'genies', 'genus' => 'genera', 'graffito' => 'graffiti', + 'hippopotamus' => 'hippopotami', 'hoof' => 'hoofs', 'human' => 'humans', + 'iris' => 'irises', + 'leaf' => 'leaves', 'loaf' => 'loaves', 'man' => 'men', + 'medium' => 'media', + 'memorandum' => 'memoranda', 'money' => 'monies', 'mongoose' => 'mongooses', + 'motto' => 'mottoes', 'move' => 'moves', 'mythos' => 'mythoi', 'niche' => 'niches', + 'nucleus' => 'nuclei', 'numen' => 'numina', 'occiput' => 'occiputs', 'octopus' => 'octopuses', @@ -98,11 +114,19 @@ class Inflector 'ox' => 'oxen', 'penis' => 'penises', 'person' => 'people', + 'plateau' => 'plateaux', + 'runner-up' => 'runners-up', 'sex' => 'sexes', 'soliloquy' => 'soliloquies', + 'son-in-law' => 'sons-in-law', + 'syllabus' => 'syllabi', 'testis' => 'testes', + 'thief' => 'thieves', + 'tooth' => 'teeth', + 'tornado' => 'tornadoes', 'trilby' => 'trilbys', 'turf' => 'turfs', + 'volcano' => 'volcanoes', ) ); @@ -120,9 +144,10 @@ class Inflector '/(vert|ind)ices$/i' => '\1ex', '/^(ox)en/i' => '\1', '/(alias)(es)*$/i' => '\1', + '/(buffal|her|potat|tomat|volcan)oes$/i' => '\1o', '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us', '/([ftw]ax)es/i' => '\1', - '/(cris|ax|test)es$/i' => '\1is', + '/(analys|ax|cris|test|thes)es$/i' => '\1is', '/(shoe|slave)s$/i' => '\1', '/(o)es$/i' => '\1', '/ouses$/' => 'ouse', @@ -143,6 +168,7 @@ class Inflector '/(p)eople$/i' => '\1\2erson', '/(m)en$/i' => '\1an', '/(c)hildren$/i' => '\1\2hild', + '/(f)eet$/i' => '\1oot', '/(n)ews$/i' => '\1\2ews', '/eaus$/' => 'eau', '/^(.*us)$/' => '\\1', @@ -159,10 +185,15 @@ class Inflector '.*ss', ), 'irregular' => array( - 'criterion' => 'criteria', - 'curves' => 'curve', - 'foes' => 'foe', - 'waves' => 'wave', + 'criteria' => 'criterion', + 'curves' => 'curve', + 'emphases' => 'emphasis', + 'foes' => 'foe', + 'hoaxes' => 'hoax', + 'media' => 'medium', + 'neuroses' => 'neurosis', + 'waves' => 'wave', + 'oases' => 'oasis', ) ); @@ -236,6 +267,42 @@ class Inflector return lcfirst(self::classify($word)); } + /** + * Uppercases words with configurable delimeters between words. + * + * Takes a string and capitalizes all of the words, like PHP's built-in + * ucwords function. This extends that behavior, however, by allowing the + * word delimeters to be configured, rather than only separating on + * whitespace. + * + * Here is an example: + * + * + * + * + * @param string $string The string to operate on. + * @param string $delimiters A list of word separators. + * + * @return string The string with all delimeter-separated words capitalized. + */ + public static function ucwords($string, $delimiters = " \n\t\r\0\x0B-") + { + return preg_replace_callback( + '/[^' . preg_quote($delimiters, '/') . ']+/', + function($matches) { + return ucfirst($matches[0]); + }, + $string + ); + } + /** * Clears Inflectors inflected value caches, and resets the inflection * rules to the initial values. diff --git a/vendor/egulias/email-validator/.travis.yml b/vendor/egulias/email-validator/.travis.yml index f25de0fb8..86d52b23e 100644 --- a/vendor/egulias/email-validator/.travis.yml +++ b/vendor/egulias/email-validator/.travis.yml @@ -12,15 +12,17 @@ php: env: global: - - deps=no + - deps=high matrix: fast_finish: true include: - php: 5.3 env: deps=low - - php: 5.6 - env: deps=high + - php: 5.4 + env: deps=no + - php: 5.5 + env: deps=no install: - if [ "$deps" = "no" ]; then composer install; fi @@ -31,6 +33,3 @@ script: - mkdir -p build/logs - phpunit --coverage-clover build/logs/clover.xml -after_script: - - php vendor/bin/coveralls - diff --git a/vendor/egulias/email-validator/README.md b/vendor/egulias/email-validator/README.md index 262693bf7..0d0c5cc06 100644 --- a/vendor/egulias/email-validator/README.md +++ b/vendor/egulias/email-validator/README.md @@ -9,7 +9,7 @@ With the help of Run the command below to install via Composer ```shell -composer require egulias/email-validator +composer require egulias/email-validator "~1.2" ``` ##Usage## diff --git a/vendor/egulias/email-validator/composer.json b/vendor/egulias/email-validator/composer.json index 1ccb77a14..6fdc4d0b9 100644 --- a/vendor/egulias/email-validator/composer.json +++ b/vendor/egulias/email-validator/composer.json @@ -15,11 +15,10 @@ }, "require": { "php": ">= 5.3.3", - "doctrine/lexer": "~1.0,>=1.0.1" + "doctrine/lexer": "^1.0.1" }, "require-dev" : { - "satooshi/php-coveralls": "dev-master", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^4.8.24" }, "autoload": { "psr-0": { diff --git a/vendor/egulias/email-validator/composer.lock b/vendor/egulias/email-validator/composer.lock index 49f7df867..cbd6ba2ea 100644 --- a/vendor/egulias/email-validator/composer.lock +++ b/vendor/egulias/email-validator/composer.lock @@ -1,10 +1,11 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "9426f5a00cf0f71d83c287a7c0ff392b", + "hash": "aeeae19ffaaf639f5ad6edac2f979b28", + "content-hash": "61ce0ff395bacaa79d3f6e1216e23e4b", "packages": [ { "name": "doctrine/lexer", @@ -63,28 +64,83 @@ ], "packages-dev": [ { - "name": "doctrine/instantiator", - "version": "1.0.5", + "name": "dflydev/markdown", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "url": "https://github.com/dflydev/dflydev-markdown.git", + "reference": "76501a808522dbe40a5a71d272bd08d54cbae03d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/dflydev/dflydev-markdown/zipball/76501a808522dbe40a5a71d272bd08d54cbae03d", + "reference": "76501a808522dbe40a5a71d272bd08d54cbae03d", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": ">=5.3" + }, + "type": "library", + "autoload": { + "psr-0": { + "dflydev\\markdown": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "New BSD License" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Michel Fortin", + "homepage": "http://michelf.com" + }, + { + "name": "John Gruber", + "homepage": "http://daringfireball.net" + } + ], + "description": "PHP Markdown & Extra", + "homepage": "http://github.com/dflydev/dflydev-markdown", + "keywords": [ + "markdown" + ], + "abandoned": "michelf/php-markdown", + "time": "2012-01-02 23:11:32" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "26404e0c90565b614ee76b988b9bc8790d77f590" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/26404e0c90565b614ee76b988b9bc8790d77f590", + "reference": "26404e0c90565b614ee76b988b9bc8790d77f590", + "shasum": "" + }, + "require": { + "php": "~5.3" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "squizlabs/php_codesniffer": "2.0.*@ALPHA" }, "type": "library", "extra": { @@ -93,8 +149,8 @@ } }, "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + "psr-0": { + "Doctrine\\Instantiator\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -114,126 +170,28 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "guzzle/guzzle", - "version": "v3.9.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" - }, - "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.9-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2015-03-18 18:23:50" + "time": "2014-08-25 15:09:25" }, { "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "reference": "66ae84e9d7c8ea85c979cb65977bd8e608baf0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66ae84e9d7c8ea85c979cb65977bd8e608baf0c5", + "reference": "66ae84e9d7c8ea85c979cb65977bd8e608baf0c5", "shasum": "" }, "require": { + "dflydev/markdown": "1.0.*", "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "phpunit/phpunit": "3.7.*@stable" }, "type": "library", "extra": { @@ -258,26 +216,25 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2015-02-03 12:10:50" + "time": "2013-08-07 11:04:22" }, { "name": "phpspec/prophecy", - "version": "v1.4.1", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373" + "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/9ca52329bcdd1500de24427542577ebf3fc2f1c9", + "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "doctrine/instantiator": "~1.0,>=1.0.2", + "phpdocumentor/reflection-docblock": "~2.0" }, "require-dev": { "phpspec/phpspec": "~2.0" @@ -285,7 +242,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -309,7 +266,7 @@ } ], "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "homepage": "http://phpspec.org", "keywords": [ "Double", "Dummy", @@ -318,20 +275,20 @@ "spy", "stub" ], - "time": "2015-04-27 22:15:08" + "time": "2014-11-17 16:23:49" }, { "name": "phpunit/php-code-coverage", - "version": "2.1.6", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "631e365cf26bb2c078683e8d9bcf8bc631ac4d44" + "reference": "ba315f46873fd6e86fdb98685a1a900e7379c886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/631e365cf26bb2c078683e8d9bcf8bc631ac4d44", - "reference": "631e365cf26bb2c078683e8d9bcf8bc631ac4d44", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ba315f46873fd6e86fdb98685a1a900e7379c886", + "reference": "ba315f46873fd6e86fdb98685a1a900e7379c886", "shasum": "" }, "require": { @@ -380,7 +337,7 @@ "testing", "xunit" ], - "time": "2015-06-19 07:11:55" + "time": "2015-05-30 12:58:40" }, { "name": "phpunit/php-file-iterator", @@ -431,16 +388,16 @@ }, { "name": "phpunit/php-text-template", - "version": "1.2.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", "shasum": "" }, "require": { @@ -449,17 +406,20 @@ "type": "library", "autoload": { "classmap": [ - "src/" + "Text/" ] }, "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", + "email": "sb@sebastian-bergmann.de", "role": "lead" } ], @@ -468,7 +428,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2014-01-30 17:20:04" }, { "name": "phpunit/php-timer", @@ -513,16 +473,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.3", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9" + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/7a9b0969488c3c54fd62b4d504b3ec758fd005d9", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", "shasum": "" }, "require": { @@ -535,7 +495,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -558,20 +518,20 @@ "keywords": [ "tokenizer" ], - "time": "2015-06-19 03:43:16" + "time": "2014-08-31 06:12:13" }, { "name": "phpunit/phpunit", - "version": "4.7.5", + "version": "4.8.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f6701ef3faea759acd1910a7751d8d102a7fd5bc" + "reference": "a1066c562c52900a142a0e2bbf0582994671385e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f6701ef3faea759acd1910a7751d8d102a7fd5bc", - "reference": "f6701ef3faea759acd1910a7751d8d102a7fd5bc", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1066c562c52900a142a0e2bbf0582994671385e", + "reference": "a1066c562c52900a142a0e2bbf0582994671385e", "shasum": "" }, "require": { @@ -581,7 +541,7 @@ "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", + "phpspec/prophecy": "^1.3.1", "phpunit/php-code-coverage": "~2.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", @@ -589,7 +549,7 @@ "phpunit/phpunit-mock-objects": "~2.3", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", - "sebastian/environment": "~1.2", + "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", "sebastian/version": "~1.0", @@ -604,7 +564,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.7.x-dev" + "dev-master": "4.8.x-dev" } }, "autoload": { @@ -630,29 +590,29 @@ "testing", "xunit" ], - "time": "2015-06-21 07:23:36" + "time": "2016-03-14 06:16:08" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.4", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "92408bb1968a81b3217a6fdf6c1a198da83caa35" + "reference": "c63d2367247365f688544f0d500af90a11a44c65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/92408bb1968a81b3217a6fdf6c1a198da83caa35", - "reference": "92408bb1968a81b3217a6fdf6c1a198da83caa35", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65", + "reference": "c63d2367247365f688544f0d500af90a11a44c65", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", + "doctrine/instantiator": "~1.0,>=1.0.1", "php": ">=5.3.3", "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~4.3" }, "suggest": { "ext-soap": "*" @@ -685,142 +645,29 @@ "mock", "xunit" ], - "time": "2015-06-11 15:55:48" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "satooshi/php-coveralls", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/satooshi/php-coveralls.git", - "reference": "2fbf803803d179ab1082807308a67bbd5a760c70" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/2fbf803803d179ab1082807308a67bbd5a760c70", - "reference": "2fbf803803d179ab1082807308a67bbd5a760c70", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzle/guzzle": ">=2.7", - "php": ">=5.3", - "psr/log": "1.0.0", - "symfony/config": ">=2.0", - "symfony/console": ">=2.0", - "symfony/stopwatch": ">=2.2", - "symfony/yaml": ">=2.0" - }, - "require-dev": { - "apigen/apigen": "2.8.*@stable", - "pdepend/pdepend": "dev-master as 2.0.0", - "phpmd/phpmd": "dev-master", - "phpunit/php-invoker": ">=1.1.0,<1.2.0", - "phpunit/phpunit": "3.7.*@stable", - "sebastian/finder-facade": "dev-master", - "sebastian/phpcpd": "1.4.*@stable", - "squizlabs/php_codesniffer": "1.4.*@stable", - "theseer/fdomdocument": "dev-master" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "composer/bin/coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.7-dev" - } - }, - "autoload": { - "psr-0": { - "Satooshi\\Component": "src/", - "Satooshi\\Bundle": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/satooshi/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2014-11-11 15:35:34" + "time": "2014-10-03 05:12:11" }, { "name": "sebastian/comparator", - "version": "1.1.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" + "reference": "c484a80f97573ab934e37826dba0135a3301b26a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c484a80f97573ab934e37826dba0135a3301b26a", + "reference": "c484a80f97573ab934e37826dba0135a3301b26a", "shasum": "" }, "require": { "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/diff": "~1.1", + "sebastian/exporter": "~1.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~4.1" }, "type": "library", "extra": { @@ -862,20 +709,20 @@ "compare", "equality" ], - "time": "2015-01-29 16:28:08" + "time": "2014-11-16 21:32:38" }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "5843509fed39dee4b356a306401e9dd1a931fec7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7", + "reference": "5843509fed39dee4b356a306401e9dd1a931fec7", "shasum": "" }, "require": { @@ -887,7 +734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -914,20 +761,20 @@ "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2014-08-15 10:29:00" }, { "name": "sebastian/environment", - "version": "1.2.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" + "reference": "4fe0a44cddd8cc19583a024bdc7374eb2fef0b87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4fe0a44cddd8cc19583a024bdc7374eb2fef0b87", + "reference": "4fe0a44cddd8cc19583a024bdc7374eb2fef0b87", "shasum": "" }, "require": { @@ -964,7 +811,7 @@ "environment", "hhvm" ], - "time": "2015-01-01 10:01:08" + "time": "2015-07-26 06:42:57" }, { "name": "sebastian/exporter", @@ -1138,16 +985,16 @@ }, { "name": "sebastian/version", - "version": "1.0.6", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "reference": "16b021aed448b654ae05846e394e057e9a6f04cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/16b021aed448b654ae05846e394e057e9a6f04cb", + "reference": "16b021aed448b654ae05846e394e057e9a6f04cb", "shasum": "" }, "type": "library", @@ -1169,300 +1016,35 @@ ], "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" - }, - { - "name": "symfony/config", - "version": "v2.7.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "58ded81f1f582a87c528ef3dae9a859f78b5f374" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/58ded81f1f582a87c528ef3dae9a859f78b5f374", - "reference": "58ded81f1f582a87c528ef3dae9a859f78b5f374", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "symfony/filesystem": "~2.3" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2015-06-11 14:06:56" - }, - { - "name": "symfony/console", - "version": "v2.7.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "564398bc1f33faf92fc2ec86859983d30eb81806" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/564398bc1f33faf92fc2ec86859983d30eb81806", - "reference": "564398bc1f33faf92fc2ec86859983d30eb81806", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2015-06-10 15:30:22" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.7.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "be3c5ff8d503c46768aeb78ce6333051aa6f26d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/be3c5ff8d503c46768aeb78ce6333051aa6f26d9", - "reference": "be3c5ff8d503c46768aeb78ce6333051aa6f26d9", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.3" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2015-06-08 09:37:21" - }, - { - "name": "symfony/filesystem", - "version": "v2.7.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "a0d43eb3e17d4f4c6990289805a488a0482a07f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a0d43eb3e17d4f4c6990289805a488a0482a07f3", - "reference": "a0d43eb3e17d4f4c6990289805a488a0482a07f3", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2015-06-08 09:37:21" - }, - { - "name": "symfony/stopwatch", - "version": "v2.7.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/Stopwatch.git", - "reference": "c653f1985f6c2b7dbffd04d48b9c0a96aaef814b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/c653f1985f6c2b7dbffd04d48b9c0a96aaef814b", - "reference": "c653f1985f6c2b7dbffd04d48b9c0a96aaef814b", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2015-06-04 20:11:48" + "time": "2013-01-05 14:27:32" }, { "name": "symfony/yaml", - "version": "v2.7.1", + "version": "v2.1.0", + "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "9808e75c609a14f6db02f70fccf4ca4aab53c160" + "url": "https://github.com/symfony/yaml.git", + "reference": "f18e004fc975707bb4695df1dbbe9b0d8c8b7715" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/9808e75c609a14f6db02f70fccf4ca4aab53c160", - "reference": "9808e75c609a14f6db02f70fccf4ca4aab53c160", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f18e004fc975707bb4695df1dbbe9b0d8c8b7715", + "reference": "f18e004fc975707bb4695df1dbbe9b0d8c8b7715", "shasum": "" }, "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.1-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "psr-0": { + "Symfony\\Component\\Yaml": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1471,26 +1053,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-06-10 15:30:22" + "homepage": "http://symfony.com", + "time": "2012-08-22 13:48:41" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "satooshi/php-coveralls": 20 - }, + "stability-flags": [], "prefer-stable": false, - "prefer-lowest": false, + "prefer-lowest": true, "platform": { "php": ">= 5.3.3" }, diff --git a/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php b/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php index d8522fff1..882c96815 100644 --- a/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php +++ b/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php @@ -67,8 +67,6 @@ class EmailLexer extends AbstractLexer "\n" => self::S_LF, "\r\n" => self::CRLF, 'IPv6' => self::S_IPV6TAG, - '<' => self::S_LOWERTHAN, - '>' => self::S_GREATERTHAN, '{' => self::S_OPENQBRACKET, '}' => self::S_CLOSEQBRACKET, '' => self::S_EMPTY, diff --git a/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php b/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php index d047decf2..69ff5fc1a 100644 --- a/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php +++ b/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidator.php @@ -7,49 +7,52 @@ namespace Egulias\EmailValidator; * * @author Eduardo Gulias Davis */ -class EmailValidator +class EmailValidator implements EmailValidatorInterface { + /** + * Critical validation errors used to indicate that + * an email address is invalid: + */ const ERR_CONSECUTIVEATS = 128; const ERR_EXPECTING_DTEXT = 129; const ERR_NOLOCALPART = 130; const ERR_NODOMAIN = 131; const ERR_CONSECUTIVEDOTS = 132; const ERR_ATEXT_AFTER_CFWS = 133; - const ERR_ATEXT_AFTER_QS = 134; - const ERR_ATEXT_AFTER_DOMLIT = 135; const ERR_EXPECTING_QPAIR = 136; const ERR_EXPECTING_ATEXT = 137; - const ERR_EXPECTING_QTEXT = 138; const ERR_EXPECTING_CTEXT = 139; - const ERR_BACKSLASHEND = 140; const ERR_DOT_START = 141; const ERR_DOT_END = 142; - const ERR_DOMAINHYPHENSTART = 143; const ERR_DOMAINHYPHENEND = 144; const ERR_UNCLOSEDQUOTEDSTR = 145; const ERR_UNCLOSEDCOMMENT = 146; - const ERR_UNCLOSEDDOMLIT = 147; const ERR_FWS_CRLF_X2 = 148; const ERR_FWS_CRLF_END = 149; const ERR_CR_NO_LF = 150; const ERR_DEPREC_REACHED = 151; + const ERR_UNOPENEDCOMMENT = 152; + const ERR_ATEXT_AFTER_QS = 134; // not in use + const ERR_ATEXT_AFTER_DOMLIT = 135; // not in use + const ERR_EXPECTING_QTEXT = 138; // not in use + const ERR_BACKSLASHEND = 140; // not in use + const ERR_DOMAINHYPHENSTART = 143; // not in use + const ERR_UNCLOSEDDOMLIT = 147; // not in use + + /** + * Informational validation warnings regarding unusual or + * deprecated features found in an email address: + */ + // Address is valid for SMTP (RFC-5321), but has unusual elements. const RFC5321_TLD = 9; - const RFC5321_TLDNUMERIC = 10; const RFC5321_QUOTEDSTRING = 11; const RFC5321_ADDRESSLITERAL = 12; const RFC5321_IPV6DEPRECATED = 13; - const CFWS_COMMENT = 17; - const CFWS_FWS = 18; - const DEPREC_LOCALPART = 33; - const DEPREC_FWS = 34; - const DEPREC_QTEXT = 35; - const DEPREC_QP = 36; - const DEPREC_COMMENT = 37; - const DEPREC_CTEXT = 38; - const DEPREC_CFWS_NEAR_AT = 49; + const RFC5321_TLDNUMERIC = 10; // not in use + // Address is only valid according to the broad + // definition of RFC-5322. It is otherwise invalid. const RFC5322_LOCAL_TOOLONG = 64; const RFC5322_LABEL_TOOLONG = 63; - const RFC5322_DOMAIN = 65; const RFC5322_TOOLONG = 66; const RFC5322_DOMAIN_TOOLONG = 255; const RFC5322_DOMAINLITERAL = 70; @@ -60,12 +63,48 @@ class EmailValidator const RFC5322_IPV6_MAXGRPS = 75; const RFC5322_IPV6_COLONSTRT = 76; const RFC5322_IPV6_COLONEND = 77; + const RFC5322_DOMAIN = 65; // not in use + // Address contains deprecated elements, but may + // still be valid in restricted contexts. + const DEPREC_QP = 36; + const DEPREC_COMMENT = 37; + const DEPREC_CFWS_NEAR_AT = 49; + const DEPREC_LOCALPART = 33; // not in use + const DEPREC_FWS = 34; // not in use + const DEPREC_QTEXT = 35; // not in use + const DEPREC_CTEXT = 38; // not in use + // Address is valid within the message, + // but cannot be used unmodified in the envelope. + const CFWS_COMMENT = 17; + const CFWS_FWS = 18; + // Hostname DNS checks were unsuccessful. const DNSWARN_NO_MX_RECORD = 5; const DNSWARN_NO_RECORD = 6; + /** + * @var EmailParser + */ protected $parser; + + /** + * Contains any informational warnings regarding unusual/deprecated + * features that were encountered during validation. + * + * @var array + */ protected $warnings = array(); + + /** + * If a critical validation problem is encountered, this will be + * set to the value of one of this class's ERR_* constants. + * + * @var int + */ protected $error; + + /** + * @var int + */ protected $threshold = 255; public function __construct() @@ -73,6 +112,9 @@ class EmailValidator $this->parser = new EmailParser(new EmailLexer()); } + /** + * {@inheritdoc} + */ public function isValid($email, $checkDNS = false, $strict = false) { try { @@ -84,22 +126,18 @@ class EmailValidator return false; } - $dns = true; - if ($checkDNS) { - $dns = $this->checkDNS(); - } + $dnsProblemExists = ($checkDNS ? !$this->checkDNS() : false); if ($this->hasWarnings() && ((int) max($this->warnings) > $this->threshold)) { $this->error = self::ERR_DEPREC_REACHED; - return false; } - return !$strict || (!$this->hasWarnings() && $dns); + return ($strict ? (!$this->hasWarnings() && !$dnsProblemExists) : true); } /** - * @return boolean + * {@inheritdoc} */ public function hasWarnings() { @@ -107,7 +145,7 @@ class EmailValidator } /** - * @return array + * {@inheritdoc} */ public function getWarnings() { @@ -115,7 +153,7 @@ class EmailValidator } /** - * @return string + * {@inheritdoc} */ public function getError() { @@ -123,9 +161,7 @@ class EmailValidator } /** - * @param int $threshold - * - * @return EmailValidator + * {@inheritdoc} */ public function setThreshold($threshold) { @@ -135,26 +171,30 @@ class EmailValidator } /** - * @return int + * {@inheritdoc} */ public function getThreshold() { return $this->threshold; } + /** + * @return bool Whether or not an MX record exists for the + * email address's host name. + */ protected function checkDNS() { - $checked = true; + $host = $this->parser->getParsedDomainPart(); + $host = rtrim($host, '.') . '.'; - $result = checkdnsrr(trim($this->parser->getParsedDomainPart()), 'MX'); + $mxRecordExists = checkdnsrr($host, 'MX'); - if (!$result) { + if (!$mxRecordExists) { $this->warnings[] = self::DNSWARN_NO_RECORD; - $checked = false; $this->addTLDWarnings(); } - return $checked; + return $mxRecordExists; } protected function addTLDWarnings() diff --git a/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidatorInterface.php b/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidatorInterface.php new file mode 100644 index 000000000..7ac54f930 --- /dev/null +++ b/vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailValidatorInterface.php @@ -0,0 +1,62 @@ + + */ +interface EmailValidatorInterface +{ + /** + * Validates an email address against the following standards: + * + * RFC-5321: Simple Mail Transfer Protocol + * RFC-5322: Internet Message Format + * RFC-6530: Overview and Framework for Internationalized Email + * RFC-6531: SMTP Extension for Internationalized Email + * RFC-6532: Internationalized Email Headers + * RFC-1123 section 2.1: Requirements for Internet Hosts -- Application and Support + * RFC-4291 section 2.2: IP Version 6 Addressing Architecture + * + * @param string $email The email address to validate. + * @param bool $checkDNS Whether or not the email address's hostname should + * be confirmed with a DNS lookup. This only comes + * into play if strict mode is also enabled. + * @param bool $strict If this is true, and any informational warnings + * were raised during validation, the email address + * will be considered invalid. Additionally, if + * $checkDNS is true and the DNS lookup failed, + * the email address will be considered invalid. + * @return bool + */ + public function isValid($email, $checkDNS = false, $strict = false); + + /** + * @return bool + */ + public function hasWarnings(); + + /** + * @return array + */ + public function getWarnings(); + + /** + * @return string + */ + public function getError(); + + /** + * @param int $threshold The acceptable number of deprecation warnings. + * + * @return EmailValidator + */ + public function setThreshold($threshold); + + /** + * @return int + */ + public function getThreshold(); +} diff --git a/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php b/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php index c4d0cf602..66a51fb4f 100644 --- a/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php +++ b/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php @@ -4,7 +4,6 @@ namespace Egulias\EmailValidator\Parser; use Egulias\EmailValidator\EmailLexer; -use Egulias\EmailValidator\Parser\Parser; use Egulias\EmailValidator\EmailValidator; class DomainPart extends Parser @@ -103,23 +102,34 @@ class DomainPart extends Parser protected function doParseDomainPart() { $domain = ''; + $openedParenthesis = 0; + $openBrackets = false; do { - $prev = $this->lexer->getPrevious(); - if ($this->lexer->token['type'] === EmailLexer::S_SLASH) { - throw new \InvalidArgumentException('ERR_DOMAIN_CHAR_NOT_ALLOWED'); - } + $this->checkNotAllowedChars($this->lexer->token); if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { $this->parseComments(); + $openedParenthesis += $this->getOpenedParenthesis(); $this->lexer->moveNext(); + $tmpPrev = $this->lexer->getPrevious(); + if ($tmpPrev['type'] === EmailLexer::S_CLOSEPARENTHESIS) { + $openedParenthesis--; + } + } + if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { + if ($openedParenthesis === 0) { + throw new \InvalidArgumentException('ERR_UNOPENEDCOMMENT'); + } else { + $openedParenthesis--; + } } $this->checkConsecutiveDots(); $this->checkDomainPartExceptions($prev); - if ($this->hasBrackets()) { + if ($openBrackets = $this->hasBrackets($openBrackets)) { $this->parseDomainLiteral(); } @@ -136,6 +146,14 @@ class DomainPart extends Parser return $domain; } + private function checkNotAllowedChars($token) + { + $notAllowed = array(EmailLexer::S_BACKSLASH => true, EmailLexer::S_SLASH=> true); + if (isset($notAllowed[$token['type']])) { + throw new \InvalidArgumentException('ERR_DOMAIN_CHAR_NOT_ALLOWED'); + } + } + protected function parseDomainLiteral() { if ($this->lexer->isNextToken(EmailLexer::S_COLON)) { @@ -180,7 +198,7 @@ class DomainPart extends Parser } if ($this->lexer->isNextToken(EmailLexer::S_CR)) { - throw new \InvalidArgumentException("ERR_CR_NO_LF"); + throw new \InvalidArgumentException('ERR_CR_NO_LF'); } if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH) { $this->warnings[] = EmailValidator::RFC5322_DOMLIT_OBSDTEXT; @@ -276,8 +294,12 @@ class DomainPart extends Parser } } - protected function hasBrackets() + protected function hasBrackets($openBrackets) { + if ($this->lexer->token['type'] === EmailLexer::S_CLOSEBRACKET && !$openBrackets) { + throw new \InvalidArgumentException('ERR_EXPECTING_OPENBRACKET'); + } + if ($this->lexer->token['type'] !== EmailLexer::S_OPENBRACKET) { return false; } diff --git a/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/LocalPart.php b/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/LocalPart.php index 2f7716409..449748f4d 100644 --- a/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/LocalPart.php +++ b/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/LocalPart.php @@ -4,7 +4,6 @@ namespace Egulias\EmailValidator\Parser; use Egulias\EmailValidator\EmailLexer; use Egulias\EmailValidator\EmailValidator; -use \InvalidArgumentException; class LocalPart extends Parser { @@ -12,9 +11,9 @@ class LocalPart extends Parser { $parseDQuote = true; $closingQuote = false; + $openedParenthesis = 0; while ($this->lexer->token['type'] !== EmailLexer::S_AT && $this->lexer->token) { - if ($this->lexer->token['type'] === EmailLexer::S_DOT && !$this->lexer->getPrevious()) { throw new \InvalidArgumentException('ERR_DOT_START'); } @@ -26,12 +25,19 @@ class LocalPart extends Parser if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { $this->parseComments(); + $openedParenthesis += $this->getOpenedParenthesis(); + } + if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { + if ($openedParenthesis === 0) { + throw new \InvalidArgumentException('ERR_UNOPENEDCOMMENT'); + } else { + $openedParenthesis--; + } } $this->checkConsecutiveDots(); - if ( - $this->lexer->token['type'] === EmailLexer::S_DOT && + if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_AT) ) { throw new \InvalidArgumentException('ERR_DOT_END'); @@ -82,7 +88,7 @@ class LocalPart extends Parser $this->lexer->moveNext(); if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) { - throw new InvalidArgumentException("ERR_EXPECTED_ATEXT"); + throw new \InvalidArgumentException('ERR_EXPECTED_ATEXT'); } } @@ -90,12 +96,12 @@ class LocalPart extends Parser if ($prev['type'] === EmailLexer::S_BACKSLASH) { if (!$this->checkDQUOTE(false)) { - throw new \InvalidArgumentException("ERR_UNCLOSED_DQUOTE"); + throw new \InvalidArgumentException('ERR_UNCLOSED_DQUOTE'); } } if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) { - throw new \InvalidArgumentException("ERR_EXPECED_AT"); + throw new \InvalidArgumentException('ERR_EXPECED_AT'); } return $parseAgain; diff --git a/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php b/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php index b66279e29..8a72cd104 100644 --- a/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php +++ b/vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php @@ -9,6 +9,7 @@ abstract class Parser { protected $warnings = array(); protected $lexer; + protected $openedParenthesis = 0; public function __construct(EmailLexer $lexer) { @@ -20,7 +21,13 @@ abstract class Parser return $this->warnings; } - abstract function parse($str); + abstract public function parse($str); + + /** @return int */ + public function getOpenedParenthesis() + { + return $this->openedParenthesis; + } /** * validateQuotedPair @@ -35,15 +42,15 @@ abstract class Parser $this->warnings[] = EmailValidator::DEPREC_QP; } - /** - * @return string the the comment - * @throws \InvalidArgumentException - */ protected function parseComments() { + $this->openedParenthesis = 1; $this->isUnclosedComment(); $this->warnings[] = EmailValidator::CFWS_COMMENT; while (!$this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) { + if ($this->lexer->isNextToken(EmailLexer::S_OPENPARENTHESIS)) { + $this->openedParenthesis++; + } $this->warnEscaping(); $this->lexer->moveNext(); } @@ -75,11 +82,11 @@ abstract class Parser $this->checkCRLFInFWS(); if ($this->lexer->token['type'] === EmailLexer::S_CR) { - throw new \InvalidArgumentException("ERR_CR_NO_LF"); + throw new \InvalidArgumentException('ERR_CR_NO_LF'); } if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { - throw new \InvalidArgumentException("ERR_ATEXT_AFTER_CFWS"); + throw new \InvalidArgumentException('ERR_ATEXT_AFTER_CFWS'); } if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) { @@ -160,7 +167,7 @@ abstract class Parser return $hasClosingQuote; } $previous = $this->lexer->getPrevious(); - if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { + if ($previous['type'] === EmailLexer::GENERIC && $this->lexer->isNextToken(EmailLexer::GENERIC)) { throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); } @@ -181,10 +188,10 @@ abstract class Parser return; } if ($this->lexer->isNextToken(EmailLexer::CRLF)) { - throw new \InvalidArgumentException("ERR_FWS_CRLF_X2"); + throw new \InvalidArgumentException('ERR_FWS_CRLF_X2'); } if (!$this->lexer->isNextTokenAny(array(EmailLexer::S_SP, EmailLexer::S_HTAB))) { - throw new \InvalidArgumentException("ERR_FWS_CRLF_END"); + throw new \InvalidArgumentException('ERR_FWS_CRLF_END'); } } } diff --git a/vendor/guzzlehttp/guzzle/.travis.yml b/vendor/guzzlehttp/guzzle/.travis.yml index a4cd64ccd..e2f4f7021 100644 --- a/vendor/guzzlehttp/guzzle/.travis.yml +++ b/vendor/guzzlehttp/guzzle/.travis.yml @@ -6,11 +6,11 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 - hhvm before_script: - curl --version - - composer self-update - composer install --no-interaction --prefer-source --dev - ~/.nvm/nvm.sh install v0.6.14 - ~/.nvm/nvm.sh run v0.6.14 diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md index affddab49..dbce4ac8b 100644 --- a/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -1,5 +1,16 @@ # CHANGELOG +## 6.2.3 - 2017-02-28 + +* Fix deprecations with guzzle/psr7 version 1.4 + +## 6.2.2 - 2016-10-08 + +* Allow to pass nullable Response to delay callable +* Only add scheme when host is present +* Fix drain case where content-length is the literal string zero +* Obfuscate in-URL credentials in exceptions + ## 6.2.1 - 2016-07-18 * Address HTTP_PROXY security vulnerability, CVE-2016-5385: @@ -746,7 +757,7 @@ interfaces. * Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference to help with refcount based garbage collection of resources created by sending a request * Deprecating ZF1 cache and log adapters. These will be removed in the next major version. -* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it'sdeprecated). Use the +* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the HistoryPlugin for a history. * Added a `responseBody` alias for the `response_body` location * Refactored internals to no longer rely on Response::getRequest() diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md index 9e31ddcce..91d1dcc99 100644 --- a/vendor/guzzlehttp/guzzle/UPGRADING.md +++ b/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -132,7 +132,7 @@ $handler = GuzzleHttp\HandlerStack::create(); $handler->push(Middleware::mapRequest(function (RequestInterface $request) { // Notice that we have to return a request object return $request->withHeader('X-Foo', 'Bar'); -}); +})); // Inject the handler into the client $client = new GuzzleHttp\Client(['handler' => $handler]); ``` @@ -600,7 +600,7 @@ these if needed): The following plugins are not part of the core Guzzle package, but are provided in separate repositories: -- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be muchs simpler +- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler to build custom retry policies using simple functions rather than various chained classes. See: https://github.com/guzzle/retry-subscriber - `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to @@ -664,8 +664,8 @@ that contain additional metadata accessible via `getMetadata()`. The entire concept of the StreamRequestFactory has been removed. The way this was used in Guzzle 3 broke the actual interface of sending streaming requests -(instead of getting back a Response, you got a StreamInterface). Streeaming -PHP requests are now implemented throught the `GuzzleHttp\Adapter\StreamAdapter`. +(instead of getting back a Response, you got a StreamInterface). Streaming +PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. 3.6 to 3.7 ---------- diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json index 218c24736..0f4f94a50 100644 --- a/vendor/guzzlehttp/guzzle/composer.json +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -14,7 +14,7 @@ ], "require": { "php": ">=5.5", - "guzzlehttp/psr7": "^1.3.1", + "guzzlehttp/psr7": "^1.4", "guzzlehttp/promises": "^1.0" }, "require-dev": { diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php index 6089c1869..2e4ceadef 100644 --- a/vendor/guzzlehttp/guzzle/src/Client.php +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -9,18 +9,18 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; /** - * @method ResponseInterface get($uri, array $options = []) - * @method ResponseInterface head($uri, array $options = []) - * @method ResponseInterface put($uri, array $options = []) - * @method ResponseInterface post($uri, array $options = []) - * @method ResponseInterface patch($uri, array $options = []) - * @method ResponseInterface delete($uri, array $options = []) - * @method Promise\PromiseInterface getAsync($uri, array $options = []) - * @method Promise\PromiseInterface headAsync($uri, array $options = []) - * @method Promise\PromiseInterface putAsync($uri, array $options = []) - * @method Promise\PromiseInterface postAsync($uri, array $options = []) - * @method Promise\PromiseInterface patchAsync($uri, array $options = []) - * @method Promise\PromiseInterface deleteAsync($uri, array $options = []) + * @method ResponseInterface get(string|UriInterface $uri, array $options = []) + * @method ResponseInterface head(string|UriInterface $uri, array $options = []) + * @method ResponseInterface put(string|UriInterface $uri, array $options = []) + * @method ResponseInterface post(string|UriInterface $uri, array $options = []) + * @method ResponseInterface patch(string|UriInterface $uri, array $options = []) + * @method ResponseInterface delete(string|UriInterface $uri, array $options = []) + * @method Promise\PromiseInterface getAsync(string|UriInterface $uri, array $options = []) + * @method Promise\PromiseInterface headAsync(string|UriInterface $uri, array $options = []) + * @method Promise\PromiseInterface putAsync(string|UriInterface $uri, array $options = []) + * @method Promise\PromiseInterface postAsync(string|UriInterface $uri, array $options = []) + * @method Promise\PromiseInterface patchAsync(string|UriInterface $uri, array $options = []) + * @method Promise\PromiseInterface deleteAsync(string|UriInterface $uri, array $options = []) */ class Client implements ClientInterface { @@ -142,10 +142,10 @@ class Client implements ClientInterface $uri = Psr7\uri_for($uri === null ? '' : $uri); if (isset($config['base_uri'])) { - $uri = Psr7\Uri::resolve(Psr7\uri_for($config['base_uri']), $uri); + $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); } - return $uri->getScheme() === '' ? $uri->withScheme('http') : $uri; + return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; } /** diff --git a/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php b/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php index f01f06d99..3fd72faa8 100644 --- a/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +++ b/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php @@ -4,6 +4,7 @@ namespace GuzzleHttp\Exception; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Http\Message\UriInterface; /** * HTTP Request exception @@ -89,12 +90,15 @@ class RequestException extends TransferException $className = __CLASS__; } + $uri = $request->getUri(); + $uri = static::obfuscateUri($uri); + // Server Error: `GET /` resulted in a `404 Not Found` response: // ... (truncated) $message = sprintf( '%s: `%s` resulted in a `%s` response', $label, - $request->getMethod() . ' ' . $request->getUri(), + $request->getMethod() . ' ' . $uri, $response->getStatusCode() . ' ' . $response->getReasonPhrase() ); @@ -141,6 +145,24 @@ class RequestException extends TransferException return $summary; } + /** + * Obfuscates URI if there is an username and a password present + * + * @param UriInterface $uri + * + * @return UriInterface + */ + private static function obfuscateUri($uri) + { + $userInfo = $uri->getUserInfo(); + + if (false !== ($pos = strpos($userInfo, ':'))) { + return $uri->withUserInfo(substr($userInfo, 0, $pos), '***'); + } + + return $uri; + } + /** * Get the request that caused the exception * diff --git a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php index 30b602e2d..4972f54a4 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php @@ -210,7 +210,7 @@ class StreamHandler Psr7\copy_to_stream( $source, $sink, - strlen($contentLength) > 0 ? (int) $contentLength : -1 + (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 ); $sink->seek(0); diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php index dbe8b87e5..5613f6ec0 100644 --- a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -208,9 +208,9 @@ class RedirectMiddleware ResponseInterface $response, array $protocols ) { - $location = Psr7\Uri::resolve( + $location = Psr7\UriResolver::resolve( $request->getUri(), - $response->getHeaderLine('Location') + new Psr7\Uri($response->getHeaderLine('Location')) ); // Ensure that the redirect URI is allowed based on the protocols. diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php index 3af2f368a..60e53f537 100644 --- a/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -43,8 +43,8 @@ final class RequestOptions const AUTH = 'auth'; /** - * body: (string|null|callable|iterator|object) Body to send in the - * request. + * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator) + * Body to send in the request. */ const BODY = 'body'; diff --git a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php index 4b95a1474..db0f22226 100644 --- a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php @@ -5,6 +5,7 @@ use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Promise\RejectedPromise; use GuzzleHttp\Psr7; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; /** * Middleware that retries requests based on the boolean result of @@ -25,8 +26,8 @@ class RetryMiddleware * retried. * @param callable $nextHandler Next handler to invoke. * @param callable $delay Function that accepts the number of retries - * and returns the number of milliseconds to - * delay. + * and [response] and returns the number of + * milliseconds to delay. */ public function __construct( callable $decider, @@ -82,7 +83,7 @@ class RetryMiddleware )) { return $value; } - return $this->doRetry($req, $options); + return $this->doRetry($req, $options, $value); }; } @@ -102,9 +103,9 @@ class RetryMiddleware }; } - private function doRetry(RequestInterface $request, array $options) + private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) { - $options['delay'] = call_user_func($this->delay, ++$options['retries']); + $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); return $this($request, $options); } diff --git a/vendor/guzzlehttp/promises/CHANGELOG.md b/vendor/guzzlehttp/promises/CHANGELOG.md index 99603e5d0..551929f6b 100644 --- a/vendor/guzzlehttp/promises/CHANGELOG.md +++ b/vendor/guzzlehttp/promises/CHANGELOG.md @@ -1,31 +1,65 @@ # CHANGELOG + +## 1.3.1 - 2016-12-20 + +### Fixed + +- `wait()` foreign promise compatibility + + +## 1.3.0 - 2016-11-18 + +### Added + +- Adds support for custom task queues. + +### Fixed + +- Fixed coroutine promise memory leak. + + ## 1.2.0 - 2016-05-18 -* Update to now catch `\Throwable` on PHP 7+ +### Changed + +- Update to now catch `\Throwable` on PHP 7+ + ## 1.1.0 - 2016-03-07 -* Update EachPromise to prevent recurring on a iterator when advancing, as this +### Changed + +- Update EachPromise to prevent recurring on a iterator when advancing, as this could trigger fatal generator errors. -* Update Promise to allow recursive waiting without unwrapping exceptions. +- Update Promise to allow recursive waiting without unwrapping exceptions. + ## 1.0.3 - 2015-10-15 -* Update EachPromise to immediately resolve when the underlying promise iterator +### Changed + +- Update EachPromise to immediately resolve when the underlying promise iterator is empty. Previously, such a promise would throw an exception when its `wait` function was called. + ## 1.0.2 - 2015-05-15 -* Conditionally require functions.php. +### Changed + +- Conditionally require functions.php. + ## 1.0.1 - 2015-06-24 -* Updating EachPromise to call next on the underlying promise iterator as late +### Changed + +- Updating EachPromise to call next on the underlying promise iterator as late as possible to ensure that generators that generate new requests based on callbacks are not iterated until after callbacks are invoked. + ## 1.0.0 - 2015-05-12 -* Initial release +- Initial release diff --git a/vendor/guzzlehttp/promises/LICENSE b/vendor/guzzlehttp/promises/LICENSE index 581d95f92..67f91a14c 100644 --- a/vendor/guzzlehttp/promises/LICENSE +++ b/vendor/guzzlehttp/promises/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling +Copyright (c) 2015-2016 Michael Dowling, https://github.com/mtdowling Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md index 0dea84014..7b607e28b 100644 --- a/vendor/guzzlehttp/promises/README.md +++ b/vendor/guzzlehttp/promises/README.md @@ -96,7 +96,7 @@ $promise->resolve('reader.'); ## Promise forwarding Promises can be chained one after the other. Each then in the chain is a new -promise. The return value of of a promise is what's forwarded to the next +promise. The return value of a promise is what's forwarded to the next promise in the chain. Returning a promise in a `then` callback will cause the subsequent promises in the chain to only be fulfilled when the returned promise has been fulfilled. The next promise in the chain will be invoked with the @@ -315,8 +315,11 @@ A promise has the following methods: - `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` - Creates a new promise that is fulfilled or rejected when the promise is - resolved. + Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. + +- `otherwise(callable $onRejected) : PromiseInterface` + + Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. - `wait($unwrap = true) : mixed` diff --git a/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json index f13844b63..ec41a61e6 100644 --- a/vendor/guzzlehttp/promises/composer.json +++ b/vendor/guzzlehttp/promises/composer.json @@ -1,6 +1,5 @@ { "name": "guzzlehttp/promises", - "type": "library", "description": "Guzzle promises library", "keywords": ["promise"], "license": "MIT", @@ -15,7 +14,7 @@ "php": ">=5.5.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0" }, "autoload": { "psr-4": { @@ -23,9 +22,13 @@ }, "files": ["src/functions_include.php"] }, + "scripts": { + "test": "vendor/bin/phpunit", + "test-ci": "vendor/bin/phpunit --coverage-text" + }, "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.4-dev" } } } diff --git a/vendor/guzzlehttp/promises/src/Coroutine.php b/vendor/guzzlehttp/promises/src/Coroutine.php new file mode 100644 index 000000000..6aa095870 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Coroutine.php @@ -0,0 +1,151 @@ +then(function ($v) { echo $v; }); + * + * @param callable $generatorFn Generator function to wrap into a promise. + * + * @return Promise + * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration + */ +final class Coroutine implements PromiseInterface +{ + /** + * @var PromiseInterface|null + */ + private $currentPromise; + + /** + * @var Generator + */ + private $generator; + + /** + * @var Promise + */ + private $result; + + public function __construct(callable $generatorFn) + { + $this->generator = $generatorFn(); + $this->result = new Promise(function () { + while (isset($this->currentPromise)) { + $this->currentPromise->wait(); + } + }); + $this->nextCoroutine($this->generator->current()); + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + return $this->result->then($onFulfilled, $onRejected); + } + + public function otherwise(callable $onRejected) + { + return $this->result->otherwise($onRejected); + } + + public function wait($unwrap = true) + { + return $this->result->wait($unwrap); + } + + public function getState() + { + return $this->result->getState(); + } + + public function resolve($value) + { + $this->result->resolve($value); + } + + public function reject($reason) + { + $this->result->reject($reason); + } + + public function cancel() + { + $this->currentPromise->cancel(); + $this->result->cancel(); + } + + private function nextCoroutine($yielded) + { + $this->currentPromise = promise_for($yielded) + ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); + } + + /** + * @internal + */ + public function _handleSuccess($value) + { + unset($this->currentPromise); + try { + $next = $this->generator->send($value); + if ($this->generator->valid()) { + $this->nextCoroutine($next); + } else { + $this->result->resolve($value); + } + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } + + /** + * @internal + */ + public function _handleFailure($reason) + { + unset($this->currentPromise); + try { + $nextYield = $this->generator->throw(exception_for($reason)); + // The throw was caught, so keep iterating on the coroutine + $this->nextCoroutine($nextYield); + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } +} diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php index 04f3ea043..844ada073 100644 --- a/vendor/guzzlehttp/promises/src/Promise.php +++ b/vendor/guzzlehttp/promises/src/Promise.php @@ -263,10 +263,17 @@ class Promise implements PromiseInterface $this->waitList = null; foreach ($waitList as $result) { - $result->waitIfPending(); - while ($result->result instanceof Promise) { - $result = $result->result; + while (true) { $result->waitIfPending(); + + if ($result->result instanceof Promise) { + $result = $result->result; + } else { + if ($result->result instanceof PromiseInterface) { + $result->result->wait(false); + } + break; + } } } } diff --git a/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php index 39fe5bbb6..6e8a2a083 100644 --- a/vendor/guzzlehttp/promises/src/TaskQueue.php +++ b/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -10,7 +10,7 @@ namespace GuzzleHttp\Promise; * * GuzzleHttp\Promise\queue()->run(); */ -class TaskQueue +class TaskQueue implements TaskQueueInterface { private $enableShutdown = true; private $queue = []; @@ -30,30 +30,16 @@ class TaskQueue } } - /** - * Returns true if the queue is empty. - * - * @return bool - */ public function isEmpty() { return !$this->queue; } - /** - * Adds a task to the queue that will be executed the next time run is - * called. - * - * @param callable $task - */ public function add(callable $task) { $this->queue[] = $task; } - /** - * Execute all of the pending task in the queue. - */ public function run() { /** @var callable $task */ diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php new file mode 100644 index 000000000..ac8306e19 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -0,0 +1,25 @@ + * - * @return TaskQueue + * @param TaskQueueInterface $assign Optionally specify a new queue instance. + * + * @return TaskQueueInterface */ -function queue() +function queue(TaskQueueInterface $assign = null) { static $queue; - if (!$queue) { + if ($assign) { + $queue = $assign; + } elseif (!$queue) { $queue = new TaskQueue(); } @@ -210,7 +214,7 @@ function unwrap($promises) * * @param mixed $promises Promises or values. * - * @return Promise + * @return PromiseInterface */ function all($promises) { @@ -243,7 +247,7 @@ function all($promises) * @param int $count Total number of promises. * @param mixed $promises Promises or values. * - * @return Promise + * @return PromiseInterface */ function some($count, $promises) { @@ -299,7 +303,7 @@ function any($promises) * * @param mixed $promises Promises or values. * - * @return Promise + * @return PromiseInterface * @see GuzzleHttp\Promise\inspect for the inspection state array format. */ function settle($promises) @@ -337,7 +341,7 @@ function settle($promises) * @param callable $onFulfilled * @param callable $onRejected * - * @return Promise + * @return PromiseInterface */ function each( $iterable, @@ -363,7 +367,7 @@ function each( * @param callable $onFulfilled * @param callable $onRejected * - * @return mixed + * @return PromiseInterface */ function each_limit( $iterable, @@ -387,7 +391,7 @@ function each_limit( * @param int|callable $concurrency * @param callable $onFulfilled * - * @return mixed + * @return PromiseInterface */ function each_limit_all( $iterable, @@ -441,60 +445,13 @@ function is_settled(PromiseInterface $promise) } /** - * Creates a promise that is resolved using a generator that yields values or - * promises (somewhat similar to C#'s async keyword). + * @see Coroutine * - * When called, the coroutine function will start an instance of the generator - * and returns a promise that is fulfilled with its final yielded value. + * @param callable $generatorFn * - * Control is returned back to the generator when the yielded promise settles. - * This can lead to less verbose code when doing lots of sequential async calls - * with minimal processing in between. - * - * use GuzzleHttp\Promise; - * - * function createPromise($value) { - * return new Promise\FulfilledPromise($value); - * } - * - * $promise = Promise\coroutine(function () { - * $value = (yield createPromise('a')); - * try { - * $value = (yield createPromise($value . 'b')); - * } catch (\Exception $e) { - * // The promise was rejected. - * } - * yield $value . 'c'; - * }); - * - * // Outputs "abc" - * $promise->then(function ($v) { echo $v; }); - * - * @param callable $generatorFn Generator function to wrap into a promise. - * - * @return Promise - * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration + * @return PromiseInterface */ function coroutine(callable $generatorFn) { - $generator = $generatorFn(); - return __next_coroutine($generator->current(), $generator)->then(); -} - -/** @internal */ -function __next_coroutine($yielded, \Generator $generator) -{ - return promise_for($yielded)->then( - function ($value) use ($generator) { - $nextYield = $generator->send($value); - return $generator->valid() - ? __next_coroutine($nextYield, $generator) - : $value; - }, - function ($reason) use ($generator) { - $nextYield = $generator->throw(exception_for($reason)); - // The throw was caught, so keep iterating on the coroutine - return __next_coroutine($nextYield, $generator); - } - ); + return new Coroutine($generatorFn); } diff --git a/vendor/guzzlehttp/psr7/CHANGELOG.md b/vendor/guzzlehttp/psr7/CHANGELOG.md index 0771a9aca..5c252b3a2 100644 --- a/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -1,5 +1,45 @@ # CHANGELOG +## 1.4.2 - 2017-03-20 + +* Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing + calls to `trigger_error` when deprecated methods are invoked. + +## 1.4.1 - 2017-02-27 + +* Reverted BC break by reintroducing behavior to automagically fix a URI with a + relative path and an authority by adding a leading slash to the path. It's only + deprecated now. +* Added triggering of silenced deprecation warnings. + +## 1.4.0 - 2017-02-21 + +* Fix `Stream::read` when length parameter <= 0. +* `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. +* Fix `ServerRequest::getUriFromGlobals` when `Host` header contains port. +* Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form. +* Allow `parse_response` to parse a response without delimiting space and reason. +* Ensure each URI modification results in a valid URI according to PSR-7 discussions. + Invalid modifications will throw an exception instead of returning a wrong URI or + doing some magic. + - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` +* Fix compatibility of URIs with `file` scheme and empty host. +* Added common URI utility methods based on RFC 3986 (see documentation in the readme): + - `Uri::isDefaultPort` + - `Uri::isAbsolute` + - `Uri::isNetworkPathReference` + - `Uri::isAbsolutePathReference` + - `Uri::isRelativePathReference` + - `Uri::isSameDocumentReference` + - `Uri::composeComponents` + - `UriNormalizer::normalize` + - `UriNormalizer::isEquivalent` + - `UriResolver::relativize` +* Deprecated `Uri::resolve` in favor of `UriResolver::resolve` +* Deprecated `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + ## 1.3.1 - 2016-06-25 * Fix `Uri::__toString` for network path references, e.g. `//example.org`. diff --git a/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md index 2642164ff..16499358e 100644 --- a/vendor/guzzlehttp/psr7/README.md +++ b/vendor/guzzlehttp/psr7/README.md @@ -519,51 +519,221 @@ Determines the mimetype of a file by looking at its extension. Maps a file extensions to a mimetype. -# Static URI methods +# Additional URI Methods -The `GuzzleHttp\Psr7\Uri` class has several static methods to manipulate URIs. +Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, +this library also provides additional functionality when working with URIs as static methods. +## URI Types -## `GuzzleHttp\Psr7\Uri::removeDotSegments` +An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. +An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, +the base URI. Relative references can be divided into several forms according to +[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): -`public static function removeDotSegments(string $path): string` +- network-path references, e.g. `//example.com/path` +- absolute-path references, e.g. `/path` +- relative-path references, e.g. `subpath` -Removes dot segments from a path and returns the new path. +The following methods can be used to identify the type of the URI. -See http://tools.ietf.org/html/rfc3986#section-5.2.4 +### `GuzzleHttp\Psr7\Uri::isAbsolute` +`public static function isAbsolute(UriInterface $uri): bool` -## `GuzzleHttp\Psr7\Uri::resolve` +Whether the URI is absolute, i.e. it has a scheme. -`public static function resolve(UriInterface $base, $rel): UriInterface` +### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` -Resolve a base URI with a relative URI and return a new URI. +`public static function isNetworkPathReference(UriInterface $uri): bool` -See http://tools.ietf.org/html/rfc3986#section-5 +Whether the URI is a network-path reference. A relative reference that begins with two slash characters is +termed an network-path reference. +### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` -## `GuzzleHttp\Psr7\Uri::withQueryValue` +`public static function isAbsolutePathReference(UriInterface $uri): bool` -`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` +Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is +termed an absolute-path reference. -Create a new URI with a specific query string value. +### `GuzzleHttp\Psr7\Uri::isRelativePathReference` -Any existing query string values that exactly match the provided key are -removed and replaced with the given key value pair. +`public static function isRelativePathReference(UriInterface $uri): bool` +Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is +termed a relative-path reference. -## `GuzzleHttp\Psr7\Uri::withoutQueryValue` +### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` -`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` +`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` -Create a new URI with a specific query string value removed. +Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its +fragment component, identical to the base URI. When no base URI is given, only an empty URI reference +(apart from its fragment) is considered a same-document reference. -Any existing query string values that exactly match the provided key are -removed. +## URI Components +Additional methods to work with URI components. -## `GuzzleHttp\Psr7\Uri::fromParts` +### `GuzzleHttp\Psr7\Uri::isDefaultPort` + +`public static function isDefaultPort(UriInterface $uri): bool` + +Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null +or the standard port. This method can be used independently of the implementation. + +### `GuzzleHttp\Psr7\Uri::composeComponents` + +`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` + +Composes a URI reference string from its various components according to +[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called +manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. + +### `GuzzleHttp\Psr7\Uri::fromParts` `public static function fromParts(array $parts): UriInterface` -Create a `GuzzleHttp\Psr7\Uri` object from a hash of `parse_url` parts. +Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. + + +### `GuzzleHttp\Psr7\Uri::withQueryValue` + +`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` + +Creates a new URI with a specific query string value. Any existing query string values that exactly match the +provided key are removed and replaced with the given key value pair. A value of null will set the query string +key without a value, e.g. "key" instead of "key=value". + + +### `GuzzleHttp\Psr7\Uri::withoutQueryValue` + +`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` + +Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the +provided key are removed. + +## Reference Resolution + +`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according +to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers +do when resolving a link in a website based on the current request URI. + +### `GuzzleHttp\Psr7\UriResolver::resolve` + +`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` + +Converts the relative URI into a new URI that is resolved against the base URI. + +### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` + +`public static function removeDotSegments(string $path): string` + +Removes dot segments from a path and returns the new path according to +[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). + +### `GuzzleHttp\Psr7\UriResolver::relativize` + +`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` + +Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): + +```php +(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) +``` + +One use-case is to use the current request URI as base URI and then generate relative links in your documents +to reduce the document size or offer self-contained downloadable document archives. + +```php +$base = new Uri('http://example.com/a/b/'); +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. +echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. +``` + +## Normalization and Comparison + +`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to +[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). + +### `GuzzleHttp\Psr7\UriNormalizer::normalize` + +`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` + +Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. +This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask +of normalizations to apply. The following normalizations are available: + +- `UriNormalizer::PRESERVING_NORMALIZATIONS` + + Default normalizations which only include the ones that preserve semantics. + +- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` + + All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. + + Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` + +- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` + + Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of + ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should + not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved + characters by URI normalizers. + + Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` + +- `UriNormalizer::CONVERT_EMPTY_PATH` + + Converts the empty path to "/" for http and https URIs. + + Example: `http://example.org` → `http://example.org/` + +- `UriNormalizer::REMOVE_DEFAULT_HOST` + + Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host + "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to + RFC 3986. + + Example: `file://localhost/myfile` → `file:///myfile` + +- `UriNormalizer::REMOVE_DEFAULT_PORT` + + Removes the default port of the given URI scheme from the URI. + + Example: `http://example.org:80/` → `http://example.org/` + +- `UriNormalizer::REMOVE_DOT_SEGMENTS` + + Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would + change the semantics of the URI reference. + + Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` + +- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` + + Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes + and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization + may change the semantics. Encoded slashes (%2F) are not removed. + + Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` + +- `UriNormalizer::SORT_QUERY_PARAMETERS` + + Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be + significant (this is not defined by the standard). So this normalization is not safe and may change the semantics + of the URI. + + Example: `?lang=en&article=fred` → `?article=fred&lang=en` + +### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` + +`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` + +Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given +`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. +This of course assumes they will be resolved against the same base URI. If this is not the case, determination of +equivalence or difference of relative references does not mean anything. diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json index fdfb97bdd..b1c5a90ba 100644 --- a/vendor/guzzlehttp/psr7/composer.json +++ b/vendor/guzzlehttp/psr7/composer.json @@ -1,14 +1,18 @@ { "name": "guzzlehttp/psr7", "type": "library", - "description": "PSR-7 message implementation", - "keywords": ["message", "stream", "http", "uri"], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": ["request", "response", "message", "stream", "http", "uri", "url"], "license": "MIT", "authors": [ { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], "require": { diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php index 7f2298bcb..3c13d4f41 100644 --- a/vendor/guzzlehttp/psr7/src/LimitStream.php +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -21,7 +21,7 @@ class LimitStream implements StreamInterface * @param StreamInterface $stream Stream to wrap * @param int $limit Total number of bytes to allow to be read * from the stream. Pass -1 for no limit. - * @param int|null $offset Position to seek to before reading (only + * @param int $offset Position to seek to before reading (only * works on seekable streams). */ public function __construct( diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php index 2988fcba0..c0fd584f7 100644 --- a/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -27,7 +27,7 @@ class MultipartStream implements StreamInterface */ public function __construct(array $elements = [], $boundary = null) { - $this->boundary = $boundary ?: uniqid(); + $this->boundary = $boundary ?: sha1(uniqid('', true)); $this->stream = $this->createStream($elements); } @@ -108,7 +108,7 @@ class MultipartStream implements StreamInterface /** * @return array */ - private function createElement($name, $stream, $filename, array $headers) + private function createElement($name, StreamInterface $stream, $filename, array $headers) { // Set a default content-disposition header if one was no provided $disposition = $this->getHeader($headers, 'content-disposition'); diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php index 4a3db6ece..08285484d 100644 --- a/vendor/guzzlehttp/psr7/src/Request.php +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -19,7 +19,7 @@ class Request implements RequestInterface /** @var null|string */ private $requestTarget; - /** @var null|UriInterface */ + /** @var UriInterface */ private $uri; /** diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php index 841ff0200..2830c6c9e 100644 --- a/vendor/guzzlehttp/psr7/src/Response.php +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -2,6 +2,7 @@ namespace GuzzleHttp\Psr7; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamInterface; /** * PSR-7 response implementation. @@ -100,7 +101,7 @@ class Response implements ResponseInterface $this->setHeaders($headers); if ($reason == '' && isset(self::$phrases[$this->statusCode])) { - $this->reasonPhrase = self::$phrases[$status]; + $this->reasonPhrase = self::$phrases[$this->statusCode]; } else { $this->reasonPhrase = (string) $reason; } diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php index a6a47bec4..575aab848 100644 --- a/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -188,25 +188,37 @@ class ServerRequest extends Request implements ServerRequestInterface public static function getUriFromGlobals() { $uri = new Uri(''); - if (isset($_SERVER['HTTPS'])) { - $uri = $uri->withScheme($_SERVER['HTTPS'] == 'on' ? 'https' : 'http'); - } + $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); + $hasPort = false; if (isset($_SERVER['HTTP_HOST'])) { - $uri = $uri->withHost($_SERVER['HTTP_HOST']); + $hostHeaderParts = explode(':', $_SERVER['HTTP_HOST']); + $uri = $uri->withHost($hostHeaderParts[0]); + if (isset($hostHeaderParts[1])) { + $hasPort = true; + $uri = $uri->withPort($hostHeaderParts[1]); + } } elseif (isset($_SERVER['SERVER_NAME'])) { $uri = $uri->withHost($_SERVER['SERVER_NAME']); + } elseif (isset($_SERVER['SERVER_ADDR'])) { + $uri = $uri->withHost($_SERVER['SERVER_ADDR']); } - if (isset($_SERVER['SERVER_PORT'])) { + if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { $uri = $uri->withPort($_SERVER['SERVER_PORT']); } + $hasQuery = false; if (isset($_SERVER['REQUEST_URI'])) { - $uri = $uri->withPath(current(explode('?', $_SERVER['REQUEST_URI']))); + $requestUriParts = explode('?', $_SERVER['REQUEST_URI']); + $uri = $uri->withPath($requestUriParts[0]); + if (isset($requestUriParts[1])) { + $hasQuery = true; + $uri = $uri->withQuery($requestUriParts[1]); + } } - if (isset($_SERVER['QUERY_STRING'])) { + if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { $uri = $uri->withQuery($_SERVER['QUERY_STRING']); } diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php index 214af151c..e33662879 100644 --- a/vendor/guzzlehttp/psr7/src/Stream.php +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -207,8 +207,20 @@ class Stream implements StreamInterface if (!$this->readable) { throw new \RuntimeException('Cannot read from non-readable stream'); } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } - return fread($this->stream, $length); + if (0 === $length) { + return ''; + } + + $string = fread($this->stream, $length); + if (false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + + return $string; } public function write($string) diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php index 44a1e9d49..f46c1db9e 100644 --- a/vendor/guzzlehttp/psr7/src/Uri.php +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -12,9 +12,26 @@ use Psr\Http\Message\UriInterface; */ class Uri implements UriInterface { - private static $schemes = [ + /** + * Absolute http and https URIs require a host per RFC 7230 Section 2.7 + * but in generic URIs the host can be empty. So for http(s) URIs + * we apply this default host when no host is given yet to form a + * valid URI. + */ + const HTTP_DEFAULT_HOST = 'localhost'; + + private static $defaultPorts = [ 'http' => 80, 'https' => 443, + 'ftp' => 21, + 'gopher' => 70, + 'nntp' => 119, + 'news' => 119, + 'telnet' => 23, + 'tn3270' => 23, + 'imap' => 143, + 'pop' => 110, + 'ldap' => 389, ]; private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; @@ -47,6 +64,7 @@ class Uri implements UriInterface */ public function __construct($uri = '') { + // weak type check to also accept null until we can add scalar type hints if ($uri != '') { $parts = parse_url($uri); if ($parts === false) { @@ -58,7 +76,7 @@ class Uri implements UriInterface public function __toString() { - return self::createUriString( + return self::composeComponents( $this->scheme, $this->getAuthority(), $this->path, @@ -67,57 +85,199 @@ class Uri implements UriInterface ); } + /** + * Composes a URI reference string from its various components. + * + * Usually this method does not need to be called manually but instead is used indirectly via + * `Psr\Http\Message\UriInterface::__toString`. + * + * PSR-7 UriInterface treats an empty component the same as a missing component as + * getQuery(), getFragment() etc. always return a string. This explains the slight + * difference to RFC 3986 Section 5.3. + * + * Another adjustment is that the authority separator is added even when the authority is missing/empty + * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with + * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But + * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to + * that format). + * + * @param string $scheme + * @param string $authority + * @param string $path + * @param string $query + * @param string $fragment + * + * @return string + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + */ + public static function composeComponents($scheme, $authority, $path, $query, $fragment) + { + $uri = ''; + + // weak type checks to also accept null until we can add scalar type hints + if ($scheme != '') { + $uri .= $scheme . ':'; + } + + if ($authority != ''|| $scheme === 'file') { + $uri .= '//' . $authority; + } + + $uri .= $path; + + if ($query != '') { + $uri .= '?' . $query; + } + + if ($fragment != '') { + $uri .= '#' . $fragment; + } + + return $uri; + } + + /** + * Whether the URI has the default port of the current scheme. + * + * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used + * independently of the implementation. + * + * @param UriInterface $uri + * + * @return bool + */ + public static function isDefaultPort(UriInterface $uri) + { + return $uri->getPort() === null + || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); + } + + /** + * Whether the URI is absolute, i.e. it has a scheme. + * + * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true + * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative + * to another URI, the base URI. Relative references can be divided into several forms: + * - network-path references, e.g. '//example.com/path' + * - absolute-path references, e.g. '/path' + * - relative-path references, e.g. 'subpath' + * + * @param UriInterface $uri + * + * @return bool + * @see Uri::isNetworkPathReference + * @see Uri::isAbsolutePathReference + * @see Uri::isRelativePathReference + * @link https://tools.ietf.org/html/rfc3986#section-4 + */ + public static function isAbsolute(UriInterface $uri) + { + return $uri->getScheme() !== ''; + } + + /** + * Whether the URI is a network-path reference. + * + * A relative reference that begins with two slash characters is termed an network-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isNetworkPathReference(UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() !== ''; + } + + /** + * Whether the URI is a absolute-path reference. + * + * A relative reference that begins with a single slash character is termed an absolute-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isAbsolutePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && isset($uri->getPath()[0]) + && $uri->getPath()[0] === '/'; + } + + /** + * Whether the URI is a relative-path reference. + * + * A relative reference that does not begin with a slash character is termed a relative-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isRelativePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); + } + + /** + * Whether the URI is a same-document reference. + * + * A same-document reference refers to a URI that is, aside from its fragment + * component, identical to the base URI. When no base URI is given, only an empty + * URI reference (apart from its fragment) is considered a same-document reference. + * + * @param UriInterface $uri The URI to check + * @param UriInterface|null $base An optional base URI to compare against + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.4 + */ + public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) + { + if ($base !== null) { + $uri = UriResolver::resolve($base, $uri); + + return ($uri->getScheme() === $base->getScheme()) + && ($uri->getAuthority() === $base->getAuthority()) + && ($uri->getPath() === $base->getPath()) + && ($uri->getQuery() === $base->getQuery()); + } + + return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; + } + /** * Removes dot segments from a path and returns the new path. * * @param string $path * * @return string - * @link http://tools.ietf.org/html/rfc3986#section-5.2.4 + * + * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. + * @see UriResolver::removeDotSegments */ public static function removeDotSegments($path) { - static $noopPaths = ['' => true, '/' => true, '*' => true]; - static $ignoreSegments = ['.' => true, '..' => true]; - - if (isset($noopPaths[$path])) { - return $path; - } - - $results = []; - $segments = explode('/', $path); - foreach ($segments as $segment) { - if ($segment === '..') { - array_pop($results); - } elseif (!isset($ignoreSegments[$segment])) { - $results[] = $segment; - } - } - - $newPath = implode('/', $results); - // Add the leading slash if necessary - if (substr($path, 0, 1) === '/' && - substr($newPath, 0, 1) !== '/' - ) { - $newPath = '/' . $newPath; - } - - // Add the trailing slash if necessary - if ($newPath !== '/' && isset($ignoreSegments[end($segments)])) { - $newPath .= '/'; - } - - return $newPath; + return UriResolver::removeDotSegments($path); } /** - * Resolve a base URI with a relative URI and return a new URI. + * Converts the relative URI into a new URI that is resolved against the base URI. * * @param UriInterface $base Base URI * @param string|UriInterface $rel Relative URI * * @return UriInterface - * @link http://tools.ietf.org/html/rfc3986#section-5.2 + * + * @deprecated since version 1.4. Use UriResolver::resolve instead. + * @see UriResolver::resolve */ public static function resolve(UriInterface $base, $rel) { @@ -125,55 +285,11 @@ class Uri implements UriInterface $rel = new self($rel); } - if ((string) $rel === '') { - // we can simply return the same base URI instance for this same-document reference - return $base; - } - - if ($rel->getScheme() != '') { - return $rel->withPath(self::removeDotSegments($rel->getPath())); - } - - if ($rel->getAuthority() != '') { - $targetAuthority = $rel->getAuthority(); - $targetPath = self::removeDotSegments($rel->getPath()); - $targetQuery = $rel->getQuery(); - } else { - $targetAuthority = $base->getAuthority(); - if ($rel->getPath() === '') { - $targetPath = $base->getPath(); - $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); - } else { - if ($rel->getPath()[0] === '/') { - $targetPath = $rel->getPath(); - } else { - if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); - } else { - $lastSlashPos = strrpos($base->getPath(), '/'); - if ($lastSlashPos === false) { - $targetPath = $rel->getPath(); - } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); - } - } - } - $targetPath = self::removeDotSegments($targetPath); - $targetQuery = $rel->getQuery(); - } - } - - return new self(self::createUriString( - $base->getScheme(), - $targetAuthority, - $targetPath, - $targetQuery, - $rel->getFragment() - )); + return UriResolver::resolve($base, $rel); } /** - * Create a new URI with a specific query string value removed. + * Creates a new URI with a specific query string value removed. * * Any existing query string values that exactly match the provided key are * removed. @@ -186,7 +302,7 @@ class Uri implements UriInterface public static function withoutQueryValue(UriInterface $uri, $key) { $current = $uri->getQuery(); - if ($current == '') { + if ($current === '') { return $uri; } @@ -199,7 +315,7 @@ class Uri implements UriInterface } /** - * Create a new URI with a specific query string value. + * Creates a new URI with a specific query string value. * * Any existing query string values that exactly match the provided key are * removed and replaced with the given key value pair. @@ -217,7 +333,7 @@ class Uri implements UriInterface { $current = $uri->getQuery(); - if ($current == '') { + if ($current === '') { $result = []; } else { $decodedKey = rawurldecode($key); @@ -241,16 +357,21 @@ class Uri implements UriInterface } /** - * Create a URI from a hash of parse_url parts. + * Creates a URI from a hash of `parse_url` components. * * @param array $parts * - * @return self + * @return UriInterface + * @link http://php.net/manual/en/function.parse-url.php + * + * @throws \InvalidArgumentException If the components do not form a valid URI. */ public static function fromParts(array $parts) { $uri = new self(); $uri->applyParts($parts); + $uri->validateState(); + return $uri; } @@ -261,12 +382,8 @@ class Uri implements UriInterface public function getAuthority() { - if ($this->host == '') { - return ''; - } - $authority = $this->host; - if ($this->userInfo != '') { + if ($this->userInfo !== '') { $authority = $this->userInfo . '@' . $authority; } @@ -317,7 +434,9 @@ class Uri implements UriInterface $new = clone $this; $new->scheme = $scheme; - $new->port = $new->filterPort($new->port); + $new->removeDefaultPort(); + $new->validateState(); + return $new; } @@ -334,6 +453,8 @@ class Uri implements UriInterface $new = clone $this; $new->userInfo = $info; + $new->validateState(); + return $new; } @@ -347,6 +468,8 @@ class Uri implements UriInterface $new = clone $this; $new->host = $host; + $new->validateState(); + return $new; } @@ -360,6 +483,9 @@ class Uri implements UriInterface $new = clone $this; $new->port = $port; + $new->removeDefaultPort(); + $new->validateState(); + return $new; } @@ -373,6 +499,8 @@ class Uri implements UriInterface $new = clone $this; $new->path = $path; + $new->validateState(); + return $new; } @@ -386,6 +514,7 @@ class Uri implements UriInterface $new = clone $this; $new->query = $query; + return $new; } @@ -399,6 +528,7 @@ class Uri implements UriInterface $new = clone $this; $new->fragment = $fragment; + return $new; } @@ -431,69 +561,8 @@ class Uri implements UriInterface if (isset($parts['pass'])) { $this->userInfo .= ':' . $parts['pass']; } - } - /** - * Create a URI string from its various parts - * - * @param string $scheme - * @param string $authority - * @param string $path - * @param string $query - * @param string $fragment - * @return string - */ - private static function createUriString($scheme, $authority, $path, $query, $fragment) - { - $uri = ''; - - if ($scheme != '') { - $uri .= $scheme . ':'; - } - - if ($authority != '') { - $uri .= '//' . $authority; - } - - if ($path != '') { - if ($path[0] !== '/') { - if ($authority != '') { - // If the path is rootless and an authority is present, the path MUST be prefixed by "/" - $path = '/' . $path; - } - } elseif (isset($path[1]) && $path[1] === '/') { - if ($authority == '') { - // If the path is starting with more than one "/" and no authority is present, the - // starting slashes MUST be reduced to one. - $path = '/' . ltrim($path, '/'); - } - } - - $uri .= $path; - } - - if ($query != '') { - $uri .= '?' . $query; - } - - if ($fragment != '') { - $uri .= '#' . $fragment; - } - - return $uri; - } - - /** - * Is a given port non-standard for the current scheme? - * - * @param string $scheme - * @param int $port - * - * @return bool - */ - private static function isNonStandardPort($scheme, $port) - { - return !isset(self::$schemes[$scheme]) || $port !== self::$schemes[$scheme]; + $this->removeDefaultPort(); } /** @@ -548,7 +617,14 @@ class Uri implements UriInterface ); } - return self::isNonStandardPort($this->scheme, $port) ? $port : null; + return $port; + } + + private function removeDefaultPort() + { + if ($this->port !== null && self::isDefaultPort($this)) { + $this->port = null; + } } /** @@ -599,4 +675,28 @@ class Uri implements UriInterface { return rawurlencode($match[0]); } + + private function validateState() + { + if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { + $this->host = self::HTTP_DEFAULT_HOST; + } + + if ($this->getAuthority() === '') { + if (0 === strpos($this->path, '//')) { + throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); + } + if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { + throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); + } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + @trigger_error( + 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . + 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', + E_USER_DEPRECATED + ); + $this->path = '/'. $this->path; + //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); + } + } } diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php new file mode 100644 index 000000000..384c29e50 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -0,0 +1,216 @@ +getPath() === '' && + ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + ) { + $uri = $uri->withPath('/'); + } + + if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { + $uri = $uri->withHost(''); + } + + if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { + $uri = $uri->withPort(null); + } + + if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { + $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); + } + + if ($flags & self::REMOVE_DUPLICATE_SLASHES) { + $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); + } + + if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { + $queryKeyValues = explode('&', $uri->getQuery()); + sort($queryKeyValues); + $uri = $uri->withQuery(implode('&', $queryKeyValues)); + } + + return $uri; + } + + /** + * Whether two URIs can be considered equivalent. + * + * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also + * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be + * resolved against the same base URI. If this is not the case, determination of equivalence or difference of + * relative references does not mean anything. + * + * @param UriInterface $uri1 An URI to compare + * @param UriInterface $uri2 An URI to compare + * @param int $normalizations A bitmask of normalizations to apply, see constants + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-6.1 + */ + public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) + { + return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); + } + + private static function capitalizePercentEncoding(UriInterface $uri) + { + $regex = '/(?:%[A-Fa-f0-9]{2})++/'; + + $callback = function (array $match) { + return strtoupper($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private static function decodeUnreservedCharacters(UriInterface $uri) + { + $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; + + $callback = function (array $match) { + return rawurldecode($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php new file mode 100644 index 000000000..c1cb8a275 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -0,0 +1,219 @@ +getScheme() != '') { + return $rel->withPath(self::removeDotSegments($rel->getPath())); + } + + if ($rel->getAuthority() != '') { + $targetAuthority = $rel->getAuthority(); + $targetPath = self::removeDotSegments($rel->getPath()); + $targetQuery = $rel->getQuery(); + } else { + $targetAuthority = $base->getAuthority(); + if ($rel->getPath() === '') { + $targetPath = $base->getPath(); + $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); + } else { + if ($rel->getPath()[0] === '/') { + $targetPath = $rel->getPath(); + } else { + if ($targetAuthority != '' && $base->getPath() === '') { + $targetPath = '/' . $rel->getPath(); + } else { + $lastSlashPos = strrpos($base->getPath(), '/'); + if ($lastSlashPos === false) { + $targetPath = $rel->getPath(); + } else { + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + } + } + } + $targetPath = self::removeDotSegments($targetPath); + $targetQuery = $rel->getQuery(); + } + } + + return new Uri(Uri::composeComponents( + $base->getScheme(), + $targetAuthority, + $targetPath, + $targetQuery, + $rel->getFragment() + )); + } + + /** + * Returns the target URI as a relative reference from the base URI. + * + * This method is the counterpart to resolve(): + * + * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) + * + * One use-case is to use the current request URI as base URI and then generate relative links in your documents + * to reduce the document size or offer self-contained downloadable document archives. + * + * $base = new Uri('http://example.com/a/b/'); + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. + * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. + * + * This method also accepts a target that is already relative and will try to relativize it further. Only a + * relative-path reference will be returned as-is. + * + * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + * + * @param UriInterface $base Base URI + * @param UriInterface $target Target URI + * + * @return UriInterface The relative URI reference + */ + public static function relativize(UriInterface $base, UriInterface $target) + { + if ($target->getScheme() !== '' && + ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + ) { + return $target; + } + + if (Uri::isRelativePathReference($target)) { + // As the target is already highly relative we return it as-is. It would be possible to resolve + // the target with `$target = self::resolve($base, $target);` and then try make it more relative + // by removing a duplicate query. But let's not do that automatically. + return $target; + } + + if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { + return $target->withScheme(''); + } + + // We must remove the path before removing the authority because if the path starts with two slashes, the URI + // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also + // invalid. + $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); + + if ($base->getPath() !== $target->getPath()) { + return $emptyPathUri->withPath(self::getRelativePath($base, $target)); + } + + if ($base->getQuery() === $target->getQuery()) { + // Only the target fragment is left. And it must be returned even if base and target fragment are the same. + return $emptyPathUri->withQuery(''); + } + + // If the base URI has a query but the target has none, we cannot return an empty path reference as it would + // inherit the base query component when resolving. + if ($target->getQuery() === '') { + $segments = explode('/', $target->getPath()); + $lastSegment = end($segments); + + return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); + } + + return $emptyPathUri; + } + + private static function getRelativePath(UriInterface $base, UriInterface $target) + { + $sourceSegments = explode('/', $base->getPath()); + $targetSegments = explode('/', $target->getPath()); + array_pop($sourceSegments); + $targetLastSegment = array_pop($targetSegments); + foreach ($sourceSegments as $i => $segment) { + if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { + unset($sourceSegments[$i], $targetSegments[$i]); + } else { + break; + } + } + $targetSegments[] = $targetLastSegment; + $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); + + // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. + if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { + $relativePath = "./$relativePath"; + } elseif ('/' === $relativePath[0]) { + if ($base->getAuthority() != '' && $base->getPath() === '') { + // In this case an extra slash is added by resolve() automatically. So we must not add one here. + $relativePath = ".$relativePath"; + } else { + $relativePath = "./$relativePath"; + } + } + + return $relativePath; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/functions.php b/vendor/guzzlehttp/psr7/src/functions.php index 96bf92611..e40348d6a 100644 --- a/vendor/guzzlehttp/psr7/src/functions.php +++ b/vendor/guzzlehttp/psr7/src/functions.php @@ -371,25 +371,24 @@ function copy_to_stream( StreamInterface $dest, $maxLen = -1 ) { + $bufferSize = 8192; + if ($maxLen === -1) { while (!$source->eof()) { - if (!$dest->write($source->read(1048576))) { + if (!$dest->write($source->read($bufferSize))) { break; } } - return; - } - - $bytes = 0; - while (!$source->eof()) { - $buf = $source->read($maxLen - $bytes); - if (!($len = strlen($buf))) { - break; - } - $bytes += $len; - $dest->write($buf); - if ($bytes == $maxLen) { - break; + } else { + $remaining = $maxLen; + while ($remaining > 0 && !$source->eof()) { + $buf = $source->read(min($bufferSize, $remaining)); + $len = strlen($buf); + if (!$len) { + break; + } + $remaining -= $len; + $dest->write($buf); } } } @@ -492,7 +491,10 @@ function parse_request($message) function parse_response($message) { $data = _parse_message($message); - if (!preg_match('/^HTTP\/.* [0-9]{3} .*/', $data['start-line'])) { + // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space + // between status-code and reason-phrase is required. But browsers accept + // responses without space and reason as well. + if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { throw new \InvalidArgumentException('Invalid response string'); } $parts = explode(' ', $data['start-line'], 3); diff --git a/vendor/masterminds/html5/RELEASE.md b/vendor/masterminds/html5/RELEASE.md index dfec8f8ce..56d5fa1bc 100644 --- a/vendor/masterminds/html5/RELEASE.md +++ b/vendor/masterminds/html5/RELEASE.md @@ -1,10 +1,17 @@ # Release Notes -2.2.1 (2015-05-10) +2.2.2 (2016-10-22) -- #109: Fixed issue where address tag could be written without closing tag +- #116: In XML mode, tags are case sensitive +- #115: Fix PHP Notice in OutputRules +- #112: fix parsing of options of an optgroup +- #111: Adding test for the address tag -2.2.0 (2015-04-11) +2.2.1 (2016-05-10) + +- #109: Fixed issue where address tag could be written without closing tag (thanks sylus) + +2.2.0 (2016-04-11) - #105: Enable composer cache (for CI/CD) - #100: Use mb_substitute_character inset of ini_set for environments where diff --git a/vendor/masterminds/html5/composer.json b/vendor/masterminds/html5/composer.json index 30241849b..f4f43d325 100644 --- a/vendor/masterminds/html5/composer.json +++ b/vendor/masterminds/html5/composer.json @@ -36,7 +36,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } } } diff --git a/vendor/masterminds/html5/src/HTML5.php b/vendor/masterminds/html5/src/HTML5.php index 1c46c2b82..990e8f433 100644 --- a/vendor/masterminds/html5/src/HTML5.php +++ b/vendor/masterminds/html5/src/HTML5.php @@ -166,9 +166,10 @@ class HTML5 public function parse(\Masterminds\HTML5\Parser\InputStream $input, array $options = array()) { $this->errors = array(); - $events = new DOMTreeBuilder(false, array_merge($this->getOptions(), $options)); + $options = array_merge($this->getOptions(), $options); + $events = new DOMTreeBuilder(false, $options); $scanner = new Scanner($input); - $parser = new Tokenizer($scanner, $events); + $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML: Tokenizer::CONFORMANT_HTML); $parser->parse(); $this->errors = $events->getErrors(); @@ -184,9 +185,10 @@ class HTML5 */ public function parseFragment(\Masterminds\HTML5\Parser\InputStream $input, array $options = array()) { - $events = new DOMTreeBuilder(true, array_merge($this->getOptions(), $options)); + $options = array_merge($this->getOptions(), $options); + $events = new DOMTreeBuilder(true, $options); $scanner = new Scanner($input); - $parser = new Tokenizer($scanner, $events); + $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML: Tokenizer::CONFORMANT_HTML); $parser->parse(); $this->errors = $events->getErrors(); diff --git a/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php b/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php index 301addf16..02b2affdd 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php @@ -43,6 +43,10 @@ class Tokenizer protected $textMode = 0; // TEXTMODE_NORMAL; protected $untilTag = null; + const CONFORMANT_XML = 'xml'; + const CONFORMANT_HTML = 'html'; + protected $mode = self::CONFORMANT_HTML; + const WHITE = "\t\n\f "; /** @@ -57,11 +61,13 @@ class Tokenizer * @param \Masterminds\HTML5\Parser\EventHandler $eventHandler * An event handler, initialized and ready to receive * events. + * @param string $mode */ - public function __construct($scanner, $eventHandler) + public function __construct($scanner, $eventHandler, $mode = self::CONFORMANT_HTML) { $this->scanner = $scanner; $this->events = $eventHandler; + $this->mode = $mode; } /** @@ -335,7 +341,8 @@ class Tokenizer return $this->bogusComment('scanner->charsUntil("\n\f \t>")); + $name = $this->scanner->charsUntil("\n\f \t>"); + $name = $this->mode === self::CONFORMANT_XML ? $name: strtolower($name); // Trash whitespace. $this->scanner->whitespace(); @@ -362,7 +369,8 @@ class Tokenizer } // We know this is at least one char. - $name = strtolower($this->scanner->charsWhile(":_-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")); + $name = $this->scanner->charsWhile(":_-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); + $name = $this->mode === self::CONFORMANT_XML ? $name : strtolower($name); $attributes = array(); $selfClose = false; diff --git a/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php b/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php index 2af3c664e..623620821 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php @@ -76,7 +76,6 @@ class TreeBuildingRules case 'option': return $this->closeIfCurrentMatches($new, $current, array( 'option', - 'optgroup' )); case 'tr': return $this->closeIfCurrentMatches($new, $current, array( diff --git a/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php b/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php index c45045f78..a22683c38 100644 --- a/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php +++ b/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php @@ -221,7 +221,11 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface $this->openTag($ele); if (Elements::isA($name, Elements::TEXT_RAW)) { foreach ($ele->childNodes as $child) { - $this->wr($child->data); + if ($child instanceof \DOMCharacterData) { + $this->wr($child->data); + } elseif ($child instanceof \DOMElement) { + $this->element($child); + } } } else { // Handle children. diff --git a/vendor/paragonie/random_compat/build-phar.sh b/vendor/paragonie/random_compat/build-phar.sh new file mode 100755 index 000000000..b4a5ba31c --- /dev/null +++ b/vendor/paragonie/random_compat/build-phar.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) + +php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/vendor/paragonie/random_compat/composer.json b/vendor/paragonie/random_compat/composer.json index d363f4c8c..1c5978c6f 100644 --- a/vendor/paragonie/random_compat/composer.json +++ b/vendor/paragonie/random_compat/composer.json @@ -1,35 +1,37 @@ { - "name": "paragonie/random_compat", - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "random", - "pseudorandom" - ], - "license": "MIT", - "type": "library", - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "support": { - "issues": "https://github.com/paragonie/random_compat/issues", - "email": "info@paragonie.com", - "source": "https://github.com/paragonie/random_compat" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "autoload": { - "files": ["lib/random.php"] + "name": "paragonie/random_compat", + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "random", + "pseudorandom" + ], + "license": "MIT", + "type": "library", + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" } + ], + "support": { + "issues": "https://github.com/paragonie/random_compat/issues", + "email": "info@paragonie.com", + "source": "https://github.com/paragonie/random_compat" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "autoload": { + "files": [ + "lib/random.php" + ] + } } diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey new file mode 100644 index 000000000..eb50ebfcd --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey @@ -0,0 +1,5 @@ +-----BEGIN PUBLIC KEY----- +MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm +pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p ++h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc +-----END PUBLIC KEY----- diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc new file mode 100644 index 000000000..6a1d7f300 --- /dev/null +++ b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (MingW32) + +iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip +QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg +1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW +NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA +NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV +JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= +=B6+8 +-----END PGP SIGNATURE----- diff --git a/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/vendor/paragonie/random_compat/lib/byte_safe_strings.php index a3cc90b14..3de86b223 100644 --- a/vendor/paragonie/random_compat/lib/byte_safe_strings.php +++ b/vendor/paragonie/random_compat/lib/byte_safe_strings.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,7 +26,7 @@ * SOFTWARE. */ -if (!function_exists('RandomCompat_strlen')) { +if (!is_callable('RandomCompat_strlen')) { if ( defined('MB_OVERLOAD_STRING') && ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING @@ -50,8 +50,10 @@ if (!function_exists('RandomCompat_strlen')) { 'RandomCompat_strlen() expects a string' ); } - return mb_strlen($binary_string, '8bit'); + + return (int) mb_strlen($binary_string, '8bit'); } + } else { /** * strlen() implementation that isn't brittle to mbstring.func_overload @@ -71,14 +73,16 @@ if (!function_exists('RandomCompat_strlen')) { 'RandomCompat_strlen() expects a string' ); } - return strlen($binary_string); + return (int) strlen($binary_string); } } } -if (!function_exists('RandomCompat_substr')) { +if (!is_callable('RandomCompat_substr')) { + if ( - defined('MB_OVERLOAD_STRING') && + defined('MB_OVERLOAD_STRING') + && ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING ) { /** @@ -102,25 +106,38 @@ if (!function_exists('RandomCompat_substr')) { 'RandomCompat_substr(): First argument should be a string' ); } + if (!is_int($start)) { throw new TypeError( 'RandomCompat_substr(): Second argument should be an integer' ); } + if ($length === null) { /** * mb_substr($str, 0, NULL, '8bit') returns an empty string on * PHP 5.3, so we have to find the length ourselves. */ - $length = RandomCompat_strlen($length) - $start; + $length = RandomCompat_strlen($binary_string) - $start; } elseif (!is_int($length)) { throw new TypeError( 'RandomCompat_substr(): Third argument should be an integer, or omitted' ); } - return mb_substr($binary_string, $start, $length, '8bit'); + + // Consistency with PHP's behavior + if ($start === RandomCompat_strlen($binary_string) && $length === 0) { + return ''; + } + if ($start > RandomCompat_strlen($binary_string)) { + return ''; + } + + return (string) mb_substr($binary_string, $start, $length, '8bit'); } + } else { + /** * substr() implementation that isn't brittle to mbstring.func_overload * @@ -141,20 +158,24 @@ if (!function_exists('RandomCompat_substr')) { 'RandomCompat_substr(): First argument should be a string' ); } + if (!is_int($start)) { throw new TypeError( 'RandomCompat_substr(): Second argument should be an integer' ); } + if ($length !== null) { if (!is_int($length)) { throw new TypeError( 'RandomCompat_substr(): Third argument should be an integer, or omitted' ); } - return substr($binary_string, $start, $length); + + return (string) substr($binary_string, $start, $length); } - return substr($binary_string, $start); + + return (string) substr($binary_string, $start); } } } diff --git a/vendor/paragonie/random_compat/lib/cast_to_int.php b/vendor/paragonie/random_compat/lib/cast_to_int.php index 474ce6400..be7388dfd 100644 --- a/vendor/paragonie/random_compat/lib/cast_to_int.php +++ b/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,7 +26,7 @@ * SOFTWARE. */ -if (!function_exists('RandomCompat_intval')) { +if (!is_callable('RandomCompat_intval')) { /** * Cast to an integer if we can, safely. @@ -37,28 +37,38 @@ if (!function_exists('RandomCompat_intval')) { * lose precision, so the <= and => operators might accidentally let a float * through. * - * @param numeric $number The number we want to convert to an int - * @param boolean $fail_open Set to true to not throw an exception + * @param int|float $number The number we want to convert to an int + * @param boolean $fail_open Set to true to not throw an exception * - * @return int (or float if $fail_open) + * @return float|int + * + * @throws TypeError */ function RandomCompat_intval($number, $fail_open = false) { - if (is_numeric($number)) { + if (is_int($number) || is_float($number)) { + $number += 0; + } elseif (is_numeric($number)) { $number += 0; } + if ( - is_float($number) && - $number > ~PHP_INT_MAX && + is_float($number) + && + $number > ~PHP_INT_MAX + && $number < PHP_INT_MAX ) { $number = (int) $number; } - if (is_int($number) || $fail_open) { - return $number; + + if (is_int($number)) { + return (int) $number; + } elseif (!$fail_open) { + throw new TypeError( + 'Expected an integer.' + ); } - throw new TypeError( - 'Expected an integer.' - ); + return $number; } } diff --git a/vendor/paragonie/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php index 57cfefdcd..6a91990ce 100644 --- a/vendor/paragonie/random_compat/lib/error_polyfill.php +++ b/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -4,8 +4,8 @@ * for using the new PHP 7 random_* API in PHP 5 projects * * The MIT License (MIT) - * - * Copyright (c) 2015 Paragon Initiative Enterprises + * + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -35,8 +35,15 @@ if (!class_exists('Error', false)) { } if (!class_exists('TypeError', false)) { - class TypeError extends Error - { - + if (is_subclass_of('Error', 'Exception')) { + class TypeError extends Error + { + + } + } else { + class TypeError extends Exception + { + + } } } diff --git a/vendor/paragonie/random_compat/lib/random.php b/vendor/paragonie/random_compat/lib/random.php index d1f7555af..df74c8a4b 100644 --- a/vendor/paragonie/random_compat/lib/random.php +++ b/vendor/paragonie/random_compat/lib/random.php @@ -1,22 +1,25 @@ GetRandom() - * 5. openssl_random_pseudo_bytes() (absolute last resort) - * - * See ERRATA.md for our reasoning behind this particular order - */ - if (extension_loaded('libsodium')) { - // See random_bytes_libsodium.php - require_once $RandomCompatDIR.'/random_bytes_libsodium.php'; + +/** + * PHP 7.0.0 and newer have these functions natively. + */ +if (PHP_VERSION_ID >= 70000) { + return; +} + +if (!defined('RANDOM_COMPAT_READ_BUFFER')) { + define('RANDOM_COMPAT_READ_BUFFER', 8); +} + +$RandomCompatDIR = dirname(__FILE__); + +require_once $RandomCompatDIR . '/byte_safe_strings.php'; +require_once $RandomCompatDIR . '/cast_to_int.php'; +require_once $RandomCompatDIR . '/error_polyfill.php'; + +if (!is_callable('random_bytes')) { + /** + * PHP 5.2.0 - 5.6.x way to implement random_bytes() + * + * We use conditional statements here to define the function in accordance + * to the operating environment. It's a micro-optimization. + * + * In order of preference: + * 1. Use libsodium if available. + * 2. fread() /dev/urandom if available (never on Windows) + * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) + * 4. COM('CAPICOM.Utilities.1')->GetRandom() + * + * See RATIONALE.md for our reasoning behind this particular order + */ + if (extension_loaded('libsodium')) { + // See random_bytes_libsodium.php + if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium.php'; + } elseif (method_exists('Sodium', 'randombytes_buf')) { + require_once $RandomCompatDIR . '/random_bytes_libsodium_legacy.php'; } + } + + /** + * Reading directly from /dev/urandom: + */ + if (DIRECTORY_SEPARATOR === '/') { + // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast + // way to exclude Windows. + $RandomCompatUrandom = true; + $RandomCompat_basedir = ini_get('open_basedir'); + + if (!empty($RandomCompat_basedir)) { + $RandomCompat_open_basedir = explode( + PATH_SEPARATOR, + strtolower($RandomCompat_basedir) + ); + $RandomCompatUrandom = (array() !== array_intersect( + array('/dev', '/dev/', '/dev/urandom'), + $RandomCompat_open_basedir + )); + $RandomCompat_open_basedir = null; + } + if ( - !function_exists('random_bytes') && - DIRECTORY_SEPARATOR === '/' && + !is_callable('random_bytes') + && + $RandomCompatUrandom + && @is_readable('/dev/urandom') ) { - // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast - // way to exclude Windows. - // - // Error suppression on is_readable() in case of an open_basedir or - // safe_mode failure. All we care about is whether or not we can - // read it at this point. If the PHP environment is going to panic - // over trying to see if the file can be read in the first place, - // that is not helpful to us here. - + // Error suppression on is_readable() in case of an open_basedir + // or safe_mode failure. All we care about is whether or not we + // can read it at this point. If the PHP environment is going to + // panic over trying to see if the file can be read in the first + // place, that is not helpful to us here. + // See random_bytes_dev_urandom.php - require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php'; + require_once $RandomCompatDIR . '/random_bytes_dev_urandom.php'; } - if ( - !function_exists('random_bytes') && - PHP_VERSION_ID >= 50307 && - extension_loaded('mcrypt') - ) { - // See random_bytes_mcrypt.php - require_once $RandomCompatDIR.'/random_bytes_mcrypt.php'; - } - if ( - !function_exists('random_bytes') && - extension_loaded('com_dotnet') && - class_exists('COM') - ) { + // Unset variables after use + $RandomCompat_basedir = null; + } else { + $RandomCompatUrandom = false; + } + + /** + * mcrypt_create_iv() + * + * We only want to use mcypt_create_iv() if: + * + * - random_bytes() hasn't already been defined + * - the mcrypt extensions is loaded + * - One of these two conditions is true: + * - We're on Windows (DIRECTORY_SEPARATOR !== '/') + * - We're not on Windows and /dev/urandom is readabale + * (i.e. we're not in a chroot jail) + * - Special case: + * - If we're not on Windows, but the PHP version is between + * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will + * hang indefinitely. This is bad. + * - If we're on Windows, we want to use PHP >= 5.3.7 or else + * we get insufficient entropy errors. + */ + if ( + !is_callable('random_bytes') + && + // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be. + (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307) + && + // Prevent this code from hanging indefinitely on non-Windows; + // see https://bugs.php.net/bug.php?id=69833 + ( + DIRECTORY_SEPARATOR !== '/' || + (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) + ) + && + extension_loaded('mcrypt') + ) { + // See random_bytes_mcrypt.php + require_once $RandomCompatDIR . '/random_bytes_mcrypt.php'; + } + $RandomCompatUrandom = null; + + /** + * This is a Windows-specific fallback, for when the mcrypt extension + * isn't loaded. + */ + if ( + !is_callable('random_bytes') + && + extension_loaded('com_dotnet') + && + class_exists('COM') + ) { + $RandomCompat_disabled_classes = preg_split( + '#\s*,\s*#', + strtolower(ini_get('disable_classes')) + ); + + if (!in_array('com', $RandomCompat_disabled_classes)) { try { $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); if (method_exists($RandomCompatCOMtest, 'GetRandom')) { // See random_bytes_com_dotnet.php - require_once $RandomCompatDIR.'/random_bytes_com_dotnet.php'; + require_once $RandomCompatDIR . '/random_bytes_com_dotnet.php'; } } catch (com_exception $e) { // Don't try to use it. } - $RandomCompatCOMtest = null; } - if ( - !function_exists('random_bytes') && - extension_loaded('openssl') && - ( - // Unix-like with PHP >= 5.3.0 or - ( - DIRECTORY_SEPARATOR === '/' && - PHP_VERSION_ID >= 50300 - ) || - // Windows with PHP >= 5.4.1 - PHP_VERSION_ID >= 50401 - ) - ) { - // See random_bytes_openssl.php - require_once $RandomCompatDIR.'/random_bytes_openssl.php'; - } - if (!function_exists('random_bytes')) { - /** - * We don't have any more options, so let's throw an exception right now - * and hope the developer won't let it fail silently. - */ - function random_bytes() - { - throw new Exception( - 'There is no suitable CSPRNG installed on your system' - ); - } + $RandomCompat_disabled_classes = null; + $RandomCompatCOMtest = null; + } + + /** + * throw new Exception + */ + if (!is_callable('random_bytes')) { + /** + * We don't have any more options, so let's throw an exception right now + * and hope the developer won't let it fail silently. + * + * @param mixed $length + * @return void + * @throws Exception + */ + function random_bytes($length) + { + unset($length); // Suppress "variable not used" warnings. + throw new Exception( + 'There is no suitable CSPRNG installed on your system' + ); } } - if (!function_exists('random_int')) { - require_once $RandomCompatDIR.'/random_int.php'; - } - $RandomCompatDIR = null; } + +if (!is_callable('random_int')) { + require_once $RandomCompatDIR . '/random_int.php'; +} + +$RandomCompatDIR = null; diff --git a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php index 0a781f4ef..fc1926e5c 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php @@ -5,7 +5,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2015 Paragon Initiative Enterprises + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,52 +26,63 @@ * SOFTWARE. */ -/** - * Windows with PHP < 5.3.0 will not have the function - * openssl_random_pseudo_bytes() available, so let's use - * CAPICOM to work around this deficiency. - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ -function random_bytes($bytes) -{ - try { - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - $buf = ''; - $util = new COM('CAPICOM.Utilities.1'); - $execCount = 0; +if (!is_callable('random_bytes')) { /** - * Let's not let it loop forever. If we run N times and fail to - * get N bytes of random data, then CAPICOM has failed us. + * Windows with PHP < 5.3.0 will not have the function + * openssl_random_pseudo_bytes() available, so let's use + * CAPICOM to work around this deficiency. + * + * @param int $bytes + * + * @throws Exception + * + * @return string */ - do { - $buf .= base64_decode($util->GetRandom($bytes, 0)); - if (RandomCompat_strlen($buf) >= $bytes) { - /** - * Return our random entropy buffer here: - */ - return RandomCompat_substr($buf, 0, $bytes); + function random_bytes($bytes) + { + try { + $bytes = RandomCompat_intval($bytes); + } catch (TypeError $ex) { + throw new TypeError( + 'random_bytes(): $bytes must be an integer' + ); } - ++$execCount; - } while ($execCount < $bytes); - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); -} + + if ($bytes < 1) { + throw new Error( + 'Length must be greater than 0' + ); + } + + $buf = ''; + if (!class_exists('COM')) { + throw new Error( + 'COM does not exist' + ); + } + $util = new COM('CAPICOM.Utilities.1'); + $execCount = 0; + + /** + * Let's not let it loop forever. If we run N times and fail to + * get N bytes of random data, then CAPICOM has failed us. + */ + do { + $buf .= base64_decode($util->GetRandom($bytes, 0)); + if (RandomCompat_strlen($buf) >= $bytes) { + /** + * Return our random entropy buffer here: + */ + return RandomCompat_substr($buf, 0, $bytes); + } + ++$execCount; + } while ($execCount < $bytes); + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} \ No newline at end of file diff --git a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php index 5d07104b3..df5b91524 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php @@ -4,8 +4,8 @@ * for using the new PHP 7 random_* API in PHP 5 projects * * The MIT License (MIT) - * - * Copyright (c) 2015 Paragon Initiative Enterprises + * + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -30,113 +30,138 @@ if (!defined('RANDOM_COMPAT_READ_BUFFER')) { define('RANDOM_COMPAT_READ_BUFFER', 8); } -/** - * Unless open_basedir is enabled, use /dev/urandom for - * random numbers in accordance with best practices - * - * Why we use /dev/urandom and not /dev/random - * @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ -function random_bytes($bytes) -{ - static $fp = null; +if (!is_callable('random_bytes')) { /** - * This block should only be run once + * Unless open_basedir is enabled, use /dev/urandom for + * random numbers in accordance with best practices + * + * Why we use /dev/urandom and not /dev/random + * @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers + * + * @param int $bytes + * + * @throws Exception + * + * @return string */ - if (empty($fp)) { + function random_bytes($bytes) + { + static $fp = null; /** - * We use /dev/urandom if it is a char device. - * We never fall back to /dev/random + * This block should only be run once */ - $fp = fopen('/dev/urandom', 'rb'); - if (!empty($fp)) { - $st = fstat($fp); - if (($st['mode'] & 0170000) !== 020000) { - fclose($fp); - $fp = false; + if (empty($fp)) { + /** + * We use /dev/urandom if it is a char device. + * We never fall back to /dev/random + */ + $fp = fopen('/dev/urandom', 'rb'); + if (!empty($fp)) { + $st = fstat($fp); + if (($st['mode'] & 0170000) !== 020000) { + fclose($fp); + $fp = false; + } + } + + if (!empty($fp)) { + /** + * stream_set_read_buffer() does not exist in HHVM + * + * If we don't set the stream's read buffer to 0, PHP will + * internally buffer 8192 bytes, which can waste entropy + * + * stream_set_read_buffer returns 0 on success + */ + if (is_callable('stream_set_read_buffer')) { + stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER); + } + if (is_callable('stream_set_chunk_size')) { + stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER); + } } } + + try { + $bytes = RandomCompat_intval($bytes); + } catch (TypeError $ex) { + throw new TypeError( + 'random_bytes(): $bytes must be an integer' + ); + } + + if ($bytes < 1) { + throw new Error( + 'Length must be greater than 0' + ); + } + + /** + * This if() block only runs if we managed to open a file handle + * + * It does not belong in an else {} block, because the above + * if (empty($fp)) line is logic that should only be run once per + * page load. + */ if (!empty($fp)) { /** - * stream_set_read_buffer() does not exist in HHVM - * - * If we don't set the stream's read buffer to 0, PHP will - * internally buffer 8192 bytes, which can waste entropy - * - * stream_set_read_buffer returns 0 on success + * @var int */ - if (function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER); - } - if (function_exists('stream_set_chunk_size')) { - stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER); - } - } - } - try { - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - /** - * This if() block only runs if we managed to open a file handle - * - * It does not belong in an else {} block, because the above - * if (empty($fp)) line is logic that should only be run once per - * page load. - */ - if (!empty($fp)) { - $remaining = $bytes; - $buf = ''; - /** - * We use fread() in a loop to protect against partial reads - */ - do { - $read = fread($fp, $remaining); - if ($read === false) { - /** - * We cannot safely read from the file. Exit the - * do-while loop and trigger the exception condition - */ - $buf = false; - break; - } + $remaining = $bytes; + /** - * Decrease the number of bytes returned from remaining + * @var string|bool */ - $remaining -= RandomCompat_strlen($read); - $buf .= $read; - } while ($remaining > 0); - - /** - * Is our result valid? - */ - if ($buf !== false) { - if (RandomCompat_strlen($buf) === $bytes) { + $buf = ''; + + /** + * We use fread() in a loop to protect against partial reads + */ + do { /** - * Return our random entropy buffer here: + * @var string|bool */ - return $buf; + $read = fread($fp, $remaining); + if (!is_string($read)) { + if ($read === false) { + /** + * We cannot safely read from the file. Exit the + * do-while loop and trigger the exception condition + * + * @var string|bool + */ + $buf = false; + break; + } + } + /** + * Decrease the number of bytes returned from remaining + */ + $remaining -= RandomCompat_strlen($read); + /** + * @var string|bool + */ + $buf = $buf . $read; + } while ($remaining > 0); + + /** + * Is our result valid? + */ + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + /** + * Return our random entropy buffer here: + */ + return $buf; + } } } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Error reading from source device' + ); } - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Error reading from source device' - ); } diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php index 938cac929..4af1a2422 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -4,8 +4,8 @@ * for using the new PHP 7 random_* API in PHP 5 projects * * The MIT License (MIT) - * - * Copyright (c) 2015 Paragon Initiative Enterprises + * + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,59 +26,63 @@ * SOFTWARE. */ -/** - * If the libsodium PHP extension is loaded, we'll use it above any other - * solution. - * - * libsodium-php project: - * @ref https://github.com/jedisct1/libsodium-php - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ -function random_bytes($bytes) -{ - try { - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' +if (!is_callable('random_bytes')) { + /** + * If the libsodium PHP extension is loaded, we'll use it above any other + * solution. + * + * libsodium-php project: + * @ref https://github.com/jedisct1/libsodium-php + * + * @param int $bytes + * + * @throws Exception + * + * @return string + */ + function random_bytes($bytes) + { + try { + $bytes = RandomCompat_intval($bytes); + } catch (TypeError $ex) { + throw new TypeError( + 'random_bytes(): $bytes must be an integer' + ); + } + + if ($bytes < 1) { + throw new Error( + 'Length must be greater than 0' + ); + } + + /** + * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be + * generated in one invocation. + */ + if ($bytes > 2147483647) { + $buf = ''; + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= \Sodium\randombytes_buf($n); + } + } else { + $buf = \Sodium\randombytes_buf($bytes); + } + + if ($buf !== false) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' ); } - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } - /** - * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be - * generated in one invocation. - */ - if ($bytes > 2147483647) { - $buf = ''; - for ($i = 0; $i < $bytes; $i += 1073741824) { - $n = ($bytes - $i) > 1073741824 - ? 1073741824 - : $bytes - $i; - $buf .= \Sodium\randombytes_buf($n); - } - } else { - $buf = \Sodium\randombytes_buf($bytes); - } - - if ($buf !== false) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); } diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php new file mode 100644 index 000000000..02160b919 --- /dev/null +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php @@ -0,0 +1,92 @@ + 2147483647) { + for ($i = 0; $i < $bytes; $i += 1073741824) { + $n = ($bytes - $i) > 1073741824 + ? 1073741824 + : $bytes - $i; + $buf .= Sodium::randombytes_buf($n); + } + } else { + $buf .= Sodium::randombytes_buf($bytes); + } + + if (is_string($buf)) { + if (RandomCompat_strlen($buf) === $bytes) { + return $buf; + } + } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); + } +} diff --git a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php index 5a1b688f6..aac9c013d 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php @@ -4,8 +4,8 @@ * for using the new PHP 7 random_* API in PHP 5 projects * * The MIT License (MIT) - * - * Copyright (c) 2015 Paragon Initiative Enterprises + * + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -26,47 +26,52 @@ * SOFTWARE. */ +if (!is_callable('random_bytes')) { + /** + * Powered by ext/mcrypt (and thankfully NOT libmcrypt) + * + * @ref https://bugs.php.net/bug.php?id=55169 + * @ref https://github.com/php/php-src/blob/c568ffe5171d942161fc8dda066bce844bdef676/ext/mcrypt/mcrypt.c#L1321-L1386 + * + * @param int $bytes + * + * @throws Exception + * + * @return string + */ + function random_bytes($bytes) + { + try { + $bytes = RandomCompat_intval($bytes); + } catch (TypeError $ex) { + throw new TypeError( + 'random_bytes(): $bytes must be an integer' + ); + } -/** - * Powered by ext/mcrypt (and thankfully NOT libmcrypt) - * - * @ref https://bugs.php.net/bug.php?id=55169 - * @ref https://github.com/php/php-src/blob/c568ffe5171d942161fc8dda066bce844bdef676/ext/mcrypt/mcrypt.c#L1321-L1386 - * - * @param int $bytes - * - * @throws Exception - * - * @return string - */ -function random_bytes($bytes) -{ - try { - $bytes = RandomCompat_intval($bytes); - } catch (TypeError $ex) { - throw new TypeError( - 'random_bytes(): $bytes must be an integer' - ); - } - if ($bytes < 1) { - throw new Error( - 'Length must be greater than 0' - ); - } + if ($bytes < 1) { + throw new Error( + 'Length must be greater than 0' + ); + } - $buf = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM); - if ($buf !== false) { - if (RandomCompat_strlen($buf) === $bytes) { + $buf = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM); + if ( + $buf !== false + && + RandomCompat_strlen($buf) === $bytes + ) { /** * Return our random entropy buffer here: */ return $buf; } + + /** + * If we reach here, PHP has failed us. + */ + throw new Exception( + 'Could not gather sufficient random data' + ); } - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); } diff --git a/vendor/paragonie/random_compat/lib/random_int.php b/vendor/paragonie/random_compat/lib/random_int.php index 6c91dbc51..b2ea02d17 100644 --- a/vendor/paragonie/random_compat/lib/random_int.php +++ b/vendor/paragonie/random_compat/lib/random_int.php @@ -1,185 +1,190 @@ operators might accidentally let a float - * through. + * Random_* Compatibility Library + * for using the new PHP 7 random_* API in PHP 5 projects + * + * The MIT License (MIT) + * + * Copyright (c) 2015 - 2017 Paragon Initiative Enterprises + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ - - try { - $min = RandomCompat_intval($min); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $min must be an integer' - ); - } - try { - $max = RandomCompat_intval($max); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $max must be an integer' - ); - } - - /** - * Now that we've verified our weak typing system has given us an integer, - * let's validate the logic then we can move forward with generating random - * integers along a given range. - */ - if ($min > $max) { - throw new Error( - 'Minimum value must be less than or equal to the maximum value' - ); - } - if ($max === $min) { - return $min; - } /** - * Initialize variables to 0 - * - * We want to store: - * $bytes => the number of random bytes we need - * $mask => an integer bitmask (for use with the &) operator - * so we can minimize the number of discards + * Fetch a random integer between $min and $max inclusive + * + * @param int $min + * @param int $max + * + * @throws Exception + * + * @return int */ - $attempts = $bits = $bytes = $mask = $valueShift = 0; - - /** - * At this point, $range is a positive number greater than 0. It might - * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to - * a float and we will lose some precision. - */ - $range = $max - $min; - - /** - * Test for integer overflow: - */ - if (!is_int($range)) { + function random_int($min, $max) + { /** - * Still safely calculate wider ranges. - * Provided by @CodesInChaos, @oittaa - * - * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 - * - * We use ~0 as a mask in this case because it generates all 1s - * - * @ref https://eval.in/400356 (32-bit) - * @ref http://3v4l.org/XX9r5 (64-bit) + * Type and input logic checks + * + * If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX) + * (non-inclusive), it will sanely cast it to an int. If you it's equal to + * ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats + * lose precision, so the <= and => operators might accidentally let a float + * through. */ - $bytes = PHP_INT_SIZE; - $mask = ~0; - } else { + + try { + $min = RandomCompat_intval($min); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $min must be an integer' + ); + } + + try { + $max = RandomCompat_intval($max); + } catch (TypeError $ex) { + throw new TypeError( + 'random_int(): $max must be an integer' + ); + } + /** - * $bits is effectively ceil(log($range, 2)) without dealing with - * type juggling + * Now that we've verified our weak typing system has given us an integer, + * let's validate the logic then we can move forward with generating random + * integers along a given range. */ - while ($range > 0) { - if ($bits % 8 === 0) { - ++$bytes; + if ($min > $max) { + throw new Error( + 'Minimum value must be less than or equal to the maximum value' + ); + } + + if ($max === $min) { + return $min; + } + + /** + * Initialize variables to 0 + * + * We want to store: + * $bytes => the number of random bytes we need + * $mask => an integer bitmask (for use with the &) operator + * so we can minimize the number of discards + */ + $attempts = $bits = $bytes = $mask = $valueShift = 0; + + /** + * At this point, $range is a positive number greater than 0. It might + * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to + * a float and we will lose some precision. + */ + $range = $max - $min; + + /** + * Test for integer overflow: + */ + if (!is_int($range)) { + + /** + * Still safely calculate wider ranges. + * Provided by @CodesInChaos, @oittaa + * + * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 + * + * We use ~0 as a mask in this case because it generates all 1s + * + * @ref https://eval.in/400356 (32-bit) + * @ref http://3v4l.org/XX9r5 (64-bit) + */ + $bytes = PHP_INT_SIZE; + $mask = ~0; + + } else { + + /** + * $bits is effectively ceil(log($range, 2)) without dealing with + * type juggling + */ + while ($range > 0) { + if ($bits % 8 === 0) { + ++$bytes; + } + ++$bits; + $range >>= 1; + $mask = $mask << 1 | 1; } - ++$bits; - $range >>= 1; - $mask = $mask << 1 | 1; - } - $valueShift = $min; - } - - /** - * Now that we have our parameters set up, let's begin generating - * random integers until one falls between $min and $max - */ - do { - /** - * The rejection probability is at most 0.5, so this corresponds - * to a failure probability of 2^-128 for a working RNG - */ - if ($attempts > 128) { - throw new Exception( - 'random_int: RNG is broken - too many rejections' - ); + $valueShift = $min; } - /** - * Let's grab the necessary number of random bytes - */ - $randomByteString = random_bytes($bytes); - if ($randomByteString === false) { - throw new Exception( - 'Random number generator failure' - ); - } - - /** - * Let's turn $randomByteString into an integer - * - * This uses bitwise operators (<< and |) to build an integer - * out of the values extracted from ord() - * - * Example: [9F] | [6D] | [32] | [0C] => - * 159 + 27904 + 3276800 + 201326592 => - * 204631455 - */ $val = 0; - for ($i = 0; $i < $bytes; ++$i) { - $val |= ord($randomByteString[$i]) << ($i * 8); - } - /** - * Apply mask + * Now that we have our parameters set up, let's begin generating + * random integers until one falls between $min and $max */ - $val &= $mask; - $val += $valueShift; + do { + /** + * The rejection probability is at most 0.5, so this corresponds + * to a failure probability of 2^-128 for a working RNG + */ + if ($attempts > 128) { + throw new Exception( + 'random_int: RNG is broken - too many rejections' + ); + } - ++$attempts; - /** - * If $val overflows to a floating point number, - * ... or is larger than $max, - * ... or smaller than $min, - * then try again. - */ - } while (!is_int($val) || $val > $max || $val < $min); - return (int) $val; + /** + * Let's grab the necessary number of random bytes + */ + $randomByteString = random_bytes($bytes); + + /** + * Let's turn $randomByteString into an integer + * + * This uses bitwise operators (<< and |) to build an integer + * out of the values extracted from ord() + * + * Example: [9F] | [6D] | [32] | [0C] => + * 159 + 27904 + 3276800 + 201326592 => + * 204631455 + */ + $val &= 0; + for ($i = 0; $i < $bytes; ++$i) { + $val |= ord($randomByteString[$i]) << ($i * 8); + } + + /** + * Apply mask + */ + $val &= $mask; + $val += $valueShift; + + ++$attempts; + /** + * If $val overflows to a floating point number, + * ... or is larger than $max, + * ... or smaller than $min, + * then try again. + */ + } while (!is_int($val) || $val > $max || $val < $min); + + return (int)$val; + } } diff --git a/vendor/paragonie/random_compat/other/build_phar.php b/vendor/paragonie/random_compat/other/build_phar.php new file mode 100644 index 000000000..70ef4b2ed --- /dev/null +++ b/vendor/paragonie/random_compat/other/build_phar.php @@ -0,0 +1,57 @@ +buildFromDirectory(dirname(__DIR__).'/lib'); +rename( + dirname(__DIR__).'/lib/index.php', + dirname(__DIR__).'/lib/random.php' +); + +/** + * If we pass an (optional) path to a private key as a second argument, we will + * sign the Phar with OpenSSL. + * + * If you leave this out, it will produce an unsigned .phar! + */ +if ($argc > 1) { + if (!@is_readable($argv[1])) { + echo 'Could not read the private key file:', $argv[1], "\n"; + exit(255); + } + $pkeyFile = file_get_contents($argv[1]); + + $private = openssl_get_privatekey($pkeyFile); + if ($private !== false) { + $pkey = ''; + openssl_pkey_export($private, $pkey); + $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); + + /** + * Save the corresponding public key to the file + */ + if (!@is_readable($dist.'/random_compat.phar.pubkey')) { + $details = openssl_pkey_get_details($private); + file_put_contents( + $dist.'/random_compat.phar.pubkey', + $details['key'] + ); + } + } else { + echo 'An error occurred reading the private key from OpenSSL.', "\n"; + exit(255); + } +} diff --git a/vendor/paragonie/random_compat/psalm-autoload.php b/vendor/paragonie/random_compat/psalm-autoload.php new file mode 100644 index 000000000..d71d1b818 --- /dev/null +++ b/vendor/paragonie/random_compat/psalm-autoload.php @@ -0,0 +1,9 @@ + + + + + + + + + + + diff --git a/vendor/psr/http-message/CHANGELOG.md b/vendor/psr/http-message/CHANGELOG.md new file mode 100644 index 000000000..74b1ef923 --- /dev/null +++ b/vendor/psr/http-message/CHANGELOG.md @@ -0,0 +1,36 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 1.0.1 - 2016-08-06 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Updated all `@return self` annotation references in interfaces to use + `@return static`, which more closelly follows the semantics of the + specification. +- Updated the `MessageInterface::getHeaders()` return annotation to use the + value `string[][]`, indicating the format is a nested array of strings. +- Updated the `@link` annotation for `RequestInterface::withRequestTarget()` + to point to the correct section of RFC 7230. +- Updated the `ServerRequestInterface::withUploadedFiles()` parameter annotation + to add the parameter name (`$uploadedFiles`). +- Updated a `@throws` annotation for the `UploadedFileInterface::moveTo()` + method to correctly reference the method parameter (it was referencing an + incorrect parameter name previously). + +## 1.0.0 - 2016-05-18 + +Initial stable release; reflects accepted PSR-7 specification. diff --git a/vendor/psr/http-message/composer.json b/vendor/psr/http-message/composer.json index 4774b6126..b0d2937a0 100644 --- a/vendor/psr/http-message/composer.json +++ b/vendor/psr/http-message/composer.json @@ -2,6 +2,7 @@ "name": "psr/http-message", "description": "Common interface for HTTP messages", "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"], + "homepage": "https://github.com/php-fig/http-message", "license": "MIT", "authors": [ { diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php index 8f67a050e..dd46e5ec8 100644 --- a/vendor/psr/http-message/src/MessageInterface.php +++ b/vendor/psr/http-message/src/MessageInterface.php @@ -36,7 +36,7 @@ interface MessageInterface * new protocol version. * * @param string $version HTTP protocol version - * @return self + * @return static */ public function withProtocolVersion($version); @@ -61,7 +61,7 @@ interface MessageInterface * While header names are not case-sensitive, getHeaders() will preserve the * exact case in which headers were originally specified. * - * @return array Returns an associative array of the message's headers. Each + * @return string[][] Returns an associative array of the message's headers. Each * key MUST be a header name, and each value MUST be an array of strings * for that header. */ @@ -126,7 +126,7 @@ interface MessageInterface * * @param string $name Case-insensitive header field name. * @param string|string[] $value Header value(s). - * @return self + * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withHeader($name, $value); @@ -144,7 +144,7 @@ interface MessageInterface * * @param string $name Case-insensitive header field name to add. * @param string|string[] $value Header value(s). - * @return self + * @return static * @throws \InvalidArgumentException for invalid header names or values. */ public function withAddedHeader($name, $value); @@ -159,7 +159,7 @@ interface MessageInterface * the named header. * * @param string $name Case-insensitive header field name to remove. - * @return self + * @return static */ public function withoutHeader($name); @@ -180,7 +180,7 @@ interface MessageInterface * new body stream. * * @param StreamInterface $body Body. - * @return self + * @return static * @throws \InvalidArgumentException When the body is not valid. */ public function withBody(StreamInterface $body); diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php index 75c802e29..a96d4fd63 100644 --- a/vendor/psr/http-message/src/RequestInterface.php +++ b/vendor/psr/http-message/src/RequestInterface.php @@ -53,10 +53,10 @@ interface RequestInterface extends MessageInterface * immutability of the message, and MUST return an instance that has the * changed request target. * - * @link http://tools.ietf.org/html/rfc7230#section-2.7 (for the various + * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various * request-target forms allowed in request messages) * @param mixed $requestTarget - * @return self + * @return static */ public function withRequestTarget($requestTarget); @@ -79,7 +79,7 @@ interface RequestInterface extends MessageInterface * changed request method. * * @param string $method Case-sensitive method. - * @return self + * @return static * @throws \InvalidArgumentException for invalid HTTP methods. */ public function withMethod($method); @@ -107,7 +107,7 @@ interface RequestInterface extends MessageInterface * setting `$preserveHost` to `true`. When `$preserveHost` is set to * `true`, this method interacts with the Host header in the following ways: * - * - If the the Host header is missing or empty, and the new URI contains + * - If the Host header is missing or empty, and the new URI contains * a host component, this method MUST update the Host header in the returned * request. * - If the Host header is missing or empty, and the new URI does not contain a @@ -123,7 +123,7 @@ interface RequestInterface extends MessageInterface * @link http://tools.ietf.org/html/rfc3986#section-4.3 * @param UriInterface $uri New request URI to use. * @param bool $preserveHost Preserve the original state of the Host header. - * @return self + * @return static */ public function withUri(UriInterface $uri, $preserveHost = false); } diff --git a/vendor/psr/http-message/src/ResponseInterface.php b/vendor/psr/http-message/src/ResponseInterface.php index 6724809e3..c306514e6 100644 --- a/vendor/psr/http-message/src/ResponseInterface.php +++ b/vendor/psr/http-message/src/ResponseInterface.php @@ -46,7 +46,7 @@ interface ResponseInterface extends MessageInterface * @param string $reasonPhrase The reason phrase to use with the * provided status code; if none is provided, implementations MAY * use the defaults as suggested in the HTTP specification. - * @return self + * @return static * @throws \InvalidArgumentException For invalid status code arguments. */ public function withStatus($code, $reasonPhrase = ''); diff --git a/vendor/psr/http-message/src/ServerRequestInterface.php b/vendor/psr/http-message/src/ServerRequestInterface.php index 916e0658d..02512340a 100644 --- a/vendor/psr/http-message/src/ServerRequestInterface.php +++ b/vendor/psr/http-message/src/ServerRequestInterface.php @@ -80,7 +80,7 @@ interface ServerRequestInterface extends RequestInterface * updated cookie values. * * @param array $cookies Array of key/value pairs representing cookies. - * @return self + * @return static */ public function withCookieParams(array $cookies); @@ -118,7 +118,7 @@ interface ServerRequestInterface extends RequestInterface * * @param array $query Array of query string arguments, typically from * $_GET. - * @return self + * @return static */ public function withQueryParams(array $query); @@ -143,8 +143,8 @@ interface ServerRequestInterface extends RequestInterface * immutability of the message, and MUST return an instance that has the * updated body parameters. * - * @param array An array tree of UploadedFileInterface instances. - * @return self + * @param array $uploadedFiles An array tree of UploadedFileInterface instances. + * @return static * @throws \InvalidArgumentException if an invalid structure is provided. */ public function withUploadedFiles(array $uploadedFiles); @@ -190,7 +190,7 @@ interface ServerRequestInterface extends RequestInterface * * @param null|array|object $data The deserialized body data. This will * typically be in an array or object. - * @return self + * @return static * @throws \InvalidArgumentException if an unsupported argument type is * provided. */ @@ -239,7 +239,7 @@ interface ServerRequestInterface extends RequestInterface * @see getAttributes() * @param string $name The attribute name. * @param mixed $value The value of the attribute. - * @return self + * @return static */ public function withAttribute($name, $value); @@ -255,7 +255,7 @@ interface ServerRequestInterface extends RequestInterface * * @see getAttributes() * @param string $name The attribute name. - * @return self + * @return static */ public function withoutAttribute($name); } diff --git a/vendor/psr/http-message/src/UploadedFileInterface.php b/vendor/psr/http-message/src/UploadedFileInterface.php index 5ad288d2b..f8a6901e0 100644 --- a/vendor/psr/http-message/src/UploadedFileInterface.php +++ b/vendor/psr/http-message/src/UploadedFileInterface.php @@ -58,7 +58,7 @@ interface UploadedFileInterface * @see http://php.net/is_uploaded_file * @see http://php.net/move_uploaded_file * @param string $targetPath Path to which to move the uploaded file. - * @throws \InvalidArgumentException if the $path specified is invalid. + * @throws \InvalidArgumentException if the $targetPath specified is invalid. * @throws \RuntimeException on any error during the move operation, or on * the second or subsequent call to the method. */ diff --git a/vendor/psr/http-message/src/UriInterface.php b/vendor/psr/http-message/src/UriInterface.php index 1ff5bf01d..9d7ab9eae 100644 --- a/vendor/psr/http-message/src/UriInterface.php +++ b/vendor/psr/http-message/src/UriInterface.php @@ -185,7 +185,7 @@ interface UriInterface * An empty scheme is equivalent to removing the scheme. * * @param string $scheme The scheme to use with the new instance. - * @return self A new instance with the specified scheme. + * @return static A new instance with the specified scheme. * @throws \InvalidArgumentException for invalid or unsupported schemes. */ public function withScheme($scheme); @@ -202,7 +202,7 @@ interface UriInterface * * @param string $user The user name to use for authority. * @param null|string $password The password associated with $user. - * @return self A new instance with the specified user information. + * @return static A new instance with the specified user information. */ public function withUserInfo($user, $password = null); @@ -215,7 +215,7 @@ interface UriInterface * An empty host value is equivalent to removing the host. * * @param string $host The hostname to use with the new instance. - * @return self A new instance with the specified host. + * @return static A new instance with the specified host. * @throws \InvalidArgumentException for invalid hostnames. */ public function withHost($host); @@ -234,7 +234,7 @@ interface UriInterface * * @param null|int $port The port to use with the new instance; a null value * removes the port information. - * @return self A new instance with the specified port. + * @return static A new instance with the specified port. * @throws \InvalidArgumentException for invalid ports. */ public function withPort($port); @@ -258,7 +258,7 @@ interface UriInterface * Implementations ensure the correct encoding as outlined in getPath(). * * @param string $path The path to use with the new instance. - * @return self A new instance with the specified path. + * @return static A new instance with the specified path. * @throws \InvalidArgumentException for invalid paths. */ public function withPath($path); @@ -275,7 +275,7 @@ interface UriInterface * An empty query string value is equivalent to removing the query string. * * @param string $query The query string to use with the new instance. - * @return self A new instance with the specified query string. + * @return static A new instance with the specified query string. * @throws \InvalidArgumentException for invalid query strings. */ public function withQuery($query); @@ -292,7 +292,7 @@ interface UriInterface * An empty fragment value is equivalent to removing the fragment. * * @param string $fragment The fragment to use with the new instance. - * @return self A new instance with the specified fragment. + * @return static A new instance with the specified fragment. */ public function withFragment($fragment); diff --git a/vendor/psr/log/Psr/Log/AbstractLogger.php b/vendor/psr/log/Psr/Log/AbstractLogger.php index 00f903452..90e721af2 100644 --- a/vendor/psr/log/Psr/Log/AbstractLogger.php +++ b/vendor/psr/log/Psr/Log/AbstractLogger.php @@ -15,8 +15,9 @@ abstract class AbstractLogger implements LoggerInterface * System is unusable. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function emergency($message, array $context = array()) { @@ -30,8 +31,9 @@ abstract class AbstractLogger implements LoggerInterface * trigger the SMS alerts and wake you up. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function alert($message, array $context = array()) { @@ -44,8 +46,9 @@ abstract class AbstractLogger implements LoggerInterface * Example: Application component unavailable, unexpected exception. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function critical($message, array $context = array()) { @@ -57,8 +60,9 @@ abstract class AbstractLogger implements LoggerInterface * be logged and monitored. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function error($message, array $context = array()) { @@ -72,8 +76,9 @@ abstract class AbstractLogger implements LoggerInterface * that are not necessarily wrong. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function warning($message, array $context = array()) { @@ -84,8 +89,9 @@ abstract class AbstractLogger implements LoggerInterface * Normal but significant events. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function notice($message, array $context = array()) { @@ -98,8 +104,9 @@ abstract class AbstractLogger implements LoggerInterface * Example: User logs in, SQL logs. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function info($message, array $context = array()) { @@ -110,8 +117,9 @@ abstract class AbstractLogger implements LoggerInterface * Detailed debug information. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function debug($message, array $context = array()) { diff --git a/vendor/psr/log/Psr/Log/LogLevel.php b/vendor/psr/log/Psr/Log/LogLevel.php index e32c151cb..9cebcace6 100644 --- a/vendor/psr/log/Psr/Log/LogLevel.php +++ b/vendor/psr/log/Psr/Log/LogLevel.php @@ -3,16 +3,16 @@ namespace Psr\Log; /** - * Describes log levels + * Describes log levels. */ class LogLevel { const EMERGENCY = 'emergency'; - const ALERT = 'alert'; - const CRITICAL = 'critical'; - const ERROR = 'error'; - const WARNING = 'warning'; - const NOTICE = 'notice'; - const INFO = 'info'; - const DEBUG = 'debug'; + const ALERT = 'alert'; + const CRITICAL = 'critical'; + const ERROR = 'error'; + const WARNING = 'warning'; + const NOTICE = 'notice'; + const INFO = 'info'; + const DEBUG = 'debug'; } diff --git a/vendor/psr/log/Psr/Log/LoggerAwareInterface.php b/vendor/psr/log/Psr/Log/LoggerAwareInterface.php index 2eebc4ebd..4d64f4786 100644 --- a/vendor/psr/log/Psr/Log/LoggerAwareInterface.php +++ b/vendor/psr/log/Psr/Log/LoggerAwareInterface.php @@ -3,15 +3,16 @@ namespace Psr\Log; /** - * Describes a logger-aware instance + * Describes a logger-aware instance. */ interface LoggerAwareInterface { /** - * Sets a logger instance on the object + * Sets a logger instance on the object. * * @param LoggerInterface $logger - * @return null + * + * @return void */ public function setLogger(LoggerInterface $logger); } diff --git a/vendor/psr/log/Psr/Log/LoggerAwareTrait.php b/vendor/psr/log/Psr/Log/LoggerAwareTrait.php index f087a3dac..639f79bda 100644 --- a/vendor/psr/log/Psr/Log/LoggerAwareTrait.php +++ b/vendor/psr/log/Psr/Log/LoggerAwareTrait.php @@ -7,12 +7,16 @@ namespace Psr\Log; */ trait LoggerAwareTrait { - /** @var LoggerInterface */ + /** + * The logger instance. + * + * @var LoggerInterface + */ protected $logger; /** * Sets a logger. - * + * * @param LoggerInterface $logger */ public function setLogger(LoggerInterface $logger) diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php index 476bb962a..5ea72438b 100644 --- a/vendor/psr/log/Psr/Log/LoggerInterface.php +++ b/vendor/psr/log/Psr/Log/LoggerInterface.php @@ -3,14 +3,14 @@ namespace Psr\Log; /** - * Describes a logger instance + * Describes a logger instance. * * The message MUST be a string or object implementing __toString(). * * The message MAY contain placeholders in the form: {foo} where foo * will be replaced by the context data in key "foo". * - * The context array can contain arbitrary data, the only assumption that + * The context array can contain arbitrary data. The only assumption that * can be made by implementors is that if an Exception instance is given * to produce a stack trace, it MUST be in a key named "exception". * @@ -23,8 +23,9 @@ interface LoggerInterface * System is unusable. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function emergency($message, array $context = array()); @@ -35,8 +36,9 @@ interface LoggerInterface * trigger the SMS alerts and wake you up. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function alert($message, array $context = array()); @@ -46,8 +48,9 @@ interface LoggerInterface * Example: Application component unavailable, unexpected exception. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function critical($message, array $context = array()); @@ -56,8 +59,9 @@ interface LoggerInterface * be logged and monitored. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function error($message, array $context = array()); @@ -68,8 +72,9 @@ interface LoggerInterface * that are not necessarily wrong. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function warning($message, array $context = array()); @@ -77,8 +82,9 @@ interface LoggerInterface * Normal but significant events. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function notice($message, array $context = array()); @@ -88,8 +94,9 @@ interface LoggerInterface * Example: User logs in, SQL logs. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function info($message, array $context = array()); @@ -97,18 +104,20 @@ interface LoggerInterface * Detailed debug information. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function debug($message, array $context = array()); /** * Logs with an arbitrary level. * - * @param mixed $level + * @param mixed $level * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function log($level, $message, array $context = array()); } diff --git a/vendor/psr/log/Psr/Log/LoggerTrait.php b/vendor/psr/log/Psr/Log/LoggerTrait.php index 591249600..867225df1 100644 --- a/vendor/psr/log/Psr/Log/LoggerTrait.php +++ b/vendor/psr/log/Psr/Log/LoggerTrait.php @@ -6,8 +6,8 @@ namespace Psr\Log; * This is a simple Logger trait that classes unable to extend AbstractLogger * (because they extend another class, etc) can include. * - * It simply delegates all log-level-specific methods to the `log` method to - * reduce boilerplate code that a simple Logger that does the same thing with + * It simply delegates all log-level-specific methods to the `log` method to + * reduce boilerplate code that a simple Logger that does the same thing with * messages regardless of the error level has to implement. */ trait LoggerTrait @@ -16,8 +16,9 @@ trait LoggerTrait * System is unusable. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function emergency($message, array $context = array()) { @@ -31,8 +32,9 @@ trait LoggerTrait * trigger the SMS alerts and wake you up. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function alert($message, array $context = array()) { @@ -45,8 +47,9 @@ trait LoggerTrait * Example: Application component unavailable, unexpected exception. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function critical($message, array $context = array()) { @@ -58,8 +61,9 @@ trait LoggerTrait * be logged and monitored. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function error($message, array $context = array()) { @@ -73,8 +77,9 @@ trait LoggerTrait * that are not necessarily wrong. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function warning($message, array $context = array()) { @@ -85,8 +90,9 @@ trait LoggerTrait * Normal but significant events. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function notice($message, array $context = array()) { @@ -99,8 +105,9 @@ trait LoggerTrait * Example: User logs in, SQL logs. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function info($message, array $context = array()) { @@ -111,8 +118,9 @@ trait LoggerTrait * Detailed debug information. * * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function debug($message, array $context = array()) { @@ -122,10 +130,11 @@ trait LoggerTrait /** * Logs with an arbitrary level. * - * @param mixed $level + * @param mixed $level * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ abstract public function log($level, $message, array $context = array()); } diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php index 553a3c593..d8cd682c8 100644 --- a/vendor/psr/log/Psr/Log/NullLogger.php +++ b/vendor/psr/log/Psr/Log/NullLogger.php @@ -3,7 +3,7 @@ namespace Psr\Log; /** - * This Logger can be used to avoid conditional log calls + * This Logger can be used to avoid conditional log calls. * * Logging should always be optional, and if no logger is provided to your * library creating a NullLogger instance to have something to throw logs at @@ -15,10 +15,11 @@ class NullLogger extends AbstractLogger /** * Logs with an arbitrary level. * - * @param mixed $level + * @param mixed $level * @param string $message - * @param array $context - * @return null + * @param array $context + * + * @return void */ public function log($level, $message, array $context = array()) { diff --git a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php index a93281511..a0391a52b 100644 --- a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +++ b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php @@ -2,28 +2,32 @@ namespace Psr\Log\Test; +use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; /** - * Provides a base test class for ensuring compliance with the LoggerInterface + * Provides a base test class for ensuring compliance with the LoggerInterface. * - * Implementors can extend the class and implement abstract methods to run this as part of their test suite + * Implementors can extend the class and implement abstract methods to run this + * as part of their test suite. */ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase { /** * @return LoggerInterface */ - abstract function getLogger(); + abstract public function getLogger(); /** - * This must return the log messages in order with a simple formatting: " " + * This must return the log messages in order. * - * Example ->error('Foo') would yield "error Foo" + * The simple formatting of the messages is: " ". + * + * Example ->error('Foo') would yield "error Foo". * * @return string[] */ - abstract function getLogs(); + abstract public function getLogs(); public function testImplements() { @@ -61,7 +65,7 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase } /** - * @expectedException Psr\Log\InvalidArgumentException + * @expectedException \Psr\Log\InvalidArgumentException */ public function testThrowsOnInvalidLevel() { @@ -80,12 +84,19 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase public function testObjectCastToString() { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); + if (method_exists($this, 'createPartialMock')) { + $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); + } else { + $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); + } $dummy->expects($this->once()) ->method('__toString') ->will($this->returnValue('DUMMY')); $this->getLogger()->warning($dummy); + + $expected = array('warning DUMMY'); + $this->assertEquals($expected, $this->getLogs()); } public function testContextCanContainAnything() @@ -102,15 +113,28 @@ abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase ); $this->getLogger()->warning('Crazy context data', $context); + + $expected = array('warning Crazy context data'); + $this->assertEquals($expected, $this->getLogs()); } public function testContextExceptionKeyCanBeExceptionOrOtherValues() { - $this->getLogger()->warning('Random message', array('exception' => 'oops')); - $this->getLogger()->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); + $logger = $this->getLogger(); + $logger->warning('Random message', array('exception' => 'oops')); + $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); + + $expected = array( + 'warning Random message', + 'critical Uncaught Exception!' + ); + $this->assertEquals($expected, $this->getLogs()); } } class DummyTest { -} \ No newline at end of file + public function __toString() + { + } +} diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json index 6bdcc2194..87934d707 100644 --- a/vendor/psr/log/composer.json +++ b/vendor/psr/log/composer.json @@ -2,6 +2,7 @@ "name": "psr/log", "description": "Common interface for logging libraries", "keywords": ["psr", "psr-3", "log"], + "homepage": "https://github.com/php-fig/log", "license": "MIT", "authors": [ { @@ -9,9 +10,17 @@ "homepage": "http://www.php-fig.org/" } ], + "require": { + "php": ">=5.3.0" + }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" } } } diff --git a/vendor/stack/builder/CHANGELOG.md b/vendor/stack/builder/CHANGELOG.md index d44fa88fa..0e3d1c74b 100644 --- a/vendor/stack/builder/CHANGELOG.md +++ b/vendor/stack/builder/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +* 1.0.4 (2016-06-02) + + * Add compability with Symfony 3. + * 1.0.3 (2014-11-23) * Only call Terminable middlewares once. diff --git a/vendor/stack/builder/README.md b/vendor/stack/builder/README.md index 812406c24..a96697a53 100644 --- a/vendor/stack/builder/README.md +++ b/vendor/stack/builder/README.md @@ -10,51 +10,58 @@ HttpKernelInterface decorator tree. It models it as a stack of middlewares. If you want to decorate a [silex](https://github.com/fabpot/Silex) app with session and cache middlewares, you'll have to do something like this: - use Symfony\Component\HttpKernel\HttpCache\Store; +```php +use Symfony\Component\HttpKernel\HttpCache\Store; - $app = new Silex\Application(); +$app = new Silex\Application(); - $app->get('/', function () { - return 'Hello World!'; - }); +$app->get('/', function () { + return 'Hello World!'; +}); - $app = new Stack\Session( - new Symfony\Component\HttpKernel\HttpCache\HttpCache( - $app, - new Store(__DIR__.'/cache') - ) - ); +$app = new Stack\Session( + new Symfony\Component\HttpKernel\HttpCache\HttpCache( + $app, + new Store(__DIR__.'/cache') + ) +); +``` This can get quite annoying indeed. Stack/Builder simplifies that: - $stack = (new Stack\Builder()) - ->push('Stack\Session') - ->push('Symfony\Component\HttpKernel\HttpCache\HttpCache', new Store(__DIR__.'/cache')); - - $app = $stack->resolve($app); +```php +$stack = (new Stack\Builder()) + ->push('Stack\Session') + ->push('Symfony\Component\HttpKernel\HttpCache\HttpCache', new Store(__DIR__.'/cache')); +$app = $stack->resolve($app); +``` As you can see, by arranging the layers as a stack, they become a lot easier to work with. In the front controller, you need to serve the request: - use Symfony\Component\HttpFoundation\Request; - - $request = Request::createFromGlobals(); - $response = $app->handle($request)->send(); - $app->terminate($request, $response); +```php +use Symfony\Component\HttpFoundation\Request; +$request = Request::createFromGlobals(); +$response = $app->handle($request)->send(); +$app->terminate($request, $response); +``` Stack/Builder also supports pushing a `callable` on to the stack, for situations where instantiating middlewares might be more complicated. The `callable` should accept a `HttpKernelInterface` as the first argument and should also return a `HttpKernelInterface`. The example above could be rewritten as: - $stack = (new Stack\Builder()) - ->push('Stack\Session') - ->push(function ($app) { - $cache = new HttpCache($app, new Store(__DIR__.'/cache')); - return $cache; - }); +```php +$stack = (new Stack\Builder()) + ->push('Stack\Session') + ->push(function ($app) { + $cache = new HttpCache($app, new Store(__DIR__.'/cache')); + return $cache; + }) +; +``` ## Inspiration diff --git a/vendor/stack/builder/composer.json b/vendor/stack/builder/composer.json index e9f164ccc..0af2722d9 100644 --- a/vendor/stack/builder/composer.json +++ b/vendor/stack/builder/composer.json @@ -11,8 +11,8 @@ ], "require": { "php": ">=5.3.0", - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" + "symfony/http-foundation": "~2.1|~3.0", + "symfony/http-kernel": "~2.1|~3.0" }, "require-dev": { "silex/silex": "~1.0" diff --git a/vendor/stack/builder/composer.lock b/vendor/stack/builder/composer.lock index 26c6a994a..eccb02631 100644 --- a/vendor/stack/builder/composer.lock +++ b/vendor/stack/builder/composer.lock @@ -1,9 +1,11 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" ], - "hash": "78698481679eca710495d5aca028baaa", + "hash": "9ef86990728be223eb145600985d3efb", + "content-hash": "140955ca962f7fc65891ab903b51c9a9", "packages": [ { "name": "psr/log", @@ -45,143 +47,41 @@ }, { "name": "symfony/debug", - "version": "v2.4.1", - "target-dir": "Symfony/Component/Debug", + "version": "v3.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "74110be5ec681a83fc5bd66dd5fd29fe85fe9c1f" + "url": "https://github.com/symfony/debug.git", + "reference": "c9ed5a44dbc783a352f06b20440863c7463de907" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/74110be5ec681a83fc5bd66dd5fd29fe85fe9c1f", - "reference": "74110be5ec681a83fc5bd66dd5fd29fe85fe9c1f", + "url": "https://api.github.com/repos/symfony/debug/zipball/c9ed5a44dbc783a352f06b20440863c7463de907", + "reference": "c9ed5a44dbc783a352f06b20440863c7463de907", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" - }, - "suggest": { - "symfony/http-foundation": "", - "symfony/http-kernel": "" + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "3.1-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "http://symfony.com", - "time": "2014-01-01 09:02:49" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.4.1", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "e3ba42f6a70554ed05749e61b829550f6ac33601" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/e3ba42f6a70554ed05749e61b829550f6ac33601", - "reference": "e3ba42f6a70554ed05749e61b829550f6ac33601", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/dependency-injection": "~2.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2013-12-28 08:12:03" - }, - { - "name": "symfony/http-foundation", - "version": "v2.4.1", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "6c6b8a7bcd7e2cc920cd6acace563fdbf121d844" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/6c6b8a7bcd7e2cc920cd6acace563fdbf121d844", - "reference": "6c6b8a7bcd7e2cc920cd6acace563fdbf121d844", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -195,65 +95,54 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com", - "time": "2014-01-05 02:10:50" + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-05-24 10:06:56" }, { - "name": "symfony/http-kernel", - "version": "v2.4.1", - "target-dir": "Symfony/Component/HttpKernel", + "name": "symfony/event-dispatcher", + "version": "v3.0.6", "source": { "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "0605eedeb52c4d3a3144128d8336395a57be60d4" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "807dde98589f9b2b00624dca326740380d78dbbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/0605eedeb52c4d3a3144128d8336395a57be60d4", - "reference": "0605eedeb52c4d3a3144128d8336395a57be60d4", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/807dde98589f9b2b00624dca326740380d78dbbc", + "reference": "807dde98589f9b2b00624dca326740380d78dbbc", "shasum": "" }, "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/debug": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.4" + "php": ">=5.5.9" }, "require-dev": { - "symfony/browser-kit": "~2.2", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.0", - "symfony/console": "~2.2", - "symfony/dependency-injection": "~2.0", - "symfony/finder": "~2.0", - "symfony/process": "~2.0", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.2", - "symfony/templating": "~2.2" + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" }, "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", "symfony/dependency-injection": "", - "symfony/finder": "" + "symfony/http-kernel": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -266,27 +155,221 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-05-05 06:56:13" + }, + { + "name": "symfony/http-foundation", + "version": "v3.0.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "18b24bc32d2495ae79d76e777368786a6536fe31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/18b24bc32d2495ae79d76e777368786a6536fe31", + "reference": "18b24bc32d2495ae79d76e777368786a6536fe31", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2016-04-12 18:09:53" + }, + { + "name": "symfony/http-kernel", + "version": "v3.0.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "6a5010978edf0a9646342232531e53bfc7abbcd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6a5010978edf0a9646342232531e53bfc7abbcd3", + "reference": "6a5010978edf0a9646342232531e53bfc7abbcd3", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "symfony/browser-kit": "~2.8|~3.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~2.8|~3.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com", - "time": "2014-01-05 02:12:11" + "homepage": "https://symfony.com", + "time": "2016-05-09 22:13:13" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" } ], "packages-dev": [ { "name": "pimple/pimple", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/fabpot/Pimple.git", - "reference": "471c7d7c52ad6594e17b8ec33efdd1be592b5d83" + "url": "https://github.com/silexphp/Pimple.git", + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Pimple/zipball/471c7d7c52ad6594e17b8ec33efdd1be592b5d83", - "reference": "471c7d7c52ad6594e17b8ec33efdd1be592b5d83", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", + "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", "shasum": "" }, "require": { @@ -319,68 +402,62 @@ "container", "dependency injection" ], - "time": "2013-09-19 04:53:08" + "time": "2013-11-22 08:30:29" }, { "name": "silex/silex", - "version": "v1.1.2", + "version": "v1.3.5", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "47cc7d6545450ef8a91f50c04e8c7b3b04fceae9" + "reference": "374c7e04040a6f781c90f7d746726a5daa78e783" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/47cc7d6545450ef8a91f50c04e8c7b3b04fceae9", - "reference": "47cc7d6545450ef8a91f50c04e8c7b3b04fceae9", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/374c7e04040a6f781c90f7d746726a5daa78e783", + "reference": "374c7e04040a6f781c90f7d746726a5daa78e783", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.9", "pimple/pimple": "~1.0", - "symfony/event-dispatcher": ">=2.3,<2.5-dev", - "symfony/http-foundation": ">=2.3,<2.5-dev", - "symfony/http-kernel": ">=2.3,<2.5-dev", - "symfony/routing": ">=2.3,<2.5-dev" + "symfony/event-dispatcher": "~2.3|3.0.*", + "symfony/http-foundation": "~2.3|3.0.*", + "symfony/http-kernel": "~2.3|3.0.*", + "symfony/routing": "~2.3|3.0.*" }, "require-dev": { - "doctrine/dbal": ">=2.2.0,<2.4.0-dev", - "monolog/monolog": "~1.4,>=1.4.1", - "phpunit/phpunit": "~3.7", - "swiftmailer/swiftmailer": "5.*", - "symfony/browser-kit": ">=2.3,<2.5-dev", - "symfony/config": ">=2.3,<2.5-dev", - "symfony/css-selector": ">=2.3,<2.5-dev", - "symfony/debug": ">=2.3,<2.5-dev", - "symfony/dom-crawler": ">=2.3,<2.5-dev", - "symfony/finder": ">=2.3,<2.5-dev", - "symfony/form": ">=2.3,<2.5-dev", - "symfony/locale": ">=2.3,<2.5-dev", - "symfony/monolog-bridge": ">=2.3,<2.5-dev", - "symfony/options-resolver": ">=2.3,<2.5-dev", - "symfony/process": ">=2.3,<2.5-dev", - "symfony/security": ">=2.3,<2.5-dev", - "symfony/serializer": ">=2.3,<2.5-dev", - "symfony/translation": ">=2.3,<2.5-dev", - "symfony/twig-bridge": ">=2.3,<2.5-dev", - "symfony/validator": ">=2.3,<2.5-dev", - "twig/twig": ">=1.8.0,<2.0-dev" - }, - "suggest": { - "symfony/browser-kit": ">=2.3,<2.5-dev", - "symfony/css-selector": ">=2.3,<2.5-dev", - "symfony/dom-crawler": ">=2.3,<2.5-dev", - "symfony/form": ">=2.3,<2.5-dev" + "doctrine/dbal": "~2.2", + "monolog/monolog": "^1.4.1", + "swiftmailer/swiftmailer": "~5", + "symfony/browser-kit": "~2.3|3.0.*", + "symfony/config": "~2.3|3.0.*", + "symfony/css-selector": "~2.3|3.0.*", + "symfony/debug": "~2.3|3.0.*", + "symfony/dom-crawler": "~2.3|3.0.*", + "symfony/finder": "~2.3|3.0.*", + "symfony/form": "~2.3|3.0.*", + "symfony/locale": "~2.3|3.0.*", + "symfony/monolog-bridge": "~2.3|3.0.*", + "symfony/options-resolver": "~2.3|3.0.*", + "symfony/phpunit-bridge": "~2.7", + "symfony/process": "~2.3|3.0.*", + "symfony/security": "~2.3|3.0.*", + "symfony/serializer": "~2.3|3.0.*", + "symfony/translation": "~2.3|3.0.*", + "symfony/twig-bridge": "~2.3|3.0.*", + "symfony/validator": "~2.3|3.0.*", + "twig/twig": "~1.8|~2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { - "psr-0": { - "Silex": "src/" + "psr-4": { + "Silex\\": "src/Silex" } }, "notification-url": "https://packagist.org/downloads/", @@ -394,58 +471,66 @@ }, { "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" + "email": "igor@wiedler.ch" } ], - "description": "The PHP micro-framework based on the Symfony2 Components", + "description": "The PHP micro-framework based on the Symfony Components", "homepage": "http://silex.sensiolabs.org", "keywords": [ "microframework" ], - "time": "2013-10-30 08:53:26" + "time": "2016-01-06 14:59:35" }, { "name": "symfony/routing", - "version": "v2.4.1", - "target-dir": "Symfony/Component/Routing", + "version": "v3.0.6", "source": { "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "4abfb500aab8be458c9e3a227ea56b190584f78a" + "url": "https://github.com/symfony/routing.git", + "reference": "a6cd168310066176599442aa21f5da86c3f8e0b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/4abfb500aab8be458c9e3a227ea56b190584f78a", - "reference": "4abfb500aab8be458c9e3a227ea56b190584f78a", + "url": "https://api.github.com/repos/symfony/routing/zipball/a6cd168310066176599442aa21f5da86c3f8e0b3", + "reference": "a6cd168310066176599442aa21f5da86c3f8e0b3", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8" }, "require-dev": { "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", "psr/log": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/yaml": "~2.0" + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "3.0-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Routing\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -458,31 +543,27 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Routing Component", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "keywords": [ "router", "routing", "uri", "url" ], - "time": "2014-01-05 02:10:50" + "time": "2016-05-03 12:23:49" } ], - "aliases": [ - - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": [ - - ], + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, "platform": { "php": ">=5.3.0" }, - "platform-dev": [ - - ] + "platform-dev": [] } diff --git a/vendor/symfony-cmf/routing/.styleci.yml b/vendor/symfony-cmf/routing/.styleci.yml new file mode 100644 index 000000000..974f5fa5d --- /dev/null +++ b/vendor/symfony-cmf/routing/.styleci.yml @@ -0,0 +1 @@ +preset: symfony diff --git a/vendor/symfony-cmf/routing/.travis.yml b/vendor/symfony-cmf/routing/.travis.yml index c0eae5c15..0aa9aa115 100644 --- a/vendor/symfony-cmf/routing/.travis.yml +++ b/vendor/symfony-cmf/routing/.travis.yml @@ -5,26 +5,41 @@ php: - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm -env: - - SYMFONY_VERSION=2.5.* +sudo: false + +cache: + directories: + - $HOME/.composer/cache/files + +env: SYMFONY_VERSION=2.8.* matrix: - allow_failures: - - php: hhvm include: - - php: 5.5 + - php: 5.6 + env: DEPS=dev + - php: 5.3 + env: COMPOSER_FLAGS="--prefer-lowest" + - php: 5.6 env: SYMFONY_VERSION=2.3.* - - php: 5.5 - env: SYMFONY_VERSION=2.4.* - - php: 5.5 - env: SYMFONY_VERSION=2.* + - php: 5.6 + env: SYMFONY_VERSION=2.7.* + - php: 5.6 + env: SYMFONY_VERSION=3.0.* + finish_fast: true before_install: - - composer require symfony/routing:${SYMFONY_VERSION} --prefer-source + - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi + - phpenv config-rm xdebug.ini || true + - composer self-update + - if [ "$DEPS" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi + - if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi + +install: composer update --prefer-dist $COMPOSER_FLAGS -script: phpunit --coverage-text +script: phpunit notifications: irc: "irc.freenode.org#symfony-cmf" diff --git a/vendor/symfony-cmf/routing/CHANGELOG.md b/vendor/symfony-cmf/routing/CHANGELOG.md index e8e8542d1..1338052b9 100644 --- a/vendor/symfony-cmf/routing/CHANGELOG.md +++ b/vendor/symfony-cmf/routing/CHANGELOG.md @@ -1,11 +1,29 @@ Changelog ========= +1.4.0 +----- + +* **2016-02-27**: Added ContentRepositoryEnhancer that can look up a content by + ID from a content repository. + +1.4.0-RC1 +--------- + +* **2016-01-09**: When ChainRouter::match is used with a RequestMatcher, the + Request is now properly rebuilt from the RequestContext if that was set on + the ChainRouter, and http://localhost is used otherwise to avoid issues with + paths starting with a double forward slash. * **2014-09-29**: ChainRouter does not require a RouterInterface, as a RequestMatcher and UrlGenerator is fine too. Fixed chain router interface to not force a RouterInterface. * **2014-09-29**: Deprecated DynamicRouter::match in favor of matchRequest. +1.3.0 +----- + +Release 1.3.0 + 1.3.0-RC1 --------- diff --git a/vendor/symfony-cmf/routing/Candidates/Candidates.php b/vendor/symfony-cmf/routing/Candidates/Candidates.php index 84584f980..21bef5514 100644 --- a/vendor/symfony-cmf/routing/Candidates/Candidates.php +++ b/vendor/symfony-cmf/routing/Candidates/Candidates.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -60,7 +60,7 @@ class Candidates implements CandidatesInterface } /** - * {@inheritDoc} + * {@inheritdoc} * * Always returns true. */ @@ -70,7 +70,7 @@ class Candidates implements CandidatesInterface } /** - * {@inheritDoc} + * {@inheritdoc} * * Does nothing. */ @@ -79,7 +79,7 @@ class Candidates implements CandidatesInterface } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getCandidates(Request $request) { @@ -99,7 +99,7 @@ class Candidates implements CandidatesInterface * * @param string $url The url to determine the locale from. * - * @return string|boolean The locale if $url starts with one of the allowed locales. + * @return string|bool The locale if $url starts with one of the allowed locales. */ protected function determineLocale($url) { @@ -108,7 +108,7 @@ class Candidates implements CandidatesInterface } $matches = array(); - if (preg_match('#(' . implode('|', $this->locales) . ')(/|$)#', $url, $matches)) { + if (preg_match('#('.implode('|', $this->locales).')(/|$)#', $url, $matches)) { return $matches[1]; } @@ -132,7 +132,7 @@ class Candidates implements CandidatesInterface if ('/' !== $url) { // handle format extension, like .html or .json if (preg_match('/(.+)\.[a-z]+$/i', $url, $matches)) { - $candidates[] = $prefix . $url; + $candidates[] = $prefix.$url; $url = $matches[1]; } @@ -142,7 +142,7 @@ class Candidates implements CandidatesInterface if (++$count > $this->limit) { return $candidates; } - $candidates[] = $prefix . $part; + $candidates[] = $prefix.$part; $part = substr($url, 0, $pos); } } diff --git a/vendor/symfony-cmf/routing/Candidates/CandidatesInterface.php b/vendor/symfony-cmf/routing/Candidates/CandidatesInterface.php index 9ce22a97e..4ada3866c 100644 --- a/vendor/symfony-cmf/routing/Candidates/CandidatesInterface.php +++ b/vendor/symfony-cmf/routing/Candidates/CandidatesInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -33,7 +33,7 @@ interface CandidatesInterface * * @param string $name * - * @return boolean + * @return bool */ public function isCandidate($name); diff --git a/vendor/symfony-cmf/routing/ChainRouteCollection.php b/vendor/symfony-cmf/routing/ChainRouteCollection.php index 16c48596d..047f2e33c 100644 --- a/vendor/symfony-cmf/routing/ChainRouteCollection.php +++ b/vendor/symfony-cmf/routing/ChainRouteCollection.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -57,7 +57,7 @@ class ChainRouteCollection extends RouteCollection { $count = 0; foreach ($this->routeCollections as $routeCollection) { - $count+= $routeCollection->count(); + $count += $routeCollection->count(); } return $count; @@ -106,11 +106,11 @@ class ChainRouteCollection extends RouteCollection } } - return null; + return; } /** - * Removes a route or an array of routes by name from the collection + * Removes a route or an array of routes by name from the collection. * * @param string|array $name The route name or an array of route names */ diff --git a/vendor/symfony-cmf/routing/ChainRouter.php b/vendor/symfony-cmf/routing/ChainRouter.php index 89c2c15a9..670ea780a 100644 --- a/vendor/symfony-cmf/routing/ChainRouter.php +++ b/vendor/symfony-cmf/routing/ChainRouter.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -38,7 +38,8 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface private $context; /** - * Array of arrays of routers grouped by priority + * Array of arrays of routers grouped by priority. + * * @var array */ private $routers = array(); @@ -117,7 +118,7 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface /** * Sort routers by priority. - * The highest priority number is the highest priority (reverse sorting) + * The highest priority number is the highest priority (reverse sorting). * * @return RouterInterface[] */ @@ -140,9 +141,9 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface * * Note: You should use matchRequest if you can. */ - public function match($url) + public function match($pathinfo) { - return $this->doMatch($url); + return $this->doMatch($pathinfo); } /** @@ -161,14 +162,14 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface * At least the url must be provided, if a request is additionally provided * the request takes precedence. * - * @param string $url + * @param string $pathinfo * @param Request $request * * @return array An array of parameters * * @throws ResourceNotFoundException If no router matched. */ - private function doMatch($url, Request $request = null) + private function doMatch($pathinfo, Request $request = null) { $methodNotAllowed = null; @@ -179,13 +180,14 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface // matching requests is more powerful than matching URLs only, so try that first if ($router instanceof RequestMatcherInterface) { if (empty($requestForMatching)) { - $requestForMatching = Request::create($url); + $requestForMatching = $this->rebuildRequest($pathinfo); } return $router->matchRequest($requestForMatching); } + // every router implements the match method - return $router->match($url); + return $router->match($pathinfo); } catch (ResourceNotFoundException $e) { if ($this->logger) { $this->logger->debug('Router '.get_class($router).' was not able to match, message "'.$e->getMessage().'"'); @@ -201,7 +203,7 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface $info = $request ? "this request\n$request" - : "url '$url'"; + : "url '$pathinfo'"; throw $methodNotAllowed ?: new ResourceNotFoundException("None of the routers in the chain matched $info"); } @@ -211,7 +213,7 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface * Loops through all registered routers and returns a router if one is found. * It will always return the first route generated. */ - public function generate($name, $parameters = array(), $absolute = false) + public function generate($name, $parameters = array(), $absolute = UrlGeneratorInterface::ABSOLUTE_PATH) { $debug = array(); @@ -248,6 +250,41 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface throw new RouteNotFoundException(sprintf('None of the chained routers were able to generate route: %s', $info)); } + /** + * Rebuild the request object from a URL with the help of the RequestContext. + * + * If the request context is not set, this simply returns the request object built from $uri. + * + * @param string $pathinfo + * + * @return Request + */ + private function rebuildRequest($pathinfo) + { + if (!$this->context) { + return Request::create('http://localhost'.$pathinfo); + } + + $uri = $pathinfo; + + $server = array(); + if ($this->context->getBaseUrl()) { + $uri = $this->context->getBaseUrl().$pathinfo; + $server['SCRIPT_FILENAME'] = $this->context->getBaseUrl(); + $server['PHP_SELF'] = $this->context->getBaseUrl(); + } + $host = $this->context->getHost() ?: 'localhost'; + if ('https' === $this->context->getScheme() && 443 !== $this->context->getHttpsPort()) { + $host .= ':'.$this->context->getHttpsPort(); + } + if ('http' === $this->context->getScheme() && 80 !== $this->context->getHttpPort()) { + $host .= ':'.$this->context->getHttpPort(); + } + $uri = $this->context->getScheme().'://'.$host.$uri.'?'.$this->context->getQueryString(); + + return Request::create($uri, $this->context->getMethod(), $this->context->getParameters(), array(), array(), $server); + } + private function getErrorMessage($name, $router = null, $parameters = null) { if ($router instanceof VersatileGeneratorInterface) { @@ -306,4 +343,14 @@ class ChainRouter implements ChainRouterInterface, WarmableInterface return $this->routeCollection; } + + /** + * Identify if any routers have been added into the chain yet. + * + * @return bool + */ + public function hasRouters() + { + return !empty($this->routers); + } } diff --git a/vendor/symfony-cmf/routing/ChainRouterInterface.php b/vendor/symfony-cmf/routing/ChainRouterInterface.php index 9a7a003d5..157631350 100644 --- a/vendor/symfony-cmf/routing/ChainRouterInterface.php +++ b/vendor/symfony-cmf/routing/ChainRouterInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,7 +26,7 @@ interface ChainRouterInterface extends RouterInterface, RequestMatcherInterface * * @param RouterInterface $router The router instance. Instead of RouterInterface, may also * be RequestMatcherInterface and UrlGeneratorInterface. - * @param integer $priority The priority + * @param int $priority The priority */ public function add($router, $priority = 0); diff --git a/vendor/symfony-cmf/routing/ChainedRouterInterface.php b/vendor/symfony-cmf/routing/ChainedRouterInterface.php index a4ece6c45..e9bef3dbd 100644 --- a/vendor/symfony-cmf/routing/ChainedRouterInterface.php +++ b/vendor/symfony-cmf/routing/ChainedRouterInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/symfony-cmf/routing/ContentAwareGenerator.php b/vendor/symfony-cmf/routing/ContentAwareGenerator.php index 91643eb1d..db26d8f62 100644 --- a/vendor/symfony-cmf/routing/ContentAwareGenerator.php +++ b/vendor/symfony-cmf/routing/ContentAwareGenerator.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,6 +12,7 @@ namespace Symfony\Cmf\Component\Routing; use Doctrine\Common\Collections\Collection; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\Route as SymfonyRoute; use Symfony\Component\Routing\Exception\RouteNotFoundException; use Symfony\Component\Routing\RouteCollection; @@ -36,16 +37,16 @@ class ContentAwareGenerator extends ProviderBasedGenerator /** * The content repository used to find content by it's id - * This can be used to specify a parameter content_id when generating urls + * This can be used to specify a parameter content_id when generating urls. * * This is optional and might not be initialized. * - * @var ContentRepositoryInterface + * @var ContentRepositoryInterface */ protected $contentRepository; /** - * Set an optional content repository to find content by ids + * Set an optional content repository to find content by ids. * * @param ContentRepositoryInterface $contentRepository */ @@ -55,7 +56,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator } /** - * {@inheritDoc} + * {@inheritdoc} * * @param string $name ignored. * @param array $parameters must either contain the field 'route' with a @@ -65,7 +66,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator * * @throws RouteNotFoundException If there is no such route in the database */ - public function generate($name, $parameters = array(), $absolute = false) + public function generate($name, $parameters = array(), $absolute = UrlGeneratorInterface::ABSOLUTE_PATH) { if ($name instanceof SymfonyRoute) { $route = $this->getBestLocaleRoute($name, $parameters); @@ -75,7 +76,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator $route = $this->getRouteByContent($name, $parameters); } - if (! $route instanceof SymfonyRoute) { + if (!$route instanceof SymfonyRoute) { $hint = is_object($route) ? get_class($route) : gettype($route); throw new RouteNotFoundException('Route of this document is not an instance of Symfony\Component\Routing\Route but: '.$hint); } @@ -86,7 +87,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator } /** - * Get the route by a string name + * Get the route by a string name. * * @param string $route * @param array $parameters @@ -99,7 +100,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator { $route = $this->provider->getRouteByName($name); if (empty($route)) { - throw new RouteNotFoundException('No route found for name: ' . $name); + throw new RouteNotFoundException('No route found for name: '.$name); } return $this->getBestLocaleRoute($route, $parameters); @@ -116,12 +117,12 @@ class ContentAwareGenerator extends ProviderBasedGenerator */ protected function getBestLocaleRoute(SymfonyRoute $route, $parameters) { - if (! $route instanceof RouteObjectInterface) { + if (!$route instanceof RouteObjectInterface) { // this route has no content, we can't get the alternatives return $route; } $locale = $this->getLocale($parameters); - if (! $this->checkLocaleRequirement($route, $locale)) { + if (!$this->checkLocaleRequirement($route, $locale)) { $content = $route->getContent(); if ($content instanceof RouteReferrersReadInterface) { $routes = $content->getRoutes(); @@ -167,10 +168,10 @@ class ContentAwareGenerator extends ProviderBasedGenerator ) { $content = $this->contentRepository->findById($parameters['content_id']); if (empty($content)) { - throw new RouteNotFoundException('The content repository found nothing at id ' . $parameters['content_id']); + throw new RouteNotFoundException('The content repository found nothing at id '.$parameters['content_id']); } if (!$content instanceof RouteReferrersReadInterface) { - throw new RouteNotFoundException('Content repository did not return a RouteReferrersReadInterface instance for id ' . $parameters['content_id']); + throw new RouteNotFoundException('Content repository did not return a RouteReferrersReadInterface instance for id '.$parameters['content_id']); } } else { $hint = is_object($name) ? get_class($name) : gettype($name); @@ -182,7 +183,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator $hint = ($this->contentRepository && $this->contentRepository->getContentId($content)) ? $this->contentRepository->getContentId($content) : get_class($content); - throw new RouteNotFoundException('Content document has no route: ' . $hint); + throw new RouteNotFoundException('Content document has no route: '.$hint); } unset($parameters['content_id']); @@ -209,7 +210,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator protected function getRouteByLocale($routes, $locale) { foreach ($routes as $route) { - if (! $route instanceof SymfonyRoute) { + if (!$route instanceof SymfonyRoute) { continue; } @@ -238,7 +239,7 @@ class ContentAwareGenerator extends ProviderBasedGenerator } /** - * Determine the locale to be used with this request + * Determine the locale to be used with this request. * * @param array $parameters the parameters determined by the route * @@ -271,24 +272,24 @@ class ContentAwareGenerator extends ProviderBasedGenerator } /** - * We additionally support empty name and data in parameters and RouteAware content + * We additionally support empty name and data in parameters and RouteAware content. */ public function supports($name) { - return ! $name || parent::supports($name) || $name instanceof RouteReferrersReadInterface; + return !$name || parent::supports($name) || $name instanceof RouteReferrersReadInterface; } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getRouteDebugMessage($name, array $parameters = array()) { if (empty($name) && isset($parameters['content_id'])) { - return 'Content id ' . $parameters['content_id']; + return 'Content id '.$parameters['content_id']; } if ($name instanceof RouteReferrersReadInterface) { - return 'Route aware content ' . parent::getRouteDebugMessage($name, $parameters); + return 'Route aware content '.parent::getRouteDebugMessage($name, $parameters); } return parent::getRouteDebugMessage($name, $parameters); diff --git a/vendor/symfony-cmf/routing/ContentRepositoryInterface.php b/vendor/symfony-cmf/routing/ContentRepositoryInterface.php index 31aea5878..34f9b86fc 100644 --- a/vendor/symfony-cmf/routing/ContentRepositoryInterface.php +++ b/vendor/symfony-cmf/routing/ContentRepositoryInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php b/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php index 0c24224cd..d30aa42b7 100644 --- a/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php +++ b/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRouteEnhancersPass.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRoutersPass.php b/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRoutersPass.php index 2d8376542..1728a19b8 100644 --- a/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRoutersPass.php +++ b/vendor/symfony-cmf/routing/DependencyInjection/Compiler/RegisterRoutersPass.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/symfony-cmf/routing/DynamicRouter.php b/vendor/symfony-cmf/routing/DynamicRouter.php index 944a94bb1..abfd2993d 100644 --- a/vendor/symfony-cmf/routing/DynamicRouter.php +++ b/vendor/symfony-cmf/routing/DynamicRouter.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,6 +13,7 @@ namespace Symfony\Cmf\Component\Routing; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; @@ -26,6 +27,7 @@ use Symfony\Cmf\Component\Routing\Enhancer\RouteEnhancerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Cmf\Component\Routing\Event\Events; use Symfony\Cmf\Component\Routing\Event\RouterMatchEvent; +use Symfony\Cmf\Component\Routing\Event\RouterGenerateEvent; /** * A flexible router accepting matcher and generator through injection and @@ -57,14 +59,15 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained protected $enhancers = array(); /** - * Cached sorted list of enhancers + * Cached sorted list of enhancers. * * @var RouteEnhancerInterface[] */ protected $sortedEnhancers = array(); /** - * The regexp pattern that needs to be matched before a dynamic lookup is made + * The regexp pattern that needs to be matched before a dynamic lookup is + * made. * * @var string */ @@ -96,7 +99,7 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained RouteProviderInterface $provider = null ) { $this->context = $context; - if (! $matcher instanceof RequestMatcherInterface && ! $matcher instanceof UrlMatcherInterface) { + if (!$matcher instanceof RequestMatcherInterface && !$matcher instanceof UrlMatcherInterface) { throw new \InvalidArgumentException('Matcher must implement either Symfony\Component\Routing\Matcher\RequestMatcherInterface or Symfony\Component\Routing\Matcher\UrlMatcherInterface'); } $this->matcher = $matcher; @@ -109,7 +112,7 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getRouteCollection() { @@ -154,9 +157,9 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained * If the generator is not able to generate the url, it must throw the * RouteNotFoundException as documented below. * - * @param string $name The name of the route - * @param mixed $parameters An array of parameters - * @param Boolean $absolute Whether to generate an absolute URL + * @param string|Route $name The name of the route or the Route instance + * @param mixed $parameters An array of parameters + * @param bool|string $referenceType The type of reference to be generated (one of the constants in UrlGeneratorInterface) * * @return string The generated URL * @@ -164,15 +167,23 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained * * @api */ - public function generate($name, $parameters = array(), $absolute = false) + public function generate($name, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH) { - return $this->getGenerator()->generate($name, $parameters, $absolute); + if ($this->eventDispatcher) { + $event = new RouterGenerateEvent($name, $parameters, $referenceType); + $this->eventDispatcher->dispatch(Events::PRE_DYNAMIC_GENERATE, $event); + $name = $event->getRoute(); + $parameters = $event->getParameters(); + $referenceType = $event->getReferenceType(); + } + + return $this->getGenerator()->generate($name, $parameters, $referenceType); } /** - * Delegate to our generator + * Delegate to our generator. * - * {@inheritDoc} + * {@inheritdoc} */ public function supports($name) { @@ -199,22 +210,25 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained * request method is not allowed * * @deprecated Use matchRequest exclusively to avoid problems. This method will be removed in version 2.0 + * * @api */ public function match($pathinfo) { + @trigger_error(__METHOD__.'() is deprecated since version 1.3 and will be removed in 2.0. Use matchRequest() instead.', E_USER_DEPRECATED); + $request = Request::create($pathinfo); if ($this->eventDispatcher) { $event = new RouterMatchEvent(); $this->eventDispatcher->dispatch(Events::PRE_DYNAMIC_MATCH, $event); } - if (! empty($this->uriFilterRegexp) && ! preg_match($this->uriFilterRegexp, $pathinfo)) { + if (!empty($this->uriFilterRegexp) && !preg_match($this->uriFilterRegexp, $pathinfo)) { throw new ResourceNotFoundException("$pathinfo does not match the '{$this->uriFilterRegexp}' pattern"); } $matcher = $this->getMatcher(); - if (! $matcher instanceof UrlMatcherInterface) { + if (!$matcher instanceof UrlMatcherInterface) { throw new \InvalidArgumentException('Wrong matcher type, you need to call matchRequest'); } @@ -245,8 +259,8 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained $this->eventDispatcher->dispatch(Events::PRE_DYNAMIC_MATCH_REQUEST, $event); } - if (! empty($this->uriFilterRegexp) - && ! preg_match($this->uriFilterRegexp, $request->getPathInfo()) + if (!empty($this->uriFilterRegexp) + && !preg_match($this->uriFilterRegexp, $request->getPathInfo()) ) { throw new ResourceNotFoundException("{$request->getPathInfo()} does not match the '{$this->uriFilterRegexp}' pattern"); } @@ -262,7 +276,7 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained } /** - * Apply the route enhancers to the defaults, according to priorities + * Apply the route enhancers to the defaults, according to priorities. * * @param array $defaults * @param Request $request @@ -358,7 +372,7 @@ class DynamicRouter implements RouterInterface, RequestMatcherInterface, Chained } /** - * {@inheritDoc} + * {@inheritdoc} * * Forwards to the generator. */ diff --git a/vendor/symfony-cmf/routing/Enhancer/ContentRepositoryEnhancer.php b/vendor/symfony-cmf/routing/Enhancer/ContentRepositoryEnhancer.php new file mode 100644 index 000000000..bd29ac08a --- /dev/null +++ b/vendor/symfony-cmf/routing/Enhancer/ContentRepositoryEnhancer.php @@ -0,0 +1,70 @@ +contentRepository = $contentRepository; + $this->target = $target; + $this->source = $source; + } + + /** + * {@inheritdoc} + */ + public function enhance(array $defaults, Request $request) + { + if (!isset($defaults[$this->target]) && isset($defaults[$this->source])) { + $defaults[$this->target] = $this->contentRepository->findById($defaults[$this->source]); + } + + return $defaults; + } +} diff --git a/vendor/symfony-cmf/routing/Enhancer/FieldByClassEnhancer.php b/vendor/symfony-cmf/routing/Enhancer/FieldByClassEnhancer.php index f88b34828..0912fc62f 100644 --- a/vendor/symfony-cmf/routing/Enhancer/FieldByClassEnhancer.php +++ b/vendor/symfony-cmf/routing/Enhancer/FieldByClassEnhancer.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -55,7 +55,7 @@ class FieldByClassEnhancer implements RouteEnhancerInterface * If the source field is instance of one of the entries in the map, * target is set to the value of that map entry. * - * {@inheritDoc} + * {@inheritdoc} */ public function enhance(array $defaults, Request $request) { @@ -64,7 +64,7 @@ class FieldByClassEnhancer implements RouteEnhancerInterface return $defaults; } - if (! isset($defaults[$this->source])) { + if (!isset($defaults[$this->source])) { return $defaults; } diff --git a/vendor/symfony-cmf/routing/Enhancer/FieldMapEnhancer.php b/vendor/symfony-cmf/routing/Enhancer/FieldMapEnhancer.php index 91adc66d4..c7b085225 100644 --- a/vendor/symfony-cmf/routing/Enhancer/FieldMapEnhancer.php +++ b/vendor/symfony-cmf/routing/Enhancer/FieldMapEnhancer.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -47,19 +47,19 @@ class FieldMapEnhancer implements RouteEnhancerInterface } /** - * If the target field is not set but the source field is, map the field + * If the target field is not set but the source field is, map the field. * - * {@inheritDoc} + * {@inheritdoc} */ public function enhance(array $defaults, Request $request) { if (isset($defaults[$this->target])) { return $defaults; } - if (! isset($defaults[$this->source])) { + if (!isset($defaults[$this->source])) { return $defaults; } - if (! isset($this->hashmap[$defaults[$this->source]])) { + if (!isset($this->hashmap[$defaults[$this->source]])) { return $defaults; } diff --git a/vendor/symfony-cmf/routing/Enhancer/FieldPresenceEnhancer.php b/vendor/symfony-cmf/routing/Enhancer/FieldPresenceEnhancer.php index d2e35ad0a..c281792fd 100644 --- a/vendor/symfony-cmf/routing/Enhancer/FieldPresenceEnhancer.php +++ b/vendor/symfony-cmf/routing/Enhancer/FieldPresenceEnhancer.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -56,7 +56,7 @@ class FieldPresenceEnhancer implements RouteEnhancerInterface } /** - * {@inheritDoc} + * {@inheritdoc} */ public function enhance(array $defaults, Request $request) { diff --git a/vendor/symfony-cmf/routing/Enhancer/RouteContentEnhancer.php b/vendor/symfony-cmf/routing/Enhancer/RouteContentEnhancer.php index af63dfc44..a69979de4 100644 --- a/vendor/symfony-cmf/routing/Enhancer/RouteContentEnhancer.php +++ b/vendor/symfony-cmf/routing/Enhancer/RouteContentEnhancer.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,7 +12,6 @@ namespace Symfony\Cmf\Component\Routing\Enhancer; use Symfony\Component\HttpFoundation\Request; - use Symfony\Cmf\Component\Routing\RouteObjectInterface; /** @@ -49,7 +48,7 @@ class RouteContentEnhancer implements RouteEnhancerInterface * If the route has a non-null content and if that content class is in the * injected map, returns that controller. * - * {@inheritDoc} + * {@inheritdoc} */ public function enhance(array $defaults, Request $request) { @@ -58,8 +57,8 @@ class RouteContentEnhancer implements RouteEnhancerInterface return $defaults; } - if (! isset($defaults[$this->routefield]) - || ! $defaults[$this->routefield] instanceof RouteObjectInterface + if (!isset($defaults[$this->routefield]) + || !$defaults[$this->routefield] instanceof RouteObjectInterface ) { // we can't determine the content return $defaults; @@ -68,7 +67,7 @@ class RouteContentEnhancer implements RouteEnhancerInterface $route = $defaults[$this->routefield]; $content = $route->getContent(); - if (! $content) { + if (!$content) { // we have no content return $defaults; } diff --git a/vendor/symfony-cmf/routing/Enhancer/RouteEnhancerInterface.php b/vendor/symfony-cmf/routing/Enhancer/RouteEnhancerInterface.php index 85a77c55a..fa4640d51 100644 --- a/vendor/symfony-cmf/routing/Enhancer/RouteEnhancerInterface.php +++ b/vendor/symfony-cmf/routing/Enhancer/RouteEnhancerInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ namespace Symfony\Cmf\Component\Routing\Enhancer; use Symfony\Component\HttpFoundation\Request; /** - * A route enhancer can change the values in the route data arrays + * A route enhancer can change the values in the route data arrays. * * This is useful to provide information to the rest of the routing system * that can be inferred from other parameters rather than hardcode that diff --git a/vendor/symfony-cmf/routing/Event/Events.php b/vendor/symfony-cmf/routing/Event/Events.php index 95c03267e..89b74ba79 100644 --- a/vendor/symfony-cmf/routing/Event/Events.php +++ b/vendor/symfony-cmf/routing/Event/Events.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,16 +14,23 @@ namespace Symfony\Cmf\Component\Routing\Event; final class Events { /** - * Fired before a path is matched in \Symfony\Cmf\Component\Routing\DynamicRouter#match + * Fired before a path is matched in \Symfony\Cmf\Component\Routing\DynamicRouter#match. * - * The event object is RouteMatchEvent. + * The event object is RouterMatchEvent. */ const PRE_DYNAMIC_MATCH = 'cmf_routing.pre_dynamic_match'; /** - * Fired before a Request is matched in \Symfony\Cmf\Component\Routing\DynamicRouter#match + * Fired before a Request is matched in \Symfony\Cmf\Component\Routing\DynamicRouter#match. * - * The event object is RouteMatchEvent. + * The event object is RouterMatchEvent. */ const PRE_DYNAMIC_MATCH_REQUEST = 'cmf_routing.pre_dynamic_match_request'; + + /** + * Fired before a route is generated in \Symfony\Cmf\Component\Routing\DynamicRouter#generate. + * + * The event object is RouterGenerateEvent. + */ + const PRE_DYNAMIC_GENERATE = 'cmf_routing.pre_dynamic_generate'; } diff --git a/vendor/symfony-cmf/routing/Event/RouterGenerateEvent.php b/vendor/symfony-cmf/routing/Event/RouterGenerateEvent.php new file mode 100644 index 000000000..b87419ead --- /dev/null +++ b/vendor/symfony-cmf/routing/Event/RouterGenerateEvent.php @@ -0,0 +1,142 @@ +route = $route; + $this->parameters = $parameters; + $this->referenceType = $referenceType; + } + + /** + * Get route name or object. + * + * @return string|Route + */ + public function getRoute() + { + return $this->route; + } + + /** + * Set route name or object. + * + * @param string|Route $route + */ + public function setRoute($route) + { + $this->route = $route; + } + + /** + * Get route parameters. + * + * @return array + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Set the route parameters. + * + * @param array $parameters + */ + public function setParameters(array $parameters) + { + $this->parameters = $parameters; + } + + /** + * Set a route parameter. + * + * @param string $key + * @param mixed $value + */ + public function setParameter($key, $value) + { + $this->parameters[$key] = $value; + } + + /** + * Remove a route parameter by key. + * + * @param string $key + */ + public function removeParameter($key) + { + unset($this->parameters[$key]); + } + + /** + * The type of reference to be generated (one of the constants in UrlGeneratorInterface). + * + * @return bool|string + */ + public function getReferenceType() + { + return $this->referenceType; + } + + /** + * The type of reference to be generated (one of the constants in UrlGeneratorInterface). + * + * @param bool|string $referenceType + */ + public function setReferenceType($referenceType) + { + $this->referenceType = $referenceType; + } +} diff --git a/vendor/symfony-cmf/routing/Event/RouterMatchEvent.php b/vendor/symfony-cmf/routing/Event/RouterMatchEvent.php index 7125972c8..2f208336a 100644 --- a/vendor/symfony-cmf/routing/Event/RouterMatchEvent.php +++ b/vendor/symfony-cmf/routing/Event/RouterMatchEvent.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/symfony-cmf/routing/LICENSE b/vendor/symfony-cmf/routing/LICENSE index b068dfb74..9cfb0de53 100644 --- a/vendor/symfony-cmf/routing/LICENSE +++ b/vendor/symfony-cmf/routing/LICENSE @@ -2,7 +2,7 @@ Routing The MIT License - Copyright (c) 2011-2014 Symfony2 CMF + Copyright (c) 2011-2015 Symfony CMF Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony-cmf/routing/LazyRouteCollection.php b/vendor/symfony-cmf/routing/LazyRouteCollection.php index 4011f9ac8..f4af373ce 100644 --- a/vendor/symfony-cmf/routing/LazyRouteCollection.php +++ b/vendor/symfony-cmf/routing/LazyRouteCollection.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -69,7 +69,7 @@ class LazyRouteCollection extends RouteCollection try { return $this->provider->getRouteByName($name); } catch (RouteNotFoundException $e) { - return null; + return; } } } diff --git a/vendor/symfony-cmf/routing/NestedMatcher/FinalMatcherInterface.php b/vendor/symfony-cmf/routing/NestedMatcher/FinalMatcherInterface.php index 77cd64923..074b3e0d5 100644 --- a/vendor/symfony-cmf/routing/NestedMatcher/FinalMatcherInterface.php +++ b/vendor/symfony-cmf/routing/NestedMatcher/FinalMatcherInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -24,15 +24,15 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; interface FinalMatcherInterface { /** - * Matches a request against a route collection and returns exactly one result. - * - * @param RouteCollection $collection The collection against which to match. - * @param Request $request The request to match. - * - * @return array An array of parameters - * - * @throws ResourceNotFoundException if none of the routes in $collection - * matches $request - */ + * Matches a request against a route collection and returns exactly one result. + * + * @param RouteCollection $collection The collection against which to match. + * @param Request $request The request to match. + * + * @return array An array of parameters + * + * @throws ResourceNotFoundException if none of the routes in $collection + * matches $request + */ public function finalMatch(RouteCollection $collection, Request $request); } diff --git a/vendor/symfony-cmf/routing/NestedMatcher/NestedMatcher.php b/vendor/symfony-cmf/routing/NestedMatcher/NestedMatcher.php index c136e1f83..cc68463d5 100644 --- a/vendor/symfony-cmf/routing/NestedMatcher/NestedMatcher.php +++ b/vendor/symfony-cmf/routing/NestedMatcher/NestedMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -61,7 +61,7 @@ class NestedMatcher implements RequestMatcherInterface protected $sortedFilters = array(); /** - * Constructs a new NestedMatcher + * Constructs a new NestedMatcher. * * @param RouteProviderInterface $provider The route provider this matcher * should use @@ -162,7 +162,7 @@ class NestedMatcher implements RequestMatcherInterface public function getRouteFilters() { if (empty($this->sortedFilters)) { - $this->sortedFilters = $this->sortFilters(); + $this->sortedFilters = $this->sortFilters(); } return $this->sortedFilters; diff --git a/vendor/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php b/vendor/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php index 15ff74d39..6f2ed72e9 100644 --- a/vendor/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php +++ b/vendor/symfony-cmf/routing/NestedMatcher/RouteFilterInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,7 +13,6 @@ namespace Symfony\Cmf\Component\Routing\NestedMatcher; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Exception\ResourceNotFoundException; - use Symfony\Component\HttpFoundation\Request; /** diff --git a/vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php b/vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php index 8986d5bbf..89f00a06c 100644 --- a/vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php +++ b/vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,7 +16,6 @@ use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Matcher\UrlMatcher as SymfonyUrlMatcher; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RequestContext; - use Symfony\Cmf\Component\Routing\RouteObjectInterface; /** diff --git a/vendor/symfony-cmf/routing/PagedRouteCollection.php b/vendor/symfony-cmf/routing/PagedRouteCollection.php index dba573e04..ae02b6e30 100644 --- a/vendor/symfony-cmf/routing/PagedRouteCollection.php +++ b/vendor/symfony-cmf/routing/PagedRouteCollection.php @@ -1,9 +1,9 @@ loadNextElements($this->current + 1); } - $this->current++; + ++$this->current; } /** @@ -110,7 +110,7 @@ class PagedRouteCollection implements \Iterator, \Countable public function rewind() { $this->current = 0; - $this->currentRoutes = NULL; + $this->currentRoutes = null; $this->loadNextElements($this->current); } diff --git a/vendor/symfony-cmf/routing/PagedRouteProviderInterface.php b/vendor/symfony-cmf/routing/PagedRouteProviderInterface.php index 970ec781b..32148e878 100644 --- a/vendor/symfony-cmf/routing/PagedRouteProviderInterface.php +++ b/vendor/symfony-cmf/routing/PagedRouteProviderInterface.php @@ -1,5 +1,14 @@ provider->getRouteByName($name, $parameters)) { + } elseif (null === $route = $this->provider->getRouteByName($name)) { throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', $name)); } @@ -60,13 +59,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI $debug_message = $this->getRouteDebugMessage($name); - return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $debug_message, $absolute, $hostTokens); + return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $debug_message, $referenceType, $hostTokens); } /** - * Support a route object and any string as route name + * Support a route object and any string as route name. * - * {@inheritDoc} + * {@inheritdoc} */ public function supports($name) { @@ -74,7 +73,7 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getRouteDebugMessage($name, array $parameters = array()) { @@ -87,14 +86,13 @@ class ProviderBasedGenerator extends UrlGenerator implements VersatileGeneratorI } if ($name instanceof RouteObjectInterface) { - return 'Route with key ' . $name->getRouteKey(); + return 'Route with key '.$name->getRouteKey(); } if ($name instanceof SymfonyRoute) { - return 'Route with pattern ' . $name->getPattern(); + return 'Route with path '.$name->getPath(); } return get_class($name); } - } diff --git a/vendor/symfony-cmf/routing/RedirectRouteInterface.php b/vendor/symfony-cmf/routing/RedirectRouteInterface.php index daa45d05f..a9f9c04dc 100644 --- a/vendor/symfony-cmf/routing/RedirectRouteInterface.php +++ b/vendor/symfony-cmf/routing/RedirectRouteInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -67,14 +67,14 @@ interface RedirectRouteInterface extends RouteObjectInterface public function getRouteName(); /** - * Whether this should be a permanent or temporary redirect + * Whether this should be a permanent or temporary redirect. * - * @return boolean + * @return bool */ public function isPermanent(); /** - * Get the parameters for the target route router::generate() + * Get the parameters for the target route router::generate(). * * Note that for the DynamicRouter, you return the target route * document as field 'route' of the hashmap. diff --git a/vendor/symfony-cmf/routing/RouteObjectInterface.php b/vendor/symfony-cmf/routing/RouteObjectInterface.php index 2476dee53..ba26c169a 100644 --- a/vendor/symfony-cmf/routing/RouteObjectInterface.php +++ b/vendor/symfony-cmf/routing/RouteObjectInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -36,13 +36,13 @@ interface RouteObjectInterface const ROUTE_OBJECT = '_route_object'; /** - * Field name for an explicit controller name to be used with this route + * Field name for an explicit controller name to be used with this route. */ const CONTROLLER_NAME = '_controller'; /** * Field name for an explicit template to be used with this route. - * i.e. CmfContentBundle:StaticContent:index.html.twig + * i.e. CmfContentBundle:StaticContent:index.html.twig. */ const TEMPLATE_NAME = '_template'; @@ -51,6 +51,11 @@ interface RouteObjectInterface */ const CONTENT_OBJECT = '_content'; + /** + * Field name for the content id of the current route, if any. + */ + const CONTENT_ID = '_content_id'; + /** * Get the content document this route entry stands for. If non-null, * the ControllerClassMapper uses it to identify a controller and @@ -64,14 +69,17 @@ interface RouteObjectInterface public function getContent(); /** - * Get the route key. + * Get the route name. * - * This key will be used as route name instead of the symfony core compatible - * route name and can contain any characters. + * Normal symfony routes do not know their name, the name is only known + * from the route collection. In the CMF, it is possible to use route + * documents outside of collections, and thus useful to have routes provide + * their name. * - * Return null if you want to use the default key. + * There are no limitations to allowed characters in the name. * - * @return string the route name + * @return string|null the route name or null to use the default name + * (e.g. from route collection if known) */ public function getRouteKey(); } diff --git a/vendor/symfony-cmf/routing/RouteProviderInterface.php b/vendor/symfony-cmf/routing/RouteProviderInterface.php index 6283e6f8e..49842b98e 100644 --- a/vendor/symfony-cmf/routing/RouteProviderInterface.php +++ b/vendor/symfony-cmf/routing/RouteProviderInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -82,7 +82,7 @@ interface RouteProviderInterface * the provider will determine what routes to return. * * @return Route[] Iterable list with the keys being the names from the - * $names array. + * $names array. */ public function getRoutesByNames($names); } diff --git a/vendor/symfony-cmf/routing/RouteReferrersInterface.php b/vendor/symfony-cmf/routing/RouteReferrersInterface.php index 1c13cb6df..e8a43f46a 100644 --- a/vendor/symfony-cmf/routing/RouteReferrersInterface.php +++ b/vendor/symfony-cmf/routing/RouteReferrersInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/symfony-cmf/routing/RouteReferrersReadInterface.php b/vendor/symfony-cmf/routing/RouteReferrersReadInterface.php index d81b43530..3bb1e767f 100644 --- a/vendor/symfony-cmf/routing/RouteReferrersReadInterface.php +++ b/vendor/symfony-cmf/routing/RouteReferrersReadInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/vendor/symfony-cmf/routing/VersatileGeneratorInterface.php b/vendor/symfony-cmf/routing/VersatileGeneratorInterface.php index d58ab7aba..7c423997a 100644 --- a/vendor/symfony-cmf/routing/VersatileGeneratorInterface.php +++ b/vendor/symfony-cmf/routing/VersatileGeneratorInterface.php @@ -3,7 +3,7 @@ /* * This file is part of the Symfony CMF package. * - * (c) 2011-2014 Symfony CMF + * (c) 2011-2015 Symfony CMF * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -34,7 +34,7 @@ interface VersatileGeneratorInterface extends UrlGeneratorInterface /** * Convert a route identifier (name, content object etc) into a string - * usable for logging and other debug/error messages + * usable for logging and other debug/error messages. * * @param mixed $name * @param array $parameters which should contain a content field containing diff --git a/vendor/symfony-cmf/routing/composer.json b/vendor/symfony-cmf/routing/composer.json index 8594e3872..0aace3c63 100644 --- a/vendor/symfony-cmf/routing/composer.json +++ b/vendor/symfony-cmf/routing/composer.json @@ -11,20 +11,21 @@ "homepage": "https://github.com/symfony-cmf/Routing/contributors" } ], - "minimum-stability": "dev", "require": { - "php": ">=5.3.3", - "symfony/routing": "~2.2", - "symfony/http-kernel": "~2.2", - "psr/log": "~1.0" + "php": "^5.3.9|^7.0", + "symfony/routing": "^2.2|3.*", + "symfony/http-kernel": "^2.2|3.*", + "psr/log": "1.*" }, "require-dev": { - "symfony/dependency-injection": "~2.0@stable", - "symfony/config": "~2.2", - "symfony/event-dispatcher": "~2.1" + "symfony-cmf/testing": "^1.3", + "symfony/dependency-injection": "^2.0.5|3.*", + "symfony/config": "^2.2|3.*", + "symfony/event-dispatcher": "^2.1|3.*", + "friendsofsymfony/jsrouting-bundle": "^1.1" }, "suggest": { - "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version ~2.1" + "symfony/event-dispatcher": "DynamicRouter can optionally trigger an event at the start of matching. Minimal version (~2.1)" }, "autoload": { "psr-4": { @@ -33,7 +34,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } } } diff --git a/vendor/symfony-cmf/routing/phpunit.xml.dist b/vendor/symfony-cmf/routing/phpunit.xml.dist index 2564ef181..aca2cd767 100644 --- a/vendor/symfony-cmf/routing/phpunit.xml.dist +++ b/vendor/symfony-cmf/routing/phpunit.xml.dist @@ -3,7 +3,7 @@ diff --git a/vendor/symfony/class-loader/ApcClassLoader.php b/vendor/symfony/class-loader/ApcClassLoader.php index 4f71ea173..46ee4a856 100644 --- a/vendor/symfony/class-loader/ApcClassLoader.php +++ b/vendor/symfony/class-loader/ApcClassLoader.php @@ -59,8 +59,8 @@ class ApcClassLoader /** * Constructor. * - * @param string $prefix The APC namespace prefix to use. - * @param object $decorated A class loader object that implements the findFile() method. + * @param string $prefix The APC namespace prefix to use + * @param object $decorated A class loader object that implements the findFile() method * * @throws \RuntimeException * @throws \InvalidArgumentException @@ -122,8 +122,10 @@ class ApcClassLoader */ public function findFile($class) { - if (false === $file = apcu_fetch($this->prefix.$class)) { - apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class)); + $file = apcu_fetch($this->prefix.$class, $success); + + if (!$success) { + apcu_store($this->prefix.$class, $file = $this->decorated->findFile($class) ?: null); } return $file; diff --git a/vendor/symfony/class-loader/ApcUniversalClassLoader.php b/vendor/symfony/class-loader/ApcUniversalClassLoader.php index aaafc78b8..0ab45678f 100644 --- a/vendor/symfony/class-loader/ApcUniversalClassLoader.php +++ b/vendor/symfony/class-loader/ApcUniversalClassLoader.php @@ -92,8 +92,10 @@ class ApcUniversalClassLoader extends UniversalClassLoader */ public function findFile($class) { - if (false === $file = apcu_fetch($this->prefix.$class)) { - apcu_store($this->prefix.$class, $file = parent::findFile($class)); + $file = apcu_fetch($this->prefix.$class, $success); + + if (!$success) { + apcu_store($this->prefix.$class, $file = parent::findFile($class) ?: null); } return $file; diff --git a/vendor/symfony/class-loader/ClassCollectionLoader.php b/vendor/symfony/class-loader/ClassCollectionLoader.php index 804657968..6f88286de 100644 --- a/vendor/symfony/class-loader/ClassCollectionLoader.php +++ b/vendor/symfony/class-loader/ClassCollectionLoader.php @@ -43,12 +43,12 @@ class ClassCollectionLoader self::$loaded[$name] = true; - $declared = array_merge(get_declared_classes(), get_declared_interfaces()); - if (function_exists('get_declared_traits')) { - $declared = array_merge($declared, get_declared_traits()); - } - if ($adaptive) { + $declared = array_merge(get_declared_classes(), get_declared_interfaces()); + if (function_exists('get_declared_traits')) { + $declared = array_merge($declared, get_declared_traits()); + } + // don't include already declared classes $classes = array_diff($classes, $declared); @@ -58,6 +58,11 @@ class ClassCollectionLoader $classes = array_unique($classes); + // cache the core classes + if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) { + throw new \RuntimeException(sprintf('Class Collection Loader was not able to create directory "%s"', $cacheDir)); + } + $cacheDir = rtrim(realpath($cacheDir) ?: $cacheDir, '/'.DIRECTORY_SEPARATOR); $cache = $cacheDir.'/'.$name.$extension; // auto-reload @@ -87,12 +92,29 @@ class ClassCollectionLoader } } - if (!$reload && is_file($cache)) { + if (!$reload && file_exists($cache)) { require_once $cache; return; } + if (!$adaptive) { + $declared = array_merge(get_declared_classes(), get_declared_interfaces()); + if (function_exists('get_declared_traits')) { + $declared = array_merge($declared, get_declared_traits()); + } + } + $spacesRegex = '(?:\s*+(?:(?:\#|//)[^\n]*+\n|/\*(?:(?getFileName(); + $files[] = $file = $class->getFileName(); + $c = file_get_contents($file); - $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($class->getFileName())); + if (preg_match($dontInlineRegex, $c)) { + $file = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $file)); - // fakes namespace declaration for global code - if (!$class->inNamespace()) { - $c = "\nnamespace\n{\n".$c."\n}\n"; + for ($i = 0; isset($file[$i], $cacheDir[$i]); ++$i) { + if ($file[$i] !== $cacheDir[$i]) { + break; + } + } + if (1 >= $i) { + $file = var_export(implode('/', $file), true); + } else { + $file = array_slice($file, $i); + $file = str_repeat('../', count($cacheDir) - $i).implode('/', $file); + $file = '__DIR__.'.var_export('/'.$file, true); + } + + $c = "\nnamespace {require $file;}"; + } else { + $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', $c); + + // fakes namespace declaration for global code + if (!$class->inNamespace()) { + $c = "\nnamespace\n{\n".$c."\n}\n"; + } + + $c = self::fixNamespaceDeclarations('getRealPath(); + $path = $file->getRealPath() ?: $file->getPathname(); if (pathinfo($path, PATHINFO_EXTENSION) !== 'php') { continue; diff --git a/vendor/symfony/class-loader/DebugClassLoader.php b/vendor/symfony/class-loader/DebugClassLoader.php index 92cbcb0d7..783cf676f 100644 --- a/vendor/symfony/class-loader/DebugClassLoader.php +++ b/vendor/symfony/class-loader/DebugClassLoader.php @@ -89,7 +89,7 @@ class DebugClassLoader */ public function findFile($class) { - return $this->classFinder->findFile($class); + return $this->classFinder->findFile($class) ?: null; } /** diff --git a/vendor/symfony/class-loader/LICENSE b/vendor/symfony/class-loader/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/class-loader/LICENSE +++ b/vendor/symfony/class-loader/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/class-loader/WinCacheClassLoader.php b/vendor/symfony/class-loader/WinCacheClassLoader.php index 0fc11d019..3e077450f 100644 --- a/vendor/symfony/class-loader/WinCacheClassLoader.php +++ b/vendor/symfony/class-loader/WinCacheClassLoader.php @@ -60,8 +60,8 @@ class WinCacheClassLoader /** * Constructor. * - * @param string $prefix The WinCache namespace prefix to use. - * @param object $decorated A class loader object that implements the findFile() method. + * @param string $prefix The WinCache namespace prefix to use + * @param object $decorated A class loader object that implements the findFile() method * * @throws \RuntimeException * @throws \InvalidArgumentException @@ -123,8 +123,10 @@ class WinCacheClassLoader */ public function findFile($class) { - if (false === $file = wincache_ucache_get($this->prefix.$class)) { - wincache_ucache_set($this->prefix.$class, $file = $this->decorated->findFile($class), 0); + $file = wincache_ucache_get($this->prefix.$class, $success); + + if (!$success) { + wincache_ucache_set($this->prefix.$class, $file = $this->decorated->findFile($class) ?: null, 0); } return $file; diff --git a/vendor/symfony/class-loader/XcacheClassLoader.php b/vendor/symfony/class-loader/XcacheClassLoader.php index bf512273e..aa4dc9d05 100644 --- a/vendor/symfony/class-loader/XcacheClassLoader.php +++ b/vendor/symfony/class-loader/XcacheClassLoader.php @@ -60,8 +60,8 @@ class XcacheClassLoader /** * Constructor. * - * @param string $prefix The XCache namespace prefix to use. - * @param object $decorated A class loader object that implements the findFile() method. + * @param string $prefix The XCache namespace prefix to use + * @param object $decorated A class loader object that implements the findFile() method * * @throws \RuntimeException * @throws \InvalidArgumentException @@ -126,7 +126,7 @@ class XcacheClassLoader if (xcache_isset($this->prefix.$class)) { $file = xcache_get($this->prefix.$class); } else { - $file = $this->decorated->findFile($class); + $file = $this->decorated->findFile($class) ?: null; xcache_set($this->prefix.$class, $file); } diff --git a/vendor/symfony/class-loader/composer.json b/vendor/symfony/class-loader/composer.json index 7acbeafda..6f306d971 100644 --- a/vendor/symfony/class-loader/composer.json +++ b/vendor/symfony/class-loader/composer.json @@ -21,7 +21,7 @@ "symfony/polyfill-apcu": "~1.1" }, "require-dev": { - "symfony/finder": "~2.0,>=2.0.5|~3.0.0" + "symfony/finder": "^2.0.5|~3.0.0" }, "autoload": { "psr-4": { "Symfony\\Component\\ClassLoader\\": "" }, diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index 603559f0f..d069da03b 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -41,6 +41,7 @@ use Symfony\Component\Console\Event\ConsoleExceptionEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** @@ -104,8 +105,6 @@ class Application * @param OutputInterface $output An Output instance * * @return int 0 if everything went fine, or an error code - * - * @throws \Exception When doRun returns Exception */ public function run(InputInterface $input = null, OutputInterface $output = null) { @@ -216,7 +215,7 @@ class Application } /** - * Set an input definition set to be used with this application. + * Set an input definition to be used with this application. * * @param InputDefinition $definition The input definition */ @@ -238,7 +237,7 @@ class Application /** * Gets the help message. * - * @return string A help message. + * @return string A help message */ public function getHelp() { @@ -338,6 +337,8 @@ class Application /** * Adds an array of command objects. * + * If a Command is not enabled it will not be added. + * * @param Command[] $commands An array of commands */ public function addCommands(array $commands) @@ -351,10 +352,11 @@ class Application * Adds a command object. * * If a command with the same name already exists, it will be overridden. + * If the command is not enabled it will not be added. * * @param Command $command A Command object * - * @return Command The registered command + * @return Command|null The registered command if enabled or null */ public function add(Command $command) { @@ -386,7 +388,7 @@ class Application * * @return Command A Command object * - * @throws CommandNotFoundException When command name given does not exist + * @throws CommandNotFoundException When given command name does not exist */ public function get($name) { @@ -423,9 +425,9 @@ class Application /** * Returns an array of all unique namespaces used by currently registered commands. * - * It does not returns the global namespace which always exists. + * It does not return the global namespace which always exists. * - * @return array An array of namespaces + * @return string[] An array of namespaces */ public function getNamespaces() { @@ -773,7 +775,7 @@ class Application * @param int $width The width * @param int $height The height * - * @return Application The current application + * @return $this */ public function setTerminalDimensions($width, $height) { @@ -807,6 +809,7 @@ class Application if (true === $input->hasParameterOption(array('--quiet', '-q'))) { $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); + $input->setInteractive(false); } else { if ($input->hasParameterOption('-vvv') || $input->hasParameterOption('--verbose=3') || $input->getParameterOption('--verbose') === 3) { $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); @@ -829,8 +832,6 @@ class Application * @param OutputInterface $output An Output instance * * @return int 0 if everything went fine, or an error code - * - * @throws \Exception when the command being run threw an exception */ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) { @@ -841,7 +842,13 @@ class Application } if (null === $this->dispatcher) { - return $command->run($input, $output); + try { + return $command->run($input, $output); + } catch (\Exception $e) { + throw $e; + } catch (\Throwable $e) { + throw new FatalThrowableError($e); + } } // bind before the console.command event, so the listeners have access to input options/arguments @@ -852,22 +859,34 @@ class Application // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition } + // don't bind the input again as it would override any input argument/option set from the command event in + // addition to being useless + $command->setInputBound(true); + $event = new ConsoleCommandEvent($command, $input, $output); $this->dispatcher->dispatch(ConsoleEvents::COMMAND, $event); if ($event->commandShouldRun()) { try { + $e = null; $exitCode = $command->run($input, $output); - } catch (\Exception $e) { + } catch (\Exception $x) { + $e = $x; + } catch (\Throwable $x) { + $e = new FatalThrowableError($x); + } + if (null !== $e) { $event = new ConsoleExceptionEvent($command, $input, $output, $e, $e->getCode()); $this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event); - $e = $event->getException(); + if ($e !== $event->getException()) { + $x = $e = $event->getException(); + } $event = new ConsoleTerminateEvent($command, $input, $output, $e->getCode()); $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event); - throw $e; + throw $x; } } else { $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED; @@ -965,7 +984,7 @@ class Application /** * Runs and parses mode CON if it's available, suppressing any error output. * - * @return string x or null if it could not be parsed + * @return string|null x or null if it could not be parsed */ private function getConsoleMode() { @@ -1024,7 +1043,7 @@ class Application * @param string $name The string * @param array|\Traversable $collection The collection * - * @return array A sorted array of similar string + * @return string[] A sorted array of similar string */ private function findAlternatives($name, $collection) { @@ -1123,7 +1142,7 @@ class Application * * @param string $name The full name of the command * - * @return array The namespaces of the command + * @return string[] The namespaces of the command */ private function extractAllNamespaces($name) { diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php index 6dddc8def..fd0376c22 100644 --- a/vendor/symfony/console/Command/Command.php +++ b/vendor/symfony/console/Command/Command.php @@ -42,6 +42,7 @@ class Command private $ignoreValidationErrors = false; private $applicationDefinitionMerged = false; private $applicationDefinitionMergedWithArgs = false; + private $inputBound = false; private $code; private $synopsis = array(); private $usages = array(); @@ -205,8 +206,6 @@ class Command * * @return int The command exit code * - * @throws \Exception - * * @see setCode() * @see execute() */ @@ -220,11 +219,13 @@ class Command $this->mergeApplicationDefinition(); // bind the input against the command specific arguments/options - try { - $input->bind($this->definition); - } catch (ExceptionInterface $e) { - if (!$this->ignoreValidationErrors) { - throw $e; + if (!$this->inputBound) { + try { + $input->bind($this->definition); + } catch (ExceptionInterface $e) { + if (!$this->ignoreValidationErrors) { + throw $e; + } } } @@ -232,7 +233,14 @@ class Command if (null !== $this->processTitle) { if (function_exists('cli_set_process_title')) { - cli_set_process_title($this->processTitle); + if (false === @cli_set_process_title($this->processTitle)) { + if ('Darwin' === PHP_OS) { + $output->writeln('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); + } else { + $error = error_get_last(); + trigger_error($error['message'], E_USER_WARNING); + } + } } elseif (function_exists('setproctitle')) { setproctitle($this->processTitle); } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { @@ -270,7 +278,7 @@ class Command * * @param callable $code A callable(InputInterface $input, OutputInterface $output) * - * @return Command The current instance + * @return $this * * @throws InvalidArgumentException * @@ -285,7 +293,15 @@ class Command if (PHP_VERSION_ID >= 50400 && $code instanceof \Closure) { $r = new \ReflectionFunction($code); if (null === $r->getClosureThis()) { - $code = \Closure::bind($code, $this); + if (PHP_VERSION_ID < 70000) { + // Bug in PHP5: https://bugs.php.net/bug.php?id=64761 + // This means that we cannot bind static closures and therefore we must + // ignore any errors here. There is no way to test if the closure is + // bindable. + $code = @\Closure::bind($code, $this); + } else { + $code = \Closure::bind($code, $this); + } } } @@ -307,14 +323,14 @@ class Command return; } + $this->definition->addOptions($this->application->getDefinition()->getOptions()); + if ($mergeArgs) { $currentArguments = $this->definition->getArguments(); $this->definition->setArguments($this->application->getDefinition()->getArguments()); $this->definition->addArguments($currentArguments); } - $this->definition->addOptions($this->application->getDefinition()->getOptions()); - $this->applicationDefinitionMerged = true; if ($mergeArgs) { $this->applicationDefinitionMergedWithArgs = true; @@ -326,7 +342,7 @@ class Command * * @param array|InputDefinition $definition An array of argument and option instances or a definition instance * - * @return Command The current instance + * @return $this */ public function setDefinition($definition) { @@ -374,7 +390,7 @@ class Command * @param string $description A description text * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) * - * @return Command The current instance + * @return $this */ public function addArgument($name, $mode = null, $description = '', $default = null) { @@ -392,7 +408,7 @@ class Command * @param string $description A description text * @param mixed $default The default value (must be null for InputOption::VALUE_NONE) * - * @return Command The current instance + * @return $this */ public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) { @@ -411,7 +427,7 @@ class Command * * @param string $name The command name * - * @return Command The current instance + * @return $this * * @throws InvalidArgumentException When the name is invalid */ @@ -434,7 +450,7 @@ class Command * * @param string $title The process title * - * @return Command The current instance + * @return $this */ public function setProcessTitle($title) { @@ -458,7 +474,7 @@ class Command * * @param string $description The description for the command * - * @return Command The current instance + * @return $this */ public function setDescription($description) { @@ -482,7 +498,7 @@ class Command * * @param string $help The help for the command * - * @return Command The current instance + * @return $this */ public function setHelp($help) { @@ -528,7 +544,7 @@ class Command * * @param string[] $aliases An array of aliases for the command * - * @return Command The current instance + * @return $this * * @throws InvalidArgumentException When an alias is invalid */ @@ -579,6 +595,8 @@ class Command * Add a command usage example. * * @param string $usage The usage, it'll be prefixed with the command name + * + * @return $this */ public function addUsage($usage) { @@ -608,10 +626,15 @@ class Command * * @return mixed The helper value * + * @throws LogicException if no HelperSet is defined * @throws InvalidArgumentException if the helper is not defined */ public function getHelper($name) { + if (null === $this->helperSet) { + throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name)); + } + return $this->helperSet->get($name); } @@ -658,6 +681,14 @@ class Command return $output->fetch(); } + /** + * @internal + */ + public function setInputBound($inputBound) + { + $this->inputBound = $inputBound; + } + /** * Validates a command name. * diff --git a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php index d3d76a420..c2d6243e2 100644 --- a/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ b/vendor/symfony/console/Descriptor/MarkdownDescriptor.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Console\Descriptor; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\Helper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; @@ -94,11 +95,11 @@ class MarkdownDescriptor extends Descriptor $this->write( $command->getName()."\n" - .str_repeat('-', strlen($command->getName()))."\n\n" + .str_repeat('-', Helper::strlen($command->getName()))."\n\n" .'* Description: '.($command->getDescription() ?: '')."\n" .'* Usage:'."\n\n" .array_reduce(array_merge(array($command->getSynopsis()), $command->getAliases(), $command->getUsages()), function ($carry, $usage) { - return $carry .= ' * `'.$usage.'`'."\n"; + return $carry.' * `'.$usage.'`'."\n"; }) ); @@ -121,7 +122,7 @@ class MarkdownDescriptor extends Descriptor $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; $description = new ApplicationDescription($application, $describedNamespace); - $this->write($application->getName()."\n".str_repeat('=', strlen($application->getName()))); + $this->write($application->getName()."\n".str_repeat('=', Helper::strlen($application->getName()))); foreach ($description->getNamespaces() as $namespace) { if (ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php index 64b539716..b49b64d5a 100644 --- a/vendor/symfony/console/Descriptor/TextDescriptor.php +++ b/vendor/symfony/console/Descriptor/TextDescriptor.php @@ -13,6 +13,8 @@ namespace Symfony\Component\Console\Descriptor; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Helper\Helper; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputOption; @@ -37,14 +39,14 @@ class TextDescriptor extends Descriptor $default = ''; } - $totalWidth = isset($options['total_width']) ? $options['total_width'] : strlen($argument->getName()); - $spacingWidth = $totalWidth - strlen($argument->getName()) + 2; + $totalWidth = isset($options['total_width']) ? $options['total_width'] : Helper::strlen($argument->getName()); + $spacingWidth = $totalWidth - strlen($argument->getName()); - $this->writeText(sprintf(' %s%s%s%s', + $this->writeText(sprintf(' %s %s%s%s', $argument->getName(), str_repeat(' ', $spacingWidth), - // + 17 = 2 spaces + + + 2 spaces - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 17), $argument->getDescription()), + // + 4 = 2 spaces before , 2 spaces after + preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()), $default ), $options); } @@ -75,13 +77,13 @@ class TextDescriptor extends Descriptor sprintf('--%s%s', $option->getName(), $value) ); - $spacingWidth = $totalWidth - strlen($synopsis) + 2; + $spacingWidth = $totalWidth - Helper::strlen($synopsis); - $this->writeText(sprintf(' %s%s%s%s%s', + $this->writeText(sprintf(' %s %s%s%s%s', $synopsis, str_repeat(' ', $spacingWidth), - // + 17 = 2 spaces + + + 2 spaces - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 17), $option->getDescription()), + // + 4 = 2 spaces before , 2 spaces after + preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()), $default, $option->isArray() ? ' (multiple values allowed)' : '' ), $options); @@ -94,7 +96,7 @@ class TextDescriptor extends Descriptor { $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); foreach ($definition->getArguments() as $argument) { - $totalWidth = max($totalWidth, strlen($argument->getName())); + $totalWidth = max($totalWidth, Helper::strlen($argument->getName())); } if ($definition->getArguments()) { @@ -156,7 +158,7 @@ class TextDescriptor extends Descriptor $this->writeText("\n"); $this->writeText('Help:', $options); $this->writeText("\n"); - $this->writeText(' '.str_replace("\n", "\n ", $help), $options); + $this->writeText(' '.str_replace("\n", "\n ", $help), $options); $this->writeText("\n"); } } @@ -206,7 +208,7 @@ class TextDescriptor extends Descriptor foreach ($namespace['commands'] as $name) { $this->writeText("\n"); - $spacingWidth = $width - strlen($name); + $spacingWidth = $width - Helper::strlen($name); $this->writeText(sprintf(' %s%s%s', $name, str_repeat(' ', $spacingWidth), $description->getCommand($name)->getDescription()), $options); } } @@ -235,6 +237,16 @@ class TextDescriptor extends Descriptor */ private function formatDefaultValue($default) { + if (is_string($default)) { + $default = OutputFormatter::escape($default); + } elseif (is_array($default)) { + foreach ($default as $key => $value) { + if (is_string($value)) { + $default[$key] = OutputFormatter::escape($value); + } + } + } + if (PHP_VERSION_ID < 50400) { return str_replace(array('\/', '\\\\'), array('/', '\\'), json_encode($default)); } @@ -252,9 +264,9 @@ class TextDescriptor extends Descriptor $widths = array(); foreach ($commands as $command) { - $widths[] = strlen($command->getName()); + $widths[] = Helper::strlen($command->getName()); foreach ($command->getAliases() as $alias) { - $widths[] = strlen($alias); + $widths[] = Helper::strlen($alias); } } @@ -271,10 +283,10 @@ class TextDescriptor extends Descriptor $totalWidth = 0; foreach ($options as $option) { // "-" + shortcut + ", --" + name - $nameLength = 1 + max(strlen($option->getShortcut()), 1) + 4 + strlen($option->getName()); + $nameLength = 1 + max(strlen($option->getShortcut()), 1) + 4 + Helper::strlen($option->getName()); if ($option->acceptValue()) { - $valueLength = 1 + strlen($option->getName()); // = + value + $valueLength = 1 + Helper::strlen($option->getName()); // = + value $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ] $nameLength += $valueLength; diff --git a/vendor/symfony/console/Exception/CommandNotFoundException.php b/vendor/symfony/console/Exception/CommandNotFoundException.php index ce6fefe34..54f1a5b0c 100644 --- a/vendor/symfony/console/Exception/CommandNotFoundException.php +++ b/vendor/symfony/console/Exception/CommandNotFoundException.php @@ -21,10 +21,10 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce private $alternatives; /** - * @param string $message Exception message to throw. - * @param array $alternatives List of similar defined names. - * @param int $code Exception code. - * @param Exception $previous previous exception used for the exception chaining. + * @param string $message Exception message to throw + * @param array $alternatives List of similar defined names + * @param int $code Exception code + * @param Exception $previous previous exception used for the exception chaining */ public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null) { @@ -34,7 +34,7 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce } /** - * @return array A list of similar defined names. + * @return array A list of similar defined names */ public function getAlternatives() { diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php index 56cd5e568..dee696759 100644 --- a/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/vendor/symfony/console/Formatter/OutputFormatter.php @@ -35,6 +35,20 @@ class OutputFormatter implements OutputFormatterInterface { $text = preg_replace('/([^\\\\]?) $format) { if ($secs >= $format[0]) { - continue; - } + if ((isset($timeFormats[$index + 1]) && $secs < $timeFormats[$index + 1][0]) + || $index == count($timeFormats) - 1 + ) { + if (2 == count($format)) { + return $format[1]; + } - if (2 == count($format)) { - return $format[1]; + return floor($secs / $format[2]).' '.$format[1]; + } } - - return ceil($secs / $format[2]).' '.$format[1]; } } diff --git a/vendor/symfony/console/Helper/HelperSet.php b/vendor/symfony/console/Helper/HelperSet.php index 27fedcf7b..896326ee3 100644 --- a/vendor/symfony/console/Helper/HelperSet.php +++ b/vendor/symfony/console/Helper/HelperSet.php @@ -21,13 +21,16 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class HelperSet implements \IteratorAggregate { + /** + * @var Helper[] + */ private $helpers = array(); private $command; /** * Constructor. * - * @param Helper[] $helpers An array of helper. + * @param Helper[] $helpers An array of helper */ public function __construct(array $helpers = array()) { @@ -110,6 +113,9 @@ class HelperSet implements \IteratorAggregate return $this->command; } + /** + * @return Helper[] + */ public function getIterator() { return new \ArrayIterator($this->helpers); diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php index 9fc4afca6..89ca85d2f 100644 --- a/vendor/symfony/console/Helper/ProgressBar.php +++ b/vendor/symfony/console/Helper/ProgressBar.php @@ -41,10 +41,10 @@ class ProgressBar private $startTime; private $stepWidth; private $percent = 0.0; - private $lastMessagesLength = 0; private $formatLineCount; - private $messages; + private $messages = array(); private $overwrite = true; + private $firstRun = true; private static $formatters; private static $formats; @@ -141,6 +141,16 @@ class ProgressBar return isset(self::$formats[$name]) ? self::$formats[$name] : null; } + /** + * Associates a text with a named placeholder. + * + * The text is displayed when the progress bar is rendered but only + * when the corresponding placeholder is part of the custom format line + * (by wrapping the name with %). + * + * @param string $message The text to associate with the placeholder + * @param string $name The name of the placeholder + */ public function setMessage($message, $name = 'message') { $this->messages[$name] = $message; @@ -473,7 +483,7 @@ class ProgressBar $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat()); } - $this->overwrite(str_repeat("\n", $this->formatLineCount)); + $this->overwrite(''); } /** @@ -513,37 +523,26 @@ class ProgressBar */ private function overwrite($message) { - $lines = explode("\n", $message); + if ($this->overwrite) { + if (!$this->firstRun) { + // Move the cursor to the beginning of the line + $this->output->write("\x0D"); - // append whitespace to match the line's length - if (null !== $this->lastMessagesLength) { - foreach ($lines as $i => $line) { - if ($this->lastMessagesLength > Helper::strlenWithoutDecoration($this->output->getFormatter(), $line)) { - $lines[$i] = str_pad($line, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT); + // Erase the line + $this->output->write("\x1B[2K"); + + // Erase previous lines + if ($this->formatLineCount > 0) { + $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount)); } } - } - - if ($this->overwrite) { - // move back to the beginning of the progress bar before redrawing it - $this->output->write("\x0D"); } elseif ($this->step > 0) { - // move to new line $this->output->writeln(''); } - if ($this->formatLineCount) { - $this->output->write(sprintf("\033[%dA", $this->formatLineCount)); - } - $this->output->write(implode("\n", $lines)); + $this->firstRun = false; - $this->lastMessagesLength = 0; - foreach ($lines as $line) { - $len = Helper::strlenWithoutDecoration($this->output->getFormatter(), $line); - if ($len > $this->lastMessagesLength) { - $this->lastMessagesLength = $len; - } - } + $this->output->write($message); } private function determineBestFormat() diff --git a/vendor/symfony/console/Helper/ProgressHelper.php b/vendor/symfony/console/Helper/ProgressHelper.php index 96b6202c9..eaac2df12 100644 --- a/vendor/symfony/console/Helper/ProgressHelper.php +++ b/vendor/symfony/console/Helper/ProgressHelper.php @@ -372,8 +372,6 @@ class ProgressHelper extends Helper } if (isset($this->formatVars['bar'])) { - $completeBars = 0; - if ($this->max > 0) { $completeBars = floor($percent * $this->barWidth); } else { diff --git a/vendor/symfony/console/Helper/ProgressIndicator.php b/vendor/symfony/console/Helper/ProgressIndicator.php index 8c8a49c44..2e43bc3f5 100644 --- a/vendor/symfony/console/Helper/ProgressIndicator.php +++ b/vendor/symfony/console/Helper/ProgressIndicator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Console\Helper; +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Output\OutputInterface; /** @@ -26,7 +28,6 @@ class ProgressIndicator private $indicatorCurrent; private $indicatorChangeInterval; private $indicatorUpdateTime; - private $lastMessagesLength; private $started = false; private static $formatters; @@ -53,7 +54,7 @@ class ProgressIndicator $indicatorValues = array_values($indicatorValues); if (2 > count($indicatorValues)) { - throw new \InvalidArgumentException('Must have at least 2 indicator value characters.'); + throw new InvalidArgumentException('Must have at least 2 indicator value characters.'); } $this->format = self::getFormatDefinition($format); @@ -118,12 +119,11 @@ class ProgressIndicator public function start($message) { if ($this->started) { - throw new \LogicException('Progress indicator already started.'); + throw new LogicException('Progress indicator already started.'); } $this->message = $message; $this->started = true; - $this->lastMessagesLength = 0; $this->startTime = time(); $this->indicatorUpdateTime = $this->getCurrentTimeInMilliseconds() + $this->indicatorChangeInterval; $this->indicatorCurrent = 0; @@ -137,7 +137,7 @@ class ProgressIndicator public function advance() { if (!$this->started) { - throw new \LogicException('Progress indicator has not yet been started.'); + throw new LogicException('Progress indicator has not yet been started.'); } if (!$this->output->isDecorated()) { @@ -164,7 +164,7 @@ class ProgressIndicator public function finish($message) { if (!$this->started) { - throw new \LogicException('Progress indicator has not yet been started.'); + throw new LogicException('Progress indicator has not yet been started.'); } $this->message = $message; @@ -260,27 +260,12 @@ class ProgressIndicator */ private function overwrite($message) { - // append whitespace to match the line's length - if (null !== $this->lastMessagesLength) { - if ($this->lastMessagesLength > Helper::strlenWithoutDecoration($this->output->getFormatter(), $message)) { - $message = str_pad($message, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT); - } - } - if ($this->output->isDecorated()) { - $this->output->write("\x0D"); + $this->output->write("\x0D\x1B[2K"); $this->output->write($message); } else { $this->output->writeln($message); } - - $this->lastMessagesLength = 0; - - $len = Helper::strlenWithoutDecoration($this->output->getFormatter(), $message); - - if ($len > $this->lastMessagesLength) { - $this->lastMessagesLength = $len; - } } private function getCurrentTimeInMilliseconds() diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php index 5bb30df8a..8998f7b0f 100644 --- a/vendor/symfony/console/Helper/QuestionHelper.php +++ b/vendor/symfony/console/Helper/QuestionHelper.php @@ -38,7 +38,7 @@ class QuestionHelper extends Helper * @param OutputInterface $output An OutputInterface instance * @param Question $question The question to ask * - * @return string The user answer + * @return mixed The user answer * * @throws RuntimeException If there is no data to read in the input stream */ @@ -136,7 +136,7 @@ class QuestionHelper extends Helper if (false === $ret) { $ret = fgets($inputStream, 4096); if (false === $ret) { - throw new \RuntimeException('Aborted'); + throw new RuntimeException('Aborted'); } $ret = trim($ret); } @@ -202,6 +202,7 @@ class QuestionHelper extends Helper * * @param OutputInterface $output * @param Question $question + * @param resource $inputStream * * @return string */ @@ -318,7 +319,8 @@ class QuestionHelper extends Helper /** * Gets a hidden response from user. * - * @param OutputInterface $output An Output instance + * @param OutputInterface $output An Output instance + * @param resource $inputStream The handler resource * * @return string The answer * @@ -382,7 +384,7 @@ class QuestionHelper extends Helper * @param OutputInterface $output An Output instance * @param Question $question A Question instance * - * @return string The validated response + * @return mixed The validated response * * @throws \Exception In case the max number of attempts has been reached and no valid response has been given */ @@ -397,6 +399,8 @@ class QuestionHelper extends Helper try { return call_user_func($question->getValidator(), $interviewer()); + } catch (RuntimeException $e) { + throw $e; } catch (\Exception $error) { } } diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php index 942278bdf..25e094a04 100644 --- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php @@ -18,6 +18,7 @@ use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\Console\Formatter\OutputFormatter; /** * Symfony Style Guide compliant question helper. @@ -35,11 +36,11 @@ class SymfonyQuestionHelper extends QuestionHelper $question->setValidator(function ($value) use ($validator) { if (null !== $validator) { $value = $validator($value); - } - - // make required - if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) { - throw new LogicException('A value is required.'); + } else { + // make required + if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) { + throw new LogicException('A value is required.'); + } } return $value; @@ -53,7 +54,7 @@ class SymfonyQuestionHelper extends QuestionHelper */ protected function writePrompt(OutputInterface $output, Question $question) { - $text = $question->getQuestion(); + $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); $default = $question->getDefault(); switch (true) { @@ -67,14 +68,26 @@ class SymfonyQuestionHelper extends QuestionHelper break; + case $question instanceof ChoiceQuestion && $question->isMultiselect(): + $choices = $question->getChoices(); + $default = explode(',', $default); + + foreach ($default as $key => $value) { + $default[$key] = $choices[trim($value)]; + } + + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape(implode(', ', $default))); + + break; + case $question instanceof ChoiceQuestion: $choices = $question->getChoices(); - $text = sprintf(' %s [%s]:', $text, $choices[$default]); + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($choices[$default])); break; default: - $text = sprintf(' %s [%s]:', $text, $default); + $text = sprintf(' %s [%s]:', $text, OutputFormatter::escape($default)); } $output->writeln($text); diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php index 1f103ad14..cf2d0a622 100644 --- a/vendor/symfony/console/Helper/Table.php +++ b/vendor/symfony/console/Helper/Table.php @@ -100,7 +100,7 @@ class Table * * @param string $name The style name * - * @return TableStyle A TableStyle instance + * @return TableStyle */ public static function getStyleDefinition($name) { @@ -108,11 +108,11 @@ class Table self::$styles = self::initStyles(); } - if (!self::$styles[$name]) { - throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); + if (isset(self::$styles[$name])) { + return self::$styles[$name]; } - return self::$styles[$name]; + throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); } /** @@ -120,17 +120,11 @@ class Table * * @param TableStyle|string $name The style name or a TableStyle instance * - * @return Table + * @return $this */ public function setStyle($name) { - if ($name instanceof TableStyle) { - $this->style = $name; - } elseif (isset(self::$styles[$name])) { - $this->style = self::$styles[$name]; - } else { - throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); - } + $this->style = $this->resolveStyle($name); return $this; } @@ -151,19 +145,13 @@ class Table * @param int $columnIndex Column index * @param TableStyle|string $name The style name or a TableStyle instance * - * @return Table + * @return $this */ public function setColumnStyle($columnIndex, $name) { $columnIndex = intval($columnIndex); - if ($name instanceof TableStyle) { - $this->columnStyles[$columnIndex] = $name; - } elseif (isset(self::$styles[$name])) { - $this->columnStyles[$columnIndex] = self::$styles[$name]; - } else { - throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); - } + $this->columnStyles[$columnIndex] = $this->resolveStyle($name); return $this; } @@ -307,7 +295,7 @@ class Table */ private function renderColumnSeparator() { - $this->output->write(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); + return sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar()); } /** @@ -324,12 +312,12 @@ class Table return; } - $this->renderColumnSeparator(); + $rowContent = $this->renderColumnSeparator(); foreach ($this->getRowColumns($row) as $column) { - $this->renderCell($row, $column, $cellFormat); - $this->renderColumnSeparator(); + $rowContent .= $this->renderCell($row, $column, $cellFormat); + $rowContent .= $this->renderColumnSeparator(); } - $this->output->writeln(''); + $this->output->writeln($rowContent); } /** @@ -358,12 +346,13 @@ class Table $style = $this->getColumnStyle($column); if ($cell instanceof TableSeparator) { - $this->output->write(sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width))); - } else { - $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); - $content = sprintf($style->getCellRowContentFormat(), $cell); - $this->output->write(sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType()))); + return sprintf($style->getBorderFormat(), str_repeat($style->getHorizontalBorderChar(), $width)); } + + $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + $content = sprintf($style->getCellRowContentFormat(), $cell); + + return sprintf($cellFormat, str_pad($content, $width, $style->getPaddingChar(), $style->getPadType())); } /** @@ -447,10 +436,13 @@ class Table } // create a two dimensional array (rowspan x colspan) - $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, ''), $unmergedRows); + $unmergedRows = array_replace_recursive(array_fill($line + 1, $nbLines, array()), $unmergedRows); foreach ($unmergedRows as $unmergedRowKey => $unmergedRow) { $value = isset($lines[$unmergedRowKey - $line]) ? $lines[$unmergedRowKey - $line] : ''; $unmergedRows[$unmergedRowKey][$column] = new TableCell($value, array('colspan' => $cell->getColspan())); + if ($nbLines === $unmergedRowKey - $line) { + break; + } } } } @@ -569,6 +561,18 @@ class Table continue; } + foreach ($row as $i => $cell) { + if ($cell instanceof TableCell) { + $textLength = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + if ($textLength > 0) { + $contentColumns = str_split($cell, ceil($textLength / $cell->getColspan())); + foreach ($contentColumns as $position => $content) { + $row[$i + $position] = $content; + } + } + } + } + $lengths[] = $this->getCellWidth($row, $column); } @@ -599,10 +603,6 @@ class Table if (isset($row[$column])) { $cell = $row[$column]; $cellWidth = Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - // we assume that cell value will be across more than one column. - $cellWidth = $cellWidth / $cell->getColspan(); - } return $cellWidth; } @@ -651,4 +651,17 @@ class Table 'symfony-style-guide' => $styleGuide, ); } + + private function resolveStyle($name) + { + if ($name instanceof TableStyle) { + return $name; + } + + if (isset(self::$styles[$name])) { + return self::$styles[$name]; + } + + throw new InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); + } } diff --git a/vendor/symfony/console/Helper/TableCell.php b/vendor/symfony/console/Helper/TableCell.php index 69442d424..a3064fc09 100644 --- a/vendor/symfony/console/Helper/TableCell.php +++ b/vendor/symfony/console/Helper/TableCell.php @@ -37,6 +37,10 @@ class TableCell */ public function __construct($value = '', array $options = array()) { + if (is_numeric($value) && !is_string($value)) { + $value = (string) $value; + } + $this->value = $value; // check option names diff --git a/vendor/symfony/console/Helper/TableHelper.php b/vendor/symfony/console/Helper/TableHelper.php index 3c7a1a786..1f50d2c19 100644 --- a/vendor/symfony/console/Helper/TableHelper.php +++ b/vendor/symfony/console/Helper/TableHelper.php @@ -49,7 +49,7 @@ class TableHelper extends Helper * * @param int $layout self::LAYOUT_* * - * @return TableHelper + * @return $this * * @throws InvalidArgumentException when the table layout is not known */ @@ -115,7 +115,7 @@ class TableHelper extends Helper * * @param string $paddingChar * - * @return TableHelper + * @return $this */ public function setPaddingChar($paddingChar) { @@ -129,7 +129,7 @@ class TableHelper extends Helper * * @param string $horizontalBorderChar * - * @return TableHelper + * @return $this */ public function setHorizontalBorderChar($horizontalBorderChar) { @@ -143,7 +143,7 @@ class TableHelper extends Helper * * @param string $verticalBorderChar * - * @return TableHelper + * @return $this */ public function setVerticalBorderChar($verticalBorderChar) { @@ -157,7 +157,7 @@ class TableHelper extends Helper * * @param string $crossingChar * - * @return TableHelper + * @return $this */ public function setCrossingChar($crossingChar) { @@ -171,7 +171,7 @@ class TableHelper extends Helper * * @param string $cellHeaderFormat * - * @return TableHelper + * @return $this */ public function setCellHeaderFormat($cellHeaderFormat) { @@ -185,7 +185,7 @@ class TableHelper extends Helper * * @param string $cellRowFormat * - * @return TableHelper + * @return $this */ public function setCellRowFormat($cellRowFormat) { @@ -199,7 +199,7 @@ class TableHelper extends Helper * * @param string $cellRowContentFormat * - * @return TableHelper + * @return $this */ public function setCellRowContentFormat($cellRowContentFormat) { @@ -213,7 +213,7 @@ class TableHelper extends Helper * * @param string $borderFormat * - * @return TableHelper + * @return $this */ public function setBorderFormat($borderFormat) { @@ -227,7 +227,7 @@ class TableHelper extends Helper * * @param int $padType STR_PAD_* * - * @return TableHelper + * @return $this */ public function setPadType($padType) { diff --git a/vendor/symfony/console/Helper/TableSeparator.php b/vendor/symfony/console/Helper/TableSeparator.php index 8cbbc6613..8cc73e69a 100644 --- a/vendor/symfony/console/Helper/TableSeparator.php +++ b/vendor/symfony/console/Helper/TableSeparator.php @@ -19,8 +19,7 @@ namespace Symfony\Component\Console\Helper; class TableSeparator extends TableCell { /** - * @param string $value - * @param array $options + * @param array $options */ public function __construct(array $options = array()) { diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php index d7e28ff2b..2999c76f8 100644 --- a/vendor/symfony/console/Helper/TableStyle.php +++ b/vendor/symfony/console/Helper/TableStyle.php @@ -37,7 +37,7 @@ class TableStyle * * @param string $paddingChar * - * @return TableStyle + * @return $this */ public function setPaddingChar($paddingChar) { @@ -65,7 +65,7 @@ class TableStyle * * @param string $horizontalBorderChar * - * @return TableStyle + * @return $this */ public function setHorizontalBorderChar($horizontalBorderChar) { @@ -89,7 +89,7 @@ class TableStyle * * @param string $verticalBorderChar * - * @return TableStyle + * @return $this */ public function setVerticalBorderChar($verticalBorderChar) { @@ -113,7 +113,7 @@ class TableStyle * * @param string $crossingChar * - * @return TableStyle + * @return $this */ public function setCrossingChar($crossingChar) { @@ -137,7 +137,7 @@ class TableStyle * * @param string $cellHeaderFormat * - * @return TableStyle + * @return $this */ public function setCellHeaderFormat($cellHeaderFormat) { @@ -161,7 +161,7 @@ class TableStyle * * @param string $cellRowFormat * - * @return TableStyle + * @return $this */ public function setCellRowFormat($cellRowFormat) { @@ -185,7 +185,7 @@ class TableStyle * * @param string $cellRowContentFormat * - * @return TableStyle + * @return $this */ public function setCellRowContentFormat($cellRowContentFormat) { @@ -209,7 +209,7 @@ class TableStyle * * @param string $borderFormat * - * @return TableStyle + * @return $this */ public function setBorderFormat($borderFormat) { @@ -233,7 +233,7 @@ class TableStyle * * @param int $padType STR_PAD_* * - * @return TableStyle + * @return $this */ public function setPadType($padType) { diff --git a/vendor/symfony/console/Input/ArgvInput.php b/vendor/symfony/console/Input/ArgvInput.php index 02d4cdb38..f6e40cfc6 100644 --- a/vendor/symfony/console/Input/ArgvInput.php +++ b/vendor/symfony/console/Input/ArgvInput.php @@ -46,8 +46,8 @@ class ArgvInput extends Input /** * Constructor. * - * @param array $argv An array of parameters from the CLI (in the argv format) - * @param InputDefinition $definition A InputDefinition instance + * @param array|null $argv An array of parameters from the CLI (in the argv format) + * @param InputDefinition|null $definition A InputDefinition instance */ public function __construct(array $argv = null, InputDefinition $definition = null) { @@ -69,7 +69,7 @@ class ArgvInput extends Input } /** - * Processes command line arguments. + * {@inheritdoc} */ protected function parse() { @@ -93,7 +93,7 @@ class ArgvInput extends Input /** * Parses a short option. * - * @param string $token The current token. + * @param string $token The current token */ private function parseShortOption($token) { @@ -147,7 +147,10 @@ class ArgvInput extends Input $name = substr($token, 2); if (false !== $pos = strpos($name, '=')) { - $this->addLongOption(substr($name, 0, $pos), substr($name, $pos + 1)); + if (0 === strlen($value = substr($name, $pos + 1))) { + array_unshift($this->parsed, null); + } + $this->addLongOption(substr($name, 0, $pos), $value); } else { $this->addLongOption($name, null); } @@ -176,7 +179,12 @@ class ArgvInput extends Input // unexpected argument } else { - throw new RuntimeException('Too many arguments.'); + $all = $this->definition->getArguments(); + if (count($all)) { + throw new RuntimeException(sprintf('Too many arguments, expected arguments "%s".', implode('" "', array_keys($all)))); + } + + throw new RuntimeException(sprintf('No arguments expected, got "%s".', $token)); } } @@ -229,7 +237,7 @@ class ArgvInput extends Input if (isset($next[0]) && '-' !== $next[0]) { $value = $next; } elseif (empty($next)) { - $value = ''; + $value = null; } else { array_unshift($this->parsed, $next); } @@ -253,9 +261,7 @@ class ArgvInput extends Input } /** - * Returns the first argument from the raw parameters (not parsed). - * - * @return string The value of the first argument or null otherwise + * {@inheritdoc} */ public function getFirstArgument() { @@ -269,14 +275,7 @@ class ArgvInput extends Input } /** - * Returns true if the raw parameters (not parsed) contain a value. - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * - * @param string|array $values The value(s) to look for in the raw parameters (can be an array) - * - * @return bool true if the value is contained in the raw parameters + * {@inheritdoc} */ public function hasParameterOption($values) { @@ -294,15 +293,7 @@ class ArgvInput extends Input } /** - * Returns the value of a raw option (not parsed). - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * - * @param string|array $values The value(s) to look for in the raw parameters (can be an array) - * @param mixed $default The default value to return if no result is found - * - * @return mixed The option value + * {@inheritdoc} */ public function getParameterOption($values, $default = false) { diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php index 8cedbb37e..af4c204bb 100644 --- a/vendor/symfony/console/Input/ArrayInput.php +++ b/vendor/symfony/console/Input/ArrayInput.php @@ -30,8 +30,8 @@ class ArrayInput extends Input /** * Constructor. * - * @param array $parameters An array of parameters - * @param InputDefinition $definition A InputDefinition instance + * @param array $parameters An array of parameters + * @param InputDefinition|null $definition A InputDefinition instance */ public function __construct(array $parameters, InputDefinition $definition = null) { @@ -41,9 +41,7 @@ class ArrayInput extends Input } /** - * Returns the first argument from the raw parameters (not parsed). - * - * @return string The value of the first argument or null otherwise + * {@inheritdoc} */ public function getFirstArgument() { @@ -57,14 +55,7 @@ class ArrayInput extends Input } /** - * Returns true if the raw parameters (not parsed) contain a value. - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * - * @param string|array $values The values to look for in the raw parameters (can be an array) - * - * @return bool true if the value is contained in the raw parameters + * {@inheritdoc} */ public function hasParameterOption($values) { @@ -84,15 +75,7 @@ class ArrayInput extends Input } /** - * Returns the value of a raw option (not parsed). - * - * This method is to be used to introspect the input parameters - * before they have been validated. It must be used carefully. - * - * @param string|array $values The value(s) to look for in the raw parameters (can be an array) - * @param mixed $default The default value to return if no result is found - * - * @return mixed The option value + * {@inheritdoc} */ public function getParameterOption($values, $default = false) { @@ -131,7 +114,7 @@ class ArrayInput extends Input } /** - * Processes command line arguments. + * {@inheritdoc} */ protected function parse() { diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php index 85499fc48..817292ed7 100644 --- a/vendor/symfony/console/Input/Input.php +++ b/vendor/symfony/console/Input/Input.php @@ -38,7 +38,7 @@ abstract class Input implements InputInterface /** * Constructor. * - * @param InputDefinition $definition A InputDefinition instance + * @param InputDefinition|null $definition A InputDefinition instance */ public function __construct(InputDefinition $definition = null) { @@ -51,9 +51,7 @@ abstract class Input implements InputInterface } /** - * Binds the current Input instance with the given arguments and options. - * - * @param InputDefinition $definition A InputDefinition instance + * {@inheritdoc} */ public function bind(InputDefinition $definition) { @@ -70,9 +68,7 @@ abstract class Input implements InputInterface abstract protected function parse(); /** - * Validates the input. - * - * @throws RuntimeException When not enough arguments are given + * {@inheritdoc} */ public function validate() { @@ -89,9 +85,7 @@ abstract class Input implements InputInterface } /** - * Checks if the input is interactive. - * - * @return bool Returns true if the input is interactive + * {@inheritdoc} */ public function isInteractive() { @@ -99,9 +93,7 @@ abstract class Input implements InputInterface } /** - * Sets the input interactivity. - * - * @param bool $interactive If the input should be interactive + * {@inheritdoc} */ public function setInteractive($interactive) { @@ -109,9 +101,7 @@ abstract class Input implements InputInterface } /** - * Returns the argument values. - * - * @return array An array of argument values + * {@inheritdoc} */ public function getArguments() { @@ -119,13 +109,7 @@ abstract class Input implements InputInterface } /** - * Returns the argument value for a given argument name. - * - * @param string $name The argument name - * - * @return mixed The argument value - * - * @throws InvalidArgumentException When argument given doesn't exist + * {@inheritdoc} */ public function getArgument($name) { @@ -137,12 +121,7 @@ abstract class Input implements InputInterface } /** - * Sets an argument value by name. - * - * @param string $name The argument name - * @param string $value The argument value - * - * @throws InvalidArgumentException When argument given doesn't exist + * {@inheritdoc} */ public function setArgument($name, $value) { @@ -154,11 +133,7 @@ abstract class Input implements InputInterface } /** - * Returns true if an InputArgument object exists by name or position. - * - * @param string|int $name The InputArgument name or position - * - * @return bool true if the InputArgument object exists, false otherwise + * {@inheritdoc} */ public function hasArgument($name) { @@ -166,9 +141,7 @@ abstract class Input implements InputInterface } /** - * Returns the options values. - * - * @return array An array of option values + * {@inheritdoc} */ public function getOptions() { @@ -176,13 +149,7 @@ abstract class Input implements InputInterface } /** - * Returns the option value for a given option name. - * - * @param string $name The option name - * - * @return mixed The option value - * - * @throws InvalidArgumentException When option given doesn't exist + * {@inheritdoc} */ public function getOption($name) { @@ -194,12 +161,7 @@ abstract class Input implements InputInterface } /** - * Sets an option value by name. - * - * @param string $name The option name - * @param string|bool $value The option value - * - * @throws InvalidArgumentException When option given doesn't exist + * {@inheritdoc} */ public function setOption($name, $value) { @@ -211,11 +173,7 @@ abstract class Input implements InputInterface } /** - * Returns true if an InputOption object exists by name. - * - * @param string $name The InputOption name - * - * @return bool true if the InputOption object exists, false otherwise + * {@inheritdoc} */ public function hasOption($name) { diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php index bd64163b9..52f324d7e 100644 --- a/vendor/symfony/console/Input/InputDefinition.php +++ b/vendor/symfony/console/Input/InputDefinition.php @@ -284,6 +284,9 @@ class InputDefinition /** * Returns true if an InputOption object exists by name. * + * This method can't be used to check if the user included the option when + * executing the command (use getOption() instead). + * * @param string $name The InputOption name * * @return bool true if the InputOption object exists, false otherwise diff --git a/vendor/symfony/console/Input/InputInterface.php b/vendor/symfony/console/Input/InputInterface.php index f83b88560..450126097 100644 --- a/vendor/symfony/console/Input/InputInterface.php +++ b/vendor/symfony/console/Input/InputInterface.php @@ -11,6 +11,9 @@ namespace Symfony\Component\Console\Input; +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\RuntimeException; + /** * InputInterface is the interface implemented by all input classes. * @@ -58,11 +61,9 @@ interface InputInterface public function bind(InputDefinition $definition); /** - * Validates if arguments given are correct. + * Validates the input. * - * Throws an exception when not enough arguments are given. - * - * @throws \RuntimeException + * @throws RuntimeException When not enough arguments are given */ public function validate(); @@ -74,11 +75,13 @@ interface InputInterface public function getArguments(); /** - * Gets argument by name. + * Returns the argument value for a given argument name. * - * @param string $name The name of the argument + * @param string $name The argument name * - * @return mixed + * @return mixed The argument value + * + * @throws InvalidArgumentException When argument given doesn't exist */ public function getArgument($name); @@ -109,11 +112,13 @@ interface InputInterface public function getOptions(); /** - * Gets an option by name. + * Returns the option value for a given option name. * - * @param string $name The name of the option + * @param string $name The option name * - * @return mixed + * @return mixed The option value + * + * @throws InvalidArgumentException When option given doesn't exist */ public function getOption($name); diff --git a/vendor/symfony/console/LICENSE b/vendor/symfony/console/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/console/LICENSE +++ b/vendor/symfony/console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php index 1f7417ea5..987e96a65 100644 --- a/vendor/symfony/console/Logger/ConsoleLogger.php +++ b/vendor/symfony/console/Logger/ConsoleLogger.php @@ -22,7 +22,7 @@ use Symfony\Component\Console\Output\ConsoleOutputInterface; * * @author Kévin Dunglas * - * @link http://www.php-fig.org/psr/psr-3/ + * @see http://www.php-fig.org/psr/psr-3/ */ class ConsoleLogger extends AbstractLogger { diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php index 682f9a4d4..218f285bf 100644 --- a/vendor/symfony/console/Output/NullOutput.php +++ b/vendor/symfony/console/Output/NullOutput.php @@ -73,21 +73,33 @@ class NullOutput implements OutputInterface return self::VERBOSITY_QUIET; } + /** + * {@inheritdoc} + */ public function isQuiet() { return true; } + /** + * {@inheritdoc} + */ public function isVerbose() { return false; } + /** + * {@inheritdoc} + */ public function isVeryVerbose() { return false; } + /** + * {@inheritdoc} + */ public function isDebug() { return false; diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php index 4476ffb59..c12015cc8 100644 --- a/vendor/symfony/console/Output/Output.php +++ b/vendor/symfony/console/Output/Output.php @@ -94,21 +94,33 @@ abstract class Output implements OutputInterface return $this->verbosity; } + /** + * {@inheritdoc} + */ public function isQuiet() { return self::VERBOSITY_QUIET === $this->verbosity; } + /** + * {@inheritdoc} + */ public function isVerbose() { return self::VERBOSITY_VERBOSE <= $this->verbosity; } + /** + * {@inheritdoc} + */ public function isVeryVerbose() { return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; } + /** + * {@inheritdoc} + */ public function isDebug() { return self::VERBOSITY_DEBUG <= $this->verbosity; diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php index 62d04c0e0..22b29aa17 100644 --- a/vendor/symfony/console/Output/StreamOutput.php +++ b/vendor/symfony/console/Output/StreamOutput.php @@ -72,7 +72,7 @@ class StreamOutput extends Output */ protected function doWrite($message, $newline) { - if (false === @fwrite($this->stream, $message.($newline ? PHP_EOL : ''))) { + if (false === @fwrite($this->stream, $message) || ($newline && (false === @fwrite($this->stream, PHP_EOL)))) { // should never happen throw new RuntimeException('Unable to write output.'); } @@ -85,7 +85,7 @@ class StreamOutput extends Output * * Colorization is disabled if not supported by the stream: * - * - Windows without Ansicon, ConEmu or Mintty + * - Windows != 10.0.10586 without Ansicon, ConEmu or Mintty * - non tty consoles * * @return bool true if the stream supports colorization, false otherwise @@ -93,7 +93,11 @@ class StreamOutput extends Output protected function hasColorSupport() { if (DIRECTORY_SEPARATOR === '\\') { - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); + return + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); } return function_exists('posix_isatty') && @posix_isatty($this->stream); diff --git a/vendor/symfony/console/Question/ChoiceQuestion.php b/vendor/symfony/console/Question/ChoiceQuestion.php index 2c40638dc..522a81bb1 100644 --- a/vendor/symfony/console/Question/ChoiceQuestion.php +++ b/vendor/symfony/console/Question/ChoiceQuestion.php @@ -58,7 +58,7 @@ class ChoiceQuestion extends Question * * @param bool $multiselect * - * @return ChoiceQuestion The current instance + * @return $this */ public function setMultiselect($multiselect) { @@ -68,6 +68,16 @@ class ChoiceQuestion extends Question return $this; } + /** + * Returns whether the choices are multiselect. + * + * @return bool + */ + public function isMultiselect() + { + return $this->multiselect; + } + /** * Gets the prompt for choices. * @@ -83,7 +93,7 @@ class ChoiceQuestion extends Question * * @param string $prompt * - * @return ChoiceQuestion The current instance + * @return $this */ public function setPrompt($prompt) { @@ -99,7 +109,7 @@ class ChoiceQuestion extends Question * * @param string $errorMessage * - * @return ChoiceQuestion The current instance + * @return $this */ public function setErrorMessage($errorMessage) { diff --git a/vendor/symfony/console/Question/Question.php b/vendor/symfony/console/Question/Question.php index ab415c26d..a618e7aa3 100644 --- a/vendor/symfony/console/Question/Question.php +++ b/vendor/symfony/console/Question/Question.php @@ -77,7 +77,7 @@ class Question * * @param bool $hidden * - * @return Question The current instance + * @return $this * * @throws LogicException In case the autocompleter is also used */ @@ -107,7 +107,7 @@ class Question * * @param bool $fallback * - * @return Question The current instance + * @return $this */ public function setHiddenFallback($fallback) { @@ -131,7 +131,7 @@ class Question * * @param null|array|\Traversable $values * - * @return Question The current instance + * @return $this * * @throws InvalidArgumentException * @throws LogicException @@ -162,7 +162,7 @@ class Question * * @param null|callable $validator * - * @return Question The current instance + * @return $this */ public function setValidator($validator) { @@ -188,7 +188,7 @@ class Question * * @param null|int $attempts * - * @return Question The current instance + * @return $this * * @throws InvalidArgumentException In case the number of attempts is invalid. */ @@ -222,7 +222,7 @@ class Question * * @param callable $normalizer * - * @return Question The current instance + * @return $this */ public function setNormalizer($normalizer) { diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php index 47d7d1249..9ae6513ce 100644 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ b/vendor/symfony/console/Style/SymfonyStyle.php @@ -65,40 +65,10 @@ class SymfonyStyle extends OutputStyle */ public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false) { - $this->autoPrependBlock(); $messages = is_array($messages) ? array_values($messages) : array($messages); - $lines = array(); - // add type - if (null !== $type) { - $messages[0] = sprintf('[%s] %s', $type, $messages[0]); - } - - // wrap and add newlines for each element - foreach ($messages as $key => $message) { - $message = OutputFormatter::escape($message); - $lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - Helper::strlen($prefix), PHP_EOL, true))); - - if (count($messages) > 1 && $key < count($messages) - 1) { - $lines[] = ''; - } - } - - if ($padding && $this->isDecorated()) { - array_unshift($lines, ''); - $lines[] = ''; - } - - foreach ($lines as &$line) { - $line = sprintf('%s%s', $prefix, $line); - $line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line)); - - if ($style) { - $line = sprintf('<%s>%s', $style, $line); - } - } - - $this->writeln($lines); + $this->autoPrependBlock(); + $this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, true)); $this->newLine(); } @@ -109,7 +79,7 @@ class SymfonyStyle extends OutputStyle { $this->autoPrependBlock(); $this->writeln(array( - sprintf('%s', $message), + sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('=', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), )); $this->newLine(); @@ -122,7 +92,7 @@ class SymfonyStyle extends OutputStyle { $this->autoPrependBlock(); $this->writeln(array( - sprintf('%s', $message), + sprintf('%s', OutputFormatter::escapeTrailingBackslash($message)), sprintf('%s', str_repeat('-', Helper::strlenWithoutDecoration($this->getFormatter(), $message))), )); $this->newLine(); @@ -156,16 +126,17 @@ class SymfonyStyle extends OutputStyle } /** - * {@inheritdoc} + * Formats a command comment. + * + * @param string|array $message */ public function comment($message) { - $this->autoPrependText(); - $messages = is_array($message) ? array_values($message) : array($message); - foreach ($messages as $message) { - $this->writeln(sprintf(' // %s', $message)); - } + + $this->autoPrependBlock(); + $this->writeln($this->createBlock($messages, null, null, ' // ')); + $this->newLine(); } /** @@ -213,12 +184,13 @@ class SymfonyStyle extends OutputStyle */ public function table(array $headers, array $rows) { - $headers = array_map(function ($value) { return sprintf('%s', $value); }, $headers); + $style = clone Table::getStyleDefinition('symfony-style-guide'); + $style->setCellHeaderFormat('%s'); $table = new Table($this); $table->setHeaders($headers); $table->setRows($rows); - $table->setStyle('symfony-style-guide'); + $table->setStyle($style); $table->render(); $this->newLine(); @@ -412,4 +384,52 @@ class SymfonyStyle extends OutputStyle return substr($value, -4); }, array_merge(array($this->bufferedOutput->fetch()), (array) $messages)); } + + private function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false) + { + $indentLength = 0; + $prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix); + $lines = array(); + + if (null !== $type) { + $type = sprintf('[%s] ', $type); + $indentLength = strlen($type); + $lineIndentation = str_repeat(' ', $indentLength); + } + + // wrap and add newlines for each element + foreach ($messages as $key => $message) { + if ($escape) { + $message = OutputFormatter::escape($message); + } + + $lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true))); + + if (count($messages) > 1 && $key < count($messages) - 1) { + $lines[] = ''; + } + } + + $firstLineIndex = 0; + if ($padding && $this->isDecorated()) { + $firstLineIndex = 1; + array_unshift($lines, ''); + $lines[] = ''; + } + + foreach ($lines as $i => &$line) { + if (null !== $type) { + $line = $firstLineIndex === $i ? $type.$line : $lineIndentation.$line; + } + + $line = $prefix.$line; + $line .= str_repeat(' ', $this->lineLength - Helper::strlenWithoutDecoration($this->getFormatter(), $line)); + + if ($style) { + $line = sprintf('<%s>%s', $style, $line); + } + } + + return $lines; + } } diff --git a/vendor/symfony/console/Tester/ApplicationTester.php b/vendor/symfony/console/Tester/ApplicationTester.php index da8a19ce5..90efbab21 100644 --- a/vendor/symfony/console/Tester/ApplicationTester.php +++ b/vendor/symfony/console/Tester/ApplicationTester.php @@ -37,7 +37,7 @@ class ApplicationTester /** * Constructor. * - * @param Application $application An Application instance to test. + * @param Application $application An Application instance to test */ public function __construct(Application $application) { diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php index 8d6486e11..f95298bc9 100644 --- a/vendor/symfony/console/Tester/CommandTester.php +++ b/vendor/symfony/console/Tester/CommandTester.php @@ -32,7 +32,7 @@ class CommandTester /** * Constructor. * - * @param Command $command A Command instance to test. + * @param Command $command A Command instance to test */ public function __construct(Command $command) { diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json index ab247045f..35ee7a7b2 100644 --- a/vendor/symfony/console/composer.json +++ b/vendor/symfony/console/composer.json @@ -17,7 +17,8 @@ ], "require": { "php": ">=5.3.9", - "symfony/polyfill-mbstring": "~1.0" + "symfony/polyfill-mbstring": "~1.0", + "symfony/debug": "^2.7.2|~3.0.0" }, "require-dev": { "symfony/event-dispatcher": "~2.1|~3.0.0", diff --git a/vendor/symfony/debug/BufferingLogger.php b/vendor/symfony/debug/BufferingLogger.php new file mode 100644 index 000000000..a2ed75b9d --- /dev/null +++ b/vendor/symfony/debug/BufferingLogger.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug; + +use Psr\Log\AbstractLogger; + +/** + * A buffering logger that stacks logs for later. + * + * @author Nicolas Grekas + */ +class BufferingLogger extends AbstractLogger +{ + private $logs = array(); + + public function log($level, $message, array $context = array()) + { + $this->logs[] = array($level, $message, $context); + } + + public function cleanLogs() + { + $logs = $this->logs; + $this->logs = array(); + + return $logs; + } +} diff --git a/vendor/symfony/debug/CHANGELOG.md b/vendor/symfony/debug/CHANGELOG.md index 31f0de9c2..ab07458a9 100644 --- a/vendor/symfony/debug/CHANGELOG.md +++ b/vendor/symfony/debug/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +2.8.0 +----- + +* added BufferingLogger for errors that happen before a proper logger is configured +* allow throwing from `__toString()` with `return trigger_error($e, E_USER_ERROR);` +* deprecate ExceptionHandler::createResponse + 2.7.0 ----- diff --git a/vendor/symfony/debug/Debug.php b/vendor/symfony/debug/Debug.php index 08b35f48b..9404992d5 100644 --- a/vendor/symfony/debug/Debug.php +++ b/vendor/symfony/debug/Debug.php @@ -45,16 +45,17 @@ class Debug error_reporting(-1); } - if ('cli' !== php_sapi_name()) { + if ('cli' !== PHP_SAPI) { ini_set('display_errors', 0); ExceptionHandler::register(); } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) { // CLI - display errors only if they're not already logged to STDERR ini_set('display_errors', 1); } - $handler = ErrorHandler::register(); - if (!$displayErrors) { - $handler->throwAt(0, true); + if ($displayErrors) { + ErrorHandler::register(new ErrorHandler(new BufferingLogger())); + } else { + ErrorHandler::register()->throwAt(0, true); } DebugClassLoader::enable(); diff --git a/vendor/symfony/debug/DebugClassLoader.php b/vendor/symfony/debug/DebugClassLoader.php index 8c797744d..12d379aa7 100644 --- a/vendor/symfony/debug/DebugClassLoader.php +++ b/vendor/symfony/debug/DebugClassLoader.php @@ -51,7 +51,26 @@ class DebugClassLoader } if (!isset(self::$caseCheck)) { - self::$caseCheck = false !== stripos(PHP_OS, 'win') ? (false !== stripos(PHP_OS, 'darwin') ? 2 : 1) : 0; + $file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), DIRECTORY_SEPARATOR); + $i = strrpos($file, DIRECTORY_SEPARATOR); + $dir = substr($file, 0, 1 + $i); + $file = substr($file, 1 + $i); + $test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file); + $test = realpath($dir.$test); + + if (false === $test || false === $i) { + // filesystem is case sensitive + self::$caseCheck = 0; + } elseif (substr($test, -strlen($file)) === $file) { + // filesystem is case insensitive and realpath() normalizes the case of characters + self::$caseCheck = 1; + } elseif (false !== stripos(PHP_OS, 'darwin')) { + // on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters + self::$caseCheck = 2; + } else { + // filesystem case checks failed, fallback to disabling them + self::$caseCheck = 0; + } } } @@ -147,7 +166,7 @@ class DebugClassLoader try { if ($this->isFinder) { if ($file = $this->classLoader[0]->findFile($class)) { - require $file; + require_once $file; } } else { call_user_func($this->classLoader, $class); @@ -156,6 +175,10 @@ class DebugClassLoader } catch (\Exception $e) { ErrorHandler::unstackErrors(); + throw $e; + } catch (\Throwable $e) { + ErrorHandler::unstackErrors(); + throw $e; } @@ -193,15 +216,32 @@ class DebugClassLoader break; } } - $parent = $refl->getParentClass(); + $parent = get_parent_class($class); - if (!$parent || strncmp($ns, $parent->name, $len)) { - if ($parent && isset(self::$deprecated[$parent->name]) && strncmp($ns, $parent->name, $len)) { - @trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED); + if (!$parent || strncmp($ns, $parent, $len)) { + if ($parent && isset(self::$deprecated[$parent]) && strncmp($ns, $parent, $len)) { + @trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent, self::$deprecated[$parent]), E_USER_DEPRECATED); + } + + $parentInterfaces = array(); + $deprecatedInterfaces = array(); + if ($parent) { + foreach (class_implements($parent) as $interface) { + $parentInterfaces[$interface] = 1; + } } foreach ($refl->getInterfaceNames() as $interface) { - if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len) && !($parent && $parent->implementsInterface($interface))) { + if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len)) { + $deprecatedInterfaces[] = $interface; + } + foreach (class_implements($interface) as $interface) { + $parentInterfaces[$interface] = 1; + } + } + + foreach ($deprecatedInterfaces as $interface) { + if (!isset($parentInterfaces[$interface])) { @trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED); } } @@ -224,7 +264,7 @@ class DebugClassLoader $i = count($tail) - 1; $j = count($real) - 1; - while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) { + while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) { --$i; --$j; } diff --git a/vendor/symfony/debug/ErrorHandler.php b/vendor/symfony/debug/ErrorHandler.php index cc698ee53..1b7201171 100644 --- a/vendor/symfony/debug/ErrorHandler.php +++ b/vendor/symfony/debug/ErrorHandler.php @@ -95,11 +95,14 @@ class ErrorHandler private $loggedTraces = array(); private $isRecursive = 0; + private $isRoot = false; private $exceptionHandler; + private $bootstrappingLogger; private static $reservedMemory; private static $stackedErrors = array(); private static $stackedErrorLevels = array(); + private static $toStringException = null; /** * Same init value as thrownErrors. @@ -134,7 +137,12 @@ class ErrorHandler $handler = new static(); } - $prev = set_error_handler(array($handler, 'handleError'), $handler->thrownErrors | $handler->loggedErrors); + if (null === $prev = set_error_handler(array($handler, 'handleError'))) { + restore_error_handler(); + // Specifying the error types earlier would expose us to https://bugs.php.net/63206 + set_error_handler(array($handler, 'handleError'), $handler->thrownErrors | $handler->loggedErrors); + $handler->isRoot = true; + } if ($handlerIsNew && is_array($prev) && $prev[0] instanceof self) { $handler = $prev[0]; @@ -151,6 +159,14 @@ class ErrorHandler return $handler; } + public function __construct(BufferingLogger $bootstrappingLogger = null) + { + if ($bootstrappingLogger) { + $this->bootstrappingLogger = $bootstrappingLogger; + $this->setDefaultLogger($bootstrappingLogger); + } + } + /** * Sets a logger to non assigned errors levels. * @@ -164,7 +180,7 @@ class ErrorHandler if (is_array($levels)) { foreach ($levels as $type => $logLevel) { - if (empty($this->loggers[$type][0]) || $replace) { + if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) { $loggers[$type] = array($logger, $logLevel); } } @@ -173,7 +189,7 @@ class ErrorHandler $levels = E_ALL | E_STRICT; } foreach ($this->loggers as $type => $log) { - if (($type & $levels) && (empty($log[0]) || $replace)) { + if (($type & $levels) && (empty($log[0]) || $replace || $log[0] === $this->bootstrappingLogger)) { $log[0] = $logger; $loggers[$type] = $log; } @@ -196,6 +212,7 @@ class ErrorHandler { $prevLogged = $this->loggedErrors; $prev = $this->loggers; + $flush = array(); foreach ($loggers as $type => $log) { if (!isset($prev[$type])) { @@ -214,9 +231,24 @@ class ErrorHandler throw new \InvalidArgumentException('Invalid logger provided'); } $this->loggers[$type] = $log + $prev[$type]; + + if ($this->bootstrappingLogger && $prev[$type][0] === $this->bootstrappingLogger) { + $flush[$type] = $type; + } } $this->reRegister($prevLogged | $this->thrownErrors); + if ($flush) { + foreach ($this->bootstrappingLogger->cleanLogs() as $log) { + $type = $log[2]['type']; + if (!isset($flush[$type])) { + $this->bootstrappingLogger->log($log[0], $log[1], $log[2]); + } elseif ($this->loggers[$type][0]) { + $this->loggers[$type][0]->log($this->loggers[$type][1], $log[1], $log[2]); + } + } + } + return $prev; } @@ -251,7 +283,7 @@ class ErrorHandler public function throwAt($levels, $replace = false) { $prev = $this->thrownErrors; - $this->thrownErrors = (E_ALL | E_STRICT) & ($levels | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED; + $this->thrownErrors = ($levels | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED; if (!$replace) { $this->thrownErrors |= $prev; } @@ -326,12 +358,16 @@ class ErrorHandler private function reRegister($prev) { if ($prev !== $this->thrownErrors | $this->loggedErrors) { - $handler = set_error_handler('var_dump', 0); + $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler === $this) { restore_error_handler(); - set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors); + if ($this->isRoot) { + set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors); + } else { + set_error_handler(array($this, 'handleError')); + } } } } @@ -340,17 +376,17 @@ class ErrorHandler * Handles errors by filtering then logging them according to the configured bit fields. * * @param int $type One of the E_* constants + * @param string $message * @param string $file * @param int $line - * @param array $context * - * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself. + * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself * * @throws \ErrorException When $this->thrownErrors requests so * * @internal */ - public function handleError($type, $message, $file, $line, array $context, array $backtrace = null) + public function handleError($type, $message, $file, $line) { $level = error_reporting() | E_RECOVERABLE_ERROR | E_USER_ERROR | E_DEPRECATED | E_USER_DEPRECATED; $log = $this->loggedErrors & $type; @@ -360,8 +396,17 @@ class ErrorHandler if (!$type || (!$log && !$throw)) { return $type && $log; } + $scope = $this->scopedErrors & $type; - if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && ($this->scopedErrors & $type)) { + if (4 < $numArgs = func_num_args()) { + $context = $scope ? (func_get_arg(4) ?: array()) : array(); + $backtrace = 5 < $numArgs ? func_get_arg(5) : null; // defined on HHVM + } else { + $context = array(); + $backtrace = null; + } + + if (isset($context['GLOBALS']) && $scope) { $e = $context; // Whatever the signature of the method, unset($e['GLOBALS'], $context); // $context is always a reference in 5.3 $context = $e; @@ -377,7 +422,10 @@ class ErrorHandler } if ($throw) { - if (($this->scopedErrors & $type) && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { + if (null !== self::$toStringException) { + $throw = self::$toStringException; + self::$toStringException = null; + } elseif ($scope && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { // Checking for class existence is a work around for https://bugs.php.net/42098 $throw = new ContextErrorException($this->levels[$type].': '.$message, 0, $type, $file, $line, $context); } else { @@ -392,6 +440,47 @@ class ErrorHandler $throw->errorHandlerCanary = new ErrorHandlerCanary(); } + if (E_USER_ERROR & $type) { + $backtrace = $backtrace ?: $throw->getTrace(); + + for ($i = 1; isset($backtrace[$i]); ++$i) { + if (isset($backtrace[$i]['function'], $backtrace[$i]['type'], $backtrace[$i - 1]['function']) + && '__toString' === $backtrace[$i]['function'] + && '->' === $backtrace[$i]['type'] + && !isset($backtrace[$i - 1]['class']) + && ('trigger_error' === $backtrace[$i - 1]['function'] || 'user_error' === $backtrace[$i - 1]['function']) + ) { + // Here, we know trigger_error() has been called from __toString(). + // HHVM is fine with throwing from __toString() but PHP triggers a fatal error instead. + // A small convention allows working around the limitation: + // given a caught $e exception in __toString(), quitting the method with + // `return trigger_error($e, E_USER_ERROR);` allows this error handler + // to make $e get through the __toString() barrier. + + foreach ($context as $e) { + if (($e instanceof \Exception || $e instanceof \Throwable) && $e->__toString() === $message) { + if (1 === $i) { + // On HHVM + $throw = $e; + break; + } + self::$toStringException = $e; + + return true; + } + } + + if (1 < $i) { + // On PHP (not on HHVM), display the original error message instead of the default one. + $this->handleException($throw); + + // Stop the process by giving back the error to the native handler. + return false; + } + } + } + } + throw $throw; } @@ -408,7 +497,7 @@ class ErrorHandler $e = compact('type', 'file', 'line', 'level'); if ($type & $level) { - if ($this->scopedErrors & $type) { + if ($scope) { $e['scope_vars'] = $context; if ($trace) { $e['stack'] = $backtrace ?: debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT); @@ -437,6 +526,10 @@ class ErrorHandler } catch (\Exception $e) { $this->isRecursive = false; + throw $e; + } catch (\Throwable $e) { + $this->isRecursive = false; + throw $e; } } @@ -459,7 +552,7 @@ class ErrorHandler } $type = $exception instanceof FatalErrorException ? $exception->getSeverity() : E_ERROR; - if ($this->loggedErrors & $type) { + if (($this->loggedErrors & $type) || $exception instanceof FatalThrowableError) { $e = array( 'type' => $type, 'file' => $exception->getFile(), @@ -486,8 +579,12 @@ class ErrorHandler } else { $message = 'Uncaught Exception: '.$exception->getMessage(); } - if ($this->loggedErrors & $e['type']) { - $this->loggers[$e['type']][0]->log($this->loggers[$e['type']][1], $message, $e); + } + if ($this->loggedErrors & $type) { + try { + $this->loggers[$type][0]->log($this->loggers[$type][1], $message, $e); + } catch (\Exception $handlerException) { + } catch (\Throwable $handlerException) { } } if ($exception instanceof FatalErrorException && !$exception instanceof OutOfMemoryException && $error) { @@ -527,7 +624,7 @@ class ErrorHandler self::$reservedMemory = null; - $handler = set_error_handler('var_dump', 0); + $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); @@ -545,6 +642,8 @@ class ErrorHandler } } catch (\Exception $exception) { // Handled below + } catch (\Throwable $exception) { + // Handled below } if ($error && $error['type'] &= E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR) { @@ -672,7 +771,7 @@ class ErrorHandler { @trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED); - $handler = set_error_handler('var_dump', 0); + $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); if (!$handler instanceof self) { diff --git a/vendor/symfony/debug/Exception/FatalThrowableError.php b/vendor/symfony/debug/Exception/FatalThrowableError.php index 6ff5ecdaf..34f43b17b 100644 --- a/vendor/symfony/debug/Exception/FatalThrowableError.php +++ b/vendor/symfony/debug/Exception/FatalThrowableError.php @@ -27,7 +27,7 @@ class FatalThrowableError extends FatalErrorException $message = 'Type error: '.$e->getMessage(); $severity = E_RECOVERABLE_ERROR; } else { - $message = 'Fatal error: '.$e->getMessage(); + $message = $e->getMessage(); $severity = E_ERROR; } diff --git a/vendor/symfony/debug/Exception/FlattenException.php b/vendor/symfony/debug/Exception/FlattenException.php index d8d5c5b92..b3a98ac0e 100644 --- a/vendor/symfony/debug/Exception/FlattenException.php +++ b/vendor/symfony/debug/Exception/FlattenException.php @@ -94,8 +94,13 @@ class FlattenException extends LegacyFlattenException $e->setClass(get_class($exception)); $e->setFile($exception->getFile()); $e->setLine($exception->getLine()); - if ($exception->getPrevious()) { - $e->setPrevious(static::create($exception->getPrevious())); + + $previous = $exception->getPrevious(); + + if ($previous instanceof \Exception) { + $e->setPrevious(static::create($previous)); + } elseif ($previous instanceof \Throwable) { + $e->setPrevious(static::create(new FatalThrowableError($previous))); } return $e; @@ -258,7 +263,10 @@ class FlattenException extends LegacyFlattenException if (++$count > 1e4) { return array('array', '*SKIPPED over 10000 entries*'); } - if (is_object($value)) { + if ($value instanceof \__PHP_Incomplete_Class) { + // is_object() returns false on PHP<=7.1 + $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value)); + } elseif (is_object($value)) { $result[$key] = array('object', get_class($value)); } elseif (is_array($value)) { if ($level > 10) { @@ -272,9 +280,6 @@ class FlattenException extends LegacyFlattenException $result[$key] = array('boolean', $value); } elseif (is_resource($value)) { $result[$key] = array('resource', get_resource_type($value)); - } elseif ($value instanceof \__PHP_Incomplete_Class) { - // Special case of object, is_object will return false - $result[$key] = array('incomplete-object', $this->getClassNameFromIncomplete($value)); } else { $result[$key] = array('string', (string) $value); } diff --git a/vendor/symfony/debug/ExceptionHandler.php b/vendor/symfony/debug/ExceptionHandler.php index 027b66c05..3cdc09213 100644 --- a/vendor/symfony/debug/ExceptionHandler.php +++ b/vendor/symfony/debug/ExceptionHandler.php @@ -39,6 +39,8 @@ class ExceptionHandler public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { if (false !== strpos($charset, '%')) { + @trigger_error('Providing $fileLinkFormat as second argument to '.__METHOD__.' is deprecated since version 2.8 and will be unsupported in 3.0. Please provide it as third argument, after $charset.', E_USER_DEPRECATED); + // Swap $charset and $fileLinkFormat for BC reasons $pivot = $fileLinkFormat; $fileLinkFormat = $charset; @@ -56,7 +58,7 @@ class ExceptionHandler * @param string|null $charset The charset used by exception messages * @param string|null $fileLinkFormat The IDE link template * - * @return ExceptionHandler The registered exception handler + * @return static */ public static function register($debug = true, $charset = null, $fileLinkFormat = null) { @@ -94,7 +96,7 @@ class ExceptionHandler * * @param string $format The format for links to source files * - * @return string The previous file link format. + * @return string The previous file link format */ public function setFileLinkFormat($format) { @@ -164,6 +166,7 @@ class ExceptionHandler $response = $this->createResponse($exception); $response->sendHeaders(); $response->sendContent(); + @trigger_error(sprintf("The %s::createResponse method is deprecated since 2.8 and won't be called anymore when handling an exception in 3.0.", $reflector->class), E_USER_DEPRECATED); return; } @@ -177,7 +180,7 @@ class ExceptionHandler * This method uses plain PHP functions like header() and echo to output * the response. * - * @param \Exception|FlattenException $exception An \Exception instance + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance */ public function sendPhpResponse($exception) { @@ -199,17 +202,37 @@ class ExceptionHandler /** * Creates the error Response associated with the given Exception. * - * @param \Exception|FlattenException $exception An \Exception instance + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance * * @return Response A Response instance + * + * @deprecated since 2.8, to be removed in 3.0. */ public function createResponse($exception) + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); + + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + + return Response::create($this->getHtml($exception), $exception->getStatusCode(), $exception->getHeaders())->setCharset($this->charset); + } + + /** + * Gets the full HTML content associated with the given exception. + * + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance + * + * @return string The HTML content as a string + */ + public function getHtml($exception) { if (!$exception instanceof FlattenException) { $exception = FlattenException::create($exception); } - return Response::create($this->decorate($this->getContent($exception), $this->getStylesheet($exception)), $exception->getStatusCode(), $exception->getHeaders())->setCharset($this->charset); + return $this->decorate($this->getContent($exception), $this->getStylesheet($exception)); } /** @@ -238,7 +261,7 @@ class ExceptionHandler $ind = $count - $position + 1; $class = $this->formatClass($e['class']); $message = nl2br($this->escapeHtml($e['message'])); - $content .= sprintf(<< %d/%d %s%s: @@ -289,7 +312,7 @@ EOF; */ public function getStylesheet(FlattenException $exception) { - return << + --FILE-- $int, - 'float' => $float, - 'str' => $str, - 'object' => $object, - 'array' => $array, - 'resource' => $resource, - 'null' => $null, - 'bool' => $bool, - 'refcount' => &$refcount2); +$var = array( + 'int' => $int, + 'float' => $float, + 'str' => $str, + 'object' => $object, + 'array' => $array, + 'resource' => $resource, + 'null' => $null, + 'bool' => $bool, + 'refcount' => &$refcount2, +); var_dump(symfony_zval_info('int', $var)); var_dump(symfony_zval_info('float', $var)); diff --git a/vendor/symfony/debug/Resources/ext/tests/002.phpt b/vendor/symfony/debug/Resources/ext/tests/002.phpt index ebe2f32d8..2bc6d7127 100644 --- a/vendor/symfony/debug/Resources/ext/tests/002.phpt +++ b/vendor/symfony/debug/Resources/ext/tests/002.phpt @@ -1,7 +1,7 @@ --TEST-- Test symfony_debug_backtrace in case of fatal error --SKIPIF-- - + --FILE-- + --FILE-- + --FILE-- =2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.2", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" }, "autoload": { - "psr-4": { "Symfony\\Component\\Debug\\": "" } + "psr-4": { "Symfony\\Component\\Debug\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/vendor/symfony/dependency-injection/Alias.php b/vendor/symfony/dependency-injection/Alias.php index 5a6c2feda..eaf7f00cc 100644 --- a/vendor/symfony/dependency-injection/Alias.php +++ b/vendor/symfony/dependency-injection/Alias.php @@ -17,8 +17,6 @@ class Alias private $public; /** - * Constructor. - * * @param string $id Alias identifier * @param bool $public If this alias is public */ diff --git a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php index 5120eb621..681f8afdd 100644 --- a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php +++ b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php @@ -34,8 +34,6 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface private $onlyConstructorArguments; /** - * Constructor. - * * @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls */ public function __construct($onlyConstructorArguments = false) @@ -128,7 +126,7 @@ class AnalyzeServiceReferencesPass implements RepeatablePassInterface /** * Returns a service definition given the full name or an alias. * - * @param string $id A full id or alias for a service definition. + * @param string $id A full id or alias for a service definition * * @return Definition|null The definition related to the supplied id */ diff --git a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php index b46635dca..9454d1bd4 100644 --- a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php +++ b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php @@ -28,25 +28,49 @@ class AutowirePass implements CompilerPassInterface private $definedTypes = array(); private $types; private $notGuessableTypes = array(); + private $usedTypes = array(); /** * {@inheritdoc} */ public function process(ContainerBuilder $container) { - $this->container = $container; - foreach ($container->getDefinitions() as $id => $definition) { - if ($definition->isAutowired()) { - $this->completeDefinition($id, $definition); + $throwingAutoloader = function ($class) { throw new \ReflectionException(sprintf('Class %s does not exist', $class)); }; + spl_autoload_register($throwingAutoloader); + + try { + $this->container = $container; + foreach ($container->getDefinitions() as $id => $definition) { + if ($definition->isAutowired()) { + $this->completeDefinition($id, $definition); + } } + + foreach ($this->usedTypes as $type => $id) { + if (isset($this->usedTypes[$type]) && isset($this->notGuessableTypes[$type])) { + $classOrInterface = class_exists($type) ? 'class' : 'interface'; + $matchingServices = implode(', ', $this->types[$type]); + + throw new RuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". Multiple services exist for this %s (%s).', $type, $id, $classOrInterface, $matchingServices)); + } + } + } catch (\Exception $e) { + } catch (\Throwable $e) { } + spl_autoload_unregister($throwingAutoloader); + // Free memory and remove circular reference to container $this->container = null; $this->reflectionClasses = array(); $this->definedTypes = array(); $this->types = null; $this->notGuessableTypes = array(); + $this->usedTypes = array(); + + if (isset($e)) { + throw $e; + } } /** @@ -82,8 +106,10 @@ class AutowirePass implements CompilerPassInterface throw new RuntimeException(sprintf('Unable to autowire argument index %d ($%s) for the service "%s". If this is an object, give it a type-hint. Otherwise, specify this argument\'s value explicitly.', $index, $parameter->name, $id)); } - // specifically pass the default value - $arguments[$index] = $parameter->getDefaultValue(); + if (!array_key_exists($index, $arguments)) { + // specifically pass the default value + $arguments[$index] = $parameter->getDefaultValue(); + } continue; } @@ -92,11 +118,13 @@ class AutowirePass implements CompilerPassInterface $this->populateAvailableTypes(); } - if (isset($this->types[$typeHint->name])) { + if (isset($this->types[$typeHint->name]) && !isset($this->notGuessableTypes[$typeHint->name])) { $value = new Reference($this->types[$typeHint->name]); + $this->usedTypes[$typeHint->name] = $id; } else { try { $value = $this->createAutowiredDefinition($typeHint, $id); + $this->usedTypes[$typeHint->name] = $id; } catch (RuntimeException $e) { if ($parameter->allowsNull()) { $value = null; @@ -107,11 +135,11 @@ class AutowirePass implements CompilerPassInterface } } } - } catch (\ReflectionException $reflectionException) { + } catch (\ReflectionException $e) { // Typehint against a non-existing class if (!$parameter->isDefaultValueAvailable()) { - throw new RuntimeException(sprintf('Cannot autowire argument %s for %s because the type-hinted class does not exist (%s).', $index + 1, $definition->getClass(), $reflectionException->getMessage()), 0, $reflectionException); + throw new RuntimeException(sprintf('Cannot autowire argument %s for %s because the type-hinted class does not exist (%s).', $index + 1, $definition->getClass(), $e->getMessage()), 0, $e); } $value = $parameter->getDefaultValue(); @@ -154,6 +182,7 @@ class AutowirePass implements CompilerPassInterface foreach ($definition->getAutowiringTypes() as $type) { $this->definedTypes[$type] = true; $this->types[$type] = $id; + unset($this->notGuessableTypes[$type]); } if (!$reflectionClass = $this->getReflectionClass($id, $definition)) { @@ -177,22 +206,26 @@ class AutowirePass implements CompilerPassInterface */ private function set($type, $id) { - if (isset($this->definedTypes[$type]) || isset($this->notGuessableTypes[$type])) { + if (isset($this->definedTypes[$type])) { return; } - if (isset($this->types[$type])) { - if ($this->types[$type] === $id) { - return; - } + if (!isset($this->types[$type])) { + $this->types[$type] = $id; - unset($this->types[$type]); + return; + } + + if ($this->types[$type] === $id) { + return; + } + + if (!isset($this->notGuessableTypes[$type])) { $this->notGuessableTypes[$type] = true; - - return; + $this->types[$type] = (array) $this->types[$type]; } - $this->types[$type] = $id; + $this->types[$type][] = $id; } /** @@ -207,8 +240,16 @@ class AutowirePass implements CompilerPassInterface */ private function createAutowiredDefinition(\ReflectionClass $typeHint, $id) { - if (isset($this->notGuessableTypes[$typeHint->name]) || !$typeHint->isInstantiable()) { - throw new RuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s".', $typeHint->name, $id)); + if (isset($this->notGuessableTypes[$typeHint->name])) { + $classOrInterface = $typeHint->isInterface() ? 'interface' : 'class'; + $matchingServices = implode(', ', $this->types[$typeHint->name]); + + throw new RuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". Multiple services exist for this %s (%s).', $typeHint->name, $id, $classOrInterface, $matchingServices)); + } + + if (!$typeHint->isInstantiable()) { + $classOrInterface = $typeHint->isInterface() ? 'interface' : 'class'; + throw new RuntimeException(sprintf('Unable to autowire argument of type "%s" for the service "%s". No services were found matching this %s and it cannot be auto-registered.', $typeHint->name, $id, $classOrInterface)); } $argumentId = sprintf('autowired.%s', $typeHint->name); @@ -217,7 +258,14 @@ class AutowirePass implements CompilerPassInterface $argumentDefinition->setPublic(false); $this->populateAvailableType($argumentId, $argumentDefinition); - $this->completeDefinition($argumentId, $argumentDefinition); + + try { + $this->completeDefinition($argumentId, $argumentDefinition); + } catch (RuntimeException $e) { + $classOrInterface = $typeHint->isInterface() ? 'interface' : 'class'; + $message = sprintf('Unable to autowire argument of type "%s" for the service "%s". No services were found matching this %s and it cannot be auto-registered.', $typeHint->name, $id, $classOrInterface); + throw new RuntimeException($message, 0, $e); + } return new Reference($argumentId); } @@ -228,7 +276,7 @@ class AutowirePass implements CompilerPassInterface * @param string $id * @param Definition $definition * - * @return \ReflectionClass|null + * @return \ReflectionClass|false */ private function getReflectionClass($id, Definition $definition) { @@ -238,15 +286,17 @@ class AutowirePass implements CompilerPassInterface // Cannot use reflection if the class isn't set if (!$class = $definition->getClass()) { - return; + return false; } $class = $this->container->getParameterBag()->resolveValue($class); try { - return $this->reflectionClasses[$id] = new \ReflectionClass($class); - } catch (\ReflectionException $reflectionException) { - // return null + $reflector = new \ReflectionClass($class); + } catch (\ReflectionException $e) { + $reflector = false; } + + return $this->reflectionClasses[$id] = $reflector; } } diff --git a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php index d7570ddc2..f39a89af2 100644 --- a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php +++ b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php @@ -60,15 +60,18 @@ class CheckCircularReferencesPass implements CompilerPassInterface $id = $node->getId(); if (empty($this->checkedNodes[$id])) { - $searchKey = array_search($id, $this->currentPath); - $this->currentPath[] = $id; + // don't check circular dependencies for lazy services + if (!$node->getValue() || !$node->getValue()->isLazy()) { + $searchKey = array_search($id, $this->currentPath); + $this->currentPath[] = $id; - if (false !== $searchKey) { - throw new ServiceCircularReferenceException($id, array_slice($this->currentPath, $searchKey)); + if (false !== $searchKey) { + throw new ServiceCircularReferenceException($id, array_slice($this->currentPath, $searchKey)); + } + + $this->checkOutEdges($node->getOutEdges()); } - $this->checkOutEdges($node->getOutEdges()); - $this->checkedNodes[$id] = true; array_pop($this->currentPath); } diff --git a/vendor/symfony/dependency-injection/Compiler/Compiler.php b/vendor/symfony/dependency-injection/Compiler/Compiler.php index 4e4c2cdab..1f6304ee8 100644 --- a/vendor/symfony/dependency-injection/Compiler/Compiler.php +++ b/vendor/symfony/dependency-injection/Compiler/Compiler.php @@ -25,9 +25,6 @@ class Compiler private $loggingFormatter; private $serviceReferenceGraph; - /** - * Constructor. - */ public function __construct() { $this->passConfig = new PassConfig(); diff --git a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php index f80d705a9..2c4c79d60 100644 --- a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php +++ b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php @@ -52,10 +52,14 @@ class DecoratorServicePass implements CompilerPassInterface $public = $alias->isPublic(); $container->setAlias($renamedId, new Alias((string) $alias, false)); } else { - $definition = $container->getDefinition($inner); - $public = $definition->isPublic(); - $definition->setPublic(false); - $container->setDefinition($renamedId, $definition); + $decoratedDefinition = $container->getDefinition($inner); + $definition->setTags(array_merge($decoratedDefinition->getTags(), $definition->getTags())); + $definition->setAutowiringTypes(array_merge($decoratedDefinition->getAutowiringTypes(), $definition->getAutowiringTypes())); + $public = $decoratedDefinition->isPublic(); + $decoratedDefinition->setPublic(false); + $decoratedDefinition->setTags(array()); + $decoratedDefinition->setAutowiringTypes(array()); + $container->setDefinition($renamedId, $decoratedDefinition); } $container->setAlias($inner, new Alias($id, $public)); diff --git a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php b/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php index b06b49702..27e504824 100644 --- a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php +++ b/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php @@ -14,7 +14,7 @@ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; /** - * A pass to automatically process extensions if they implement + * A pass to automatically process extensions if they implement * CompilerPassInterface. * * @author Wouter J diff --git a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php b/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php index f9e602416..9434ac70b 100644 --- a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php +++ b/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php @@ -12,6 +12,7 @@ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; /** @@ -47,6 +48,9 @@ class MergeExtensionConfigurationPass implements CompilerPassInterface $tmpContainer = new ContainerBuilder($container->getParameterBag()); $tmpContainer->setResourceTracking($container->isTrackingResources()); $tmpContainer->addObjectResource($extension); + if ($extension instanceof ConfigurationExtensionInterface && null !== $configuration = $extension->getConfiguration($config, $tmpContainer)) { + $tmpContainer->addObjectResource($configuration); + } foreach ($exprLangProviders as $provider) { $tmpContainer->addExpressionLanguageProvider($provider); diff --git a/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/vendor/symfony/dependency-injection/Compiler/PassConfig.php index 246529d86..cc6e0e71b 100644 --- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php +++ b/vendor/symfony/dependency-injection/Compiler/PassConfig.php @@ -35,9 +35,6 @@ class PassConfig private $optimizationPasses; private $removingPasses; - /** - * Constructor. - */ public function __construct() { $this->mergePass = new MergeExtensionConfigurationPass(); @@ -58,8 +55,8 @@ class PassConfig $this->removingPasses = array( new RemovePrivateAliasesPass(), - new RemoveAbstractDefinitionsPass(), new ReplaceAliasByActualDefinitionPass(), + new RemoveAbstractDefinitionsPass(), new RepeatedPass(array( new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass(), @@ -102,8 +99,7 @@ class PassConfig throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type)); } - $passes = &$this->$property; - $passes[] = $pass; + $this->{$property}[] = $pass; } /** @@ -157,9 +153,9 @@ class PassConfig } /** - * Gets all passes for the Merge pass. + * Gets the Merge pass. * - * @return array An array of passes + * @return CompilerPassInterface The merge pass */ public function getMergePass() { diff --git a/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php b/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php index e34b0681e..59d4e0a76 100644 --- a/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php +++ b/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php @@ -32,8 +32,6 @@ class RepeatedPass implements CompilerPassInterface private $passes; /** - * Constructor. - * * @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects * * @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface @@ -58,14 +56,12 @@ class RepeatedPass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { - $this->repeat = false; - foreach ($this->passes as $pass) { - $pass->process($container); - } - - if ($this->repeat) { - $this->process($container); - } + do { + $this->repeat = false; + foreach ($this->passes as $pass) { + $pass->process($container); + } + } while ($this->repeat); } /** diff --git a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php b/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php index c5332fcd8..b7210ee6e 100644 --- a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ b/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -25,7 +25,6 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface { private $compiler; private $formatter; - private $sourceId; /** * Process the Container to replace aliases with service definitions. @@ -36,113 +35,108 @@ class ReplaceAliasByActualDefinitionPass implements CompilerPassInterface */ public function process(ContainerBuilder $container) { + // Setup $this->compiler = $container->getCompiler(); $this->formatter = $this->compiler->getLoggingFormatter(); - - foreach ($container->getAliases() as $id => $alias) { - $aliasId = (string) $alias; - - try { - $definition = $container->getDefinition($aliasId); - } catch (InvalidArgumentException $e) { - throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with actual definition "%s".', $id, $alias), null, $e); + // First collect all alias targets that need to be replaced + $seenAliasTargets = array(); + $replacements = array(); + foreach ($container->getAliases() as $definitionId => $target) { + $targetId = (string) $target; + // Special case: leave this target alone + if ('service_container' === $targetId) { + continue; + } + // Check if target needs to be replaces + if (isset($replacements[$targetId])) { + $container->setAlias($definitionId, $replacements[$targetId]); + } + // No need to process the same target twice + if (isset($seenAliasTargets[$targetId])) { + continue; + } + // Process new target + $seenAliasTargets[$targetId] = true; + try { + $definition = $container->getDefinition($targetId); + } catch (InvalidArgumentException $e) { + throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with actual definition "%s".', $definitionId, $targetId), null, $e); } - if ($definition->isPublic()) { continue; } - + // Remove private definition and schedule for replacement $definition->setPublic(true); - $container->setDefinition($id, $definition); - $container->removeDefinition($aliasId); + $container->setDefinition($definitionId, $definition); + $container->removeDefinition($targetId); + $replacements[$targetId] = $definitionId; + } - $this->updateReferences($container, $aliasId, $id); - - // we have to restart the process due to concurrent modification of - // the container - $this->process($container); - - break; + // Now replace target instances in all definitions + foreach ($container->getDefinitions() as $definitionId => $definition) { + $definition->setArguments($this->updateArgumentReferences($replacements, $definitionId, $definition->getArguments())); + $definition->setMethodCalls($this->updateArgumentReferences($replacements, $definitionId, $definition->getMethodCalls())); + $definition->setProperties($this->updateArgumentReferences($replacements, $definitionId, $definition->getProperties())); + $definition->setFactoryService($this->updateFactoryReferenceId($replacements, $definition->getFactoryService(false)), false); + $definition->setFactory($this->updateFactoryReference($replacements, $definition->getFactory())); } } /** - * Updates references to remove aliases. + * Recursively updates references in an array. * - * @param ContainerBuilder $container The container - * @param string $currentId The alias identifier being replaced - * @param string $newId The id of the service the alias points to - */ - private function updateReferences($container, $currentId, $newId) - { - foreach ($container->getAliases() as $id => $alias) { - if ($currentId === (string) $alias) { - $container->setAlias($id, $newId); - } - } - - foreach ($container->getDefinitions() as $id => $definition) { - $this->sourceId = $id; - - $definition->setArguments( - $this->updateArgumentReferences($definition->getArguments(), $currentId, $newId) - ); - - $definition->setMethodCalls( - $this->updateArgumentReferences($definition->getMethodCalls(), $currentId, $newId) - ); - - $definition->setProperties( - $this->updateArgumentReferences($definition->getProperties(), $currentId, $newId) - ); - - $definition->setFactoryService($this->updateFactoryServiceReference($definition->getFactoryService(false), $currentId, $newId), false); - $definition->setFactory($this->updateFactoryReference($definition->getFactory(), $currentId, $newId)); - } - } - - /** - * Updates argument references. - * - * @param array $arguments An array of Arguments - * @param string $currentId The alias identifier - * @param string $newId The identifier the alias points to + * @param array $replacements Table of aliases to replace + * @param string $definitionId Identifier of this definition + * @param array $arguments Where to replace the aliases * * @return array */ - private function updateArgumentReferences(array $arguments, $currentId, $newId) + private function updateArgumentReferences(array $replacements, $definitionId, array $arguments) { foreach ($arguments as $k => $argument) { + // Handle recursion step if (is_array($argument)) { - $arguments[$k] = $this->updateArgumentReferences($argument, $currentId, $newId); - } elseif ($argument instanceof Reference) { - if ($currentId === (string) $argument) { - $arguments[$k] = new Reference($newId, $argument->getInvalidBehavior()); - $this->compiler->addLogMessage($this->formatter->formatUpdateReference($this, $this->sourceId, $currentId, $newId)); - } + $arguments[$k] = $this->updateArgumentReferences($replacements, $definitionId, $argument); + continue; } + // Skip arguments that don't need replacement + if (!$argument instanceof Reference) { + continue; + } + $referenceId = (string) $argument; + if (!isset($replacements[$referenceId])) { + continue; + } + // Perform the replacement + $newId = $replacements[$referenceId]; + $arguments[$k] = new Reference($newId, $argument->getInvalidBehavior()); + $this->compiler->addLogMessage($this->formatter->formatUpdateReference($this, $definitionId, $referenceId, $newId)); } return $arguments; } - private function updateFactoryServiceReference($factoryService, $currentId, $newId) + /** + * Returns the updated reference for the factory service. + * + * @param array $replacements Table of aliases to replace + * @param string|null $referenceId Factory service reference identifier + * + * @return string|null + */ + private function updateFactoryReferenceId(array $replacements, $referenceId) { - if (null === $factoryService) { + if (null === $referenceId) { return; } - return $currentId === $factoryService ? $newId : $factoryService; + return isset($replacements[$referenceId]) ? $replacements[$referenceId] : $referenceId; } - private function updateFactoryReference($factory, $currentId, $newId) + private function updateFactoryReference(array $replacements, $factory) { - if (null === $factory || !is_array($factory) || !$factory[0] instanceof Reference) { - return $factory; - } - - if ($currentId === (string) $factory[0]) { - $factory[0] = new Reference($newId, $factory[0]->getInvalidBehavior()); + if (is_array($factory) && $factory[0] instanceof Reference && isset($replacements[$referenceId = (string) $factory[0]])) { + $factory[0] = new Reference($replacements[$referenceId], $factory[0]->getInvalidBehavior()); } return $factory; diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php index e654819c0..4f8cd2b70 100644 --- a/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php +++ b/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php @@ -136,6 +136,7 @@ class ResolveDefinitionTemplatesPass implements CompilerPassInterface $def->setFile($parentDef->getFile()); $def->setPublic($parentDef->isPublic()); $def->setLazy($parentDef->isLazy()); + $def->setAutowired($parentDef->isAutowired()); // overwrite with values specified in the decorator $changes = $definition->getChanges(); @@ -169,12 +170,15 @@ class ResolveDefinitionTemplatesPass implements CompilerPassInterface if (isset($changes['deprecated'])) { $def->setDeprecated($definition->isDeprecated(), $definition->getDeprecationMessage('%service_id%')); } + if (isset($changes['autowire'])) { + $def->setAutowired($definition->isAutowired()); + } if (isset($changes['decorated_service'])) { $decoratedService = $definition->getDecoratedService(); if (null === $decoratedService) { $def->setDecoratedService($decoratedService); } else { - $def->setDecoratedService($decoratedService[0], $decoratedService[1]); + $def->setDecoratedService($decoratedService[0], $decoratedService[1], $decoratedService[2]); } } diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php index 8114b880f..c200cb4d9 100644 --- a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php +++ b/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php @@ -12,7 +12,6 @@ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Alias; -use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php index dc9a1a00e..e7306ab56 100644 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php +++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php @@ -45,7 +45,7 @@ class ServiceReferenceGraph * * @param string $id The id to retrieve * - * @return ServiceReferenceGraphNode The node matching the supplied identifier + * @return ServiceReferenceGraphNode * * @throws InvalidArgumentException if no node matches the supplied identifier */ @@ -61,7 +61,7 @@ class ServiceReferenceGraph /** * Returns all nodes. * - * @return ServiceReferenceGraphNode[] An array of all ServiceReferenceGraphNode objects + * @return ServiceReferenceGraphNode[] */ public function getNodes() { diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php index 6a3e2ea56..e3c793c4f 100644 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php +++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php @@ -25,8 +25,6 @@ class ServiceReferenceGraphEdge private $value; /** - * Constructor. - * * @param ServiceReferenceGraphNode $sourceNode * @param ServiceReferenceGraphNode $destNode * @param string $value @@ -41,7 +39,7 @@ class ServiceReferenceGraphEdge /** * Returns the value of the edge. * - * @return ServiceReferenceGraphNode + * @return string */ public function getValue() { diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php index c49c93257..e5718b2b6 100644 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php +++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php @@ -29,8 +29,6 @@ class ServiceReferenceGraphNode private $value; /** - * Constructor. - * * @param string $id The node identifier * @param mixed $value The node value */ diff --git a/vendor/symfony/dependency-injection/Container.php b/vendor/symfony/dependency-injection/Container.php index 3305fc98c..ea804c701 100644 --- a/vendor/symfony/dependency-injection/Container.php +++ b/vendor/symfony/dependency-injection/Container.php @@ -78,8 +78,6 @@ class Container implements IntrospectableContainerInterface, ResettableContainer private $underscoreMap = array('_' => '', '.' => '_', '\\' => '_'); /** - * Constructor. - * * @param ParameterBagInterface $parameterBag A ParameterBagInterface instance */ public function __construct(ParameterBagInterface $parameterBag = null) @@ -297,10 +295,10 @@ class Container implements IntrospectableContainerInterface, ResettableContainer } $alternatives = array(); - foreach ($this->services as $key => $associatedService) { - $lev = levenshtein($id, $key); - if ($lev <= strlen($id) / 3 || false !== strpos($key, $id)) { - $alternatives[] = $key; + foreach ($this->getServiceIds() as $knownId) { + $lev = levenshtein($id, $knownId); + if ($lev <= strlen($id) / 3 || false !== strpos($knownId, $id)) { + $alternatives[] = $knownId; } } @@ -322,6 +320,11 @@ class Container implements IntrospectableContainerInterface, ResettableContainer return; } + throw $e; + } catch (\Throwable $e) { + unset($this->loading[$id]); + unset($this->services[$id]); + throw $e; } diff --git a/vendor/symfony/dependency-injection/ContainerAware.php b/vendor/symfony/dependency-injection/ContainerAware.php index 5686bf81d..f3f2a5065 100644 --- a/vendor/symfony/dependency-injection/ContainerAware.php +++ b/vendor/symfony/dependency-injection/ContainerAware.php @@ -26,9 +26,7 @@ abstract class ContainerAware implements ContainerAwareInterface protected $container; /** - * Sets the container. - * - * @param ContainerInterface|null $container A ContainerInterface instance or null + * {@inheritdoc} */ public function setContainer(ContainerInterface $container = null) { diff --git a/vendor/symfony/dependency-injection/ContainerBuilder.php b/vendor/symfony/dependency-injection/ContainerBuilder.php index b49cb5f6f..ede06d6cc 100644 --- a/vendor/symfony/dependency-injection/ContainerBuilder.php +++ b/vendor/symfony/dependency-injection/ContainerBuilder.php @@ -201,7 +201,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param ResourceInterface $resource A resource instance * - * @return ContainerBuilder The current instance + * @return $this */ public function addResource(ResourceInterface $resource) { @@ -219,7 +219,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param ResourceInterface[] $resources An array of resources * - * @return ContainerBuilder The current instance + * @return $this */ public function setResources(array $resources) { @@ -237,7 +237,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param object $object An object instance * - * @return ContainerBuilder The current instance + * @return $this */ public function addObjectResource($object) { @@ -253,7 +253,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param \ReflectionClass $class * - * @return ContainerBuilder The current instance + * @return $this */ public function addClassResource(\ReflectionClass $class) { @@ -276,7 +276,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param string $extension The extension alias or namespace * @param array $values An array of values that customizes the extension * - * @return ContainerBuilder The current instance + * @return $this * * @throws BadMethodCallException When this ContainerBuilder is frozen * @throws \LogicException if the container is frozen @@ -300,7 +300,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * @param CompilerPassInterface $pass A compiler pass * @param string $type The type of compiler pass * - * @return ContainerBuilder The current instance + * @return $this */ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) { @@ -354,7 +354,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface /** * Returns all Scope children. * - * @return array An array of scope children. + * @return array An array of scope children * * @deprecated since version 2.8, to be removed in 3.0. */ @@ -381,21 +381,14 @@ class ContainerBuilder extends Container implements TaggedContainerInterface public function set($id, $service, $scope = self::SCOPE_CONTAINER) { $id = strtolower($id); + $set = isset($this->definitions[$id]); - if ($this->isFrozen()) { + if ($this->isFrozen() && ($set || isset($this->obsoleteDefinitions[$id])) && !$this->{$set ? 'definitions' : 'obsoleteDefinitions'}[$id]->isSynthetic()) { // setting a synthetic service on a frozen container is alright - if ( - (!isset($this->definitions[$id]) && !isset($this->obsoleteDefinitions[$id])) - || - (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic()) - || - (isset($this->obsoleteDefinitions[$id]) && !$this->obsoleteDefinitions[$id]->isSynthetic()) - ) { - throw new BadMethodCallException(sprintf('Setting service "%s" on a frozen container is not allowed.', $id)); - } + throw new BadMethodCallException(sprintf('Setting service "%s" on a frozen container is not allowed.', $id)); } - if (isset($this->definitions[$id])) { + if ($set) { $this->obsoleteDefinitions[$id] = $this->definitions[$id]; } @@ -456,7 +449,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface } if (!array_key_exists($id, $this->definitions) && isset($this->aliasDefinitions[$id])) { - return $this->get($this->aliasDefinitions[$id]); + return $this->get((string) $this->aliasDefinitions[$id], $invalidBehavior); } try { @@ -480,6 +473,10 @@ class ContainerBuilder extends Container implements TaggedContainerInterface return; } + throw $e; + } catch (\Throwable $e) { + unset($this->loading[$id]); + throw $e; } @@ -506,7 +503,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * parameter, the value will still be 'bar' as defined in the ContainerBuilder * constructor. * - * @param ContainerBuilder $container The ContainerBuilder instance to merge. + * @param ContainerBuilder $container The ContainerBuilder instance to merge * * @throws BadMethodCallException When this ContainerBuilder is frozen */ @@ -862,6 +859,10 @@ class ContainerBuilder extends Container implements TaggedContainerInterface */ public function createService(Definition $definition, $id, $tryProxy = true) { + if ($definition instanceof DefinitionDecorator) { + throw new RuntimeException(sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id)); + } + if ($definition->isSynthetic()) { throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id)); } @@ -936,15 +937,15 @@ class ContainerBuilder extends Container implements TaggedContainerInterface $this->shareService($definition, $service, $id); } - foreach ($definition->getMethodCalls() as $call) { - $this->callMethod($service, $call); - } - $properties = $this->resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties()))); foreach ($properties as $name => $value) { $service->$name = $value; } + foreach ($definition->getMethodCalls() as $call) { + $this->callMethod($service, $call); + } + if ($callable = $definition->getConfigurator()) { if (is_array($callable)) { $callable[0] = $parameterBag->resolveValue($callable[0]); @@ -1007,7 +1008,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * @param string $name The tag name * - * @return array An array of tags with the tagged service as key, holding a list of attribute arrays. + * @return array An array of tags with the tagged service as key, holding a list of attribute arrays */ public function findTaggedServiceIds($name) { @@ -1063,7 +1064,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface /** * Returns the Service Conditionals. * - * @param mixed $value An array of conditionals to return. + * @param mixed $value An array of conditionals to return * * @return array An array of Service conditionals */ @@ -1144,15 +1145,15 @@ class ContainerBuilder extends Container implements TaggedContainerInterface /** * Shares a given service in the container. * - * @param Definition $definition - * @param mixed $service - * @param string $id + * @param Definition $definition + * @param mixed $service + * @param string|null $id * * @throws InactiveScopeException */ private function shareService(Definition $definition, $service, $id) { - if ($definition->isShared() && self::SCOPE_PROTOTYPE !== $scope = $definition->getScope(false)) { + if (null !== $id && $definition->isShared() && self::SCOPE_PROTOTYPE !== $scope = $definition->getScope(false)) { if (self::SCOPE_CONTAINER !== $scope && !isset($this->scopedServices[$scope])) { throw new InactiveScopeException($id, $scope); } diff --git a/vendor/symfony/dependency-injection/Definition.php b/vendor/symfony/dependency-injection/Definition.php index bda429632..1b3a1c24e 100644 --- a/vendor/symfony/dependency-injection/Definition.php +++ b/vendor/symfony/dependency-injection/Definition.php @@ -47,8 +47,6 @@ class Definition protected $arguments; /** - * Constructor. - * * @param string|null $class The service class * @param array $arguments An array of arguments to pass to the service constructor */ @@ -63,7 +61,7 @@ class Definition * * @param string|array $factory A PHP function or an array containing a class/Reference and a method to call * - * @return Definition The current instance + * @return $this */ public function setFactory($factory) { @@ -92,7 +90,7 @@ class Definition * * @param string $factoryClass The factory class name * - * @return Definition The current instance + * @return $this * * @deprecated since version 2.6, to be removed in 3.0. */ @@ -126,7 +124,7 @@ class Definition * * @param string $factoryMethod The factory method name * - * @return Definition The current instance + * @return $this * * @deprecated since version 2.6, to be removed in 3.0. */ @@ -146,7 +144,7 @@ class Definition * @param null|string $renamedId The new decorated service id * @param int $priority The priority of decoration * - * @return Definition The current instance + * @return $this * * @throws InvalidArgumentException In case the decorated service id and the new decorated service id are equals. */ @@ -166,7 +164,7 @@ class Definition } /** - * Gets the service that decorates this service. + * Gets the service that this service is decorating. * * @return null|array An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated */ @@ -196,7 +194,7 @@ class Definition * * @param string $factoryService The factory service id * - * @return Definition The current instance + * @return $this * * @deprecated since version 2.6, to be removed in 3.0. */ @@ -232,7 +230,7 @@ class Definition * * @param string $class The service class * - * @return Definition The current instance + * @return $this */ public function setClass($class) { @@ -256,7 +254,7 @@ class Definition * * @param array $arguments An array of arguments * - * @return Definition The current instance + * @return $this */ public function setArguments(array $arguments) { @@ -289,7 +287,7 @@ class Definition * * @param mixed $argument An argument * - * @return Definition The current instance + * @return $this */ public function addArgument($argument) { @@ -304,12 +302,16 @@ class Definition * @param int $index * @param mixed $argument * - * @return Definition The current instance + * @return $this * * @throws OutOfBoundsException When the replaced argument does not exist */ public function replaceArgument($index, $argument) { + if (0 === count($this->arguments)) { + throw new OutOfBoundsException('Cannot replace arguments if none have been configured yet.'); + } + if ($index < 0 || $index > count($this->arguments) - 1) { throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, count($this->arguments) - 1)); } @@ -352,7 +354,7 @@ class Definition * * @param array $calls An array of method calls * - * @return Definition The current instance + * @return $this */ public function setMethodCalls(array $calls = array()) { @@ -370,7 +372,7 @@ class Definition * @param string $method The method name to call * @param array $arguments An array of arguments to pass to the method call * - * @return Definition The current instance + * @return $this * * @throws InvalidArgumentException on empty $method param */ @@ -389,7 +391,7 @@ class Definition * * @param string $method The method name to remove * - * @return Definition The current instance + * @return $this */ public function removeMethodCall($method) { @@ -436,7 +438,7 @@ class Definition * * @param array $tags * - * @return Definition the current instance + * @return $this */ public function setTags(array $tags) { @@ -473,7 +475,7 @@ class Definition * @param string $name The tag name * @param array $attributes An array of attributes * - * @return Definition The current instance + * @return $this */ public function addTag($name, array $attributes = array()) { @@ -499,7 +501,7 @@ class Definition * * @param string $name The tag name * - * @return Definition + * @return $this */ public function clearTag($name) { @@ -511,7 +513,7 @@ class Definition /** * Clears the tags for this definition. * - * @return Definition The current instance + * @return $this */ public function clearTags() { @@ -525,7 +527,7 @@ class Definition * * @param string $file A full pathname to include * - * @return Definition The current instance + * @return $this */ public function setFile($file) { @@ -549,7 +551,7 @@ class Definition * * @param bool $shared Whether the service must be shared or not * - * @return Definition The current instance + * @return $this */ public function setShared($shared) { @@ -573,7 +575,7 @@ class Definition * * @param string $scope Whether the service must be shared or not * - * @return Definition The current instance + * @return $this * * @deprecated since version 2.8, to be removed in 3.0. */ @@ -613,7 +615,7 @@ class Definition * * @param bool $boolean * - * @return Definition The current instance + * @return $this */ public function setPublic($boolean) { @@ -637,7 +639,7 @@ class Definition * * @param bool $boolean * - * @return Definition The current instance + * @return $this * * @deprecated since version 2.7, will be removed in 3.0. */ @@ -673,7 +675,7 @@ class Definition * * @param bool $lazy * - * @return Definition The current instance + * @return $this */ public function setLazy($lazy) { @@ -698,7 +700,7 @@ class Definition * * @param bool $boolean * - * @return Definition the current instance + * @return $this */ public function setSynthetic($boolean) { @@ -724,7 +726,7 @@ class Definition * * @param bool $boolean * - * @return Definition the current instance + * @return $this */ public function setAbstract($boolean) { @@ -751,7 +753,7 @@ class Definition * @param bool $status * @param string $template Template message to use if the definition is deprecated * - * @return Definition the current instance + * @return $this * * @throws InvalidArgumentException When the message template is invalid. */ @@ -802,7 +804,7 @@ class Definition * * @param callable $callable A PHP callable * - * @return Definition The current instance + * @return $this */ public function setConfigurator($callable) { @@ -826,7 +828,7 @@ class Definition * * @param string[] $types * - * @return Definition The current instance + * @return $this */ public function setAutowiringTypes(array $types) { @@ -852,9 +854,9 @@ class Definition /** * Sets autowired. * - * @param $autowired + * @param bool $autowired * - * @return Definition The current instance + * @return $this */ public function setAutowired($autowired) { @@ -878,7 +880,7 @@ class Definition * * @param string $type * - * @return Definition The current instance + * @return $this */ public function addAutowiringType($type) { @@ -892,7 +894,7 @@ class Definition * * @param string $type * - * @return Definition The current instance + * @return $this */ public function removeAutowiringType($type) { diff --git a/vendor/symfony/dependency-injection/DefinitionDecorator.php b/vendor/symfony/dependency-injection/DefinitionDecorator.php index a434b562d..4d0f694aa 100644 --- a/vendor/symfony/dependency-injection/DefinitionDecorator.php +++ b/vendor/symfony/dependency-injection/DefinitionDecorator.php @@ -25,9 +25,7 @@ class DefinitionDecorator extends Definition private $changes = array(); /** - * Constructor. - * - * @param string $parent The id of Definition instance to decorate. + * @param string $parent The id of Definition instance to decorate */ public function __construct($parent) { @@ -166,6 +164,16 @@ class DefinitionDecorator extends Definition return parent::setDeprecated($boolean, $template); } + /** + * {@inheritdoc} + */ + public function setAutowired($autowired) + { + $this->changes['autowire'] = true; + + return parent::setAutowired($autowired); + } + /** * Gets an argument to pass to the service constructor/factory method. * @@ -204,7 +212,7 @@ class DefinitionDecorator extends Definition * @param int $index * @param mixed $value * - * @return DefinitionDecorator the current instance + * @return $this * * @throws InvalidArgumentException when $index isn't an integer */ diff --git a/vendor/symfony/dependency-injection/Dumper/Dumper.php b/vendor/symfony/dependency-injection/Dumper/Dumper.php index 4b9d586f2..a39a5c744 100644 --- a/vendor/symfony/dependency-injection/Dumper/Dumper.php +++ b/vendor/symfony/dependency-injection/Dumper/Dumper.php @@ -23,8 +23,6 @@ abstract class Dumper implements DumperInterface protected $container; /** - * Constructor. - * * @param ContainerBuilder $container The service container to dump */ public function __construct(ContainerBuilder $container) diff --git a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php index 9710e8b0d..4172b3d7e 100644 --- a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php +++ b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php @@ -130,7 +130,7 @@ class GraphvizDumper extends Dumper * * @return array An array of edges */ - private function findEdges($id, $arguments, $required, $name) + private function findEdges($id, array $arguments, $required, $name) { $edges = array(); foreach ($arguments as $argument) { @@ -246,7 +246,7 @@ class GraphvizDumper extends Dumper * * @return string A comma separated list of attributes */ - private function addAttributes($attributes) + private function addAttributes(array $attributes) { $code = array(); foreach ($attributes as $k => $v) { @@ -263,7 +263,7 @@ class GraphvizDumper extends Dumper * * @return string A space separated list of options */ - private function addOptions($options) + private function addOptions(array $options) { $code = array(); foreach ($options as $k => $v) { diff --git a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php index c11d15864..da9ab4315 100644 --- a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php +++ b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php @@ -144,6 +144,7 @@ class PhpDumper extends Dumper if ($this->container->isFrozen()) { $code .= $this->addFrozenConstructor(); $code .= $this->addFrozenCompile(); + $code .= $this->addIsFrozenMethod(); } else { $code .= $this->addConstructor(); } @@ -334,8 +335,8 @@ class PhpDumper extends Dumper $code .= $this->addNewInstance($id, $sDefinition, '$'.$name, ' = '); if (!$this->hasReference($id, $sDefinition->getMethodCalls(), true) && !$this->hasReference($id, $sDefinition->getProperties(), true)) { - $code .= $this->addServiceMethodCalls(null, $sDefinition, $name); $code .= $this->addServiceProperties(null, $sDefinition, $name); + $code .= $this->addServiceMethodCalls(null, $sDefinition, $name); $code .= $this->addServiceConfigurator(null, $sDefinition, $name); } @@ -374,7 +375,7 @@ class PhpDumper extends Dumper * @throws InvalidArgumentException * @throws RuntimeException */ - private function addServiceInstance($id, $definition) + private function addServiceInstance($id, Definition $definition) { $class = $definition->getClass(); @@ -424,7 +425,7 @@ class PhpDumper extends Dumper * * @return bool */ - private function isSimpleInstance($id, $definition) + private function isSimpleInstance($id, Definition $definition) { foreach (array_merge(array($definition), $this->getInlinedDefinitions($definition)) as $sDefinition) { if ($definition !== $sDefinition && !$this->hasReference($id, $sDefinition->getMethodCalls())) { @@ -448,7 +449,7 @@ class PhpDumper extends Dumper * * @return string */ - private function addServiceMethodCalls($id, $definition, $variableName = 'instance') + private function addServiceMethodCalls($id, Definition $definition, $variableName = 'instance') { $calls = ''; foreach ($definition->getMethodCalls() as $call) { @@ -463,7 +464,7 @@ class PhpDumper extends Dumper return $calls; } - private function addServiceProperties($id, $definition, $variableName = 'instance') + private function addServiceProperties($id, Definition $definition, $variableName = 'instance') { $code = ''; foreach ($definition->getProperties() as $name => $value) { @@ -483,7 +484,7 @@ class PhpDumper extends Dumper * * @throws ServiceCircularReferenceException when the container contains a circular reference */ - private function addServiceInlinedDefinitionsSetup($id, $definition) + private function addServiceInlinedDefinitionsSetup($id, Definition $definition) { $this->referenceVariables[$id] = new Variable('instance'); @@ -506,8 +507,8 @@ class PhpDumper extends Dumper } $name = (string) $this->definitionVariables->offsetGet($iDefinition); - $code .= $this->addServiceMethodCalls(null, $iDefinition, $name); $code .= $this->addServiceProperties(null, $iDefinition, $name); + $code .= $this->addServiceMethodCalls(null, $iDefinition, $name); $code .= $this->addServiceConfigurator(null, $iDefinition, $name); } @@ -527,7 +528,7 @@ class PhpDumper extends Dumper * * @return string */ - private function addServiceConfigurator($id, $definition, $variableName = 'instance') + private function addServiceConfigurator($id, Definition $definition, $variableName = 'instance') { if (!$callable = $definition->getConfigurator()) { return ''; @@ -559,7 +560,7 @@ class PhpDumper extends Dumper * * @return string */ - private function addService($id, $definition) + private function addService($id, Definition $definition) { $this->definitionVariables = new \SplObjectStorage(); $this->referenceVariables = array(); @@ -570,22 +571,22 @@ class PhpDumper extends Dumper if ($definition->isSynthetic()) { $return[] = '@throws RuntimeException always since this service is expected to be injected dynamically'; } elseif ($class = $definition->getClass()) { - $return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : '\\'.ltrim($class, '\\'), ltrim($class, '\\')); + $return[] = sprintf('@return %s A %s instance', 0 === strpos($class, '%') ? 'object' : '\\'.ltrim($class, '\\'), ltrim($class, '\\')); } elseif ($definition->getFactory()) { $factory = $definition->getFactory(); if (is_string($factory)) { - $return[] = sprintf('@return object An instance returned by %s().', $factory); + $return[] = sprintf('@return object An instance returned by %s()', $factory); } elseif (is_array($factory) && (is_string($factory[0]) || $factory[0] instanceof Definition || $factory[0] instanceof Reference)) { if (is_string($factory[0]) || $factory[0] instanceof Reference) { - $return[] = sprintf('@return object An instance returned by %s::%s().', (string) $factory[0], $factory[1]); + $return[] = sprintf('@return object An instance returned by %s::%s()', (string) $factory[0], $factory[1]); } elseif ($factory[0] instanceof Definition) { - $return[] = sprintf('@return object An instance returned by %s::%s().', $factory[0]->getClass(), $factory[1]); + $return[] = sprintf('@return object An instance returned by %s::%s()', $factory[0]->getClass(), $factory[1]); } } } elseif ($definition->getFactoryClass(false)) { - $return[] = sprintf('@return object An instance returned by %s::%s().', $definition->getFactoryClass(false), $definition->getFactoryMethod(false)); + $return[] = sprintf('@return object An instance returned by %s::%s()', $definition->getFactoryClass(false), $definition->getFactoryMethod(false)); } elseif ($definition->getFactoryService(false)) { - $return[] = sprintf('@return object An instance returned by %s::%s().', $definition->getFactoryService(false), $definition->getFactoryMethod(false)); + $return[] = sprintf('@return object An instance returned by %s::%s()', $definition->getFactoryService(false), $definition->getFactoryMethod(false)); } $scope = $definition->getScope(false); @@ -682,8 +683,8 @@ EOF; $this->addServiceInlinedDefinitions($id, $definition). $this->addServiceInstance($id, $definition). $this->addServiceInlinedDefinitionsSetup($id, $definition). - $this->addServiceMethodCalls($id, $definition). $this->addServiceProperties($id, $definition). + $this->addServiceMethodCalls($id, $definition). $this->addServiceConfigurator($id, $definition). $this->addServiceReturn($id, $definition) ; @@ -977,6 +978,26 @@ EOF; throw new LogicException('You cannot compile a dumped frozen container.'); } +EOF; + } + + /** + * Adds the isFrozen method for a frozen container. + * + * @return string + */ + private function addIsFrozenMethod() + { + return <<docStar} + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + EOF; } @@ -1008,11 +1029,7 @@ EOF; private function addAliases() { if (!$aliases = $this->container->getAliases()) { - if ($this->container->isFrozen()) { - return "\n \$this->aliases = array();\n"; - } else { - return ''; - } + return $this->container->isFrozen() ? "\n \$this->aliases = array();\n" : ''; } $code = " \$this->aliases = array(\n"; @@ -1123,7 +1140,7 @@ EOF; * * @throws InvalidArgumentException */ - private function exportParameters($parameters, $path = '', $indent = 12) + private function exportParameters(array $parameters, $path = '', $indent = 12) { $php = array(); foreach ($parameters as $key => $value) { @@ -1288,10 +1305,17 @@ EOF; return true; } - if ($deep && !isset($visited[$argumentId])) { + if ($deep && !isset($visited[$argumentId]) && 'service_container' !== $argumentId) { $visited[$argumentId] = true; $service = $this->container->getDefinition($argumentId); + + // if the proxy manager is enabled, disable searching for references in lazy services, + // as these services will be instantiated lazily and don't have direct related references. + if ($service->isLazy() && !$this->getProxyDumper() instanceof NullDumper) { + continue; + } + $arguments = array_merge($service->getMethodCalls(), $service->getArguments(), $service->getProperties()); if ($this->hasReference($id, $arguments, $deep, $visited)) { @@ -1374,9 +1398,9 @@ EOF; $service = $this->dumpValue($value->getFactoryService(false)); return sprintf('%s->%s(%s)', 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService(false)), $value->getFactoryMethod(false), implode(', ', $arguments)); - } else { - throw new RuntimeException('Cannot dump definitions which have factory method without factory service or factory class.'); } + + throw new RuntimeException('Cannot dump definitions which have factory method without factory service or factory class.'); } $class = $value->getClass(); @@ -1414,9 +1438,9 @@ EOF; } } elseif (is_object($value) || is_resource($value)) { throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.'); - } else { - return $this->export($value); } + + return $this->export($value); } /** @@ -1485,13 +1509,13 @@ EOF; if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) { return sprintf('$this->get(\'%s\', ContainerInterface::NULL_ON_INVALID_REFERENCE)', $id); - } else { - if ($this->container->hasAlias($id)) { - $id = (string) $this->container->getAlias($id); - } - - return sprintf('$this->get(\'%s\')', $id); } + + if ($this->container->hasAlias($id)) { + $id = (string) $this->container->getAlias($id); + } + + return sprintf('$this->get(\'%s\')', $id); } /** diff --git a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php b/vendor/symfony/dependency-injection/Dumper/XmlDumper.php index 07aad3f06..d76982354 100644 --- a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php +++ b/vendor/symfony/dependency-injection/Dumper/XmlDumper.php @@ -286,7 +286,7 @@ class XmlDumper extends Dumper * @param \DOMElement $parent * @param string $keyAttribute */ - private function convertParameters($parameters, $type, \DOMElement $parent, $keyAttribute = 'key') + private function convertParameters(array $parameters, $type, \DOMElement $parent, $keyAttribute = 'key') { $withKeys = array_keys($parameters) !== range(0, count($parameters) - 1); foreach ($parameters as $key => $value) { @@ -335,7 +335,7 @@ class XmlDumper extends Dumper * * @return array */ - private function escape($arguments) + private function escape(array $arguments) { $args = array(); foreach ($arguments as $k => $v) { diff --git a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php b/vendor/symfony/dependency-injection/Dumper/YamlDumper.php index 5b1032873..431b40f9d 100644 --- a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php +++ b/vendor/symfony/dependency-injection/Dumper/YamlDumper.php @@ -188,7 +188,7 @@ class YamlDumper extends Dumper return sprintf(" %s: '@%s'\n", $alias, $id); } - return sprintf(" %s:\n alias: %s\n public: false", $alias, $id); + return sprintf(" %s:\n alias: %s\n public: false\n", $alias, $id); } /** @@ -327,7 +327,7 @@ class YamlDumper extends Dumper * * @return array */ - private function prepareParameters($parameters, $escape = true) + private function prepareParameters(array $parameters, $escape = true) { $filtered = array(); foreach ($parameters as $key => $value) { @@ -350,7 +350,7 @@ class YamlDumper extends Dumper * * @return array */ - private function escape($arguments) + private function escape(array $arguments) { $args = array(); foreach ($arguments as $k => $v) { diff --git a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php b/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php index b529f0fe8..ab7b86d5a 100644 --- a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php +++ b/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php @@ -24,8 +24,6 @@ class ParameterNotFoundException extends InvalidArgumentException private $alternatives; /** - * Constructor. - * * @param string $key The requested parameter key * @param string $sourceId The service id that references the non-existent parameter * @param string $sourceKey The parameter key that references the non-existent parameter diff --git a/vendor/symfony/dependency-injection/Extension/Extension.php b/vendor/symfony/dependency-injection/Extension/Extension.php index 20ea1002c..ced39f728 100644 --- a/vendor/symfony/dependency-injection/Extension/Extension.php +++ b/vendor/symfony/dependency-injection/Extension/Extension.php @@ -27,9 +27,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface; abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface { /** - * Returns the base path for the XSD files. - * - * @return string The XSD base path + * {@inheritdoc} */ public function getXsdValidationBasePath() { @@ -37,9 +35,7 @@ abstract class Extension implements ExtensionInterface, ConfigurationExtensionIn } /** - * Returns the namespace to be used for this extension (XML namespace). - * - * @return string The XML namespace + * {@inheritdoc} */ public function getNamespace() { diff --git a/vendor/symfony/dependency-injection/LICENSE b/vendor/symfony/dependency-injection/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/dependency-injection/LICENSE +++ b/vendor/symfony/dependency-injection/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php b/vendor/symfony/dependency-injection/Loader/ClosureLoader.php index a5b4e5ad2..df70cdf44 100644 --- a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php +++ b/vendor/symfony/dependency-injection/Loader/ClosureLoader.php @@ -26,8 +26,6 @@ class ClosureLoader extends Loader private $container; /** - * Constructor. - * * @param ContainerBuilder $container A ContainerBuilder instance */ public function __construct(ContainerBuilder $container) diff --git a/vendor/symfony/dependency-injection/Loader/FileLoader.php b/vendor/symfony/dependency-injection/Loader/FileLoader.php index d71eecf74..90cd6bcfa 100644 --- a/vendor/symfony/dependency-injection/Loader/FileLoader.php +++ b/vendor/symfony/dependency-injection/Loader/FileLoader.php @@ -25,8 +25,6 @@ abstract class FileLoader extends BaseFileLoader protected $container; /** - * Constructor. - * * @param ContainerBuilder $container A ContainerBuilder instance * @param FileLocatorInterface $locator A FileLocator instance */ diff --git a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php b/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php index c19b86d56..dc7ca933f 100644 --- a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php +++ b/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php @@ -187,7 +187,7 @@ class XmlFileLoader extends FileLoader } if ($deprecated = $this->getChildren($service, 'deprecated')) { - $definition->setDeprecated(true, $deprecated[0]->nodeValue); + $definition->setDeprecated(true, $deprecated[0]->nodeValue ?: null); } $definition->setArguments($this->getArgumentsAsPhp($service, 'argument')); @@ -315,6 +315,10 @@ class XmlFileLoader extends FileLoader if ($services = $this->getChildren($node, 'service')) { $definitions[$id] = array($services[0], $file, false); $services[0]->setAttribute('id', $id); + + // anonymous services are always private + // we could not use the constant false here, because of XML parsing + $services[0]->setAttribute('public', 'false'); } } } @@ -325,11 +329,7 @@ class XmlFileLoader extends FileLoader // give it a unique name $id = sprintf('%s_%d', hash('sha256', $file), ++$count); $node->setAttribute('id', $id); - - if ($services = $this->getChildren($node, 'service')) { - $definitions[$id] = array($node, $file, true); - $services[0]->setAttribute('id', $id); - } + $definitions[$id] = array($node, $file, true); } } @@ -338,10 +338,6 @@ class XmlFileLoader extends FileLoader foreach ($definitions as $id => $def) { list($domElement, $file, $wild) = $def; - // anonymous services are always private - // we could not use the constant false here, because of XML parsing - $domElement->setAttribute('public', 'false'); - if (null !== $definition = $this->parseDefinition($domElement, $file)) { $this->container->setDefinition($id, $definition); } @@ -373,21 +369,22 @@ class XmlFileLoader extends FileLoader $arg->setAttribute('key', $arg->getAttribute('name')); } - if (!$arg->hasAttribute('key')) { - $key = !$arguments ? 0 : max(array_keys($arguments)) + 1; - } else { - $key = $arg->getAttribute('key'); - } - - // parameter keys are case insensitive - if ('parameter' == $name && $lowercase) { - $key = strtolower($key); - } - // this is used by DefinitionDecorator to overwrite a specific // argument of the parent definition if ($arg->hasAttribute('index')) { $key = 'index_'.$arg->getAttribute('index'); + } elseif (!$arg->hasAttribute('key')) { + // Append an empty argument, then fetch its key to overwrite it later + $arguments[] = null; + $keys = array_keys($arguments); + $key = array_pop($keys); + } else { + $key = $arg->getAttribute('key'); + + // parameter keys are case insensitive + if ('parameter' == $name && $lowercase) { + $key = strtolower($key); + } } switch ($arg->getAttribute('type')) { @@ -418,7 +415,7 @@ class XmlFileLoader extends FileLoader $arguments[$key] = $arg->nodeValue; break; case 'constant': - $arguments[$key] = constant($arg->nodeValue); + $arguments[$key] = constant(trim($arg->nodeValue)); break; default: $arguments[$key] = XmlUtils::phpize($arg->nodeValue); @@ -511,7 +508,9 @@ $imports EOF ; + $disableEntities = libxml_disable_entity_loader(false); $valid = @$dom->schemaValidateSource($source); + libxml_disable_entity_loader($disableEntities); foreach ($tmpfiles as $tmpfile) { @unlink($tmpfile); @@ -589,7 +588,7 @@ EOF * * @return array A PHP array */ - public static function convertDomElementToArray(\DomElement $element) + public static function convertDomElementToArray(\DOMElement $element) { return XmlUtils::convertDomElementToArray($element); } diff --git a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php index b2bd2b2cb..a377eee6f 100644 --- a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php +++ b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php @@ -85,7 +85,7 @@ class YamlFileLoader extends FileLoader * @param array $content * @param string $file */ - private function parseImports($content, $file) + private function parseImports(array $content, $file) { if (!isset($content['imports'])) { return; @@ -112,7 +112,7 @@ class YamlFileLoader extends FileLoader * @param array $content * @param string $file */ - private function parseDefinitions($content, $file) + private function parseDefinitions(array $content, $file) { if (!isset($content['services'])) { return; @@ -130,9 +130,9 @@ class YamlFileLoader extends FileLoader /** * Parses a definition. * - * @param string $id - * @param array $service - * @param string $file + * @param string $id + * @param array|string $service + * @param string $file * * @throws InvalidArgumentException When tags are invalid */ @@ -420,9 +420,9 @@ class YamlFileLoader extends FileLoader { if (is_array($value)) { $value = array_map(array($this, 'resolveServices'), $value); - } elseif (is_string($value) && 0 === strpos($value, '@=')) { + } elseif (is_string($value) && 0 === strpos($value, '@=')) { return new Expression(substr($value, 2)); - } elseif (is_string($value) && 0 === strpos($value, '@')) { + } elseif (is_string($value) && 0 === strpos($value, '@')) { if (0 === strpos($value, '@@')) { $value = substr($value, 1); $invalidBehavior = null; @@ -454,7 +454,7 @@ class YamlFileLoader extends FileLoader * * @param array $content */ - private function loadFromExtensions($content) + private function loadFromExtensions(array $content) { foreach ($content as $namespace => $values) { if (in_array($namespace, array('imports', 'parameters', 'services'))) { diff --git a/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd b/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd index 382fca185..530ca1c13 100644 --- a/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd +++ b/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd @@ -24,14 +24,28 @@ ]]> - - - - - + + + + + + + + + + + + + + + + + + + - + @@ -152,7 +166,7 @@ - + diff --git a/vendor/symfony/dependency-injection/Parameter.php b/vendor/symfony/dependency-injection/Parameter.php index 5431ed822..cac6f6c4c 100644 --- a/vendor/symfony/dependency-injection/Parameter.php +++ b/vendor/symfony/dependency-injection/Parameter.php @@ -21,8 +21,6 @@ class Parameter private $id; /** - * Constructor. - * * @param string $id The parameter key */ public function __construct($id) @@ -31,8 +29,6 @@ class Parameter } /** - * __toString. - * * @return string The parameter key */ public function __toString() diff --git a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php index d9fe9eceb..ad65ad960 100644 --- a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php +++ b/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php @@ -21,8 +21,6 @@ use Symfony\Component\DependencyInjection\Exception\LogicException; class FrozenParameterBag extends ParameterBag { /** - * Constructor. - * * For performance reasons, the constructor assumes that * all keys are already lowercased. * diff --git a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php index 64a7789d1..0611b1f69 100644 --- a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php +++ b/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php @@ -26,8 +26,6 @@ class ParameterBag implements ParameterBagInterface protected $resolved = false; /** - * Constructor. - * * @param array $parameters An array of parameters */ public function __construct(array $parameters = array()) @@ -56,9 +54,7 @@ class ParameterBag implements ParameterBagInterface } /** - * Gets the service container parameters. - * - * @return array An array of parameters + * {@inheritdoc} */ public function all() { @@ -66,13 +62,7 @@ class ParameterBag implements ParameterBagInterface } /** - * Gets a service container parameter. - * - * @param string $name The parameter name - * - * @return mixed The parameter value - * - * @throws ParameterNotFoundException if the parameter is not defined + * {@inheritdoc} */ public function get($name) { @@ -109,11 +99,7 @@ class ParameterBag implements ParameterBagInterface } /** - * Returns true if a parameter name is defined. - * - * @param string $name The parameter name - * - * @return bool true if the parameter name is defined, false otherwise + * {@inheritdoc} */ public function has($name) { @@ -131,7 +117,7 @@ class ParameterBag implements ParameterBagInterface } /** - * Replaces parameter placeholders (%name%) by their values for all parameters. + * {@inheritdoc} */ public function resolve() { @@ -266,6 +252,9 @@ class ParameterBag implements ParameterBagInterface return $value; } + /** + * {@inheritdoc} + */ public function unescapeValue($value) { if (is_string($value)) { diff --git a/vendor/symfony/dependency-injection/Reference.php b/vendor/symfony/dependency-injection/Reference.php index 572062be9..cb2445023 100644 --- a/vendor/symfony/dependency-injection/Reference.php +++ b/vendor/symfony/dependency-injection/Reference.php @@ -23,8 +23,6 @@ class Reference private $strict; /** - * Constructor. - * * Note: The $strict parameter is deprecated since version 2.8 and will be removed in 3.0. * * @param string $id The service identifier @@ -41,8 +39,6 @@ class Reference } /** - * __toString. - * * @return string The service identifier */ public function __toString() diff --git a/vendor/symfony/dependency-injection/Variable.php b/vendor/symfony/dependency-injection/Variable.php index e50235607..ddd437438 100644 --- a/vendor/symfony/dependency-injection/Variable.php +++ b/vendor/symfony/dependency-injection/Variable.php @@ -29,8 +29,6 @@ class Variable private $name; /** - * Constructor. - * * @param string $name */ public function __construct($name) diff --git a/vendor/symfony/dependency-injection/composer.json b/vendor/symfony/dependency-injection/composer.json index 619c9e630..2506690ca 100644 --- a/vendor/symfony/dependency-injection/composer.json +++ b/vendor/symfony/dependency-injection/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/yaml": "~2.1|~3.0.0", + "symfony/yaml": "~2.3.42|~2.7.14|~2.8.7|~3.0.7", "symfony/config": "~2.2|~3.0.0", "symfony/expression-language": "~2.6|~3.0.0" }, @@ -29,6 +29,7 @@ "suggest": { "symfony/yaml": "", "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them" }, "autoload": { diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index 75ba2a760..9b460f55f 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -104,6 +104,10 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface */ public function getListenerPriority($eventName, $listener) { + if (!method_exists($this->dispatcher, 'getListenerPriority')) { + return 0; + } + return $this->dispatcher->getListenerPriority($eventName, $listener); } @@ -124,6 +128,10 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface $event = new Event(); } + if (null !== $this->logger && $event->isPropagationStopped()) { + $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName)); + } + $this->preProcess($eventName); $this->preDispatch($eventName, $event); diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php index ebfe435f8..326bfd184 100644 --- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php @@ -97,9 +97,13 @@ class RegisterListenersPass implements CompilerPassInterface // We must assume that the class value has been correctly filled, even if the service is created by a factory $class = $container->getParameterBag()->resolveValue($def->getClass()); - $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface'; + if (!is_subclass_of($class, $interface)) { + if (!class_exists($class, false)) { + throw new \InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); } diff --git a/vendor/symfony/event-dispatcher/Event.php b/vendor/symfony/event-dispatcher/Event.php index 4a563495e..3ce854969 100644 --- a/vendor/symfony/event-dispatcher/Event.php +++ b/vendor/symfony/event-dispatcher/Event.php @@ -33,7 +33,7 @@ class Event private $propagationStopped = false; /** - * @var EventDispatcher Dispatcher that dispatched this event + * @var EventDispatcherInterface Dispatcher that dispatched this event */ private $dispatcher; @@ -47,7 +47,7 @@ class Event * * @see Event::stopPropagation() * - * @return bool Whether propagation was already stopped for this event. + * @return bool Whether propagation was already stopped for this event */ public function isPropagationStopped() { @@ -109,7 +109,7 @@ class Event /** * Sets the event's name property. * - * @param string $name The event name. + * @param string $name The event name * * @deprecated since version 2.4, to be removed in 3.0. The event name is passed to the listener call. */ diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php index 65c5cb6f6..bce44a142 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ b/vendor/symfony/event-dispatcher/EventDispatcher.php @@ -92,7 +92,7 @@ class EventDispatcher implements EventDispatcherInterface } foreach ($this->listeners[$eventName] as $priority => $listeners) { - if (false !== ($key = array_search($listener, $listeners, true))) { + if (false !== in_array($listener, $listeners, true)) { return $priority; } } @@ -171,24 +171,24 @@ class EventDispatcher implements EventDispatcherInterface * This method can be overridden to add functionality that is executed * for each listener. * - * @param callable[] $listeners The event listeners. - * @param string $eventName The name of the event to dispatch. - * @param Event $event The event object to pass to the event handlers/listeners. + * @param callable[] $listeners The event listeners + * @param string $eventName The name of the event to dispatch + * @param Event $event The event object to pass to the event handlers/listeners */ protected function doDispatch($listeners, $eventName, Event $event) { foreach ($listeners as $listener) { - call_user_func($listener, $event, $eventName, $this); if ($event->isPropagationStopped()) { break; } + call_user_func($listener, $event, $eventName, $this); } } /** * Sorts the internal list of listeners for the given event by priority. * - * @param string $eventName The name of the event. + * @param string $eventName The name of the event */ private function sortListeners($eventName) { diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php index a9bdd2c88..abe8d2895 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php @@ -26,7 +26,7 @@ interface EventDispatcherInterface * @param string $eventName The name of the event to dispatch. The name of * the event is the name of the method that is * invoked on listeners. - * @param Event $event The event to pass to the event handlers/listeners. + * @param Event $event The event to pass to the event handlers/listeners * If not supplied, an empty Event instance is created. * * @return Event @@ -49,7 +49,7 @@ interface EventDispatcherInterface * The subscriber is asked for all the events he is * interested in and added as a listener for these events. * - * @param EventSubscriberInterface $subscriber The subscriber. + * @param EventSubscriberInterface $subscriber The subscriber */ public function addSubscriber(EventSubscriberInterface $subscriber); diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php index 6458180a5..e8e4cc050 100644 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ b/vendor/symfony/event-dispatcher/GenericEvent.php @@ -37,8 +37,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Encapsulate an event with $subject and $args. * - * @param mixed $subject The subject of the event, usually an object. - * @param array $arguments Arguments to store in the event. + * @param mixed $subject The subject of the event, usually an object + * @param array $arguments Arguments to store in the event */ public function __construct($subject = null, array $arguments = array()) { @@ -49,7 +49,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Getter for subject property. * - * @return mixed $subject The observer subject. + * @return mixed $subject The observer subject */ public function getSubject() { @@ -59,11 +59,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Get argument by key. * - * @param string $key Key. + * @param string $key Key + * + * @return mixed Contents of array key * * @throws \InvalidArgumentException If key is not found. - * - * @return mixed Contents of array key. */ public function getArgument($key) { @@ -77,10 +77,10 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Add argument to event. * - * @param string $key Argument name. - * @param mixed $value Value. + * @param string $key Argument name + * @param mixed $value Value * - * @return GenericEvent + * @return $this */ public function setArgument($key, $value) { @@ -102,9 +102,9 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Set args property. * - * @param array $args Arguments. + * @param array $args Arguments * - * @return GenericEvent + * @return $this */ public function setArguments(array $args = array()) { @@ -116,7 +116,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Has argument. * - * @param string $key Key of arguments array. + * @param string $key Key of arguments array * * @return bool */ @@ -128,11 +128,11 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess for argument getter. * - * @param string $key Array key. - * - * @throws \InvalidArgumentException If key does not exist in $this->args. + * @param string $key Array key * * @return mixed + * + * @throws \InvalidArgumentException If key does not exist in $this->args. */ public function offsetGet($key) { @@ -142,8 +142,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess for argument setter. * - * @param string $key Array key to set. - * @param mixed $value Value. + * @param string $key Array key to set + * @param mixed $value Value */ public function offsetSet($key, $value) { @@ -153,7 +153,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess for unset argument. * - * @param string $key Array key. + * @param string $key Array key */ public function offsetUnset($key) { @@ -165,7 +165,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * ArrayAccess has argument. * - * @param string $key Array key. + * @param string $key Array key * * @return bool */ diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php index 13e8572ed..7f2be8d31 100644 --- a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php @@ -28,7 +28,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface /** * Creates an unmodifiable proxy for an event dispatcher. * - * @param EventDispatcherInterface $dispatcher The proxied event dispatcher. + * @param EventDispatcherInterface $dispatcher The proxied event dispatcher */ public function __construct(EventDispatcherInterface $dispatcher) { diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/event-dispatcher/LICENSE +++ b/vendor/symfony/event-dispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php index 0169ede0b..7b59072ac 100644 --- a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php @@ -11,11 +11,12 @@ namespace Symfony\Component\EventDispatcher\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase +abstract class AbstractEventDispatcherTest extends TestCase { /* Some pseudo events */ const preFoo = 'pre.foo'; @@ -142,7 +143,7 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase public function testLegacyDispatch() { $event = new Event(); - $return = $this->dispatcher->dispatch(self::preFoo, $event); + $this->dispatcher->dispatch(self::preFoo, $event); $this->assertEquals('pre.foo', $event->getName()); } diff --git a/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php index fcdb54a91..b1f84d481 100644 --- a/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php @@ -30,7 +30,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest { $event = new Event(); - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $service ->expects($this->once()) @@ -51,7 +51,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest { $event = new Event(); - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\SubscriberService'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\SubscriberService')->getMock(); $service ->expects($this->once()) @@ -86,7 +86,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest { $event = new Event(); - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $service ->expects($this->once()) @@ -110,7 +110,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest */ public function testTriggerAListenerServiceOutOfScope() { - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $scope = new Scope('scope'); $container = new Container(); @@ -133,7 +133,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest { $event = new Event(); - $service1 = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service1 = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $service1 ->expects($this->exactly(2)) @@ -152,7 +152,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent')); $dispatcher->dispatch('onEvent', $event); - $service2 = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service2 = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $service2 ->expects($this->once()) @@ -174,7 +174,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest { $event = new Event(); - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $container = new Container(); $container->set('service.listener', $service); @@ -200,7 +200,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest public function testGetListenersOnLazyLoad() { - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $container = new Container(); $container->set('service.listener', $service); @@ -217,7 +217,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest public function testRemoveAfterDispatch() { - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $container = new Container(); $container->set('service.listener', $service); @@ -232,7 +232,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest public function testRemoveBeforeDispatch() { - $service = $this->getMock('Symfony\Component\EventDispatcher\Tests\Service'); + $service = $this->getMockBuilder('Symfony\Component\EventDispatcher\Tests\Service')->getMock(); $container = new Container(); $container->set('service.listener', $service); diff --git a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 2dd8292a1..1868c5e91 100644 --- a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\EventDispatcher\Tests\Debug; +use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -18,7 +19,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\Stopwatch\Stopwatch; -class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase +class TraceableEventDispatcherTest extends TestCase { public function testAddRemoveListener() { @@ -73,6 +74,16 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $this->assertSame(123, $tdispatcher->getListenerPriority('foo', $listeners[0])); } + public function testGetListenerPriorityReturnsZeroWhenWrappedMethodDoesNotExist() + { + $dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); + $traceableEventDispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); + $traceableEventDispatcher->addListener('foo', function () {}, 123); + $listeners = $traceableEventDispatcher->getListeners('foo'); + + $this->assertSame(0, $traceableEventDispatcher->getListenerPriority('foo', $listeners[0])); + } + public function testAddRemoveSubscriber() { $dispatcher = new EventDispatcher(); @@ -120,7 +131,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase public function testLogger() { - $logger = $this->getMock('Psr\Log\LoggerInterface'); + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); @@ -135,7 +146,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase public function testLoggerWithStoppedEvent() { - $logger = $this->getMock('Psr\Log\LoggerInterface'); + $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); diff --git a/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php b/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php index 0fdd6372b..53d7282b3 100644 --- a/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php +++ b/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php @@ -11,10 +11,11 @@ namespace Symfony\Component\EventDispatcher\Tests\DependencyInjection; +use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass; -class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase +class RegisterListenersPassTest extends TestCase { /** * Tests that event subscribers not implementing EventSubscriberInterface @@ -29,7 +30,7 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase 'my_event_subscriber' => array(0 => array()), ); - $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); $definition->expects($this->atLeastOnce()) ->method('isPublic') ->will($this->returnValue(true)); @@ -37,10 +38,7 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase ->method('getClass') ->will($this->returnValue('stdClass')); - $builder = $this->getMock( - 'Symfony\Component\DependencyInjection\ContainerBuilder', - array('hasDefinition', 'findTaggedServiceIds', 'getDefinition') - ); + $builder = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition'))->getMock(); $builder->expects($this->any()) ->method('hasDefinition') ->will($this->returnValue(true)); @@ -64,7 +62,7 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase 'my_event_subscriber' => array(0 => array()), ); - $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->getMock(); $definition->expects($this->atLeastOnce()) ->method('isPublic') ->will($this->returnValue(true)); @@ -72,10 +70,7 @@ class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase ->method('getClass') ->will($this->returnValue('Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService')); - $builder = $this->getMock( - 'Symfony\Component\DependencyInjection\ContainerBuilder', - array('hasDefinition', 'findTaggedServiceIds', 'getDefinition', 'findDefinition') - ); + $builder = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')->setMethods(array('hasDefinition', 'findTaggedServiceIds', 'getDefinition', 'findDefinition'))->getMock(); $builder->expects($this->any()) ->method('hasDefinition') ->will($this->returnValue(true)); diff --git a/vendor/symfony/event-dispatcher/Tests/EventTest.php b/vendor/symfony/event-dispatcher/Tests/EventTest.php index 9a822670c..bdc14abbf 100644 --- a/vendor/symfony/event-dispatcher/Tests/EventTest.php +++ b/vendor/symfony/event-dispatcher/Tests/EventTest.php @@ -11,13 +11,14 @@ namespace Symfony\Component\EventDispatcher\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; /** * Test class for Event. */ -class EventTest extends \PHPUnit_Framework_TestCase +class EventTest extends TestCase { /** * @var \Symfony\Component\EventDispatcher\Event diff --git a/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php b/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php index aebd82dab..c84d3ac24 100644 --- a/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php +++ b/vendor/symfony/event-dispatcher/Tests/GenericEventTest.php @@ -11,12 +11,13 @@ namespace Symfony\Component\EventDispatcher\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\GenericEvent; /** * Test class for Event. */ -class GenericEventTest extends \PHPUnit_Framework_TestCase +class GenericEventTest extends TestCase { /** * @var GenericEvent @@ -95,7 +96,7 @@ class GenericEventTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Event', $this->event['name']); // test getting invalid arg - $this->setExpectedException('InvalidArgumentException'); + $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException'); $this->assertFalse($this->event['nameNotExist']); } diff --git a/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php index 80a7e43be..04f2861e3 100644 --- a/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php @@ -11,13 +11,14 @@ namespace Symfony\Component\EventDispatcher\Tests; +use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\ImmutableEventDispatcher; /** * @author Bernhard Schussek */ -class ImmutableEventDispatcherTest extends \PHPUnit_Framework_TestCase +class ImmutableEventDispatcherTest extends TestCase { /** * @var \PHPUnit_Framework_MockObject_MockObject @@ -31,7 +32,7 @@ class ImmutableEventDispatcherTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->innerDispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); + $this->innerDispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); $this->dispatcher = new ImmutableEventDispatcher($this->innerDispatcher); } @@ -80,7 +81,7 @@ class ImmutableEventDispatcherTest extends \PHPUnit_Framework_TestCase */ public function testAddSubscriberDisallowed() { - $subscriber = $this->getMock('Symfony\Component\EventDispatcher\EventSubscriberInterface'); + $subscriber = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventSubscriberInterface')->getMock(); $this->dispatcher->addSubscriber($subscriber); } @@ -98,7 +99,7 @@ class ImmutableEventDispatcherTest extends \PHPUnit_Framework_TestCase */ public function testRemoveSubscriberDisallowed() { - $subscriber = $this->getMock('Symfony\Component\EventDispatcher\EventSubscriberInterface'); + $subscriber = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventSubscriberInterface')->getMock(); $this->dispatcher->removeSubscriber($subscriber); } diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json index 282b770c8..14fc24ba2 100644 --- a/vendor/symfony/event-dispatcher/composer.json +++ b/vendor/symfony/event-dispatcher/composer.json @@ -21,7 +21,7 @@ "require-dev": { "symfony/dependency-injection": "~2.6|~3.0.0", "symfony/expression-language": "~2.6|~3.0.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/config": "^2.0.5|~3.0.0", "symfony/stopwatch": "~2.3|~3.0.0", "psr/log": "~1.0" }, diff --git a/vendor/symfony/http-foundation/AcceptHeader.php b/vendor/symfony/http-foundation/AcceptHeader.php index 226078763..2aa91dc44 100644 --- a/vendor/symfony/http-foundation/AcceptHeader.php +++ b/vendor/symfony/http-foundation/AcceptHeader.php @@ -48,7 +48,7 @@ class AcceptHeader * * @param string $headerValue * - * @return AcceptHeader + * @return self */ public static function fromString($headerValue) { @@ -101,7 +101,7 @@ class AcceptHeader * * @param AcceptHeaderItem $item * - * @return AcceptHeader + * @return $this */ public function add(AcceptHeaderItem $item) { @@ -128,7 +128,7 @@ class AcceptHeader * * @param string $pattern * - * @return AcceptHeader + * @return self */ public function filter($pattern) { diff --git a/vendor/symfony/http-foundation/AcceptHeaderItem.php b/vendor/symfony/http-foundation/AcceptHeaderItem.php index 21a5d155f..fb54b4935 100644 --- a/vendor/symfony/http-foundation/AcceptHeaderItem.php +++ b/vendor/symfony/http-foundation/AcceptHeaderItem.php @@ -57,7 +57,7 @@ class AcceptHeaderItem * * @param string $itemValue * - * @return AcceptHeaderItem + * @return self */ public static function fromString($itemValue) { @@ -103,7 +103,7 @@ class AcceptHeaderItem * * @param string $value * - * @return AcceptHeaderItem + * @return $this */ public function setValue($value) { @@ -127,7 +127,7 @@ class AcceptHeaderItem * * @param float $quality * - * @return AcceptHeaderItem + * @return $this */ public function setQuality($quality) { @@ -151,7 +151,7 @@ class AcceptHeaderItem * * @param int $index * - * @return AcceptHeaderItem + * @return $this */ public function setIndex($index) { @@ -211,7 +211,7 @@ class AcceptHeaderItem * @param string $name * @param string $value * - * @return AcceptHeaderItem + * @return $this */ public function setAttribute($name, $value) { diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php index a39984dff..031462190 100644 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ b/vendor/symfony/http-foundation/BinaryFileResponse.php @@ -66,7 +66,7 @@ class BinaryFileResponse extends Response * @param bool $autoEtag Whether the ETag header should be automatically set * @param bool $autoLastModified Whether the Last-Modified header should be automatically set * - * @return BinaryFileResponse The created response + * @return static */ public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) { @@ -81,7 +81,7 @@ class BinaryFileResponse extends Response * @param bool $autoEtag * @param bool $autoLastModified * - * @return BinaryFileResponse + * @return $this * * @throws FileException */ @@ -153,7 +153,7 @@ class BinaryFileResponse extends Response * @param string $filename Optionally use this filename instead of the real name of the file * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename * - * @return BinaryFileResponse + * @return $this */ public function setContentDisposition($disposition, $filename = '', $filenameFallback = '') { @@ -164,7 +164,7 @@ class BinaryFileResponse extends Response if ('' === $filenameFallback && (!preg_match('/^[\x20-\x7e]*$/', $filename) || false !== strpos($filename, '%'))) { $encoding = mb_detect_encoding($filename, null, true); - for ($i = 0; $i < mb_strlen($filename, $encoding); ++$i) { + for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { $char = mb_substr($filename, $i, 1, $encoding); if ('%' === $char || ord($char) < 32 || ord($char) > 126) { @@ -190,7 +190,7 @@ class BinaryFileResponse extends Response if (!$this->headers->has('Accept-Ranges')) { // Only accept ranges on safe HTTP methods - $this->headers->set('Accept-Ranges', $request->isMethodSafe() ? 'bytes' : 'none'); + $this->headers->set('Accept-Ranges', $request->isMethodSafe(false) ? 'bytes' : 'none'); } if (!$this->headers->has('Content-Type')) { @@ -348,7 +348,7 @@ class BinaryFileResponse extends Response * * @param bool $shouldDelete * - * @return BinaryFileResponse + * @return $this */ public function deleteFileAfterSend($shouldDelete) { diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php index 13d69f3bd..91783a6ad 100644 --- a/vendor/symfony/http-foundation/Cookie.php +++ b/vendor/symfony/http-foundation/Cookie.php @@ -56,7 +56,7 @@ class Cookie } elseif (!is_numeric($expire)) { $expire = strtotime($expire); - if (false === $expire || -1 === $expire) { + if (false === $expire) { throw new \InvalidArgumentException('The cookie expiration time is not valid.'); } } @@ -64,7 +64,7 @@ class Cookie $this->name = $name; $this->value = $value; $this->domain = $domain; - $this->expire = $expire; + $this->expire = 0 < $expire ? (int) $expire : 0; $this->path = empty($path) ? '/' : $path; $this->secure = (bool) $secure; $this->httpOnly = (bool) $httpOnly; @@ -84,7 +84,7 @@ class Cookie } else { $str .= urlencode($this->getValue()); - if ($this->getExpiresTime() !== 0) { + if (0 !== $this->getExpiresTime()) { $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()); } } diff --git a/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php b/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php new file mode 100644 index 000000000..fa5f1c787 --- /dev/null +++ b/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpFoundation\Exception; + +/** + * The HTTP request contains headers with conflicting information. + * + * This exception should trigger an HTTP 400 response in your application code. + * + * @author Magnus Nordlander + */ +class ConflictingHeadersException extends \RuntimeException +{ +} diff --git a/vendor/symfony/http-foundation/File/File.php b/vendor/symfony/http-foundation/File/File.php index f1b28b4b7..e2a67684f 100644 --- a/vendor/symfony/http-foundation/File/File.php +++ b/vendor/symfony/http-foundation/File/File.php @@ -68,7 +68,7 @@ class File extends \SplFileInfo * mime_content_type() and the system binary "file" (in this order), depending on * which of those are available. * - * @return string|null The guessed mime type (i.e. "application/pdf") + * @return string|null The guessed mime type (e.g. "application/pdf") * * @see MimeTypeGuesser */ @@ -85,7 +85,7 @@ class File extends \SplFileInfo * @param string $directory The destination folder * @param string $name The new file name * - * @return File A File object representing the new file + * @return self A File object representing the new file * * @throws FileException if the target file could not be created */ diff --git a/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php b/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php index ec9b78ab2..921751f6b 100644 --- a/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/ExtensionGuesser.php @@ -42,7 +42,7 @@ class ExtensionGuesser implements ExtensionGuesserInterface /** * Returns the singleton instance. * - * @return ExtensionGuesser + * @return self */ public static function getInstance() { diff --git a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php index a7e4ae2e5..6fee94798 100644 --- a/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php @@ -28,7 +28,7 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface * * @param string $magicFile A magic file to use with the finfo instance * - * @link http://www.php.net/manual/en/function.finfo-open.php + * @see http://www.php.net/manual/en/function.finfo-open.php */ public function __construct($magicFile = null) { diff --git a/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php b/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php index 75eeefbf5..17fd344b8 100644 --- a/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php @@ -661,6 +661,7 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface 'image/gif' => 'gif', 'image/ief' => 'ief', 'image/jpeg' => 'jpeg', + 'image/pjpeg' => 'jpeg', 'image/ktx' => 'ktx', 'image/png' => 'png', 'image/prs.btif' => 'btif', diff --git a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php index ecc8a30ac..69c803b49 100644 --- a/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php +++ b/vendor/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php @@ -56,7 +56,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface /** * Returns the singleton instance. * - * @return MimeTypeGuesser + * @return self */ public static function getInstance() { diff --git a/vendor/symfony/http-foundation/File/UploadedFile.php b/vendor/symfony/http-foundation/File/UploadedFile.php index 6b869e0ab..10837726c 100644 --- a/vendor/symfony/http-foundation/File/UploadedFile.php +++ b/vendor/symfony/http-foundation/File/UploadedFile.php @@ -50,7 +50,7 @@ class UploadedFile extends File /** * The file size provided by the uploader. * - * @var string + * @var int|null */ private $size; @@ -75,12 +75,12 @@ class UploadedFile extends File * * Calling any other method on an non-valid instance will cause an unpredictable result. * - * @param string $path The full temporary path to the file - * @param string $originalName The original file name - * @param string $mimeType The type of the file as provided by PHP - * @param int $size The file size - * @param int $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants) - * @param bool $test Whether the test mode is active + * @param string $path The full temporary path to the file + * @param string $originalName The original file name + * @param string|null $mimeType The type of the file as provided by PHP; null defaults to application/octet-stream + * @param int|null $size The file size + * @param int|null $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants); null defaults to UPLOAD_ERR_OK + * @param bool $test Whether the test mode is active * * @throws FileException If file_uploads is disabled * @throws FileNotFoundException If the file does not exist @@ -194,7 +194,7 @@ class UploadedFile extends File /** * Returns whether the file was uploaded successfully. * - * @return bool True if the file has been uploaded with HTTP and no error occurred. + * @return bool True if the file has been uploaded with HTTP and no error occurred */ public function isValid() { diff --git a/vendor/symfony/http-foundation/IpUtils.php b/vendor/symfony/http-foundation/IpUtils.php index f2cf356e5..28093be43 100644 --- a/vendor/symfony/http-foundation/IpUtils.php +++ b/vendor/symfony/http-foundation/IpUtils.php @@ -57,15 +57,18 @@ class IpUtils * @param string $requestIp IPv4 address to check * @param string $ip IPv4 address or subnet in CIDR notation * - * @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet. + * @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet */ public static function checkIp4($requestIp, $ip) { + if (!filter_var($requestIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { + return false; + } + if (false !== strpos($ip, '/')) { list($address, $netmask) = explode('/', $ip, 2); if ($netmask === '0') { - // Ensure IP is valid - using ip2long below implicitly validates, but we need to do it manually here return filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); } diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php index 4a10a09ec..2412b5e2b 100644 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/JsonResponse.php @@ -27,7 +27,7 @@ class JsonResponse extends Response protected $data; protected $callback; - // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. + // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT protected $encodingOptions = 15; @@ -50,7 +50,18 @@ class JsonResponse extends Response } /** - * {@inheritdoc} + * Factory method for chainability. + * + * Example: + * + * return JsonResponse::create($data, 200) + * ->setSharedMaxAge(300); + * + * @param mixed $data The json response data + * @param int $status The response status code + * @param array $headers An array of response headers + * + * @return static */ public static function create($data = null, $status = 200, $headers = array()) { @@ -62,18 +73,26 @@ class JsonResponse extends Response * * @param string|null $callback The JSONP callback or null to use none * - * @return JsonResponse + * @return $this * * @throws \InvalidArgumentException When the callback name is not valid */ public function setCallback($callback = null) { if (null !== $callback) { - // taken from http://www.geekality.net/2011/08/03/valid-javascript-identifier/ - $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*+$/u'; + // partially token from http://www.geekality.net/2011/08/03/valid-javascript-identifier/ + // partially token from https://github.com/willdurand/JsonpCallbackValidator + // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. + // (c) William Durand + $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?:\[(?:"(?:\\\.|[^"\\\])*"|\'(?:\\\.|[^\'\\\])*\'|\d+)\])*?$/u'; + $reserved = array( + 'break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', + 'debugger', 'function', 'this', 'with', 'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 'extends', 'super', 'const', 'export', + 'import', 'implements', 'let', 'private', 'public', 'yield', 'interface', 'package', 'protected', 'static', 'null', 'true', 'false', + ); $parts = explode('.', $callback); foreach ($parts as $part) { - if (!preg_match($pattern, $part)) { + if (!preg_match($pattern, $part) || in_array($part, $reserved, true)) { throw new \InvalidArgumentException('The callback name is not valid.'); } } @@ -89,7 +108,7 @@ class JsonResponse extends Response * * @param mixed $data * - * @return JsonResponse + * @return $this * * @throws \InvalidArgumentException */ @@ -165,7 +184,7 @@ class JsonResponse extends Response * * @param int $encodingOptions * - * @return JsonResponse + * @return $this */ public function setEncodingOptions($encodingOptions) { @@ -177,7 +196,7 @@ class JsonResponse extends Response /** * Updates the content and headers according to the JSON data and callback. * - * @return JsonResponse + * @return $this */ protected function update() { diff --git a/vendor/symfony/http-foundation/LICENSE b/vendor/symfony/http-foundation/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/http-foundation/LICENSE +++ b/vendor/symfony/http-foundation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php index 9400c1b7e..ef13494ee 100644 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ b/vendor/symfony/http-foundation/ParameterBag.php @@ -248,11 +248,11 @@ class ParameterBag implements \IteratorAggregate, \Countable /** * Filter key. * - * @param string $key Key. - * @param mixed $default Default = null. - * @param int $filter FILTER_* constant. - * @param mixed $options Filter options. - * @param bool $deep Default = false. + * @param string $key Key + * @param mixed $default Default = null + * @param int $filter FILTER_* constant + * @param mixed $options Filter options + * @param bool $deep Default = false * * @see http://php.net/manual/en/function.filter-var.php * diff --git a/vendor/symfony/http-foundation/RedirectResponse.php b/vendor/symfony/http-foundation/RedirectResponse.php index 18d5794c0..5a775ad15 100644 --- a/vendor/symfony/http-foundation/RedirectResponse.php +++ b/vendor/symfony/http-foundation/RedirectResponse.php @@ -66,7 +66,7 @@ class RedirectResponse extends Response * * @param string $url The URL to redirect to * - * @return RedirectResponse The current response. + * @return $this * * @throws \InvalidArgumentException */ diff --git a/vendor/symfony/http-foundation/Request.php b/vendor/symfony/http-foundation/Request.php index 68e7d0b8e..1c840b677 100644 --- a/vendor/symfony/http-foundation/Request.php +++ b/vendor/symfony/http-foundation/Request.php @@ -11,6 +11,7 @@ namespace Symfony\Component\HttpFoundation; +use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; use Symfony\Component\HttpFoundation\Session\SessionInterface; /** @@ -260,7 +261,7 @@ class Request /** * Creates a new request with values from PHP's super globals. * - * @return Request A new request + * @return static */ public static function createFromGlobals() { @@ -303,7 +304,7 @@ class Request * @param array $server The server parameters ($_SERVER) * @param string $content The raw body data * - * @return Request A Request instance + * @return static */ public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) { @@ -421,7 +422,7 @@ class Request * @param array $files The FILES parameters * @param array $server The SERVER parameters * - * @return Request The duplicated request + * @return static */ public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) { @@ -553,7 +554,7 @@ class Request /** * Gets the list of trusted proxies. * - * @return array An array of trusted proxies. + * @return array An array of trusted proxies */ public static function getTrustedProxies() { @@ -579,7 +580,7 @@ class Request /** * Gets the list of trusted host patterns. * - * @return array An array of trusted host patterns. + * @return array An array of trusted host patterns */ public static function getTrustedHosts() { @@ -595,6 +596,7 @@ class Request * * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getHost()) * * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getPort()) * * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) + * * Request::HEADER_FORWARDED: defaults to Forwarded (see RFC 7239) * * Setting an empty value allows to disable the trusted header for the given key. * @@ -717,7 +719,7 @@ class Request * Note: Finding deep items is deprecated since version 2.8, to be removed in 3.0. * * @param string $key the key - * @param mixed $default the default value + * @param mixed $default the default value if the parameter key does not exist * @param bool $deep is parameter deep in multidimensional array * * @return mixed @@ -811,41 +813,34 @@ class Request return array($ip); } - if (self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED])) { + $hasTrustedForwardedHeader = self::$trustedHeaders[self::HEADER_FORWARDED] && $this->headers->has(self::$trustedHeaders[self::HEADER_FORWARDED]); + $hasTrustedClientIpHeader = self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP]); + + if ($hasTrustedForwardedHeader) { $forwardedHeader = $this->headers->get(self::$trustedHeaders[self::HEADER_FORWARDED]); preg_match_all('{(for)=("?\[?)([a-z0-9\.:_\-/]*)}', $forwardedHeader, $matches); - $clientIps = $matches[3]; - } elseif (self::$trustedHeaders[self::HEADER_CLIENT_IP] && $this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) { - $clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP]))); + $forwardedClientIps = $matches[3]; + + $forwardedClientIps = $this->normalizeAndFilterClientIps($forwardedClientIps, $ip); + $clientIps = $forwardedClientIps; } - $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from - $firstTrustedIp = null; + if ($hasTrustedClientIpHeader) { + $xForwardedForClientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP]))); - foreach ($clientIps as $key => $clientIp) { - // Remove port (unfortunately, it does happen) - if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) { - $clientIps[$key] = $clientIp = $match[1]; - } - - if (!filter_var($clientIp, FILTER_VALIDATE_IP)) { - unset($clientIps[$key]); - - continue; - } - - if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { - unset($clientIps[$key]); - - // Fallback to this when the client IP falls into the range of trusted proxies - if (null === $firstTrustedIp) { - $firstTrustedIp = $clientIp; - } - } + $xForwardedForClientIps = $this->normalizeAndFilterClientIps($xForwardedForClientIps, $ip); + $clientIps = $xForwardedForClientIps; } - // Now the IP chain contains only untrusted proxies and the client IP - return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp); + if ($hasTrustedForwardedHeader && $hasTrustedClientIpHeader && $forwardedClientIps !== $xForwardedForClientIps) { + throw new ConflictingHeadersException('The request has both a trusted Forwarded header and a trusted Client IP header, conflicting with each other with regards to the originating IP addresses of the request. This is the result of a misconfiguration. You should either configure your proxy only to send one of these headers, or configure Symfony to distrust one of them.'); + } + + if (!$hasTrustedForwardedHeader && !$hasTrustedClientIpHeader) { + return $this->normalizeAndFilterClientIps(array(), $ip); + } + + return $clientIps; } /** @@ -1393,16 +1388,16 @@ class Request public function getRequestFormat($default = 'html') { if (null === $this->format) { - $this->format = $this->get('_format', $default); + $this->format = $this->get('_format'); } - return $this->format; + return null === $this->format ? $default : $this->format; } /** * Sets the request format. * - * @param string $format The request format. + * @param string $format The request format */ public function setRequestFormat($format) { @@ -1466,7 +1461,7 @@ class Request /** * Checks if the request method is of specified type. * - * @param string $method Uppercase request method (GET, POST etc). + * @param string $method Uppercase request method (GET, POST etc) * * @return bool */ @@ -1478,9 +1473,25 @@ class Request /** * Checks whether the method is safe or not. * + * @see https://tools.ietf.org/html/rfc7231#section-4.2.1 + * + * @param bool $andCacheable Adds the additional condition that the method should be cacheable. True by default. + * * @return bool */ - public function isMethodSafe() + public function isMethodSafe(/* $andCacheable = true */) + { + return in_array($this->getMethod(), 0 < func_num_args() && !func_get_arg(0) ? array('GET', 'HEAD', 'OPTIONS', 'TRACE') : array('GET', 'HEAD')); + } + + /** + * Checks whether the method is cacheable or not. + * + * @see https://tools.ietf.org/html/rfc7231#section-4.2.3 + * + * @return bool + */ + public function isMethodCacheable() { return in_array($this->getMethod(), array('GET', 'HEAD')); } @@ -1490,7 +1501,7 @@ class Request * * @param bool $asResource If true, a resource will be returned * - * @return string|resource The request body content or a resource to read the body stream. + * @return string|resource The request body content or a resource to read the body stream * * @throws \LogicException */ @@ -1528,7 +1539,7 @@ class Request return stream_get_contents($this->content); } - if (null === $this->content) { + if (null === $this->content || false === $this->content) { $this->content = file_get_contents('php://input'); } @@ -1676,7 +1687,7 @@ class Request * It works if your JavaScript library sets an X-Requested-With HTTP header. * It is known to work with common JavaScript frameworks: * - * @link http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript + * @see http://en.wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript * * @return bool true if the request is an XMLHttpRequest, false otherwise */ @@ -1936,4 +1947,35 @@ class Request { return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR'), self::$trustedProxies); } + + private function normalizeAndFilterClientIps(array $clientIps, $ip) + { + $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from + $firstTrustedIp = null; + + foreach ($clientIps as $key => $clientIp) { + // Remove port (unfortunately, it does happen) + if (preg_match('{((?:\d+\.){3}\d+)\:\d+}', $clientIp, $match)) { + $clientIps[$key] = $clientIp = $match[1]; + } + + if (!filter_var($clientIp, FILTER_VALIDATE_IP)) { + unset($clientIps[$key]); + + continue; + } + + if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { + unset($clientIps[$key]); + + // Fallback to this when the client IP falls into the range of trusted proxies + if (null === $firstTrustedIp) { + $firstTrustedIp = $clientIp; + } + } + } + + // Now the IP chain contains only untrusted proxies and the client IP + return $clientIps ? array_reverse($clientIps) : array($firstTrustedIp); + } } diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php index ca094ca16..aa4f67b58 100644 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ b/vendor/symfony/http-foundation/RequestMatcher.php @@ -19,22 +19,22 @@ namespace Symfony\Component\HttpFoundation; class RequestMatcher implements RequestMatcherInterface { /** - * @var string + * @var string|null */ private $path; /** - * @var string + * @var string|null */ private $host; /** - * @var array + * @var string[] */ private $methods = array(); /** - * @var string + * @var string[] */ private $ips = array(); @@ -76,13 +76,13 @@ class RequestMatcher implements RequestMatcherInterface */ public function matchScheme($scheme) { - $this->schemes = array_map('strtolower', (array) $scheme); + $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : array(); } /** * Adds a check for the URL host name. * - * @param string $regexp A Regexp + * @param string|null $regexp A Regexp */ public function matchHost($regexp) { @@ -92,7 +92,7 @@ class RequestMatcher implements RequestMatcherInterface /** * Adds a check for the URL path info. * - * @param string $regexp A Regexp + * @param string|null $regexp A Regexp */ public function matchPath($regexp) { @@ -112,21 +112,21 @@ class RequestMatcher implements RequestMatcherInterface /** * Adds a check for the client IP. * - * @param string|string[] $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 + * @param string|string[]|null $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 */ public function matchIps($ips) { - $this->ips = (array) $ips; + $this->ips = null !== $ips ? (array) $ips : array(); } /** * Adds a check for the HTTP method. * - * @param string|string[] $method An HTTP method or an array of HTTP methods + * @param string|string[]|null $method An HTTP method or an array of HTTP methods */ public function matchMethod($method) { - $this->methods = array_map('strtoupper', (array) $method); + $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : array(); } /** @@ -145,11 +145,11 @@ class RequestMatcher implements RequestMatcherInterface */ public function matches(Request $request) { - if ($this->schemes && !in_array($request->getScheme(), $this->schemes)) { + if ($this->schemes && !in_array($request->getScheme(), $this->schemes, true)) { return false; } - if ($this->methods && !in_array($request->getMethod(), $this->methods)) { + if ($this->methods && !in_array($request->getMethod(), $this->methods, true)) { return false; } diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php index 6a6082fde..9d112d157 100644 --- a/vendor/symfony/http-foundation/Response.php +++ b/vendor/symfony/http-foundation/Response.php @@ -59,6 +59,7 @@ class Response const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; const HTTP_EXPECTATION_FAILED = 417; const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 + const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 const HTTP_LOCKED = 423; // RFC4918 const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 @@ -115,7 +116,7 @@ class Response * * The list of codes is complete according to the * {@link http://www.iana.org/assignments/http-status-codes/ Hypertext Transfer Protocol (HTTP) Status Code Registry} - * (last updated 2015-05-19). + * (last updated 2016-03-01). * * Unless otherwise noted, the status code is defined in RFC2616. * @@ -162,6 +163,7 @@ class Response 416 => 'Range Not Satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', // RFC2324 + 421 => 'Misdirected Request', // RFC7540 422 => 'Unprocessable Entity', // RFC4918 423 => 'Locked', // RFC4918 424 => 'Failed Dependency', // RFC4918 @@ -213,7 +215,7 @@ class Response * @param int $status The response status code * @param array $headers An array of response headers * - * @return Response + * @return static */ public static function create($content = '', $status = 200, $headers = array()) { @@ -256,7 +258,7 @@ class Response * * @param Request $request A Request instance * - * @return Response The current response. + * @return $this */ public function prepare(Request $request) { @@ -318,7 +320,7 @@ class Response /** * Sends HTTP headers. * - * @return Response + * @return $this */ public function sendHeaders() { @@ -352,7 +354,7 @@ class Response /** * Sends content for the current web response. * - * @return Response + * @return $this */ public function sendContent() { @@ -364,7 +366,7 @@ class Response /** * Sends HTTP headers and content. * - * @return Response + * @return $this */ public function send() { @@ -387,7 +389,7 @@ class Response * * @param mixed $content Content that can be cast to string * - * @return Response + * @return $this * * @throws \UnexpectedValueException */ @@ -417,7 +419,7 @@ class Response * * @param string $version The HTTP protocol version * - * @return Response + * @return $this */ public function setProtocolVersion($version) { @@ -445,7 +447,7 @@ class Response * If the status text is null it will be automatically populated for the known * status codes and left empty otherwise. * - * @return Response + * @return $this * * @throws \InvalidArgumentException When the HTTP status code is not valid */ @@ -488,7 +490,7 @@ class Response * * @param string $charset Character set * - * @return Response + * @return $this */ public function setCharset($charset) { @@ -561,7 +563,7 @@ class Response * * It makes the response ineligible for serving other clients. * - * @return Response + * @return $this */ public function setPrivate() { @@ -576,7 +578,7 @@ class Response * * It makes the response eligible for serving other clients. * - * @return Response + * @return $this */ public function setPublic() { @@ -622,7 +624,7 @@ class Response * * @param \DateTime $date A \DateTime instance * - * @return Response + * @return $this */ public function setDate(\DateTime $date) { @@ -649,7 +651,7 @@ class Response /** * Marks the response stale by setting the Age header to be equal to the maximum age of the response. * - * @return Response + * @return $this */ public function expire() { @@ -682,7 +684,7 @@ class Response * * @param \DateTime|null $date A \DateTime instance or null to remove the header * - * @return Response + * @return $this */ public function setExpires(\DateTime $date = null) { @@ -728,7 +730,7 @@ class Response * * @param int $value Number of seconds * - * @return Response + * @return $this */ public function setMaxAge($value) { @@ -744,7 +746,7 @@ class Response * * @param int $value Number of seconds * - * @return Response + * @return $this */ public function setSharedMaxAge($value) { @@ -778,7 +780,7 @@ class Response * * @param int $seconds Number of seconds * - * @return Response + * @return $this */ public function setTtl($seconds) { @@ -794,7 +796,7 @@ class Response * * @param int $seconds Number of seconds * - * @return Response + * @return $this */ public function setClientTtl($seconds) { @@ -822,7 +824,7 @@ class Response * * @param \DateTime|null $date A \DateTime instance or null to remove the header * - * @return Response + * @return $this */ public function setLastModified(\DateTime $date = null) { @@ -853,7 +855,7 @@ class Response * @param string|null $etag The ETag unique identifier or null to remove the header * @param bool $weak Whether you want a weak ETag or not * - * @return Response + * @return $this */ public function setEtag($etag = null, $weak = false) { @@ -877,7 +879,7 @@ class Response * * @param array $options An array of cache options * - * @return Response + * @return $this * * @throws \InvalidArgumentException */ @@ -928,7 +930,7 @@ class Response * This sets the status, removes the body, and discards any headers * that MUST NOT be included in 304 responses. * - * @return Response + * @return $this * * @see http://tools.ietf.org/html/rfc2616#section-10.3.5 */ @@ -980,7 +982,7 @@ class Response * @param string|array $headers * @param bool $replace Whether to replace the actual value or not (true by default) * - * @return Response + * @return $this */ public function setVary($headers, $replace = true) { @@ -1002,7 +1004,7 @@ class Response */ public function isNotModified(Request $request) { - if (!$request->isMethodSafe()) { + if (!$request->isMethodCacheable()) { return false; } @@ -1165,7 +1167,7 @@ class Response /** * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9. * - * @link http://support.microsoft.com/kb/323308 + * @see http://support.microsoft.com/kb/323308 */ protected function ensureIEOverSSLCompatibility(Request $request) { diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php index 06534aa75..3223691eb 100644 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php @@ -181,9 +181,9 @@ class ResponseHeaderBag extends HeaderBag * * @param string $format * - * @throws \InvalidArgumentException When the $format is invalid - * * @return array + * + * @throws \InvalidArgumentException When the $format is invalid */ public function getCookies($format = self::COOKIES_FLAT) { @@ -230,7 +230,7 @@ class ResponseHeaderBag extends HeaderBag * is semantically equivalent to $filename. If the filename is already ASCII, * it can be omitted, or just copied from $filename * - * @return string A string suitable for use as a Content-Disposition field-value. + * @return string A string suitable for use as a Content-Disposition field-value * * @throws \InvalidArgumentException * diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php index 68cecf63d..d797a6f23 100644 --- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php @@ -29,8 +29,8 @@ class NamespacedAttributeBag extends AttributeBag /** * Constructor. * - * @param string $storageKey Session storage key. - * @param string $namespaceCharacter Namespace character to use in keys. + * @param string $storageKey Session storage key + * @param string $namespaceCharacter Namespace character to use in keys */ public function __construct($storageKey = '_sf2_attributes', $namespaceCharacter = '/') { diff --git a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php index b9de5ceb3..ddd603fdd 100644 --- a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php @@ -37,7 +37,7 @@ class AutoExpireFlashBag implements FlashBagInterface /** * Constructor. * - * @param string $storageKey The key used to store flashes in the session. + * @param string $storageKey The key used to store flashes in the session */ public function __construct($storageKey = '_sf2_flashes') { diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php index 0da771509..1516de7fe 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php @@ -39,7 +39,7 @@ class FlashBag implements FlashBagInterface, \IteratorAggregate /** * Constructor. * - * @param string $storageKey The key used to store flashes in the session. + * @param string $storageKey The key used to store flashes in the session */ public function __construct($storageKey = '_sf2_flashes') { diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php index be79d9d75..25f3d57b5 100644 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php +++ b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php @@ -39,8 +39,8 @@ interface FlashBagInterface extends SessionBagInterface /** * Gets flash messages for a given type. * - * @param string $type Message category type. - * @param array $default Default value if $type does not exist. + * @param string $type Message category type + * @param array $default Default value if $type does not exist * * @return array */ @@ -57,7 +57,7 @@ interface FlashBagInterface extends SessionBagInterface * Gets and clears flash from the stack. * * @param string $type - * @param array $default Default value if $type does not exist. + * @param array $default Default value if $type does not exist * * @return array */ @@ -72,6 +72,8 @@ interface FlashBagInterface extends SessionBagInterface /** * Sets all flash messages. + * + * @param array $messages */ public function setAll(array $messages); diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php index b743fe1b1..cdd97375b 100644 --- a/vendor/symfony/http-foundation/Session/Session.php +++ b/vendor/symfony/http-foundation/Session/Session.php @@ -46,7 +46,7 @@ class Session implements SessionInterface, \IteratorAggregate, \Countable /** * Constructor. * - * @param SessionStorageInterface $storage A SessionStorageInterface instance. + * @param SessionStorageInterface $storage A SessionStorageInterface instance * @param AttributeBagInterface $attributes An AttributeBagInterface instance, (defaults null for default AttributeBag) * @param FlashBagInterface $flashes A FlashBagInterface instance (defaults null for default FlashBag) */ diff --git a/vendor/symfony/http-foundation/Session/SessionBagInterface.php b/vendor/symfony/http-foundation/Session/SessionBagInterface.php index 182a47d96..aca18aacb 100644 --- a/vendor/symfony/http-foundation/Session/SessionBagInterface.php +++ b/vendor/symfony/http-foundation/Session/SessionBagInterface.php @@ -42,7 +42,7 @@ interface SessionBagInterface /** * Clears out data from bag. * - * @return mixed Whatever data was contained. + * @return mixed Whatever data was contained */ public function clear(); } diff --git a/vendor/symfony/http-foundation/Session/SessionInterface.php b/vendor/symfony/http-foundation/Session/SessionInterface.php index e2b658413..d3fcd2eec 100644 --- a/vendor/symfony/http-foundation/Session/SessionInterface.php +++ b/vendor/symfony/http-foundation/Session/SessionInterface.php @@ -23,7 +23,7 @@ interface SessionInterface /** * Starts the session storage. * - * @return bool True if session started. + * @return bool True if session started * * @throws \RuntimeException If session fails to start. */ @@ -32,7 +32,7 @@ interface SessionInterface /** * Returns the session ID. * - * @return string The session ID. + * @return string The session ID */ public function getId(); @@ -46,7 +46,7 @@ interface SessionInterface /** * Returns the session name. * - * @return mixed The session name. + * @return mixed The session name */ public function getName(); @@ -68,7 +68,7 @@ interface SessionInterface * to expire with browser session. Time is in seconds, and is * not a Unix timestamp. * - * @return bool True if session invalidated, false if error. + * @return bool True if session invalidated, false if error */ public function invalidate($lifetime = null); @@ -76,13 +76,13 @@ interface SessionInterface * Migrates the current session to a new session id while maintaining all * session attributes. * - * @param bool $destroy Whether to delete the old session or leave it to garbage collection. + * @param bool $destroy Whether to delete the old session or leave it to garbage collection * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value * will leave the system settings unchanged, 0 sets the cookie * to expire with browser session. Time is in seconds, and is * not a Unix timestamp. * - * @return bool True if session migrated, false if error. + * @return bool True if session migrated, false if error */ public function migrate($destroy = false, $lifetime = null); @@ -108,7 +108,7 @@ interface SessionInterface * Returns an attribute. * * @param string $name The attribute name - * @param mixed $default The default value if not found. + * @param mixed $default The default value if not found * * @return mixed */ diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php index f6f99eda4..962a3878d 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -19,7 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; class MemcacheSessionHandler implements \SessionHandlerInterface { /** - * @var \Memcache Memcache driver. + * @var \Memcache Memcache driver */ private $memcache; @@ -29,7 +29,7 @@ class MemcacheSessionHandler implements \SessionHandlerInterface private $ttl; /** - * @var string Key prefix for shared environments. + * @var string Key prefix for shared environments */ private $prefix; @@ -71,7 +71,7 @@ class MemcacheSessionHandler implements \SessionHandlerInterface */ public function close() { - return $this->memcache->close(); + return true; } /** diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php index d87bef852..76b08e2db 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -24,7 +24,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; class MemcachedSessionHandler implements \SessionHandlerInterface { /** - * @var \Memcached Memcached driver. + * @var \Memcached Memcached driver */ private $memcached; @@ -34,7 +34,7 @@ class MemcachedSessionHandler implements \SessionHandlerInterface private $ttl; /** - * @var string Key prefix for shared environments. + * @var string Key prefix for shared environments */ private $prefix; diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php index f1df25d0a..8408f000c 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -19,7 +19,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; class MongoDbSessionHandler implements \SessionHandlerInterface { /** - * @var \Mongo + * @var \Mongo|\MongoClient|\MongoDB\Client */ private $mongo; @@ -61,15 +61,15 @@ class MongoDbSessionHandler implements \SessionHandlerInterface * If you use such an index, you can drop `gc_probability` to 0 since * no garbage-collection is required. * - * @param \Mongo|\MongoClient $mongo A MongoClient or Mongo instance - * @param array $options An associative array of field options + * @param \Mongo|\MongoClient|\MongoDB\Client $mongo A MongoDB\Client, MongoClient or Mongo instance + * @param array $options An associative array of field options * * @throws \InvalidArgumentException When MongoClient or Mongo instance not provided * @throws \InvalidArgumentException When "database" or "collection" not provided */ public function __construct($mongo, array $options) { - if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo)) { + if (!($mongo instanceof \MongoDB\Client || $mongo instanceof \MongoClient || $mongo instanceof \Mongo)) { throw new \InvalidArgumentException('MongoClient or Mongo instance required'); } @@ -108,7 +108,9 @@ class MongoDbSessionHandler implements \SessionHandlerInterface */ public function destroy($sessionId) { - $this->getCollection()->remove(array( + $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteOne' : 'remove'; + + $this->getCollection()->$methodName(array( $this->options['id_field'] => $sessionId, )); @@ -120,8 +122,10 @@ class MongoDbSessionHandler implements \SessionHandlerInterface */ public function gc($maxlifetime) { - $this->getCollection()->remove(array( - $this->options['expiry_field'] => array('$lt' => new \MongoDate()), + $methodName = $this->mongo instanceof \MongoDB\Client ? 'deleteOne' : 'remove'; + + $this->getCollection()->$methodName(array( + $this->options['expiry_field'] => array('$lt' => $this->createDateTime()), )); return true; @@ -132,18 +136,28 @@ class MongoDbSessionHandler implements \SessionHandlerInterface */ public function write($sessionId, $data) { - $expiry = new \MongoDate(time() + (int) ini_get('session.gc_maxlifetime')); + $expiry = $this->createDateTime(time() + (int) ini_get('session.gc_maxlifetime')); $fields = array( - $this->options['data_field'] => new \MongoBinData($data, \MongoBinData::BYTE_ARRAY), - $this->options['time_field'] => new \MongoDate(), + $this->options['time_field'] => $this->createDateTime(), $this->options['expiry_field'] => $expiry, ); - $this->getCollection()->update( + $options = array('upsert' => true); + + if ($this->mongo instanceof \MongoDB\Client) { + $fields[$this->options['data_field']] = new \MongoDB\BSON\Binary($data, \MongoDB\BSON\Binary::TYPE_OLD_BINARY); + } else { + $fields[$this->options['data_field']] = new \MongoBinData($data, \MongoBinData::BYTE_ARRAY); + $options['multiple'] = false; + } + + $methodName = $this->mongo instanceof \MongoDB\Client ? 'updateOne' : 'update'; + + $this->getCollection()->$methodName( array($this->options['id_field'] => $sessionId), array('$set' => $fields), - array('upsert' => true, 'multiple' => false) + $options ); return true; @@ -156,10 +170,18 @@ class MongoDbSessionHandler implements \SessionHandlerInterface { $dbData = $this->getCollection()->findOne(array( $this->options['id_field'] => $sessionId, - $this->options['expiry_field'] => array('$gte' => new \MongoDate()), + $this->options['expiry_field'] => array('$gte' => $this->createDateTime()), )); - return null === $dbData ? '' : $dbData[$this->options['data_field']]->bin; + if (null === $dbData) { + return ''; + } + + if ($dbData[$this->options['data_field']] instanceof \MongoDB\BSON\Binary) { + return $dbData[$this->options['data_field']]->getData(); + } + + return $dbData[$this->options['data_field']]->bin; } /** @@ -179,10 +201,32 @@ class MongoDbSessionHandler implements \SessionHandlerInterface /** * Return a Mongo instance. * - * @return \Mongo + * @return \Mongo|\MongoClient|\MongoDB\Client */ protected function getMongo() { return $this->mongo; } + + /** + * Create a date object using the class appropriate for the current mongo connection. + * + * Return an instance of a MongoDate or \MongoDB\BSON\UTCDateTime + * + * @param int $seconds An integer representing UTC seconds since Jan 1 1970. Defaults to now. + * + * @return \MongoDate|\MongoDB\BSON\UTCDateTime + */ + private function createDateTime($seconds = null) + { + if (null === $seconds) { + $seconds = time(); + } + + if ($this->mongo instanceof \MongoDB\Client) { + return new \MongoDB\BSON\UTCDateTime($seconds * 1000); + } + + return new \MongoDate($seconds); + } } diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php index c00835d79..1be0a3983 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php @@ -23,7 +23,7 @@ class NativeFileSessionHandler extends NativeSessionHandler /** * Constructor. * - * @param string $savePath Path of directory to save session files. + * @param string $savePath Path of directory to save session files * Default null will leave setting as defined by PHP. * '/path', 'N;/path', or 'N;octal-mode;/path * diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php index 48e81ee0f..8909a5f40 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php @@ -325,14 +325,8 @@ class PdoSessionHandler implements \SessionHandlerInterface try { // We use a single MERGE SQL query when supported by the database. - $mergeSql = $this->getMergeSql(); - - if (null !== $mergeSql) { - $mergeStmt = $this->pdo->prepare($mergeSql); - $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $mergeStmt->bindParam(':lifetime', $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); + $mergeStmt = $this->getMergeStatement($sessionId, $data, $maxlifetime); + if (null !== $mergeStmt) { $mergeStmt->execute(); return true; @@ -347,7 +341,7 @@ class PdoSessionHandler implements \SessionHandlerInterface $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); $updateStmt->execute(); - // When MERGE is not supported, like in Postgres, we have to use this approach that can result in + // When MERGE is not supported, like in Postgres < 9.5, we have to use this approach that can result in // duplicate key errors when the same session is written simultaneously (given the LOCK_NONE behavior). // We can just catch such an error and re-execute the update. This is similar to a serializable // transaction with retry logic on serialization failures but without the overhead and without possible @@ -510,54 +504,51 @@ class PdoSessionHandler implements \SessionHandlerInterface $selectSql = $this->getSelectSql(); $selectStmt = $this->pdo->prepare($selectSql); $selectStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $selectStmt->execute(); - $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); + do { + $selectStmt->execute(); + $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); - if ($sessionRows) { - if ($sessionRows[0][1] + $sessionRows[0][2] < time()) { - $this->sessionExpired = true; - - return ''; - } - - return is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; - } - - if (self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { - // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block - // until other connections to the session are committed. - try { - $insertStmt = $this->pdo->prepare( - "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)" - ); - $insertStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $insertStmt->bindValue(':data', '', \PDO::PARAM_LOB); - $insertStmt->bindValue(':lifetime', 0, \PDO::PARAM_INT); - $insertStmt->bindValue(':time', time(), \PDO::PARAM_INT); - $insertStmt->execute(); - } catch (\PDOException $e) { - // Catch duplicate key error because other connection created the session already. - // It would only not be the case when the other connection destroyed the session. - if (0 === strpos($e->getCode(), '23')) { - // Retrieve finished session data written by concurrent connection. SELECT - // FOR UPDATE is necessary to avoid deadlock of connection that starts reading - // before we write (transform intention to real lock). - $selectStmt->execute(); - $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); - - if ($sessionRows) { - return is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; - } + if ($sessionRows) { + if ($sessionRows[0][1] + $sessionRows[0][2] < time()) { + $this->sessionExpired = true; return ''; } - throw $e; + return is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; } - } - return ''; + if (self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { + // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block + // until other connections to the session are committed. + try { + $insertStmt = $this->pdo->prepare( + "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)" + ); + $insertStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $insertStmt->bindValue(':data', '', \PDO::PARAM_LOB); + $insertStmt->bindValue(':lifetime', 0, \PDO::PARAM_INT); + $insertStmt->bindValue(':time', time(), \PDO::PARAM_INT); + $insertStmt->execute(); + } catch (\PDOException $e) { + // Catch duplicate key error because other connection created the session already. + // It would only not be the case when the other connection destroyed the session. + if (0 === strpos($e->getCode(), '23')) { + // Retrieve finished session data written by concurrent connection by restarting the loop. + // We have to start a new transaction as a failed query will mark the current transaction as + // aborted in PostgreSQL and disallow further queries within it. + $this->rollback(); + $this->beginTransaction(); + continue; + } + + throw $e; + } + } + + return ''; + } while (true); } /** @@ -653,29 +644,64 @@ class PdoSessionHandler implements \SessionHandlerInterface } /** - * Returns a merge/upsert (i.e. insert or update) SQL query when supported by the database for writing session data. + * Returns a merge/upsert (i.e. insert or update) statement when supported by the database for writing session data. * - * @return string|null The SQL string or null when not supported + * @param string $sessionId Session ID + * @param string $data Encoded session data + * @param int $maxlifetime session.gc_maxlifetime + * + * @return \PDOStatement|null The merge statement or null when not supported */ - private function getMergeSql() + private function getMergeStatement($sessionId, $data, $maxlifetime) { - switch ($this->driver) { - case 'mysql': - return "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". + $mergeSql = null; + switch (true) { + case 'mysql' === $this->driver: + $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". "ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - case 'oci': + break; + case 'oci' === $this->driver: // DUAL is Oracle specific dummy table - return "MERGE INTO $this->table USING DUAL ON ($this->idCol = :id) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time"; + $mergeSql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; + break; case 'sqlsrv' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='): // MERGE is only available since SQL Server 2008 and must be terminated by semicolon // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx - return "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = :id) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time;"; - case 'sqlite': - return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; + $mergeSql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". + "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". + "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; + break; + case 'sqlite' === $this->driver: + $mergeSql = "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; + break; + case 'pgsql' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '9.5', '>='): + $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". + "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; + break; + } + + if (null !== $mergeSql) { + $mergeStmt = $this->pdo->prepare($mergeSql); + + if ('sqlsrv' === $this->driver || 'oci' === $this->driver) { + $mergeStmt->bindParam(1, $sessionId, \PDO::PARAM_STR); + $mergeStmt->bindParam(2, $sessionId, \PDO::PARAM_STR); + $mergeStmt->bindParam(3, $data, \PDO::PARAM_LOB); + $mergeStmt->bindParam(4, $maxlifetime, \PDO::PARAM_INT); + $mergeStmt->bindValue(5, time(), \PDO::PARAM_INT); + $mergeStmt->bindParam(6, $data, \PDO::PARAM_LOB); + $mergeStmt->bindParam(7, $maxlifetime, \PDO::PARAM_INT); + $mergeStmt->bindValue(8, time(), \PDO::PARAM_INT); + } else { + $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); + $mergeStmt->bindParam(':data', $data, \PDO::PARAM_LOB); + $mergeStmt->bindParam(':lifetime', $maxlifetime, \PDO::PARAM_INT); + $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); + } + + return $mergeStmt; } } diff --git a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php index ec7b26799..322dd560f 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php +++ b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php @@ -56,7 +56,7 @@ class MetadataBag implements SessionBagInterface /** * Constructor. * - * @param string $storageKey The key used to store bag in the session. + * @param string $storageKey The key used to store bag in the session * @param int $updateThreshold The time to wait between two UPDATED updates */ public function __construct($storageKey = '_sf2_meta', $updateThreshold = 0) diff --git a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php index bc1373755..c26cc1334 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php @@ -66,7 +66,7 @@ class MockArraySessionStorage implements SessionStorageInterface * Constructor. * * @param string $name Session name - * @param MetadataBag $metaBag MetadataBag instance. + * @param MetadataBag $metaBag MetadataBag instance */ public function __construct($name = 'MOCKSESSID', MetadataBag $metaBag = null) { diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php index 00807cfcb..71f9e5551 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php @@ -32,9 +32,9 @@ class MockFileSessionStorage extends MockArraySessionStorage /** * Constructor. * - * @param string $savePath Path of directory to save session files. - * @param string $name Session name. - * @param MetadataBag $metaBag MetadataBag instance. + * @param string $savePath Path of directory to save session files + * @param string $name Session name + * @param MetadataBag $metaBag MetadataBag instance */ public function __construct($savePath = null, $name = 'MOCKSESSID', MetadataBag $metaBag = null) { diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index bfd182d46..274b0df6b 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -92,9 +92,9 @@ class NativeSessionStorage implements SessionStorageInterface * upload_progress.min-freq, "1" * url_rewriter.tags, "a=href,area=href,frame=src,form=,fieldset=" * - * @param array $options Session configuration options. + * @param array $options Session configuration options * @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler - * @param MetadataBag $metaBag MetadataBag. + * @param MetadataBag $metaBag MetadataBag */ public function __construct(array $options = array(), $handler = null, MetadataBag $metaBag = null) { @@ -319,7 +319,7 @@ class NativeSessionStorage implements SessionStorageInterface * For convenience we omit 'session.' from the beginning of the keys. * Explicitly ignores other ini keys. * - * @param array $options Session ini directives array(key => value). + * @param array $options Session ini directives array(key => value) * * @see http://php.net/session.configuration */ diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php index 5bb2c712e..0db34aa28 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php @@ -32,7 +32,7 @@ class NativeProxy extends AbstractProxy /** * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. * - * @return bool False. + * @return bool False */ public function isWrapper() { diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php index 4b2f5d27a..34f6c4633 100644 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php +++ b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php @@ -24,23 +24,23 @@ interface SessionStorageInterface /** * Starts the session. * - * @throws \RuntimeException If something goes wrong starting the session. + * @return bool True if started * - * @return bool True if started. + * @throws \RuntimeException If something goes wrong starting the session. */ public function start(); /** * Checks if the session is started. * - * @return bool True if started, false otherwise. + * @return bool True if started, false otherwise */ public function isStarted(); /** * Returns the session ID. * - * @return string The session ID or empty. + * @return string The session ID or empty */ public function getId(); @@ -54,7 +54,7 @@ interface SessionStorageInterface /** * Returns the session name. * - * @return mixed The session name. + * @return mixed The session name */ public function getName(); diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php index 4b936a150..8be624436 100644 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ b/vendor/symfony/http-foundation/StreamedResponse.php @@ -28,6 +28,7 @@ class StreamedResponse extends Response { protected $callback; protected $streamed; + private $headersSent; /** * Constructor. @@ -44,6 +45,7 @@ class StreamedResponse extends Response $this->setCallback($callback); } $this->streamed = false; + $this->headersSent = false; } /** @@ -53,7 +55,7 @@ class StreamedResponse extends Response * @param int $status The response status code * @param array $headers An array of response headers * - * @return StreamedResponse + * @return static */ public static function create($callback = null, $status = 200, $headers = array()) { @@ -75,6 +77,22 @@ class StreamedResponse extends Response $this->callback = $callback; } + /** + * {@inheritdoc} + * + * This method only sends the headers once. + */ + public function sendHeaders() + { + if ($this->headersSent) { + return; + } + + $this->headersSent = true; + + parent::sendHeaders(); + } + /** * {@inheritdoc} * diff --git a/vendor/symfony/http-kernel/CacheClearer/CacheClearerInterface.php b/vendor/symfony/http-kernel/CacheClearer/CacheClearerInterface.php index d4a2db376..675c58423 100644 --- a/vendor/symfony/http-kernel/CacheClearer/CacheClearerInterface.php +++ b/vendor/symfony/http-kernel/CacheClearer/CacheClearerInterface.php @@ -21,7 +21,7 @@ interface CacheClearerInterface /** * Clears any caches necessary. * - * @param string $cacheDir The cache directory. + * @param string $cacheDir The cache directory */ public function clear($cacheDir); } diff --git a/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php b/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php index 81c43b602..c749c7c0a 100644 --- a/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php +++ b/vendor/symfony/http-kernel/CacheClearer/ChainCacheClearer.php @@ -26,7 +26,7 @@ class ChainCacheClearer implements CacheClearerInterface /** * Constructs a new instance of ChainCacheClearer. * - * @param array $clearers The initial clearers. + * @param array $clearers The initial clearers */ public function __construct(array $clearers = array()) { diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php index 948b3ffd1..dba35a639 100644 --- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php +++ b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmer.php @@ -20,7 +20,7 @@ abstract class CacheWarmer implements CacheWarmerInterface { protected function writeCacheFile($file, $content) { - $tmpFile = tempnam(dirname($file), basename($file)); + $tmpFile = @tempnam(dirname($file), basename($file)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { @chmod($file, 0666 & ~umask()); diff --git a/vendor/symfony/http-kernel/Client.php b/vendor/symfony/http-kernel/Client.php index 80b1bd6cd..b1814ad1f 100644 --- a/vendor/symfony/http-kernel/Client.php +++ b/vendor/symfony/http-kernel/Client.php @@ -25,6 +25,9 @@ use Symfony\Component\HttpFoundation\Response; * Client simulates a browser and makes requests to a Kernel object. * * @author Fabien Potencier + * + * @method Request|null getRequest() A Request instance + * @method Response|null getResponse() A Response instance */ class Client extends BaseClient { @@ -47,26 +50,6 @@ class Client extends BaseClient parent::__construct($server, $history, $cookieJar); } - /** - * {@inheritdoc} - * - * @return Request|null A Request instance - */ - public function getRequest() - { - return parent::getRequest(); - } - - /** - * {@inheritdoc} - * - * @return Response|null A Response instance - */ - public function getResponse() - { - return parent::getResponse(); - } - /** * Makes a request. * diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php index 1d7c49607..a1cff5353 100644 --- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php +++ b/vendor/symfony/http-kernel/Controller/ControllerResolver.php @@ -27,6 +27,22 @@ class ControllerResolver implements ControllerResolverInterface { private $logger; + /** + * If the ...$arg functionality is available. + * + * Requires at least PHP 5.6.0 or HHVM 3.9.1 + * + * @var bool + */ + private $supportsVariadic; + + /** + * If scalar types exists. + * + * @var bool + */ + private $supportsScalarTypes; + /** * Constructor. * @@ -35,6 +51,9 @@ class ControllerResolver implements ControllerResolverInterface public function __construct(LoggerInterface $logger = null) { $this->logger = $logger; + + $this->supportsVariadic = method_exists('ReflectionParameter', 'isVariadic'); + $this->supportsScalarTypes = method_exists('ReflectionParameter', 'getType'); } /** @@ -99,13 +118,20 @@ class ControllerResolver implements ControllerResolverInterface return $this->doGetArguments($request, $controller, $r->getParameters()); } + /** + * @param Request $request + * @param callable $controller + * @param \ReflectionParameter[] $parameters + * + * @return array The arguments to use when calling the action + */ protected function doGetArguments(Request $request, $controller, array $parameters) { $attributes = $request->attributes->all(); $arguments = array(); foreach ($parameters as $param) { if (array_key_exists($param->name, $attributes)) { - if (PHP_VERSION_ID >= 50600 && $param->isVariadic() && is_array($attributes[$param->name])) { + if ($this->supportsVariadic && $param->isVariadic() && is_array($attributes[$param->name])) { $arguments = array_merge($arguments, array_values($attributes[$param->name])); } else { $arguments[] = $attributes[$param->name]; @@ -114,6 +140,8 @@ class ControllerResolver implements ControllerResolverInterface $arguments[] = $request; } elseif ($param->isDefaultValueAvailable()) { $arguments[] = $param->getDefaultValue(); + } elseif ($this->supportsScalarTypes && $param->hasType() && $param->allowsNull()) { + $arguments[] = null; } else { if (is_array($controller)) { $repr = sprintf('%s::%s()', get_class($controller[0]), $controller[1]); diff --git a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php index c50bf7a13..6df03fa31 100644 --- a/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/DumpDataCollector.php @@ -97,21 +97,24 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface break; } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof \Twig_Template) { - $info = $trace[$i]['object']; - $name = $info->getTemplateName(); - $src = method_exists($info, 'getSource') ? $info->getSource() : $info->getEnvironment()->getLoader()->getSource($name); - $info = $info->getDebugInfo(); - if (null !== $src && isset($info[$trace[$i - 1]['line']])) { - $file = false; + $template = $trace[$i]['object']; + $name = $template->getTemplateName(); + $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); + $info = $template->getDebugInfo(); + if (isset($info[$trace[$i - 1]['line']])) { $line = $info[$trace[$i - 1]['line']]; - $src = explode("\n", $src); - $fileExcerpt = array(); + $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; - for ($i = max($line - 3, 1), $max = min($line + 3, count($src)); $i <= $max; ++$i) { - $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).'
  • '; + if ($src) { + $src = explode("\n", $src); + $fileExcerpt = array(); + + for ($i = max($line - 3, 1), $max = min($line + 3, count($src)); $i <= $max; ++$i) { + $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; + } + + $fileExcerpt = '
      '.implode("\n", $fileExcerpt).'
    '; } - - $fileExcerpt = '
      '.implode("\n", $fileExcerpt).'
    '; } break; } @@ -170,6 +173,8 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface return 'a:0:{}'; } + $this->data[] = $this->fileLinkFormat; + $this->data[] = $this->charset; $ser = serialize($this->data); $this->data = array(); $this->dataCount = 0; @@ -184,8 +189,10 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface public function unserialize($data) { parent::unserialize($data); + $charset = array_pop($this->data); + $fileLinkFormat = array_pop($this->data); $this->dataCount = count($this->data); - self::__construct($this->stopwatch); + self::__construct($this->stopwatch, $fileLinkFormat, $charset); } public function getDumpsCount() @@ -211,8 +218,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface // getLimitedClone is @deprecated, to be removed in 3.0 $dumper->dump($dump['data']->getLimitedClone($maxDepthLimit, $maxItemsPerDepth)); } - rewind($data); - $dump['data'] = stream_get_contents($data); + $dump['data'] = stream_get_contents($data, -1, 0); ftruncate($data, 0); rewind($data); $dumps[] = $dump; @@ -260,7 +266,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface if (PHP_VERSION_ID >= 50400 && $this->dumper instanceof CliDumper) { $contextDumper = function ($name, $file, $line, $fileLinkFormat) { if ($this instanceof HtmlDumper) { - if ('' !== $file) { + if ($file) { $s = $this->style('meta', '%s'); $name = strip_tags($this->style('', $name)); $file = strip_tags($this->style('', $file)); @@ -292,7 +298,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface { $html = ''; - $dumper = new HtmlDumper(function ($line) use (&$html) {$html .= $line;}, $this->charset); + $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); $dumper->setDumpHeader(''); $dumper->setDumpBoundaries('', ''); diff --git a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php index 11a4cc812..0e4df12ba 100644 --- a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php @@ -68,18 +68,6 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte } } - /** - * Gets the called events. - * - * @return array An array of called events - * - * @see TraceableEventDispatcherInterface - */ - public function countErrors() - { - return isset($this->data['error_count']) ? $this->data['error_count'] : 0; - } - /** * Gets the logs. * @@ -95,6 +83,11 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return isset($this->data['priorities']) ? $this->data['priorities'] : array(); } + public function countErrors() + { + return isset($this->data['error_count']) ? $this->data['error_count'] : 0; + } + public function countDeprecations() { return isset($this->data['deprecation_count']) ? $this->data['deprecation_count'] : 0; @@ -175,6 +168,10 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte } if (is_object($context)) { + if ($context instanceof \Exception) { + return sprintf('Exception(%s): %s', get_class($context), $context->getMessage()); + } + return sprintf('Object(%s)', get_class($context)); } diff --git a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php index 9a499a737..7929cfc61 100644 --- a/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php +++ b/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php @@ -12,10 +12,8 @@ namespace Symfony\Component\HttpKernel\DataCollector; use Symfony\Component\HttpFoundation\ParameterBag; -use Symfony\Component\HttpFoundation\HeaderBag; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\ResponseHeaderBag; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -40,12 +38,8 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public function collect(Request $request, Response $response, \Exception $exception = null) { $responseHeaders = $response->headers->all(); - $cookies = array(); foreach ($response->headers->getCookies() as $cookie) { - $cookies[] = $this->getCookieHeader($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); - } - if (count($cookies) > 0) { - $responseHeaders['Set-Cookie'] = $cookies; + $responseHeaders['set-cookie'][] = (string) $cookie; } // attributes are serialized and as they can be anything, they need to be converted to strings. @@ -121,6 +115,18 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $this->data['request_request']['_password'] = '******'; } + foreach ($this->data as $key => $value) { + if (!is_array($value)) { + continue; + } + if ('request_headers' === $key || 'response_headers' === $key) { + $value = array_map(function ($v) { return isset($v[0]) && !isset($v[1]) ? $v[0] : $v; }, $value); + } + if ('request_server' !== $key && 'request_cookies' !== $key) { + $this->data[$key] = $value; + } + } + if (isset($this->controllers[$request])) { $controller = $this->controllers[$request]; if (is_array($controller)) { @@ -183,7 +189,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public function getRequestHeaders() { - return new HeaderBag($this->data['request_headers']); + return new ParameterBag($this->data['request_headers']); } public function getRequestServer() @@ -203,7 +209,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter public function getResponseHeaders() { - return new ResponseHeaderBag($this->data['response_headers']); + return new ParameterBag($this->data['response_headers']); } public function getSessionMetadata() @@ -302,41 +308,4 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter { return 'request'; } - - private function getCookieHeader($name, $value, $expires, $path, $domain, $secure, $httponly) - { - $cookie = sprintf('%s=%s', $name, urlencode($value)); - - if (0 !== $expires) { - if (is_numeric($expires)) { - $expires = (int) $expires; - } elseif ($expires instanceof \DateTime) { - $expires = $expires->getTimestamp(); - } else { - $tmp = strtotime($expires); - if (false === $tmp || -1 == $tmp) { - throw new \InvalidArgumentException(sprintf('The "expires" cookie parameter is not valid (%s).', $expires)); - } - $expires = $tmp; - } - - $cookie .= '; expires='.str_replace('+0000', '', \DateTime::createFromFormat('U', $expires, new \DateTimeZone('GMT'))->format('D, d-M-Y H:i:s T')); - } - - if ($domain) { - $cookie .= '; domain='.$domain; - } - - $cookie .= '; path='.$path; - - if ($secure) { - $cookie .= '; secure'; - } - - if ($httponly) { - $cookie .= '; httponly'; - } - - return $cookie; - } } diff --git a/vendor/symfony/http-kernel/DataCollector/Util/ValueExporter.php b/vendor/symfony/http-kernel/DataCollector/Util/ValueExporter.php index c9e51cc26..71b090cf0 100644 --- a/vendor/symfony/http-kernel/DataCollector/Util/ValueExporter.php +++ b/vendor/symfony/http-kernel/DataCollector/Util/ValueExporter.php @@ -27,18 +27,18 @@ class ValueExporter */ public function exportValue($value, $depth = 1, $deep = false) { + if ($value instanceof \__PHP_Incomplete_Class) { + return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($value)); + } + if (is_object($value)) { if ($value instanceof \DateTime || $value instanceof \DateTimeInterface) { - return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ISO8601)); + return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ATOM)); } return sprintf('Object(%s)', get_class($value)); } - if ($value instanceof \__PHP_Incomplete_Class) { - return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($value)); - } - if (is_array($value)) { if (empty($value)) { return '[]'; diff --git a/vendor/symfony/http-kernel/DependencyInjection/ContainerAwareHttpKernel.php b/vendor/symfony/http-kernel/DependencyInjection/ContainerAwareHttpKernel.php index 97aa74096..4b3e218b8 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/ContainerAwareHttpKernel.php +++ b/vendor/symfony/http-kernel/DependencyInjection/ContainerAwareHttpKernel.php @@ -71,6 +71,11 @@ class ContainerAwareHttpKernel extends HttpKernel $this->container->set('request', null, 'request'); $this->container->leaveScope('request'); + throw $e; + } catch (\Throwable $e) { + $this->container->set('request', null, 'request'); + $this->container->leaveScope('request'); + throw $e; } diff --git a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php b/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php index 3187e943c..0c4cecef6 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php @@ -54,7 +54,12 @@ class FragmentRendererPass implements CompilerPassInterface $class = $container->getParameterBag()->resolveValue($def->getClass()); $interface = 'Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface'; + if (!is_subclass_of($class, $interface)) { + if (!class_exists($class, false)) { + throw new \InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); } diff --git a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php b/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php index 50dde02d8..1d1e979d2 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php +++ b/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php @@ -54,6 +54,7 @@ class LazyLoadingFragmentHandler extends FragmentHandler /** * Adds a service as a fragment renderer. * + * @param string $name The service name * @param string $renderer The render service id */ public function addRendererService($name, $renderer) diff --git a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php b/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php index 14a5d4351..280844c18 100644 --- a/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php +++ b/vendor/symfony/http-kernel/EventListener/AddRequestFormatsListener.php @@ -52,6 +52,6 @@ class AddRequestFormatsListener implements EventSubscriberInterface */ public static function getSubscribedEvents() { - return array(KernelEvents::REQUEST => 'onKernelRequest'); + return array(KernelEvents::REQUEST => array('onKernelRequest', 1)); } } diff --git a/vendor/symfony/http-kernel/EventListener/DumpListener.php b/vendor/symfony/http-kernel/EventListener/DumpListener.php index bccde8eb9..06b8a030c 100644 --- a/vendor/symfony/http-kernel/EventListener/DumpListener.php +++ b/vendor/symfony/http-kernel/EventListener/DumpListener.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\VarDumper\Cloner\ClonerInterface; use Symfony\Component\VarDumper\Dumper\DataDumperInterface; use Symfony\Component\VarDumper\VarDumper; @@ -28,8 +28,8 @@ class DumpListener implements EventSubscriberInterface private $dumper; /** - * @param ClonerInterface $cloner Cloner service. - * @param DataDumperInterface $dumper Dumper service. + * @param ClonerInterface $cloner Cloner service + * @param DataDumperInterface $dumper Dumper service */ public function __construct(ClonerInterface $cloner, DataDumperInterface $dumper) { @@ -50,6 +50,6 @@ class DumpListener implements EventSubscriberInterface public static function getSubscribedEvents() { // Register early to have a working dump() as early as possible - return array(KernelEvents::REQUEST => array('configure', 1024)); + return array(ConsoleEvents::COMMAND => array('configure', 1024)); } } diff --git a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php index fc2efed86..1c50ef4ac 100644 --- a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php +++ b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php @@ -49,7 +49,7 @@ class ExceptionListener implements EventSubscriberInterface try { $response = $event->getKernel()->handle($request, HttpKernelInterface::SUB_REQUEST, false); } catch (\Exception $e) { - $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()), false); + $this->logException($e, sprintf('Exception thrown when handling an exception (%s: %s at %s line %s)', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine())); $wrapper = $e; @@ -96,10 +96,10 @@ class ExceptionListener implements EventSubscriberInterface /** * Clones the request for the exception. * - * @param \Exception $exception The thrown exception. - * @param Request $request The original request. + * @param \Exception $exception The thrown exception + * @param Request $request The original request * - * @return Request $request The cloned request. + * @return Request $request The cloned request */ protected function duplicateRequest(\Exception $exception, Request $request) { diff --git a/vendor/symfony/http-kernel/EventListener/FragmentListener.php b/vendor/symfony/http-kernel/EventListener/FragmentListener.php index 2ab6c8589..ad6349286 100644 --- a/vendor/symfony/http-kernel/EventListener/FragmentListener.php +++ b/vendor/symfony/http-kernel/EventListener/FragmentListener.php @@ -81,7 +81,7 @@ class FragmentListener implements EventSubscriberInterface protected function validateRequest(Request $request) { // is the Request safe? - if (!$request->isMethodSafe()) { + if (!$request->isMethodSafe(false)) { throw new AccessDeniedHttpException(); } diff --git a/vendor/symfony/http-kernel/EventListener/SessionListener.php b/vendor/symfony/http-kernel/EventListener/SessionListener.php index ecf065f0e..2d6adfa01 100644 --- a/vendor/symfony/http-kernel/EventListener/SessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/SessionListener.php @@ -11,6 +11,7 @@ namespace Symfony\Component\HttpKernel\EventListener; +use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php b/vendor/symfony/http-kernel/EventListener/TestSessionListener.php index 8fc8e5757..19a61f169 100644 --- a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/TestSessionListener.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpKernel\EventListener; use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent; diff --git a/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php b/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php new file mode 100644 index 000000000..00096ccf9 --- /dev/null +++ b/vendor/symfony/http-kernel/EventListener/ValidateRequestListener.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Validates that the headers and other information indicating the + * client IP address of a request are consistent. + * + * @author Magnus Nordlander + */ +class ValidateRequestListener implements EventSubscriberInterface +{ + /** + * Performs the validation. + * + * @param GetResponseEvent $event + */ + public function onKernelRequest(GetResponseEvent $event) + { + if (!$event->isMasterRequest()) { + return; + } + $request = $event->getRequest(); + + if ($request::getTrustedProxies()) { + // This will throw an exception if the headers are inconsistent. + $request->getClientIps(); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array( + KernelEvents::REQUEST => array( + array('onKernelRequest', 256), + ), + ); + } +} diff --git a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php index 56c96b3ce..27051cfb7 100644 --- a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php @@ -140,12 +140,16 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer } $loader = $this->templating->getLoader(); - if ($loader instanceof \Twig_ExistsLoaderInterface) { + if ($loader instanceof \Twig_ExistsLoaderInterface || method_exists($loader, 'exists')) { return $loader->exists($template); } try { - $loader->getSource($template); + if (method_exists($loader, 'getSourceContext')) { + $loader->getSourceContext($template); + } else { + $loader->getSource($template); + } return true; } catch (\Twig_Error_Loader $e) { diff --git a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php index a6ab82ea2..a61b239c1 100644 --- a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php @@ -129,6 +129,8 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer } $server['REMOTE_ADDR'] = '127.0.0.1'; + unset($server['HTTP_IF_MODIFIED_SINCE']); + unset($server['HTTP_IF_NONE_MATCH']); $subRequest = Request::create($uri, 'get', array(), $cookies, array(), $server); if ($request->headers->has('Surrogate-Capability')) { diff --git a/vendor/symfony/http-kernel/HttpCache/Esi.php b/vendor/symfony/http-kernel/HttpCache/Esi.php index bc344c633..457793953 100644 --- a/vendor/symfony/http-kernel/HttpCache/Esi.php +++ b/vendor/symfony/http-kernel/HttpCache/Esi.php @@ -37,7 +37,7 @@ class Esi implements SurrogateInterface /** * Constructor. * - * @param array $contentTypes An array of content-type that should be parsed for ESI information. + * @param array $contentTypes An array of content-type that should be parsed for ESI information * (default: text/html, text/xml, application/xhtml+xml, and application/xml) */ public function __construct(array $contentTypes = array('text/html', 'text/xml', 'application/xhtml+xml', 'application/xml')) diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php index 6075d235b..941d4c6fa 100644 --- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/HttpCache/HttpCache.php @@ -153,9 +153,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface /** * Gets the Surrogate instance. * - * @throws \LogicException - * * @return SurrogateInterface A Surrogate instance + * + * @throws \LogicException */ public function getSurrogate() { @@ -169,10 +169,10 @@ class HttpCache implements HttpKernelInterface, TerminableInterface /** * Gets the Esi instance. * - * @throws \LogicException - * * @return Esi An Esi instance * + * @throws \LogicException + * * @deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead */ public function getEsi() @@ -202,9 +202,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface } $this->traces[$request->getMethod().' '.$path] = array(); - if (!$request->isMethodSafe()) { + if (!$request->isMethodSafe(false)) { $response = $this->invalidate($request, $catch); - } elseif ($request->headers->has('expect')) { + } elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) { $response = $this->pass($request, $catch); } else { $response = $this->lookup($request, $catch); @@ -374,7 +374,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $subRequest = clone $request; // send no head requests because we want content - $subRequest->setMethod('GET'); + if ('HEAD' === $request->getMethod()) { + $subRequest->setMethod('GET'); + } // add our cached last-modified validator $subRequest->headers->set('if_modified_since', $entry->headers->get('Last-Modified')); @@ -435,7 +437,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $subRequest = clone $request; // send no head requests because we want content - $subRequest->setMethod('GET'); + if ('HEAD' === $request->getMethod()) { + $subRequest->setMethod('GET'); + } // avoid that the backend sends no content $subRequest->headers->remove('if_modified_since'); @@ -600,6 +604,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface */ protected function store(Request $request, Response $response) { + if (!$response->headers->has('Date')) { + $response->setDate(\DateTime::createFromFormat('U', time())); + } try { $this->store->write($request, $response); diff --git a/vendor/symfony/http-kernel/HttpCache/Ssi.php b/vendor/symfony/http-kernel/HttpCache/Ssi.php index 43311b6dc..5f7ee10a5 100644 --- a/vendor/symfony/http-kernel/HttpCache/Ssi.php +++ b/vendor/symfony/http-kernel/HttpCache/Ssi.php @@ -31,7 +31,7 @@ class Ssi implements SurrogateInterface /** * Constructor. * - * @param array $contentTypes An array of content-type that should be parsed for SSI information. + * @param array $contentTypes An array of content-type that should be parsed for SSI information * (default: text/html, text/xml, application/xhtml+xml, and application/xml) */ public function __construct(array $contentTypes = array('text/html', 'text/xml', 'application/xhtml+xml', 'application/xml')) diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php index 433b0ef29..f5574614b 100644 --- a/vendor/symfony/http-kernel/HttpCache/Store.php +++ b/vendor/symfony/http-kernel/HttpCache/Store.php @@ -38,7 +38,7 @@ class Store implements StoreInterface public function __construct($root) { $this->root = $root; - if (!is_dir($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { + if (!file_exists($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); } $this->keyCache = new \SplObjectStorage(); @@ -52,22 +52,15 @@ class Store implements StoreInterface { // unlock everything foreach ($this->locks as $lock) { - if (file_exists($lock)) { - @unlink($lock); - } + flock($lock, LOCK_UN); + fclose($lock); } - $error = error_get_last(); - if (1 === $error['type'] && false === headers_sent()) { - // send a 503 - header('HTTP/1.0 503 Service Unavailable'); - header('Retry-After: 10'); - echo '503 Service Unavailable'; - } + $this->locks = array(); } /** - * Locks the cache for a given Request. + * Tries to lock the cache for a given Request, without blocking. * * @param Request $request A Request instance * @@ -75,21 +68,24 @@ class Store implements StoreInterface */ public function lock(Request $request) { - $path = $this->getPath($this->getCacheKey($request).'.lck'); - if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { - return false; + $key = $this->getCacheKey($request); + + if (!isset($this->locks[$key])) { + $path = $this->getPath($key); + if (!file_exists(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { + return $path; + } + $h = fopen($path, 'cb'); + if (!flock($h, LOCK_EX | LOCK_NB)) { + fclose($h); + + return $path; + } + + $this->locks[$key] = $h; } - $lock = @fopen($path, 'x'); - if (false !== $lock) { - fclose($lock); - - $this->locks[] = $path; - - return true; - } - - return !file_exists($path) ?: $path; + return true; } /** @@ -101,17 +97,37 @@ class Store implements StoreInterface */ public function unlock(Request $request) { - $file = $this->getPath($this->getCacheKey($request).'.lck'); + $key = $this->getCacheKey($request); - return is_file($file) ? @unlink($file) : false; + if (isset($this->locks[$key])) { + flock($this->locks[$key], LOCK_UN); + fclose($this->locks[$key]); + unset($this->locks[$key]); + + return true; + } + + return false; } public function isLocked(Request $request) { - $path = $this->getPath($this->getCacheKey($request).'.lck'); - clearstatcache(true, $path); + $key = $this->getCacheKey($request); - return is_file($path); + if (isset($this->locks[$key])) { + return true; // shortcut if lock held by this process + } + + if (!file_exists($path = $this->getPath($key))) { + return false; + } + + $h = fopen($path, 'rb'); + flock($h, LOCK_EX | LOCK_NB, $wouldBlock); + flock($h, LOCK_UN); // release the lock we just acquired + fclose($h); + + return (bool) $wouldBlock; } /** @@ -144,7 +160,7 @@ class Store implements StoreInterface } list($req, $headers) = $match; - if (is_file($body = $this->getPath($headers['x-content-digest'][0]))) { + if (file_exists($body = $this->getPath($headers['x-content-digest'][0]))) { return $this->restoreResponse($headers, $body); } @@ -291,13 +307,30 @@ class Store implements StoreInterface */ private function getMetadata($key) { - if (false === $entries = $this->load($key)) { + if (!$entries = $this->load($key)) { return array(); } return unserialize($entries); } + /** + * Purges data for the given URL. + * + * This method purges both the HTTP and the HTTPS version of the cache entry. + * + * @param string $url A URL + * + * @return bool true if the URL exists with either HTTP or HTTPS scheme and has been purged, false otherwise + */ + public function purge($url) + { + $http = preg_replace('#^https#', 'http', $url); + $https = preg_replace('#^http#', 'https', $url); + + return $this->doPurge($http) || $this->doPurge($https); + } + /** * Purges data for the given URL. * @@ -305,9 +338,16 @@ class Store implements StoreInterface * * @return bool true if the URL exists and has been purged, false otherwise */ - public function purge($url) + private function doPurge($url) { - if (is_file($path = $this->getPath($this->getCacheKey(Request::create($url))))) { + $key = $this->getCacheKey(Request::create($url)); + if (isset($this->locks[$key])) { + flock($this->locks[$key], LOCK_UN); + fclose($this->locks[$key]); + unset($this->locks[$key]); + } + + if (file_exists($path = $this->getPath($key))) { unlink($path); return true; @@ -327,7 +367,7 @@ class Store implements StoreInterface { $path = $this->getPath($key); - return is_file($path) ? file_get_contents($path) : false; + return file_exists($path) ? file_get_contents($path) : false; } /** @@ -341,23 +381,36 @@ class Store implements StoreInterface private function save($key, $data) { $path = $this->getPath($key); - if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { - return false; - } - $tmpFile = tempnam(dirname($path), basename($path)); - if (false === $fp = @fopen($tmpFile, 'wb')) { - return false; - } - @fwrite($fp, $data); - @fclose($fp); + if (isset($this->locks[$key])) { + $fp = $this->locks[$key]; + @ftruncate($fp, 0); + @fseek($fp, 0); + $len = @fwrite($fp, $data); + if (strlen($data) !== $len) { + @ftruncate($fp, 0); - if ($data != file_get_contents($tmpFile)) { - return false; - } + return false; + } + } else { + if (!file_exists(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { + return false; + } - if (false === @rename($tmpFile, $path)) { - return false; + $tmpFile = tempnam(dirname($path), basename($path)); + if (false === $fp = @fopen($tmpFile, 'wb')) { + return false; + } + @fwrite($fp, $data); + @fclose($fp); + + if ($data != file_get_contents($tmpFile)) { + return false; + } + + if (false === @rename($tmpFile, $path)) { + return false; + } } @chmod($path, 0666 & ~umask()); diff --git a/vendor/symfony/http-kernel/HttpKernel.php b/vendor/symfony/http-kernel/HttpKernel.php index 1600b2ce5..4e628a140 100644 --- a/vendor/symfony/http-kernel/HttpKernel.php +++ b/vendor/symfony/http-kernel/HttpKernel.php @@ -12,6 +12,7 @@ namespace Symfony\Component\HttpKernel; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; +use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Event\FilterControllerEvent; @@ -21,6 +22,7 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\Event\PostResponseEvent; +use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; @@ -61,6 +63,9 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface try { return $this->handleRaw($request, $type); } catch (\Exception $e) { + if ($e instanceof ConflictingHeadersException) { + $e = new BadRequestHttpException('The request headers contain conflicting information regarding the origin of this request.', $e); + } if (false === $catch) { $this->finishRequest($request, $type); diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index 40e32e50b..b9c351a36 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.8.4-DEV'; - const VERSION_ID = 20804; + const VERSION = '2.8.18'; + const VERSION_ID = 20818; const MAJOR_VERSION = 2; const MINOR_VERSION = 8; - const RELEASE_VERSION = 4; - const EXTRA_VERSION = 'DEV'; + const RELEASE_VERSION = 18; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2018'; const END_OF_LIFE = '11/2019'; @@ -466,8 +466,8 @@ abstract class Kernel implements KernelInterface, TerminableInterface $hierarchy[] = $name; } - foreach ($hierarchy as $bundle) { - $this->bundleMap[$bundle] = $bundleMap; + foreach ($hierarchy as $hierarchyBundle) { + $this->bundleMap[$hierarchyBundle] = $bundleMap; array_pop($bundleMap); } } @@ -532,8 +532,15 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected function getKernelParameters() { $bundles = array(); + $bundlesMetadata = array(); + foreach ($this->bundles as $name => $bundle) { $bundles[$name] = get_class($bundle); + $bundlesMetadata[$name] = array( + 'parent' => $bundle->getParent(), + 'path' => $bundle->getPath(), + 'namespace' => $bundle->getNamespace(), + ); } return array_merge( @@ -545,6 +552,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface 'kernel.cache_dir' => realpath($this->getCacheDir()) ?: $this->getCacheDir(), 'kernel.logs_dir' => realpath($this->getLogDir()) ?: $this->getLogDir(), 'kernel.bundles' => $bundles, + 'kernel.bundles_metadata' => $bundlesMetadata, 'kernel.charset' => $this->getCharset(), 'kernel.container_class' => $this->getContainerClass(), ), diff --git a/vendor/symfony/http-kernel/KernelEvents.php b/vendor/symfony/http-kernel/KernelEvents.php index 8768979da..abbbfcc00 100644 --- a/vendor/symfony/http-kernel/KernelEvents.php +++ b/vendor/symfony/http-kernel/KernelEvents.php @@ -108,6 +108,10 @@ final class KernelEvents * * This event allows you to reset the global and environmental state of * the application, when it was changed during the request. + * The event listener method receives a + * Symfony\Component\HttpKernel\Event\FinishRequestEvent instance. + * + * @Event * * @var string */ diff --git a/vendor/symfony/http-kernel/KernelInterface.php b/vendor/symfony/http-kernel/KernelInterface.php index ee5d27336..37ac3af51 100644 --- a/vendor/symfony/http-kernel/KernelInterface.php +++ b/vendor/symfony/http-kernel/KernelInterface.php @@ -27,7 +27,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable /** * Returns an array of bundles to register. * - * @return BundleInterface[] An array of bundle instances. + * @return BundleInterface[] An array of bundle instances */ public function registerBundles(); diff --git a/vendor/symfony/http-kernel/LICENSE b/vendor/symfony/http-kernel/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/http-kernel/LICENSE +++ b/vendor/symfony/http-kernel/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-kernel/Profiler/MemcacheProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/MemcacheProfilerStorage.php index 997c0dd45..6578ebfa5 100644 --- a/vendor/symfony/http-kernel/Profiler/MemcacheProfilerStorage.php +++ b/vendor/symfony/http-kernel/Profiler/MemcacheProfilerStorage.php @@ -46,7 +46,7 @@ class MemcacheProfilerStorage extends BaseMemcacheProfilerStorage $port = $matches[3]; $memcache = new \Memcache(); - $memcache->addserver($host, $port); + $memcache->addServer($host, $port); $this->memcache = $memcache; } diff --git a/vendor/symfony/http-kernel/Profiler/Profile.php b/vendor/symfony/http-kernel/Profiler/Profile.php index a4e4ba6ad..d6be0c7db 100644 --- a/vendor/symfony/http-kernel/Profiler/Profile.php +++ b/vendor/symfony/http-kernel/Profiler/Profile.php @@ -76,7 +76,7 @@ class Profile /** * Sets the parent token. * - * @param Profile $parent The parent Profile + * @param Profile $parent */ public function setParent(Profile $parent) { @@ -86,7 +86,7 @@ class Profile /** * Returns the parent profile. * - * @return Profile The parent profile + * @return self */ public function getParent() { @@ -191,7 +191,7 @@ class Profile /** * Finds children profilers. * - * @return Profile[] An array of Profile + * @return self[] */ public function getChildren() { @@ -201,7 +201,7 @@ class Profile /** * Sets children profiler. * - * @param Profile[] $children An array of Profile + * @param Profile[] $children */ public function setChildren(array $children) { @@ -214,7 +214,7 @@ class Profile /** * Adds the child token. * - * @param Profile $child The child Profile + * @param Profile $child */ public function addChild(Profile $child) { diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php index 378bf5dac..88b4c0c94 100644 --- a/vendor/symfony/http-kernel/Profiler/Profiler.php +++ b/vendor/symfony/http-kernel/Profiler/Profiler.php @@ -11,6 +11,7 @@ namespace Symfony\Component\HttpKernel\Profiler; +use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; @@ -77,7 +78,7 @@ class Profiler * * @param Response $response A Response instance * - * @return Profile A Profile instance + * @return Profile|false A Profile instance */ public function loadProfileFromResponse(Response $response) { @@ -152,7 +153,7 @@ class Profiler * * @param string $data A data string as exported by the export() method * - * @return Profile A Profile instance + * @return Profile|false A Profile instance * * @deprecated since Symfony 2.8, to be removed in 3.0. */ @@ -208,9 +209,13 @@ class Profiler $profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6)); $profile->setTime(time()); $profile->setUrl($request->getUri()); - $profile->setIp($request->getClientIp()); $profile->setMethod($request->getMethod()); $profile->setStatusCode($response->getStatusCode()); + try { + $profile->setIp($request->getClientIp()); + } catch (ConflictingHeadersException $e) { + $profile->setIp('Unknown'); + } $response->headers->set('X-Debug-Token', $profile->getToken()); diff --git a/vendor/symfony/http-kernel/UriSigner.php b/vendor/symfony/http-kernel/UriSigner.php index c2d0d7966..fa8489906 100644 --- a/vendor/symfony/http-kernel/UriSigner.php +++ b/vendor/symfony/http-kernel/UriSigner.php @@ -98,7 +98,7 @@ class UriSigner $host = isset($url['host']) ? $url['host'] : ''; $port = isset($url['port']) ? ':'.$url['port'] : ''; $user = isset($url['user']) ? $url['user'] : ''; - $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; + $pass = isset($url['pass']) ? ':'.$url['pass'] : ''; $pass = ($user || $pass) ? "$pass@" : ''; $path = isset($url['path']) ? $url['path'] : ''; $query = isset($url['query']) && $url['query'] ? '?'.$url['query'] : ''; diff --git a/vendor/symfony/http-kernel/composer.json b/vendor/symfony/http-kernel/composer.json index d0e92d57a..14a36bbd4 100644 --- a/vendor/symfony/http-kernel/composer.json +++ b/vendor/symfony/http-kernel/composer.json @@ -17,9 +17,9 @@ ], "require": { "php": ">=5.3.9", - "symfony/event-dispatcher": "~2.6,>=2.6.7|~3.0.0", - "symfony/http-foundation": "~2.5,>=2.5.4|~3.0.0", - "symfony/debug": "~2.6,>=2.6.2", + "symfony/event-dispatcher": "^2.6.7|~3.0.0", + "symfony/http-foundation": "~2.7.20|~2.8.13|~3.1.6", + "symfony/debug": "^2.6.2", "psr/log": "~1.0" }, "require-dev": { @@ -27,16 +27,16 @@ "symfony/class-loader": "~2.1|~3.0.0", "symfony/config": "~2.8", "symfony/console": "~2.3|~3.0.0", - "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/css-selector": "^2.0.5|~3.0.0", "symfony/dependency-injection": "~2.8|~3.0.0", - "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", + "symfony/dom-crawler": "^2.0.5|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", - "symfony/finder": "~2.0,>=2.0.5|~3.0.0", - "symfony/process": "~2.0,>=2.0.5|~3.0.0", + "symfony/finder": "^2.0.5|~3.0.0", + "symfony/process": "^2.0.5|~3.0.0", "symfony/routing": "~2.8|~3.0.0", "symfony/stopwatch": "~2.3|~3.0.0", "symfony/templating": "~2.2|~3.0.0", - "symfony/translation": "~2.0,>=2.0.5|~3.0.0", + "symfony/translation": "^2.0.5|~3.0.0", "symfony/var-dumper": "~2.6|~3.0.0" }, "conflict": { diff --git a/vendor/symfony/polyfill-apcu/composer.json b/vendor/symfony/polyfill-apcu/composer.json index 38f0ebf67..cb8df8bdb 100644 --- a/vendor/symfony/polyfill-apcu/composer.json +++ b/vendor/symfony/polyfill-apcu/composer.json @@ -24,7 +24,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } } } diff --git a/vendor/symfony/polyfill-iconv/Iconv.php b/vendor/symfony/polyfill-iconv/Iconv.php index 0c5dd0587..8a1e074da 100644 --- a/vendor/symfony/polyfill-iconv/Iconv.php +++ b/vendor/symfony/polyfill-iconv/Iconv.php @@ -716,8 +716,8 @@ final class Iconv private static function getData($file) { - if (file_exists($file = __DIR__.'/Resources/charset/'.$file.'.ser')) { - return unserialize(file_get_contents($file)); + if (file_exists($file = __DIR__.'/Resources/charset/'.$file.'.php')) { + return require $file; } return false; diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php new file mode 100644 index 000000000..b11985494 --- /dev/null +++ b/vendor/symfony/polyfill-iconv/Resources/charset/from.big5.php @@ -0,0 +1,13719 @@ + ' ', + 'A' => ',', + 'B' => '、', + 'C' => '。', + 'D' => '.', + 'E' => '•', + 'F' => ';', + 'G' => ':', + 'H' => '?', + 'I' => '!', + 'J' => '︰', + 'K' => '…', + 'L' => '‥', + 'M' => '﹐', + 'N' => '、', + 'O' => '﹒', + 'P' => '·', + 'Q' => '﹔', + 'R' => '﹕', + 'S' => '﹖', + 'T' => '﹗', + 'U' => '|', + 'V' => '–', + 'W' => '︱', + 'X' => '—', + 'Y' => '︳', + 'Z' => '�', + '[' => '︴', + '\\' => '﹏', + ']' => '(', + '^' => ')', + '_' => '︵', + '`' => '︶', + 'a' => '{', + 'b' => '}', + 'c' => '︷', + 'd' => '︸', + 'e' => '〔', + 'f' => '〕', + 'g' => '︹', + 'h' => '︺', + 'i' => '【', + 'j' => '】', + 'k' => '︻', + 'l' => '︼', + 'm' => '《', + 'n' => '》', + 'o' => '︽', + 'p' => '︾', + 'q' => '〈', + 'r' => '〉', + 's' => '︿', + 't' => '﹀', + 'u' => '「', + 'v' => '」', + 'w' => '﹁', + 'x' => '﹂', + 'y' => '『', + 'z' => '』', + '{' => '﹃', + '|' => '﹄', + '}' => '﹙', + '~' => '﹚', + '' => '﹛', + '' => '﹜', + '' => '﹝', + '' => '﹞', + '' => '‘', + '' => '’', + '' => '“', + '' => '”', + '' => '〝', + '' => '〞', + '' => '‵', + '' => '′', + '' => '#', + '' => '&', + '' => '*', + '' => '※', + '' => '§', + '' => '〃', + '' => '○', + '' => '●', + '' => '△', + '' => '▲', + '' => '◎', + '' => '☆', + '' => '★', + '' => '◇', + '' => '◆', + '' => '□', + '' => '■', + '' => '▽', + '' => '▼', + '' => '㊣', + '' => '℅', + '' => '‾', + '' => '�', + '' => '_', + '' => '�', + '' => '﹉', + '' => '﹊', + '' => '﹍', + '' => '﹎', + '' => '﹋', + '' => '﹌', + '' => '﹟', + '' => '﹠', + '' => '﹡', + '' => '+', + '' => '-', + '' => '×', + '' => '÷', + '' => '±', + '' => '√', + '' => '<', + '' => '>', + '' => '=', + '' => '≦', + '' => '≧', + '' => '≠', + '' => '∞', + '' => '≒', + '' => '≡', + '' => '﹢', + '' => '﹣', + '' => '﹤', + '' => '﹥', + '' => '﹦', + '' => '∼', + '' => '∩', + '' => '∪', + '' => '⊥', + '' => '∠', + '' => '∟', + '' => '⊿', + '' => '㏒', + '' => '㏑', + '' => '∫', + '' => '∮', + '' => '∵', + '' => '∴', + '' => '♀', + '' => '♂', + '' => '♁', + '' => '☉', + '' => '↑', + '' => '↓', + '' => '←', + '' => '→', + '' => '↖', + '' => '↗', + '' => '↙', + '' => '↘', + '' => '∥', + '' => '∣', + '' => '�', + '@' => '�', + 'A' => '/', + 'B' => '\', + 'C' => '$', + 'D' => '¥', + 'E' => '〒', + 'F' => '¢', + 'G' => '£', + 'H' => '%', + 'I' => '@', + 'J' => '℃', + 'K' => '℉', + 'L' => '﹩', + 'M' => '﹪', + 'N' => '﹫', + 'O' => '㏕', + 'P' => '㎜', + 'Q' => '㎝', + 'R' => '㎞', + 'S' => '㏎', + 'T' => '㎡', + 'U' => '㎎', + 'V' => '㎏', + 'W' => '㏄', + 'X' => '°', + 'Y' => '兙', + 'Z' => '兛', + '[' => '兞', + '\\' => '兝', + ']' => '兡', + '^' => '兣', + '_' => '嗧', + '`' => '瓩', + 'a' => '糎', + 'b' => '▁', + 'c' => '▂', + 'd' => '▃', + 'e' => '▄', + 'f' => '▅', + 'g' => '▆', + 'h' => '▇', + 'i' => '█', + 'j' => '▏', + 'k' => '▎', + 'l' => '▍', + 'm' => '▌', + 'n' => '▋', + 'o' => '▊', + 'p' => '▉', + 'q' => '┼', + 'r' => '┴', + 's' => '┬', + 't' => '┤', + 'u' => '├', + 'v' => '▔', + 'w' => '─', + 'x' => '│', + 'y' => '▕', + 'z' => '┌', + '{' => '┐', + '|' => '└', + '}' => '┘', + '~' => '╭', + '' => '╮', + '' => '╰', + '' => '╯', + '' => '═', + '' => '╞', + '' => '╪', + '' => '╡', + '' => '◢', + '' => '◣', + '' => '◥', + '' => '◤', + '' => '╱', + '' => '╲', + '' => '╳', + '' => '0', + '' => '1', + '' => '2', + '' => '3', + '' => '4', + '' => '5', + '' => '6', + '' => '7', + '' => '8', + '' => '9', + '' => 'Ⅰ', + '' => 'Ⅱ', + '' => 'Ⅲ', + '' => 'Ⅳ', + '' => 'Ⅴ', + '' => 'Ⅵ', + '' => 'Ⅶ', + '' => 'Ⅷ', + '' => 'Ⅸ', + '' => 'Ⅹ', + '' => '〡', + '' => '〢', + '' => '〣', + '' => '〤', + '' => '〥', + '' => '〦', + '' => '〧', + '' => '〨', + '' => '〩', + '' => '�', + '' => '卄', + '' => '�', + '' => 'A', + '' => 'B', + '' => 'C', + '' => 'D', + '' => 'E', + '' => 'F', + '' => 'G', + '' => 'H', + '' => 'I', + '' => 'J', + '' => 'K', + '' => 'L', + '' => 'M', + '' => 'N', + '' => 'O', + '' => 'P', + '' => 'Q', + '' => 'R', + '' => 'S', + '' => 'T', + '' => 'U', + '' => 'V', + '' => 'W', + '' => 'X', + '' => 'Y', + '' => 'Z', + '' => 'a', + '' => 'b', + '' => 'c', + '' => 'd', + '' => 'e', + '' => 'f', + '' => 'g', + '' => 'h', + '' => 'i', + '' => 'j', + '' => 'k', + '' => 'l', + '' => 'm', + '' => 'n', + '' => 'o', + '' => 'p', + '' => 'q', + '' => 'r', + '' => 's', + '' => 't', + '' => 'u', + '' => 'v', + '@' => 'w', + 'A' => 'x', + 'B' => 'y', + 'C' => 'z', + 'D' => 'Α', + 'E' => 'Β', + 'F' => 'Γ', + 'G' => 'Δ', + 'H' => 'Ε', + 'I' => 'Ζ', + 'J' => 'Η', + 'K' => 'Θ', + 'L' => 'Ι', + 'M' => 'Κ', + 'N' => 'Λ', + 'O' => 'Μ', + 'P' => 'Ν', + 'Q' => 'Ξ', + 'R' => 'Ο', + 'S' => 'Π', + 'T' => 'Ρ', + 'U' => 'Σ', + 'V' => 'Τ', + 'W' => 'Υ', + 'X' => 'Φ', + 'Y' => 'Χ', + 'Z' => 'Ψ', + '[' => 'Ω', + '\\' => 'α', + ']' => 'β', + '^' => 'γ', + '_' => 'δ', + '`' => 'ε', + 'a' => 'ζ', + 'b' => 'η', + 'c' => 'θ', + 'd' => 'ι', + 'e' => 'κ', + 'f' => 'λ', + 'g' => 'μ', + 'h' => 'ν', + 'i' => 'ξ', + 'j' => 'ο', + 'k' => 'π', + 'l' => 'ρ', + 'm' => 'σ', + 'n' => 'τ', + 'o' => 'υ', + 'p' => 'φ', + 'q' => 'χ', + 'r' => 'ψ', + 's' => 'ω', + 't' => 'ㄅ', + 'u' => 'ㄆ', + 'v' => 'ㄇ', + 'w' => 'ㄈ', + 'x' => 'ㄉ', + 'y' => 'ㄊ', + 'z' => 'ㄋ', + '{' => 'ㄌ', + '|' => 'ㄍ', + '}' => 'ㄎ', + '~' => 'ㄏ', + '' => 'ㄐ', + '' => 'ㄑ', + '' => 'ㄒ', + '' => 'ㄓ', + '' => 'ㄔ', + '' => 'ㄕ', + '' => 'ㄖ', + '' => 'ㄗ', + '' => 'ㄘ', + '' => 'ㄙ', + '' => 'ㄚ', + '' => 'ㄛ', + '' => 'ㄜ', + '' => 'ㄝ', + '' => 'ㄞ', + '' => 'ㄟ', + '' => 'ㄠ', + '' => 'ㄡ', + '' => 'ㄢ', + '' => 'ㄣ', + '' => 'ㄤ', + '' => 'ㄥ', + '' => 'ㄦ', + '' => 'ㄧ', + '' => 'ㄨ', + '' => 'ㄩ', + '' => '˙', + '' => 'ˉ', + '' => 'ˊ', + '' => 'ˇ', + '' => 'ˋ', + '@' => '一', + 'A' => '乙', + 'B' => '丁', + 'C' => '七', + 'D' => '乃', + 'E' => '九', + 'F' => '了', + 'G' => '二', + 'H' => '人', + 'I' => '儿', + 'J' => '入', + 'K' => '八', + 'L' => '几', + 'M' => '刀', + 'N' => '刁', + 'O' => '力', + 'P' => '匕', + 'Q' => '十', + 'R' => '卜', + 'S' => '又', + 'T' => '三', + 'U' => '下', + 'V' => '丈', + 'W' => '上', + 'X' => '丫', + 'Y' => '丸', + 'Z' => '凡', + '[' => '久', + '\\' => '么', + ']' => '也', + '^' => '乞', + '_' => '于', + '`' => '亡', + 'a' => '兀', + 'b' => '刃', + 'c' => '勺', + 'd' => '千', + 'e' => '叉', + 'f' => '口', + 'g' => '土', + 'h' => '士', + 'i' => '夕', + 'j' => '大', + 'k' => '女', + 'l' => '子', + 'm' => '孑', + 'n' => '孓', + 'o' => '寸', + 'p' => '小', + 'q' => '尢', + 'r' => '尸', + 's' => '山', + 't' => '川', + 'u' => '工', + 'v' => '己', + 'w' => '已', + 'x' => '巳', + 'y' => '巾', + 'z' => '干', + '{' => '廾', + '|' => '弋', + '}' => '弓', + '~' => '才', + '' => '丑', + '' => '丐', + '' => '不', + '' => '中', + '' => '丰', + '' => '丹', + '' => '之', + '' => '尹', + '' => '予', + '' => '云', + '' => '井', + '' => '互', + '' => '五', + '' => '亢', + '' => '仁', + '' => '什', + '' => '仃', + '' => '仆', + '' => '仇', + '' => '仍', + '' => '今', + '' => '介', + '' => '仄', + '' => '元', + '' => '允', + '' => '內', + '' => '六', + '' => '兮', + '' => '公', + '' => '冗', + '' => '凶', + '' => '分', + '' => '切', + '' => '刈', + '' => '勻', + '' => '勾', + '' => '勿', + '' => '化', + '' => '匹', + '' => '午', + '' => '升', + '' => '卅', + '' => '卞', + '' => '厄', + '' => '友', + '' => '及', + '' => '反', + '' => '壬', + '' => '天', + '' => '夫', + '' => '太', + '' => '夭', + '' => '孔', + '' => '少', + '' => '尤', + '' => '尺', + '' => '屯', + '' => '巴', + '' => '幻', + '' => '廿', + '' => '弔', + '' => '引', + '' => '心', + '' => '戈', + '' => '戶', + '' => '手', + '' => '扎', + '' => '支', + '' => '文', + '' => '斗', + '' => '斤', + '' => '方', + '' => '日', + '' => '曰', + '' => '月', + '' => '木', + '' => '欠', + '' => '止', + '' => '歹', + '' => '毋', + '' => '比', + '' => '毛', + '' => '氏', + '' => '水', + '' => '火', + '' => '爪', + '' => '父', + '' => '爻', + '' => '片', + '' => '牙', + '' => '牛', + '' => '犬', + '' => '王', + '' => '丙', + '@' => '世', + 'A' => '丕', + 'B' => '且', + 'C' => '丘', + 'D' => '主', + 'E' => '乍', + 'F' => '乏', + 'G' => '乎', + 'H' => '以', + 'I' => '付', + 'J' => '仔', + 'K' => '仕', + 'L' => '他', + 'M' => '仗', + 'N' => '代', + 'O' => '令', + 'P' => '仙', + 'Q' => '仞', + 'R' => '充', + 'S' => '兄', + 'T' => '冉', + 'U' => '冊', + 'V' => '冬', + 'W' => '凹', + 'X' => '出', + 'Y' => '凸', + 'Z' => '刊', + '[' => '加', + '\\' => '功', + ']' => '包', + '^' => '匆', + '_' => '北', + '`' => '匝', + 'a' => '仟', + 'b' => '半', + 'c' => '卉', + 'd' => '卡', + 'e' => '占', + 'f' => '卯', + 'g' => '卮', + 'h' => '去', + 'i' => '可', + 'j' => '古', + 'k' => '右', + 'l' => '召', + 'm' => '叮', + 'n' => '叩', + 'o' => '叨', + 'p' => '叼', + 'q' => '司', + 'r' => '叵', + 's' => '叫', + 't' => '另', + 'u' => '只', + 'v' => '史', + 'w' => '叱', + 'x' => '台', + 'y' => '句', + 'z' => '叭', + '{' => '叻', + '|' => '四', + '}' => '囚', + '~' => '外', + '' => '央', + '' => '失', + '' => '奴', + '' => '奶', + '' => '孕', + '' => '它', + '' => '尼', + '' => '巨', + '' => '巧', + '' => '左', + '' => '市', + '' => '布', + '' => '平', + '' => '幼', + '' => '弁', + '' => '弘', + '' => '弗', + '' => '必', + '' => '戊', + '' => '打', + '' => '扔', + '' => '扒', + '' => '扑', + '' => '斥', + '' => '旦', + '' => '朮', + '' => '本', + '' => '未', + '' => '末', + '' => '札', + '' => '正', + '' => '母', + '' => '民', + '' => '氐', + '' => '永', + '' => '汁', + '' => '汀', + '' => '氾', + '' => '犯', + '' => '玄', + '' => '玉', + '' => '瓜', + '' => '瓦', + '' => '甘', + '' => '生', + '' => '用', + '' => '甩', + '' => '田', + '' => '由', + '' => '甲', + '' => '申', + '' => '疋', + '' => '白', + '' => '皮', + '' => '皿', + '' => '目', + '' => '矛', + '' => '矢', + '' => '石', + '' => '示', + '' => '禾', + '' => '穴', + '' => '立', + '' => '丞', + '' => '丟', + '' => '乒', + '' => '乓', + '' => '乩', + '' => '亙', + '' => '交', + '' => '亦', + '' => '亥', + '' => '仿', + '' => '伉', + '' => '伙', + '' => '伊', + '' => '伕', + '' => '伍', + '' => '伐', + '' => '休', + '' => '伏', + '' => '仲', + '' => '件', + '' => '任', + '' => '仰', + '' => '仳', + '' => '份', + '' => '企', + '' => '伋', + '' => '光', + '' => '兇', + '' => '兆', + '' => '先', + '' => '全', + '@' => '共', + 'A' => '再', + 'B' => '冰', + 'C' => '列', + 'D' => '刑', + 'E' => '划', + 'F' => '刎', + 'G' => '刖', + 'H' => '劣', + 'I' => '匈', + 'J' => '匡', + 'K' => '匠', + 'L' => '印', + 'M' => '危', + 'N' => '吉', + 'O' => '吏', + 'P' => '同', + 'Q' => '吊', + 'R' => '吐', + 'S' => '吁', + 'T' => '吋', + 'U' => '各', + 'V' => '向', + 'W' => '名', + 'X' => '合', + 'Y' => '吃', + 'Z' => '后', + '[' => '吆', + '\\' => '吒', + ']' => '因', + '^' => '回', + '_' => '囝', + '`' => '圳', + 'a' => '地', + 'b' => '在', + 'c' => '圭', + 'd' => '圬', + 'e' => '圯', + 'f' => '圩', + 'g' => '夙', + 'h' => '多', + 'i' => '夷', + 'j' => '夸', + 'k' => '妄', + 'l' => '奸', + 'm' => '妃', + 'n' => '好', + 'o' => '她', + 'p' => '如', + 'q' => '妁', + 'r' => '字', + 's' => '存', + 't' => '宇', + 'u' => '守', + 'v' => '宅', + 'w' => '安', + 'x' => '寺', + 'y' => '尖', + 'z' => '屹', + '{' => '州', + '|' => '帆', + '}' => '并', + '~' => '年', + '' => '式', + '' => '弛', + '' => '忙', + '' => '忖', + '' => '戎', + '' => '戌', + '' => '戍', + '' => '成', + '' => '扣', + '' => '扛', + '' => '托', + '' => '收', + '' => '早', + '' => '旨', + '' => '旬', + '' => '旭', + '' => '曲', + '' => '曳', + '' => '有', + '' => '朽', + '' => '朴', + '' => '朱', + '' => '朵', + '' => '次', + '' => '此', + '' => '死', + '' => '氖', + '' => '汝', + '' => '汗', + '' => '汙', + '' => '江', + '' => '池', + '' => '汐', + '' => '汕', + '' => '污', + '' => '汛', + '' => '汍', + '' => '汎', + '' => '灰', + '' => '牟', + '' => '牝', + '' => '百', + '' => '竹', + '' => '米', + '' => '糸', + '' => '缶', + '' => '羊', + '' => '羽', + '' => '老', + '' => '考', + '' => '而', + '' => '耒', + '' => '耳', + '' => '聿', + '' => '肉', + '' => '肋', + '' => '肌', + '' => '臣', + '' => '自', + '' => '至', + '' => '臼', + '' => '舌', + '' => '舛', + '' => '舟', + '' => '艮', + '' => '色', + '' => '艾', + '' => '虫', + '' => '血', + '' => '行', + '' => '衣', + '' => '西', + '' => '阡', + '' => '串', + '' => '亨', + '' => '位', + '' => '住', + '' => '佇', + '' => '佗', + '' => '佞', + '' => '伴', + '' => '佛', + '' => '何', + '' => '估', + '' => '佐', + '' => '佑', + '' => '伽', + '' => '伺', + '' => '伸', + '' => '佃', + '' => '佔', + '' => '似', + '' => '但', + '' => '佣', + '@' => '作', + 'A' => '你', + 'B' => '伯', + 'C' => '低', + 'D' => '伶', + 'E' => '余', + 'F' => '佝', + 'G' => '佈', + 'H' => '佚', + 'I' => '兌', + 'J' => '克', + 'K' => '免', + 'L' => '兵', + 'M' => '冶', + 'N' => '冷', + 'O' => '別', + 'P' => '判', + 'Q' => '利', + 'R' => '刪', + 'S' => '刨', + 'T' => '劫', + 'U' => '助', + 'V' => '努', + 'W' => '劬', + 'X' => '匣', + 'Y' => '即', + 'Z' => '卵', + '[' => '吝', + '\\' => '吭', + ']' => '吞', + '^' => '吾', + '_' => '否', + '`' => '呎', + 'a' => '吧', + 'b' => '呆', + 'c' => '呃', + 'd' => '吳', + 'e' => '呈', + 'f' => '呂', + 'g' => '君', + 'h' => '吩', + 'i' => '告', + 'j' => '吹', + 'k' => '吻', + 'l' => '吸', + 'm' => '吮', + 'n' => '吵', + 'o' => '吶', + 'p' => '吠', + 'q' => '吼', + 'r' => '呀', + 's' => '吱', + 't' => '含', + 'u' => '吟', + 'v' => '听', + 'w' => '囪', + 'x' => '困', + 'y' => '囤', + 'z' => '囫', + '{' => '坊', + '|' => '坑', + '}' => '址', + '~' => '坍', + '' => '均', + '' => '坎', + '' => '圾', + '' => '坐', + '' => '坏', + '' => '圻', + '' => '壯', + '' => '夾', + '' => '妝', + '' => '妒', + '' => '妨', + '' => '妞', + '' => '妣', + '' => '妙', + '' => '妖', + '' => '妍', + '' => '妤', + '' => '妓', + '' => '妊', + '' => '妥', + '' => '孝', + '' => '孜', + '' => '孚', + '' => '孛', + '' => '完', + '' => '宋', + '' => '宏', + '' => '尬', + '' => '局', + '' => '屁', + '' => '尿', + '' => '尾', + '' => '岐', + '' => '岑', + '' => '岔', + '' => '岌', + '' => '巫', + '' => '希', + '' => '序', + '' => '庇', + '' => '床', + '' => '廷', + '' => '弄', + '' => '弟', + '' => '彤', + '' => '形', + '' => '彷', + '' => '役', + '' => '忘', + '' => '忌', + '' => '志', + '' => '忍', + '' => '忱', + '' => '快', + '' => '忸', + '' => '忪', + '' => '戒', + '' => '我', + '' => '抄', + '' => '抗', + '' => '抖', + '' => '技', + '' => '扶', + '' => '抉', + '' => '扭', + '' => '把', + '' => '扼', + '' => '找', + '' => '批', + '' => '扳', + '' => '抒', + '' => '扯', + '' => '折', + '' => '扮', + '' => '投', + '' => '抓', + '' => '抑', + '' => '抆', + '' => '改', + '' => '攻', + '' => '攸', + '' => '旱', + '' => '更', + '' => '束', + '' => '李', + '' => '杏', + '' => '材', + '' => '村', + '' => '杜', + '' => '杖', + '' => '杞', + '' => '杉', + '' => '杆', + '' => '杠', + '@' => '杓', + 'A' => '杗', + 'B' => '步', + 'C' => '每', + 'D' => '求', + 'E' => '汞', + 'F' => '沙', + 'G' => '沁', + 'H' => '沈', + 'I' => '沉', + 'J' => '沅', + 'K' => '沛', + 'L' => '汪', + 'M' => '決', + 'N' => '沐', + 'O' => '汰', + 'P' => '沌', + 'Q' => '汨', + 'R' => '沖', + 'S' => '沒', + 'T' => '汽', + 'U' => '沃', + 'V' => '汲', + 'W' => '汾', + 'X' => '汴', + 'Y' => '沆', + 'Z' => '汶', + '[' => '沍', + '\\' => '沔', + ']' => '沘', + '^' => '沂', + '_' => '灶', + '`' => '灼', + 'a' => '災', + 'b' => '灸', + 'c' => '牢', + 'd' => '牡', + 'e' => '牠', + 'f' => '狄', + 'g' => '狂', + 'h' => '玖', + 'i' => '甬', + 'j' => '甫', + 'k' => '男', + 'l' => '甸', + 'm' => '皂', + 'n' => '盯', + 'o' => '矣', + 'p' => '私', + 'q' => '秀', + 'r' => '禿', + 's' => '究', + 't' => '系', + 'u' => '罕', + 'v' => '肖', + 'w' => '肓', + 'x' => '肝', + 'y' => '肘', + 'z' => '肛', + '{' => '肚', + '|' => '育', + '}' => '良', + '~' => '芒', + '' => '芋', + '' => '芍', + '' => '見', + '' => '角', + '' => '言', + '' => '谷', + '' => '豆', + '' => '豕', + '' => '貝', + '' => '赤', + '' => '走', + '' => '足', + '' => '身', + '' => '車', + '' => '辛', + '' => '辰', + '' => '迂', + '' => '迆', + '' => '迅', + '' => '迄', + '' => '巡', + '' => '邑', + '' => '邢', + '' => '邪', + '' => '邦', + '' => '那', + '' => '酉', + '' => '釆', + '' => '里', + '' => '防', + '' => '阮', + '' => '阱', + '' => '阪', + '' => '阬', + '' => '並', + '' => '乖', + '' => '乳', + '' => '事', + '' => '些', + '' => '亞', + '' => '享', + '' => '京', + '' => '佯', + '' => '依', + '' => '侍', + '' => '佳', + '' => '使', + '' => '佬', + '' => '供', + '' => '例', + '' => '來', + '' => '侃', + '' => '佰', + '' => '併', + '' => '侈', + '' => '佩', + '' => '佻', + '' => '侖', + '' => '佾', + '' => '侏', + '' => '侑', + '' => '佺', + '' => '兔', + '' => '兒', + '' => '兕', + '' => '兩', + '' => '具', + '' => '其', + '' => '典', + '' => '冽', + '' => '函', + '' => '刻', + '' => '券', + '' => '刷', + '' => '刺', + '' => '到', + '' => '刮', + '' => '制', + '' => '剁', + '' => '劾', + '' => '劻', + '' => '卒', + '' => '協', + '' => '卓', + '' => '卑', + '' => '卦', + '' => '卷', + '' => '卸', + '' => '卹', + '' => '取', + '' => '叔', + '' => '受', + '' => '味', + '' => '呵', + '@' => '咖', + 'A' => '呸', + 'B' => '咕', + 'C' => '咀', + 'D' => '呻', + 'E' => '呷', + 'F' => '咄', + 'G' => '咒', + 'H' => '咆', + 'I' => '呼', + 'J' => '咐', + 'K' => '呱', + 'L' => '呶', + 'M' => '和', + 'N' => '咚', + 'O' => '呢', + 'P' => '周', + 'Q' => '咋', + 'R' => '命', + 'S' => '咎', + 'T' => '固', + 'U' => '垃', + 'V' => '坷', + 'W' => '坪', + 'X' => '坩', + 'Y' => '坡', + 'Z' => '坦', + '[' => '坤', + '\\' => '坼', + ']' => '夜', + '^' => '奉', + '_' => '奇', + '`' => '奈', + 'a' => '奄', + 'b' => '奔', + 'c' => '妾', + 'd' => '妻', + 'e' => '委', + 'f' => '妹', + 'g' => '妮', + 'h' => '姑', + 'i' => '姆', + 'j' => '姐', + 'k' => '姍', + 'l' => '始', + 'm' => '姓', + 'n' => '姊', + 'o' => '妯', + 'p' => '妳', + 'q' => '姒', + 'r' => '姅', + 's' => '孟', + 't' => '孤', + 'u' => '季', + 'v' => '宗', + 'w' => '定', + 'x' => '官', + 'y' => '宜', + 'z' => '宙', + '{' => '宛', + '|' => '尚', + '}' => '屈', + '~' => '居', + '' => '屆', + '' => '岷', + '' => '岡', + '' => '岸', + '' => '岩', + '' => '岫', + '' => '岱', + '' => '岳', + '' => '帘', + '' => '帚', + '' => '帖', + '' => '帕', + '' => '帛', + '' => '帑', + '' => '幸', + '' => '庚', + '' => '店', + '' => '府', + '' => '底', + '' => '庖', + '' => '延', + '' => '弦', + '' => '弧', + '' => '弩', + '' => '往', + '' => '征', + '' => '彿', + '' => '彼', + '' => '忝', + '' => '忠', + '' => '忽', + '' => '念', + '' => '忿', + '' => '怏', + '' => '怔', + '' => '怯', + '' => '怵', + '' => '怖', + '' => '怪', + '' => '怕', + '' => '怡', + '' => '性', + '' => '怩', + '' => '怫', + '' => '怛', + '' => '或', + '' => '戕', + '' => '房', + '' => '戾', + '' => '所', + '' => '承', + '' => '拉', + '' => '拌', + '' => '拄', + '' => '抿', + '' => '拂', + '' => '抹', + '' => '拒', + '' => '招', + '' => '披', + '' => '拓', + '' => '拔', + '' => '拋', + '' => '拈', + '' => '抨', + '' => '抽', + '' => '押', + '' => '拐', + '' => '拙', + '' => '拇', + '' => '拍', + '' => '抵', + '' => '拚', + '' => '抱', + '' => '拘', + '' => '拖', + '' => '拗', + '' => '拆', + '' => '抬', + '' => '拎', + '' => '放', + '' => '斧', + '' => '於', + '' => '旺', + '' => '昔', + '' => '易', + '' => '昌', + '' => '昆', + '' => '昂', + '' => '明', + '' => '昀', + '' => '昏', + '' => '昕', + '' => '昊', + '@' => '昇', + 'A' => '服', + 'B' => '朋', + 'C' => '杭', + 'D' => '枋', + 'E' => '枕', + 'F' => '東', + 'G' => '果', + 'H' => '杳', + 'I' => '杷', + 'J' => '枇', + 'K' => '枝', + 'L' => '林', + 'M' => '杯', + 'N' => '杰', + 'O' => '板', + 'P' => '枉', + 'Q' => '松', + 'R' => '析', + 'S' => '杵', + 'T' => '枚', + 'U' => '枓', + 'V' => '杼', + 'W' => '杪', + 'X' => '杲', + 'Y' => '欣', + 'Z' => '武', + '[' => '歧', + '\\' => '歿', + ']' => '氓', + '^' => '氛', + '_' => '泣', + '`' => '注', + 'a' => '泳', + 'b' => '沱', + 'c' => '泌', + 'd' => '泥', + 'e' => '河', + 'f' => '沽', + 'g' => '沾', + 'h' => '沼', + 'i' => '波', + 'j' => '沫', + 'k' => '法', + 'l' => '泓', + 'm' => '沸', + 'n' => '泄', + 'o' => '油', + 'p' => '況', + 'q' => '沮', + 'r' => '泗', + 's' => '泅', + 't' => '泱', + 'u' => '沿', + 'v' => '治', + 'w' => '泡', + 'x' => '泛', + 'y' => '泊', + 'z' => '沬', + '{' => '泯', + '|' => '泜', + '}' => '泖', + '~' => '泠', + '' => '炕', + '' => '炎', + '' => '炒', + '' => '炊', + '' => '炙', + '' => '爬', + '' => '爭', + '' => '爸', + '' => '版', + '' => '牧', + '' => '物', + '' => '狀', + '' => '狎', + '' => '狙', + '' => '狗', + '' => '狐', + '' => '玩', + '' => '玨', + '' => '玟', + '' => '玫', + '' => '玥', + '' => '甽', + '' => '疝', + '' => '疙', + '' => '疚', + '' => '的', + '' => '盂', + '' => '盲', + '' => '直', + '' => '知', + '' => '矽', + '' => '社', + '' => '祀', + '' => '祁', + '' => '秉', + '' => '秈', + '' => '空', + '' => '穹', + '' => '竺', + '' => '糾', + '' => '罔', + '' => '羌', + '' => '羋', + '' => '者', + '' => '肺', + '' => '肥', + '' => '肢', + '' => '肱', + '' => '股', + '' => '肫', + '' => '肩', + '' => '肴', + '' => '肪', + '' => '肯', + '' => '臥', + '' => '臾', + '' => '舍', + '' => '芳', + '' => '芝', + '' => '芙', + '' => '芭', + '' => '芽', + '' => '芟', + '' => '芹', + '' => '花', + '' => '芬', + '' => '芥', + '' => '芯', + '' => '芸', + '' => '芣', + '' => '芰', + '' => '芾', + '' => '芷', + '' => '虎', + '' => '虱', + '' => '初', + '' => '表', + '' => '軋', + '' => '迎', + '' => '返', + '' => '近', + '' => '邵', + '' => '邸', + '' => '邱', + '' => '邶', + '' => '采', + '' => '金', + '' => '長', + '' => '門', + '' => '阜', + '' => '陀', + '' => '阿', + '' => '阻', + '' => '附', + '@' => '陂', + 'A' => '隹', + 'B' => '雨', + 'C' => '青', + 'D' => '非', + 'E' => '亟', + 'F' => '亭', + 'G' => '亮', + 'H' => '信', + 'I' => '侵', + 'J' => '侯', + 'K' => '便', + 'L' => '俠', + 'M' => '俑', + 'N' => '俏', + 'O' => '保', + 'P' => '促', + 'Q' => '侶', + 'R' => '俘', + 'S' => '俟', + 'T' => '俊', + 'U' => '俗', + 'V' => '侮', + 'W' => '俐', + 'X' => '俄', + 'Y' => '係', + 'Z' => '俚', + '[' => '俎', + '\\' => '俞', + ']' => '侷', + '^' => '兗', + '_' => '冒', + '`' => '冑', + 'a' => '冠', + 'b' => '剎', + 'c' => '剃', + 'd' => '削', + 'e' => '前', + 'f' => '剌', + 'g' => '剋', + 'h' => '則', + 'i' => '勇', + 'j' => '勉', + 'k' => '勃', + 'l' => '勁', + 'm' => '匍', + 'n' => '南', + 'o' => '卻', + 'p' => '厚', + 'q' => '叛', + 'r' => '咬', + 's' => '哀', + 't' => '咨', + 'u' => '哎', + 'v' => '哉', + 'w' => '咸', + 'x' => '咦', + 'y' => '咳', + 'z' => '哇', + '{' => '哂', + '|' => '咽', + '}' => '咪', + '~' => '品', + '' => '哄', + '' => '哈', + '' => '咯', + '' => '咫', + '' => '咱', + '' => '咻', + '' => '咩', + '' => '咧', + '' => '咿', + '' => '囿', + '' => '垂', + '' => '型', + '' => '垠', + '' => '垣', + '' => '垢', + '' => '城', + '' => '垮', + '' => '垓', + '' => '奕', + '' => '契', + '' => '奏', + '' => '奎', + '' => '奐', + '' => '姜', + '' => '姘', + '' => '姿', + '' => '姣', + '' => '姨', + '' => '娃', + '' => '姥', + '' => '姪', + '' => '姚', + '' => '姦', + '' => '威', + '' => '姻', + '' => '孩', + '' => '宣', + '' => '宦', + '' => '室', + '' => '客', + '' => '宥', + '' => '封', + '' => '屎', + '' => '屏', + '' => '屍', + '' => '屋', + '' => '峙', + '' => '峒', + '' => '巷', + '' => '帝', + '' => '帥', + '' => '帟', + '' => '幽', + '' => '庠', + '' => '度', + '' => '建', + '' => '弈', + '' => '弭', + '' => '彥', + '' => '很', + '' => '待', + '' => '徊', + '' => '律', + '' => '徇', + '' => '後', + '' => '徉', + '' => '怒', + '' => '思', + '' => '怠', + '' => '急', + '' => '怎', + '' => '怨', + '' => '恍', + '' => '恰', + '' => '恨', + '' => '恢', + '' => '恆', + '' => '恃', + '' => '恬', + '' => '恫', + '' => '恪', + '' => '恤', + '' => '扁', + '' => '拜', + '' => '挖', + '' => '按', + '' => '拼', + '' => '拭', + '' => '持', + '' => '拮', + '' => '拽', + '' => '指', + '' => '拱', + '' => '拷', + '@' => '拯', + 'A' => '括', + 'B' => '拾', + 'C' => '拴', + 'D' => '挑', + 'E' => '挂', + 'F' => '政', + 'G' => '故', + 'H' => '斫', + 'I' => '施', + 'J' => '既', + 'K' => '春', + 'L' => '昭', + 'M' => '映', + 'N' => '昧', + 'O' => '是', + 'P' => '星', + 'Q' => '昨', + 'R' => '昱', + 'S' => '昤', + 'T' => '曷', + 'U' => '柿', + 'V' => '染', + 'W' => '柱', + 'X' => '柔', + 'Y' => '某', + 'Z' => '柬', + '[' => '架', + '\\' => '枯', + ']' => '柵', + '^' => '柩', + '_' => '柯', + '`' => '柄', + 'a' => '柑', + 'b' => '枴', + 'c' => '柚', + 'd' => '查', + 'e' => '枸', + 'f' => '柏', + 'g' => '柞', + 'h' => '柳', + 'i' => '枰', + 'j' => '柙', + 'k' => '柢', + 'l' => '柝', + 'm' => '柒', + 'n' => '歪', + 'o' => '殃', + 'p' => '殆', + 'q' => '段', + 'r' => '毒', + 's' => '毗', + 't' => '氟', + 'u' => '泉', + 'v' => '洋', + 'w' => '洲', + 'x' => '洪', + 'y' => '流', + 'z' => '津', + '{' => '洌', + '|' => '洱', + '}' => '洞', + '~' => '洗', + '' => '活', + '' => '洽', + '' => '派', + '' => '洶', + '' => '洛', + '' => '泵', + '' => '洹', + '' => '洧', + '' => '洸', + '' => '洩', + '' => '洮', + '' => '洵', + '' => '洎', + '' => '洫', + '' => '炫', + '' => '為', + '' => '炳', + '' => '炬', + '' => '炯', + '' => '炭', + '' => '炸', + '' => '炮', + '' => '炤', + '' => '爰', + '' => '牲', + '' => '牯', + '' => '牴', + '' => '狩', + '' => '狠', + '' => '狡', + '' => '玷', + '' => '珊', + '' => '玻', + '' => '玲', + '' => '珍', + '' => '珀', + '' => '玳', + '' => '甚', + '' => '甭', + '' => '畏', + '' => '界', + '' => '畎', + '' => '畋', + '' => '疫', + '' => '疤', + '' => '疥', + '' => '疢', + '' => '疣', + '' => '癸', + '' => '皆', + '' => '皇', + '' => '皈', + '' => '盈', + '' => '盆', + '' => '盃', + '' => '盅', + '' => '省', + '' => '盹', + '' => '相', + '' => '眉', + '' => '看', + '' => '盾', + '' => '盼', + '' => '眇', + '' => '矜', + '' => '砂', + '' => '研', + '' => '砌', + '' => '砍', + '' => '祆', + '' => '祉', + '' => '祈', + '' => '祇', + '' => '禹', + '' => '禺', + '' => '科', + '' => '秒', + '' => '秋', + '' => '穿', + '' => '突', + '' => '竿', + '' => '竽', + '' => '籽', + '' => '紂', + '' => '紅', + '' => '紀', + '' => '紉', + '' => '紇', + '' => '約', + '' => '紆', + '' => '缸', + '' => '美', + '' => '羿', + '' => '耄', + '@' => '耐', + 'A' => '耍', + 'B' => '耑', + 'C' => '耶', + 'D' => '胖', + 'E' => '胥', + 'F' => '胚', + 'G' => '胃', + 'H' => '胄', + 'I' => '背', + 'J' => '胡', + 'K' => '胛', + 'L' => '胎', + 'M' => '胞', + 'N' => '胤', + 'O' => '胝', + 'P' => '致', + 'Q' => '舢', + 'R' => '苧', + 'S' => '范', + 'T' => '茅', + 'U' => '苣', + 'V' => '苛', + 'W' => '苦', + 'X' => '茄', + 'Y' => '若', + 'Z' => '茂', + '[' => '茉', + '\\' => '苒', + ']' => '苗', + '^' => '英', + '_' => '茁', + '`' => '苜', + 'a' => '苔', + 'b' => '苑', + 'c' => '苞', + 'd' => '苓', + 'e' => '苟', + 'f' => '苯', + 'g' => '茆', + 'h' => '虐', + 'i' => '虹', + 'j' => '虻', + 'k' => '虺', + 'l' => '衍', + 'm' => '衫', + 'n' => '要', + 'o' => '觔', + 'p' => '計', + 'q' => '訂', + 'r' => '訃', + 's' => '貞', + 't' => '負', + 'u' => '赴', + 'v' => '赳', + 'w' => '趴', + 'x' => '軍', + 'y' => '軌', + 'z' => '述', + '{' => '迦', + '|' => '迢', + '}' => '迪', + '~' => '迥', + '' => '迭', + '' => '迫', + '' => '迤', + '' => '迨', + '' => '郊', + '' => '郎', + '' => '郁', + '' => '郃', + '' => '酋', + '' => '酊', + '' => '重', + '' => '閂', + '' => '限', + '' => '陋', + '' => '陌', + '' => '降', + '' => '面', + '' => '革', + '' => '韋', + '' => '韭', + '' => '音', + '' => '頁', + '' => '風', + '' => '飛', + '' => '食', + '' => '首', + '' => '香', + '' => '乘', + '' => '亳', + '' => '倌', + '' => '倍', + '' => '倣', + '' => '俯', + '' => '倦', + '' => '倥', + '' => '俸', + '' => '倩', + '' => '倖', + '' => '倆', + '' => '值', + '' => '借', + '' => '倚', + '' => '倒', + '' => '們', + '' => '俺', + '' => '倀', + '' => '倔', + '' => '倨', + '' => '俱', + '' => '倡', + '' => '個', + '' => '候', + '' => '倘', + '' => '俳', + '' => '修', + '' => '倭', + '' => '倪', + '' => '俾', + '' => '倫', + '' => '倉', + '' => '兼', + '' => '冤', + '' => '冥', + '' => '冢', + '' => '凍', + '' => '凌', + '' => '准', + '' => '凋', + '' => '剖', + '' => '剜', + '' => '剔', + '' => '剛', + '' => '剝', + '' => '匪', + '' => '卿', + '' => '原', + '' => '厝', + '' => '叟', + '' => '哨', + '' => '唐', + '' => '唁', + '' => '唷', + '' => '哼', + '' => '哥', + '' => '哲', + '' => '唆', + '' => '哺', + '' => '唔', + '' => '哩', + '' => '哭', + '' => '員', + '' => '唉', + '' => '哮', + '' => '哪', + '@' => '哦', + 'A' => '唧', + 'B' => '唇', + 'C' => '哽', + 'D' => '唏', + 'E' => '圃', + 'F' => '圄', + 'G' => '埂', + 'H' => '埔', + 'I' => '埋', + 'J' => '埃', + 'K' => '堉', + 'L' => '夏', + 'M' => '套', + 'N' => '奘', + 'O' => '奚', + 'P' => '娑', + 'Q' => '娘', + 'R' => '娜', + 'S' => '娟', + 'T' => '娛', + 'U' => '娓', + 'V' => '姬', + 'W' => '娠', + 'X' => '娣', + 'Y' => '娩', + 'Z' => '娥', + '[' => '娌', + '\\' => '娉', + ']' => '孫', + '^' => '屘', + '_' => '宰', + '`' => '害', + 'a' => '家', + 'b' => '宴', + 'c' => '宮', + 'd' => '宵', + 'e' => '容', + 'f' => '宸', + 'g' => '射', + 'h' => '屑', + 'i' => '展', + 'j' => '屐', + 'k' => '峭', + 'l' => '峽', + 'm' => '峻', + 'n' => '峪', + 'o' => '峨', + 'p' => '峰', + 'q' => '島', + 'r' => '崁', + 's' => '峴', + 't' => '差', + 'u' => '席', + 'v' => '師', + 'w' => '庫', + 'x' => '庭', + 'y' => '座', + 'z' => '弱', + '{' => '徒', + '|' => '徑', + '}' => '徐', + '~' => '恙', + '' => '恣', + '' => '恥', + '' => '恐', + '' => '恕', + '' => '恭', + '' => '恩', + '' => '息', + '' => '悄', + '' => '悟', + '' => '悚', + '' => '悍', + '' => '悔', + '' => '悌', + '' => '悅', + '' => '悖', + '' => '扇', + '' => '拳', + '' => '挈', + '' => '拿', + '' => '捎', + '' => '挾', + '' => '振', + '' => '捕', + '' => '捂', + '' => '捆', + '' => '捏', + '' => '捉', + '' => '挺', + '' => '捐', + '' => '挽', + '' => '挪', + '' => '挫', + '' => '挨', + '' => '捍', + '' => '捌', + '' => '效', + '' => '敉', + '' => '料', + '' => '旁', + '' => '旅', + '' => '時', + '' => '晉', + '' => '晏', + '' => '晃', + '' => '晒', + '' => '晌', + '' => '晅', + '' => '晁', + '' => '書', + '' => '朔', + '' => '朕', + '' => '朗', + '' => '校', + '' => '核', + '' => '案', + '' => '框', + '' => '桓', + '' => '根', + '' => '桂', + '' => '桔', + '' => '栩', + '' => '梳', + '' => '栗', + '' => '桌', + '' => '桑', + '' => '栽', + '' => '柴', + '' => '桐', + '' => '桀', + '' => '格', + '' => '桃', + '' => '株', + '' => '桅', + '' => '栓', + '' => '栘', + '' => '桁', + '' => '殊', + '' => '殉', + '' => '殷', + '' => '氣', + '' => '氧', + '' => '氨', + '' => '氦', + '' => '氤', + '' => '泰', + '' => '浪', + '' => '涕', + '' => '消', + '' => '涇', + '' => '浦', + '' => '浸', + '' => '海', + '' => '浙', + '' => '涓', + '@' => '浬', + 'A' => '涉', + 'B' => '浮', + 'C' => '浚', + 'D' => '浴', + 'E' => '浩', + 'F' => '涌', + 'G' => '涊', + 'H' => '浹', + 'I' => '涅', + 'J' => '浥', + 'K' => '涔', + 'L' => '烊', + 'M' => '烘', + 'N' => '烤', + 'O' => '烙', + 'P' => '烈', + 'Q' => '烏', + 'R' => '爹', + 'S' => '特', + 'T' => '狼', + 'U' => '狹', + 'V' => '狽', + 'W' => '狸', + 'X' => '狷', + 'Y' => '玆', + 'Z' => '班', + '[' => '琉', + '\\' => '珮', + ']' => '珠', + '^' => '珪', + '_' => '珞', + '`' => '畔', + 'a' => '畝', + 'b' => '畜', + 'c' => '畚', + 'd' => '留', + 'e' => '疾', + 'f' => '病', + 'g' => '症', + 'h' => '疲', + 'i' => '疳', + 'j' => '疽', + 'k' => '疼', + 'l' => '疹', + 'm' => '痂', + 'n' => '疸', + 'o' => '皋', + 'p' => '皰', + 'q' => '益', + 'r' => '盍', + 's' => '盎', + 't' => '眩', + 'u' => '真', + 'v' => '眠', + 'w' => '眨', + 'x' => '矩', + 'y' => '砰', + 'z' => '砧', + '{' => '砸', + '|' => '砝', + '}' => '破', + '~' => '砷', + '' => '砥', + '' => '砭', + '' => '砠', + '' => '砟', + '' => '砲', + '' => '祕', + '' => '祐', + '' => '祠', + '' => '祟', + '' => '祖', + '' => '神', + '' => '祝', + '' => '祗', + '' => '祚', + '' => '秤', + '' => '秣', + '' => '秧', + '' => '租', + '' => '秦', + '' => '秩', + '' => '秘', + '' => '窄', + '' => '窈', + '' => '站', + '' => '笆', + '' => '笑', + '' => '粉', + '' => '紡', + '' => '紗', + '' => '紋', + '' => '紊', + '' => '素', + '' => '索', + '' => '純', + '' => '紐', + '' => '紕', + '' => '級', + '' => '紜', + '' => '納', + '' => '紙', + '' => '紛', + '' => '缺', + '' => '罟', + '' => '羔', + '' => '翅', + '' => '翁', + '' => '耆', + '' => '耘', + '' => '耕', + '' => '耙', + '' => '耗', + '' => '耽', + '' => '耿', + '' => '胱', + '' => '脂', + '' => '胰', + '' => '脅', + '' => '胭', + '' => '胴', + '' => '脆', + '' => '胸', + '' => '胳', + '' => '脈', + '' => '能', + '' => '脊', + '' => '胼', + '' => '胯', + '' => '臭', + '' => '臬', + '' => '舀', + '' => '舐', + '' => '航', + '' => '舫', + '' => '舨', + '' => '般', + '' => '芻', + '' => '茫', + '' => '荒', + '' => '荔', + '' => '荊', + '' => '茸', + '' => '荐', + '' => '草', + '' => '茵', + '' => '茴', + '' => '荏', + '' => '茲', + '' => '茹', + '' => '茶', + '' => '茗', + '' => '荀', + '' => '茱', + '' => '茨', + '' => '荃', + '@' => '虔', + 'A' => '蚊', + 'B' => '蚪', + 'C' => '蚓', + 'D' => '蚤', + 'E' => '蚩', + 'F' => '蚌', + 'G' => '蚣', + 'H' => '蚜', + 'I' => '衰', + 'J' => '衷', + 'K' => '袁', + 'L' => '袂', + 'M' => '衽', + 'N' => '衹', + 'O' => '記', + 'P' => '訐', + 'Q' => '討', + 'R' => '訌', + 'S' => '訕', + 'T' => '訊', + 'U' => '託', + 'V' => '訓', + 'W' => '訖', + 'X' => '訏', + 'Y' => '訑', + 'Z' => '豈', + '[' => '豺', + '\\' => '豹', + ']' => '財', + '^' => '貢', + '_' => '起', + '`' => '躬', + 'a' => '軒', + 'b' => '軔', + 'c' => '軏', + 'd' => '辱', + 'e' => '送', + 'f' => '逆', + 'g' => '迷', + 'h' => '退', + 'i' => '迺', + 'j' => '迴', + 'k' => '逃', + 'l' => '追', + 'm' => '逅', + 'n' => '迸', + 'o' => '邕', + 'p' => '郡', + 'q' => '郝', + 'r' => '郢', + 's' => '酒', + 't' => '配', + 'u' => '酌', + 'v' => '釘', + 'w' => '針', + 'x' => '釗', + 'y' => '釜', + 'z' => '釙', + '{' => '閃', + '|' => '院', + '}' => '陣', + '~' => '陡', + '' => '陛', + '' => '陝', + '' => '除', + '' => '陘', + '' => '陞', + '' => '隻', + '' => '飢', + '' => '馬', + '' => '骨', + '' => '高', + '' => '鬥', + '' => '鬲', + '' => '鬼', + '' => '乾', + '' => '偺', + '' => '偽', + '' => '停', + '' => '假', + '' => '偃', + '' => '偌', + '' => '做', + '' => '偉', + '' => '健', + '' => '偶', + '' => '偎', + '' => '偕', + '' => '偵', + '' => '側', + '' => '偷', + '' => '偏', + '' => '倏', + '' => '偯', + '' => '偭', + '' => '兜', + '' => '冕', + '' => '凰', + '' => '剪', + '' => '副', + '' => '勒', + '' => '務', + '' => '勘', + '' => '動', + '' => '匐', + '' => '匏', + '' => '匙', + '' => '匿', + '' => '區', + '' => '匾', + '' => '參', + '' => '曼', + '' => '商', + '' => '啪', + '' => '啦', + '' => '啄', + '' => '啞', + '' => '啡', + '' => '啃', + '' => '啊', + '' => '唱', + '' => '啖', + '' => '問', + '' => '啕', + '' => '唯', + '' => '啤', + '' => '唸', + '' => '售', + '' => '啜', + '' => '唬', + '' => '啣', + '' => '唳', + '' => '啁', + '' => '啗', + '' => '圈', + '' => '國', + '' => '圉', + '' => '域', + '' => '堅', + '' => '堊', + '' => '堆', + '' => '埠', + '' => '埤', + '' => '基', + '' => '堂', + '' => '堵', + '' => '執', + '' => '培', + '' => '夠', + '' => '奢', + '' => '娶', + '' => '婁', + '' => '婉', + '' => '婦', + '' => '婪', + '' => '婀', + '@' => '娼', + 'A' => '婢', + 'B' => '婚', + 'C' => '婆', + 'D' => '婊', + 'E' => '孰', + 'F' => '寇', + 'G' => '寅', + 'H' => '寄', + 'I' => '寂', + 'J' => '宿', + 'K' => '密', + 'L' => '尉', + 'M' => '專', + 'N' => '將', + 'O' => '屠', + 'P' => '屜', + 'Q' => '屝', + 'R' => '崇', + 'S' => '崆', + 'T' => '崎', + 'U' => '崛', + 'V' => '崖', + 'W' => '崢', + 'X' => '崑', + 'Y' => '崩', + 'Z' => '崔', + '[' => '崙', + '\\' => '崤', + ']' => '崧', + '^' => '崗', + '_' => '巢', + '`' => '常', + 'a' => '帶', + 'b' => '帳', + 'c' => '帷', + 'd' => '康', + 'e' => '庸', + 'f' => '庶', + 'g' => '庵', + 'h' => '庾', + 'i' => '張', + 'j' => '強', + 'k' => '彗', + 'l' => '彬', + 'm' => '彩', + 'n' => '彫', + 'o' => '得', + 'p' => '徙', + 'q' => '從', + 'r' => '徘', + 's' => '御', + 't' => '徠', + 'u' => '徜', + 'v' => '恿', + 'w' => '患', + 'x' => '悉', + 'y' => '悠', + 'z' => '您', + '{' => '惋', + '|' => '悴', + '}' => '惦', + '~' => '悽', + '' => '情', + '' => '悻', + '' => '悵', + '' => '惜', + '' => '悼', + '' => '惘', + '' => '惕', + '' => '惆', + '' => '惟', + '' => '悸', + '' => '惚', + '' => '惇', + '' => '戚', + '' => '戛', + '' => '扈', + '' => '掠', + '' => '控', + '' => '捲', + '' => '掖', + '' => '探', + '' => '接', + '' => '捷', + '' => '捧', + '' => '掘', + '' => '措', + '' => '捱', + '' => '掩', + '' => '掉', + '' => '掃', + '' => '掛', + '' => '捫', + '' => '推', + '' => '掄', + '' => '授', + '' => '掙', + '' => '採', + '' => '掬', + '' => '排', + '' => '掏', + '' => '掀', + '' => '捻', + '' => '捩', + '' => '捨', + '' => '捺', + '' => '敝', + '' => '敖', + '' => '救', + '' => '教', + '' => '敗', + '' => '啟', + '' => '敏', + '' => '敘', + '' => '敕', + '' => '敔', + '' => '斜', + '' => '斛', + '' => '斬', + '' => '族', + '' => '旋', + '' => '旌', + '' => '旎', + '' => '晝', + '' => '晚', + '' => '晤', + '' => '晨', + '' => '晦', + '' => '晞', + '' => '曹', + '' => '勗', + '' => '望', + '' => '梁', + '' => '梯', + '' => '梢', + '' => '梓', + '' => '梵', + '' => '桿', + '' => '桶', + '' => '梱', + '' => '梧', + '' => '梗', + '' => '械', + '' => '梃', + '' => '棄', + '' => '梭', + '' => '梆', + '' => '梅', + '' => '梔', + '' => '條', + '' => '梨', + '' => '梟', + '' => '梡', + '' => '梂', + '' => '欲', + '' => '殺', + '@' => '毫', + 'A' => '毬', + 'B' => '氫', + 'C' => '涎', + 'D' => '涼', + 'E' => '淳', + 'F' => '淙', + 'G' => '液', + 'H' => '淡', + 'I' => '淌', + 'J' => '淤', + 'K' => '添', + 'L' => '淺', + 'M' => '清', + 'N' => '淇', + 'O' => '淋', + 'P' => '涯', + 'Q' => '淑', + 'R' => '涮', + 'S' => '淞', + 'T' => '淹', + 'U' => '涸', + 'V' => '混', + 'W' => '淵', + 'X' => '淅', + 'Y' => '淒', + 'Z' => '渚', + '[' => '涵', + '\\' => '淚', + ']' => '淫', + '^' => '淘', + '_' => '淪', + '`' => '深', + 'a' => '淮', + 'b' => '淨', + 'c' => '淆', + 'd' => '淄', + 'e' => '涪', + 'f' => '淬', + 'g' => '涿', + 'h' => '淦', + 'i' => '烹', + 'j' => '焉', + 'k' => '焊', + 'l' => '烽', + 'm' => '烯', + 'n' => '爽', + 'o' => '牽', + 'p' => '犁', + 'q' => '猜', + 'r' => '猛', + 's' => '猖', + 't' => '猓', + 'u' => '猙', + 'v' => '率', + 'w' => '琅', + 'x' => '琊', + 'y' => '球', + 'z' => '理', + '{' => '現', + '|' => '琍', + '}' => '瓠', + '~' => '瓶', + '' => '瓷', + '' => '甜', + '' => '產', + '' => '略', + '' => '畦', + '' => '畢', + '' => '異', + '' => '疏', + '' => '痔', + '' => '痕', + '' => '疵', + '' => '痊', + '' => '痍', + '' => '皎', + '' => '盔', + '' => '盒', + '' => '盛', + '' => '眷', + '' => '眾', + '' => '眼', + '' => '眶', + '' => '眸', + '' => '眺', + '' => '硫', + '' => '硃', + '' => '硎', + '' => '祥', + '' => '票', + '' => '祭', + '' => '移', + '' => '窒', + '' => '窕', + '' => '笠', + '' => '笨', + '' => '笛', + '' => '第', + '' => '符', + '' => '笙', + '' => '笞', + '' => '笮', + '' => '粒', + '' => '粗', + '' => '粕', + '' => '絆', + '' => '絃', + '' => '統', + '' => '紮', + '' => '紹', + '' => '紼', + '' => '絀', + '' => '細', + '' => '紳', + '' => '組', + '' => '累', + '' => '終', + '' => '紲', + '' => '紱', + '' => '缽', + '' => '羞', + '' => '羚', + '' => '翌', + '' => '翎', + '' => '習', + '' => '耜', + '' => '聊', + '' => '聆', + '' => '脯', + '' => '脖', + '' => '脣', + '' => '脫', + '' => '脩', + '' => '脰', + '' => '脤', + '' => '舂', + '' => '舵', + '' => '舷', + '' => '舶', + '' => '船', + '' => '莎', + '' => '莞', + '' => '莘', + '' => '荸', + '' => '莢', + '' => '莖', + '' => '莽', + '' => '莫', + '' => '莒', + '' => '莊', + '' => '莓', + '' => '莉', + '' => '莠', + '' => '荷', + '' => '荻', + '' => '荼', + '@' => '莆', + 'A' => '莧', + 'B' => '處', + 'C' => '彪', + 'D' => '蛇', + 'E' => '蛀', + 'F' => '蚶', + 'G' => '蛄', + 'H' => '蚵', + 'I' => '蛆', + 'J' => '蛋', + 'K' => '蚱', + 'L' => '蚯', + 'M' => '蛉', + 'N' => '術', + 'O' => '袞', + 'P' => '袈', + 'Q' => '被', + 'R' => '袒', + 'S' => '袖', + 'T' => '袍', + 'U' => '袋', + 'V' => '覓', + 'W' => '規', + 'X' => '訪', + 'Y' => '訝', + 'Z' => '訣', + '[' => '訥', + '\\' => '許', + ']' => '設', + '^' => '訟', + '_' => '訛', + '`' => '訢', + 'a' => '豉', + 'b' => '豚', + 'c' => '販', + 'd' => '責', + 'e' => '貫', + 'f' => '貨', + 'g' => '貪', + 'h' => '貧', + 'i' => '赧', + 'j' => '赦', + 'k' => '趾', + 'l' => '趺', + 'm' => '軛', + 'n' => '軟', + 'o' => '這', + 'p' => '逍', + 'q' => '通', + 'r' => '逗', + 's' => '連', + 't' => '速', + 'u' => '逝', + 'v' => '逐', + 'w' => '逕', + 'x' => '逞', + 'y' => '造', + 'z' => '透', + '{' => '逢', + '|' => '逖', + '}' => '逛', + '~' => '途', + '' => '部', + '' => '郭', + '' => '都', + '' => '酗', + '' => '野', + '' => '釵', + '' => '釦', + '' => '釣', + '' => '釧', + '' => '釭', + '' => '釩', + '' => '閉', + '' => '陪', + '' => '陵', + '' => '陳', + '' => '陸', + '' => '陰', + '' => '陴', + '' => '陶', + '' => '陷', + '' => '陬', + '' => '雀', + '' => '雪', + '' => '雩', + '' => '章', + '' => '竟', + '' => '頂', + '' => '頃', + '' => '魚', + '' => '鳥', + '' => '鹵', + '' => '鹿', + '' => '麥', + '' => '麻', + '' => '傢', + '' => '傍', + '' => '傅', + '' => '備', + '' => '傑', + '' => '傀', + '' => '傖', + '' => '傘', + '' => '傚', + '' => '最', + '' => '凱', + '' => '割', + '' => '剴', + '' => '創', + '' => '剩', + '' => '勞', + '' => '勝', + '' => '勛', + '' => '博', + '' => '厥', + '' => '啻', + '' => '喀', + '' => '喧', + '' => '啼', + '' => '喊', + '' => '喝', + '' => '喘', + '' => '喂', + '' => '喜', + '' => '喪', + '' => '喔', + '' => '喇', + '' => '喋', + '' => '喃', + '' => '喳', + '' => '單', + '' => '喟', + '' => '唾', + '' => '喲', + '' => '喚', + '' => '喻', + '' => '喬', + '' => '喱', + '' => '啾', + '' => '喉', + '' => '喫', + '' => '喙', + '' => '圍', + '' => '堯', + '' => '堪', + '' => '場', + '' => '堤', + '' => '堰', + '' => '報', + '' => '堡', + '' => '堝', + '' => '堠', + '' => '壹', + '' => '壺', + '' => '奠', + '@' => '婷', + 'A' => '媚', + 'B' => '婿', + 'C' => '媒', + 'D' => '媛', + 'E' => '媧', + 'F' => '孳', + 'G' => '孱', + 'H' => '寒', + 'I' => '富', + 'J' => '寓', + 'K' => '寐', + 'L' => '尊', + 'M' => '尋', + 'N' => '就', + 'O' => '嵌', + 'P' => '嵐', + 'Q' => '崴', + 'R' => '嵇', + 'S' => '巽', + 'T' => '幅', + 'U' => '帽', + 'V' => '幀', + 'W' => '幃', + 'X' => '幾', + 'Y' => '廊', + 'Z' => '廁', + '[' => '廂', + '\\' => '廄', + ']' => '弼', + '^' => '彭', + '_' => '復', + '`' => '循', + 'a' => '徨', + 'b' => '惑', + 'c' => '惡', + 'd' => '悲', + 'e' => '悶', + 'f' => '惠', + 'g' => '愜', + 'h' => '愣', + 'i' => '惺', + 'j' => '愕', + 'k' => '惰', + 'l' => '惻', + 'm' => '惴', + 'n' => '慨', + 'o' => '惱', + 'p' => '愎', + 'q' => '惶', + 'r' => '愉', + 's' => '愀', + 't' => '愒', + 'u' => '戟', + 'v' => '扉', + 'w' => '掣', + 'x' => '掌', + 'y' => '描', + 'z' => '揀', + '{' => '揩', + '|' => '揉', + '}' => '揆', + '~' => '揍', + '' => '插', + '' => '揣', + '' => '提', + '' => '握', + '' => '揖', + '' => '揭', + '' => '揮', + '' => '捶', + '' => '援', + '' => '揪', + '' => '換', + '' => '摒', + '' => '揚', + '' => '揹', + '' => '敞', + '' => '敦', + '' => '敢', + '' => '散', + '' => '斑', + '' => '斐', + '' => '斯', + '' => '普', + '' => '晰', + '' => '晴', + '' => '晶', + '' => '景', + '' => '暑', + '' => '智', + '' => '晾', + '' => '晷', + '' => '曾', + '' => '替', + '' => '期', + '' => '朝', + '' => '棺', + '' => '棕', + '' => '棠', + '' => '棘', + '' => '棗', + '' => '椅', + '' => '棟', + '' => '棵', + '' => '森', + '' => '棧', + '' => '棹', + '' => '棒', + '' => '棲', + '' => '棣', + '' => '棋', + '' => '棍', + '' => '植', + '' => '椒', + '' => '椎', + '' => '棉', + '' => '棚', + '' => '楮', + '' => '棻', + '' => '款', + '' => '欺', + '' => '欽', + '' => '殘', + '' => '殖', + '' => '殼', + '' => '毯', + '' => '氮', + '' => '氯', + '' => '氬', + '' => '港', + '' => '游', + '' => '湔', + '' => '渡', + '' => '渲', + '' => '湧', + '' => '湊', + '' => '渠', + '' => '渥', + '' => '渣', + '' => '減', + '' => '湛', + '' => '湘', + '' => '渤', + '' => '湖', + '' => '湮', + '' => '渭', + '' => '渦', + '' => '湯', + '' => '渴', + '' => '湍', + '' => '渺', + '' => '測', + '' => '湃', + '' => '渝', + '' => '渾', + '' => '滋', + '@' => '溉', + 'A' => '渙', + 'B' => '湎', + 'C' => '湣', + 'D' => '湄', + 'E' => '湲', + 'F' => '湩', + 'G' => '湟', + 'H' => '焙', + 'I' => '焚', + 'J' => '焦', + 'K' => '焰', + 'L' => '無', + 'M' => '然', + 'N' => '煮', + 'O' => '焜', + 'P' => '牌', + 'Q' => '犄', + 'R' => '犀', + 'S' => '猶', + 'T' => '猥', + 'U' => '猴', + 'V' => '猩', + 'W' => '琺', + 'X' => '琪', + 'Y' => '琳', + 'Z' => '琢', + '[' => '琥', + '\\' => '琵', + ']' => '琶', + '^' => '琴', + '_' => '琯', + '`' => '琛', + 'a' => '琦', + 'b' => '琨', + 'c' => '甥', + 'd' => '甦', + 'e' => '畫', + 'f' => '番', + 'g' => '痢', + 'h' => '痛', + 'i' => '痣', + 'j' => '痙', + 'k' => '痘', + 'l' => '痞', + 'm' => '痠', + 'n' => '登', + 'o' => '發', + 'p' => '皖', + 'q' => '皓', + 'r' => '皴', + 's' => '盜', + 't' => '睏', + 'u' => '短', + 'v' => '硝', + 'w' => '硬', + 'x' => '硯', + 'y' => '稍', + 'z' => '稈', + '{' => '程', + '|' => '稅', + '}' => '稀', + '~' => '窘', + '' => '窗', + '' => '窖', + '' => '童', + '' => '竣', + '' => '等', + '' => '策', + '' => '筆', + '' => '筐', + '' => '筒', + '' => '答', + '' => '筍', + '' => '筋', + '' => '筏', + '' => '筑', + '' => '粟', + '' => '粥', + '' => '絞', + '' => '結', + '' => '絨', + '' => '絕', + '' => '紫', + '' => '絮', + '' => '絲', + '' => '絡', + '' => '給', + '' => '絢', + '' => '絰', + '' => '絳', + '' => '善', + '' => '翔', + '' => '翕', + '' => '耋', + '' => '聒', + '' => '肅', + '' => '腕', + '' => '腔', + '' => '腋', + '' => '腑', + '' => '腎', + '' => '脹', + '' => '腆', + '' => '脾', + '' => '腌', + '' => '腓', + '' => '腴', + '' => '舒', + '' => '舜', + '' => '菩', + '' => '萃', + '' => '菸', + '' => '萍', + '' => '菠', + '' => '菅', + '' => '萋', + '' => '菁', + '' => '華', + '' => '菱', + '' => '菴', + '' => '著', + '' => '萊', + '' => '菰', + '' => '萌', + '' => '菌', + '' => '菽', + '' => '菲', + '' => '菊', + '' => '萸', + '' => '萎', + '' => '萄', + '' => '菜', + '' => '萇', + '' => '菔', + '' => '菟', + '' => '虛', + '' => '蛟', + '' => '蛙', + '' => '蛭', + '' => '蛔', + '' => '蛛', + '' => '蛤', + '' => '蛐', + '' => '蛞', + '' => '街', + '' => '裁', + '' => '裂', + '' => '袱', + '' => '覃', + '' => '視', + '' => '註', + '' => '詠', + '' => '評', + '' => '詞', + '' => '証', + '' => '詁', + '@' => '詔', + 'A' => '詛', + 'B' => '詐', + 'C' => '詆', + 'D' => '訴', + 'E' => '診', + 'F' => '訶', + 'G' => '詖', + 'H' => '象', + 'I' => '貂', + 'J' => '貯', + 'K' => '貼', + 'L' => '貳', + 'M' => '貽', + 'N' => '賁', + 'O' => '費', + 'P' => '賀', + 'Q' => '貴', + 'R' => '買', + 'S' => '貶', + 'T' => '貿', + 'U' => '貸', + 'V' => '越', + 'W' => '超', + 'X' => '趁', + 'Y' => '跎', + 'Z' => '距', + '[' => '跋', + '\\' => '跚', + ']' => '跑', + '^' => '跌', + '_' => '跛', + '`' => '跆', + 'a' => '軻', + 'b' => '軸', + 'c' => '軼', + 'd' => '辜', + 'e' => '逮', + 'f' => '逵', + 'g' => '週', + 'h' => '逸', + 'i' => '進', + 'j' => '逶', + 'k' => '鄂', + 'l' => '郵', + 'm' => '鄉', + 'n' => '郾', + 'o' => '酣', + 'p' => '酥', + 'q' => '量', + 'r' => '鈔', + 's' => '鈕', + 't' => '鈣', + 'u' => '鈉', + 'v' => '鈞', + 'w' => '鈍', + 'x' => '鈐', + 'y' => '鈇', + 'z' => '鈑', + '{' => '閔', + '|' => '閏', + '}' => '開', + '~' => '閑', + '' => '間', + '' => '閒', + '' => '閎', + '' => '隊', + '' => '階', + '' => '隋', + '' => '陽', + '' => '隅', + '' => '隆', + '' => '隍', + '' => '陲', + '' => '隄', + '' => '雁', + '' => '雅', + '' => '雄', + '' => '集', + '' => '雇', + '' => '雯', + '' => '雲', + '' => '韌', + '' => '項', + '' => '順', + '' => '須', + '' => '飧', + '' => '飪', + '' => '飯', + '' => '飩', + '' => '飲', + '' => '飭', + '' => '馮', + '' => '馭', + '' => '黃', + '' => '黍', + '' => '黑', + '' => '亂', + '' => '傭', + '' => '債', + '' => '傲', + '' => '傳', + '' => '僅', + '' => '傾', + '' => '催', + '' => '傷', + '' => '傻', + '' => '傯', + '' => '僇', + '' => '剿', + '' => '剷', + '' => '剽', + '' => '募', + '' => '勦', + '' => '勤', + '' => '勢', + '' => '勣', + '' => '匯', + '' => '嗟', + '' => '嗨', + '' => '嗓', + '' => '嗦', + '' => '嗎', + '' => '嗜', + '' => '嗇', + '' => '嗑', + '' => '嗣', + '' => '嗤', + '' => '嗯', + '' => '嗚', + '' => '嗡', + '' => '嗅', + '' => '嗆', + '' => '嗥', + '' => '嗉', + '' => '園', + '' => '圓', + '' => '塞', + '' => '塑', + '' => '塘', + '' => '塗', + '' => '塚', + '' => '塔', + '' => '填', + '' => '塌', + '' => '塭', + '' => '塊', + '' => '塢', + '' => '塒', + '' => '塋', + '' => '奧', + '' => '嫁', + '' => '嫉', + '' => '嫌', + '' => '媾', + '' => '媽', + '' => '媼', + '@' => '媳', + 'A' => '嫂', + 'B' => '媲', + 'C' => '嵩', + 'D' => '嵯', + 'E' => '幌', + 'F' => '幹', + 'G' => '廉', + 'H' => '廈', + 'I' => '弒', + 'J' => '彙', + 'K' => '徬', + 'L' => '微', + 'M' => '愚', + 'N' => '意', + 'O' => '慈', + 'P' => '感', + 'Q' => '想', + 'R' => '愛', + 'S' => '惹', + 'T' => '愁', + 'U' => '愈', + 'V' => '慎', + 'W' => '慌', + 'X' => '慄', + 'Y' => '慍', + 'Z' => '愾', + '[' => '愴', + '\\' => '愧', + ']' => '愍', + '^' => '愆', + '_' => '愷', + '`' => '戡', + 'a' => '戢', + 'b' => '搓', + 'c' => '搾', + 'd' => '搞', + 'e' => '搪', + 'f' => '搭', + 'g' => '搽', + 'h' => '搬', + 'i' => '搏', + 'j' => '搜', + 'k' => '搔', + 'l' => '損', + 'm' => '搶', + 'n' => '搖', + 'o' => '搗', + 'p' => '搆', + 'q' => '敬', + 'r' => '斟', + 's' => '新', + 't' => '暗', + 'u' => '暉', + 'v' => '暇', + 'w' => '暈', + 'x' => '暖', + 'y' => '暄', + 'z' => '暘', + '{' => '暍', + '|' => '會', + '}' => '榔', + '~' => '業', + '' => '楚', + '' => '楷', + '' => '楠', + '' => '楔', + '' => '極', + '' => '椰', + '' => '概', + '' => '楊', + '' => '楨', + '' => '楫', + '' => '楞', + '' => '楓', + '' => '楹', + '' => '榆', + '' => '楝', + '' => '楣', + '' => '楛', + '' => '歇', + '' => '歲', + '' => '毀', + '' => '殿', + '' => '毓', + '' => '毽', + '' => '溢', + '' => '溯', + '' => '滓', + '' => '溶', + '' => '滂', + '' => '源', + '' => '溝', + '' => '滇', + '' => '滅', + '' => '溥', + '' => '溘', + '' => '溼', + '' => '溺', + '' => '溫', + '' => '滑', + '' => '準', + '' => '溜', + '' => '滄', + '' => '滔', + '' => '溪', + '' => '溧', + '' => '溴', + '' => '煎', + '' => '煙', + '' => '煩', + '' => '煤', + '' => '煉', + '' => '照', + '' => '煜', + '' => '煬', + '' => '煦', + '' => '煌', + '' => '煥', + '' => '煞', + '' => '煆', + '' => '煨', + '' => '煖', + '' => '爺', + '' => '牒', + '' => '猷', + '' => '獅', + '' => '猿', + '' => '猾', + '' => '瑯', + '' => '瑚', + '' => '瑕', + '' => '瑟', + '' => '瑞', + '' => '瑁', + '' => '琿', + '' => '瑙', + '' => '瑛', + '' => '瑜', + '' => '當', + '' => '畸', + '' => '瘀', + '' => '痰', + '' => '瘁', + '' => '痲', + '' => '痱', + '' => '痺', + '' => '痿', + '' => '痴', + '' => '痳', + '' => '盞', + '' => '盟', + '' => '睛', + '' => '睫', + '' => '睦', + '' => '睞', + '' => '督', + '@' => '睹', + 'A' => '睪', + 'B' => '睬', + 'C' => '睜', + 'D' => '睥', + 'E' => '睨', + 'F' => '睢', + 'G' => '矮', + 'H' => '碎', + 'I' => '碰', + 'J' => '碗', + 'K' => '碘', + 'L' => '碌', + 'M' => '碉', + 'N' => '硼', + 'O' => '碑', + 'P' => '碓', + 'Q' => '硿', + 'R' => '祺', + 'S' => '祿', + 'T' => '禁', + 'U' => '萬', + 'V' => '禽', + 'W' => '稜', + 'X' => '稚', + 'Y' => '稠', + 'Z' => '稔', + '[' => '稟', + '\\' => '稞', + ']' => '窟', + '^' => '窠', + '_' => '筷', + '`' => '節', + 'a' => '筠', + 'b' => '筮', + 'c' => '筧', + 'd' => '粱', + 'e' => '粳', + 'f' => '粵', + 'g' => '經', + 'h' => '絹', + 'i' => '綑', + 'j' => '綁', + 'k' => '綏', + 'l' => '絛', + 'm' => '置', + 'n' => '罩', + 'o' => '罪', + 'p' => '署', + 'q' => '義', + 'r' => '羨', + 's' => '群', + 't' => '聖', + 'u' => '聘', + 'v' => '肆', + 'w' => '肄', + 'x' => '腱', + 'y' => '腰', + 'z' => '腸', + '{' => '腥', + '|' => '腮', + '}' => '腳', + '~' => '腫', + '' => '腹', + '' => '腺', + '' => '腦', + '' => '舅', + '' => '艇', + '' => '蒂', + '' => '葷', + '' => '落', + '' => '萱', + '' => '葵', + '' => '葦', + '' => '葫', + '' => '葉', + '' => '葬', + '' => '葛', + '' => '萼', + '' => '萵', + '' => '葡', + '' => '董', + '' => '葩', + '' => '葭', + '' => '葆', + '' => '虞', + '' => '虜', + '' => '號', + '' => '蛹', + '' => '蜓', + '' => '蜈', + '' => '蜇', + '' => '蜀', + '' => '蛾', + '' => '蛻', + '' => '蜂', + '' => '蜃', + '' => '蜆', + '' => '蜊', + '' => '衙', + '' => '裟', + '' => '裔', + '' => '裙', + '' => '補', + '' => '裘', + '' => '裝', + '' => '裡', + '' => '裊', + '' => '裕', + '' => '裒', + '' => '覜', + '' => '解', + '' => '詫', + '' => '該', + '' => '詳', + '' => '試', + '' => '詩', + '' => '詰', + '' => '誇', + '' => '詼', + '' => '詣', + '' => '誠', + '' => '話', + '' => '誅', + '' => '詭', + '' => '詢', + '' => '詮', + '' => '詬', + '' => '詹', + '' => '詻', + '' => '訾', + '' => '詨', + '' => '豢', + '' => '貊', + '' => '貉', + '' => '賊', + '' => '資', + '' => '賈', + '' => '賄', + '' => '貲', + '' => '賃', + '' => '賂', + '' => '賅', + '' => '跡', + '' => '跟', + '' => '跨', + '' => '路', + '' => '跳', + '' => '跺', + '' => '跪', + '' => '跤', + '' => '跦', + '' => '躲', + '' => '較', + '' => '載', + '' => '軾', + '' => '輊', + '@' => '辟', + 'A' => '農', + 'B' => '運', + 'C' => '遊', + 'D' => '道', + 'E' => '遂', + 'F' => '達', + 'G' => '逼', + 'H' => '違', + 'I' => '遐', + 'J' => '遇', + 'K' => '遏', + 'L' => '過', + 'M' => '遍', + 'N' => '遑', + 'O' => '逾', + 'P' => '遁', + 'Q' => '鄒', + 'R' => '鄗', + 'S' => '酬', + 'T' => '酪', + 'U' => '酩', + 'V' => '釉', + 'W' => '鈷', + 'X' => '鉗', + 'Y' => '鈸', + 'Z' => '鈽', + '[' => '鉀', + '\\' => '鈾', + ']' => '鉛', + '^' => '鉋', + '_' => '鉤', + '`' => '鉑', + 'a' => '鈴', + 'b' => '鉉', + 'c' => '鉍', + 'd' => '鉅', + 'e' => '鈹', + 'f' => '鈿', + 'g' => '鉚', + 'h' => '閘', + 'i' => '隘', + 'j' => '隔', + 'k' => '隕', + 'l' => '雍', + 'm' => '雋', + 'n' => '雉', + 'o' => '雊', + 'p' => '雷', + 'q' => '電', + 'r' => '雹', + 's' => '零', + 't' => '靖', + 'u' => '靴', + 'v' => '靶', + 'w' => '預', + 'x' => '頑', + 'y' => '頓', + 'z' => '頊', + '{' => '頒', + '|' => '頌', + '}' => '飼', + '~' => '飴', + '' => '飽', + '' => '飾', + '' => '馳', + '' => '馱', + '' => '馴', + '' => '髡', + '' => '鳩', + '' => '麂', + '' => '鼎', + '' => '鼓', + '' => '鼠', + '' => '僧', + '' => '僮', + '' => '僥', + '' => '僖', + '' => '僭', + '' => '僚', + '' => '僕', + '' => '像', + '' => '僑', + '' => '僱', + '' => '僎', + '' => '僩', + '' => '兢', + '' => '凳', + '' => '劃', + '' => '劂', + '' => '匱', + '' => '厭', + '' => '嗾', + '' => '嘀', + '' => '嘛', + '' => '嘗', + '' => '嗽', + '' => '嘔', + '' => '嘆', + '' => '嘉', + '' => '嘍', + '' => '嘎', + '' => '嗷', + '' => '嘖', + '' => '嘟', + '' => '嘈', + '' => '嘐', + '' => '嗶', + '' => '團', + '' => '圖', + '' => '塵', + '' => '塾', + '' => '境', + '' => '墓', + '' => '墊', + '' => '塹', + '' => '墅', + '' => '塽', + '' => '壽', + '' => '夥', + '' => '夢', + '' => '夤', + '' => '奪', + '' => '奩', + '' => '嫡', + '' => '嫦', + '' => '嫩', + '' => '嫗', + '' => '嫖', + '' => '嫘', + '' => '嫣', + '' => '孵', + '' => '寞', + '' => '寧', + '' => '寡', + '' => '寥', + '' => '實', + '' => '寨', + '' => '寢', + '' => '寤', + '' => '察', + '' => '對', + '' => '屢', + '' => '嶄', + '' => '嶇', + '' => '幛', + '' => '幣', + '' => '幕', + '' => '幗', + '' => '幔', + '' => '廓', + '' => '廖', + '' => '弊', + '' => '彆', + '' => '彰', + '' => '徹', + '' => '慇', + '@' => '愿', + 'A' => '態', + 'B' => '慷', + 'C' => '慢', + 'D' => '慣', + 'E' => '慟', + 'F' => '慚', + 'G' => '慘', + 'H' => '慵', + 'I' => '截', + 'J' => '撇', + 'K' => '摘', + 'L' => '摔', + 'M' => '撤', + 'N' => '摸', + 'O' => '摟', + 'P' => '摺', + 'Q' => '摑', + 'R' => '摧', + 'S' => '搴', + 'T' => '摭', + 'U' => '摻', + 'V' => '敲', + 'W' => '斡', + 'X' => '旗', + 'Y' => '旖', + 'Z' => '暢', + '[' => '暨', + '\\' => '暝', + ']' => '榜', + '^' => '榨', + '_' => '榕', + '`' => '槁', + 'a' => '榮', + 'b' => '槓', + 'c' => '構', + 'd' => '榛', + 'e' => '榷', + 'f' => '榻', + 'g' => '榫', + 'h' => '榴', + 'i' => '槐', + 'j' => '槍', + 'k' => '榭', + 'l' => '槌', + 'm' => '榦', + 'n' => '槃', + 'o' => '榣', + 'p' => '歉', + 'q' => '歌', + 'r' => '氳', + 's' => '漳', + 't' => '演', + 'u' => '滾', + 'v' => '漓', + 'w' => '滴', + 'x' => '漩', + 'y' => '漾', + 'z' => '漠', + '{' => '漬', + '|' => '漏', + '}' => '漂', + '~' => '漢', + '' => '滿', + '' => '滯', + '' => '漆', + '' => '漱', + '' => '漸', + '' => '漲', + '' => '漣', + '' => '漕', + '' => '漫', + '' => '漯', + '' => '澈', + '' => '漪', + '' => '滬', + '' => '漁', + '' => '滲', + '' => '滌', + '' => '滷', + '' => '熔', + '' => '熙', + '' => '煽', + '' => '熊', + '' => '熄', + '' => '熒', + '' => '爾', + '' => '犒', + '' => '犖', + '' => '獄', + '' => '獐', + '' => '瑤', + '' => '瑣', + '' => '瑪', + '' => '瑰', + '' => '瑭', + '' => '甄', + '' => '疑', + '' => '瘧', + '' => '瘍', + '' => '瘋', + '' => '瘉', + '' => '瘓', + '' => '盡', + '' => '監', + '' => '瞄', + '' => '睽', + '' => '睿', + '' => '睡', + '' => '磁', + '' => '碟', + '' => '碧', + '' => '碳', + '' => '碩', + '' => '碣', + '' => '禎', + '' => '福', + '' => '禍', + '' => '種', + '' => '稱', + '' => '窪', + '' => '窩', + '' => '竭', + '' => '端', + '' => '管', + '' => '箕', + '' => '箋', + '' => '筵', + '' => '算', + '' => '箝', + '' => '箔', + '' => '箏', + '' => '箸', + '' => '箇', + '' => '箄', + '' => '粹', + '' => '粽', + '' => '精', + '' => '綻', + '' => '綰', + '' => '綜', + '' => '綽', + '' => '綾', + '' => '綠', + '' => '緊', + '' => '綴', + '' => '網', + '' => '綱', + '' => '綺', + '' => '綢', + '' => '綿', + '' => '綵', + '' => '綸', + '' => '維', + '' => '緒', + '' => '緇', + '' => '綬', + '@' => '罰', + 'A' => '翠', + 'B' => '翡', + 'C' => '翟', + 'D' => '聞', + 'E' => '聚', + 'F' => '肇', + 'G' => '腐', + 'H' => '膀', + 'I' => '膏', + 'J' => '膈', + 'K' => '膊', + 'L' => '腿', + 'M' => '膂', + 'N' => '臧', + 'O' => '臺', + 'P' => '與', + 'Q' => '舔', + 'R' => '舞', + 'S' => '艋', + 'T' => '蓉', + 'U' => '蒿', + 'V' => '蓆', + 'W' => '蓄', + 'X' => '蒙', + 'Y' => '蒞', + 'Z' => '蒲', + '[' => '蒜', + '\\' => '蓋', + ']' => '蒸', + '^' => '蓀', + '_' => '蓓', + '`' => '蒐', + 'a' => '蒼', + 'b' => '蓑', + 'c' => '蓊', + 'd' => '蜿', + 'e' => '蜜', + 'f' => '蜻', + 'g' => '蜢', + 'h' => '蜥', + 'i' => '蜴', + 'j' => '蜘', + 'k' => '蝕', + 'l' => '蜷', + 'm' => '蜩', + 'n' => '裳', + 'o' => '褂', + 'p' => '裴', + 'q' => '裹', + 'r' => '裸', + 's' => '製', + 't' => '裨', + 'u' => '褚', + 'v' => '裯', + 'w' => '誦', + 'x' => '誌', + 'y' => '語', + 'z' => '誣', + '{' => '認', + '|' => '誡', + '}' => '誓', + '~' => '誤', + '' => '說', + '' => '誥', + '' => '誨', + '' => '誘', + '' => '誑', + '' => '誚', + '' => '誧', + '' => '豪', + '' => '貍', + '' => '貌', + '' => '賓', + '' => '賑', + '' => '賒', + '' => '赫', + '' => '趙', + '' => '趕', + '' => '跼', + '' => '輔', + '' => '輒', + '' => '輕', + '' => '輓', + '' => '辣', + '' => '遠', + '' => '遘', + '' => '遜', + '' => '遣', + '' => '遙', + '' => '遞', + '' => '遢', + '' => '遝', + '' => '遛', + '' => '鄙', + '' => '鄘', + '' => '鄞', + '' => '酵', + '' => '酸', + '' => '酷', + '' => '酴', + '' => '鉸', + '' => '銀', + '' => '銅', + '' => '銘', + '' => '銖', + '' => '鉻', + '' => '銓', + '' => '銜', + '' => '銨', + '' => '鉼', + '' => '銑', + '' => '閡', + '' => '閨', + '' => '閩', + '' => '閣', + '' => '閥', + '' => '閤', + '' => '隙', + '' => '障', + '' => '際', + '' => '雌', + '' => '雒', + '' => '需', + '' => '靼', + '' => '鞅', + '' => '韶', + '' => '頗', + '' => '領', + '' => '颯', + '' => '颱', + '' => '餃', + '' => '餅', + '' => '餌', + '' => '餉', + '' => '駁', + '' => '骯', + '' => '骰', + '' => '髦', + '' => '魁', + '' => '魂', + '' => '鳴', + '' => '鳶', + '' => '鳳', + '' => '麼', + '' => '鼻', + '' => '齊', + '' => '億', + '' => '儀', + '' => '僻', + '' => '僵', + '' => '價', + '' => '儂', + '' => '儈', + '' => '儉', + '' => '儅', + '' => '凜', + '@' => '劇', + 'A' => '劈', + 'B' => '劉', + 'C' => '劍', + 'D' => '劊', + 'E' => '勰', + 'F' => '厲', + 'G' => '嘮', + 'H' => '嘻', + 'I' => '嘹', + 'J' => '嘲', + 'K' => '嘿', + 'L' => '嘴', + 'M' => '嘩', + 'N' => '噓', + 'O' => '噎', + 'P' => '噗', + 'Q' => '噴', + 'R' => '嘶', + 'S' => '嘯', + 'T' => '嘰', + 'U' => '墀', + 'V' => '墟', + 'W' => '增', + 'X' => '墳', + 'Y' => '墜', + 'Z' => '墮', + '[' => '墩', + '\\' => '墦', + ']' => '奭', + '^' => '嬉', + '_' => '嫻', + '`' => '嬋', + 'a' => '嫵', + 'b' => '嬌', + 'c' => '嬈', + 'd' => '寮', + 'e' => '寬', + 'f' => '審', + 'g' => '寫', + 'h' => '層', + 'i' => '履', + 'j' => '嶝', + 'k' => '嶔', + 'l' => '幢', + 'm' => '幟', + 'n' => '幡', + 'o' => '廢', + 'p' => '廚', + 'q' => '廟', + 'r' => '廝', + 's' => '廣', + 't' => '廠', + 'u' => '彈', + 'v' => '影', + 'w' => '德', + 'x' => '徵', + 'y' => '慶', + 'z' => '慧', + '{' => '慮', + '|' => '慝', + '}' => '慕', + '~' => '憂', + '' => '慼', + '' => '慰', + '' => '慫', + '' => '慾', + '' => '憧', + '' => '憐', + '' => '憫', + '' => '憎', + '' => '憬', + '' => '憚', + '' => '憤', + '' => '憔', + '' => '憮', + '' => '戮', + '' => '摩', + '' => '摯', + '' => '摹', + '' => '撞', + '' => '撲', + '' => '撈', + '' => '撐', + '' => '撰', + '' => '撥', + '' => '撓', + '' => '撕', + '' => '撩', + '' => '撒', + '' => '撮', + '' => '播', + '' => '撫', + '' => '撚', + '' => '撬', + '' => '撙', + '' => '撢', + '' => '撳', + '' => '敵', + '' => '敷', + '' => '數', + '' => '暮', + '' => '暫', + '' => '暴', + '' => '暱', + '' => '樣', + '' => '樟', + '' => '槨', + '' => '樁', + '' => '樞', + '' => '標', + '' => '槽', + '' => '模', + '' => '樓', + '' => '樊', + '' => '槳', + '' => '樂', + '' => '樅', + '' => '槭', + '' => '樑', + '' => '歐', + '' => '歎', + '' => '殤', + '' => '毅', + '' => '毆', + '' => '漿', + '' => '潼', + '' => '澄', + '' => '潑', + '' => '潦', + '' => '潔', + '' => '澆', + '' => '潭', + '' => '潛', + '' => '潸', + '' => '潮', + '' => '澎', + '' => '潺', + '' => '潰', + '' => '潤', + '' => '澗', + '' => '潘', + '' => '滕', + '' => '潯', + '' => '潠', + '' => '潟', + '' => '熟', + '' => '熬', + '' => '熱', + '' => '熨', + '' => '牖', + '' => '犛', + '' => '獎', + '' => '獗', + '' => '瑩', + '' => '璋', + '' => '璃', + '@' => '瑾', + 'A' => '璀', + 'B' => '畿', + 'C' => '瘠', + 'D' => '瘩', + 'E' => '瘟', + 'F' => '瘤', + 'G' => '瘦', + 'H' => '瘡', + 'I' => '瘢', + 'J' => '皚', + 'K' => '皺', + 'L' => '盤', + 'M' => '瞎', + 'N' => '瞇', + 'O' => '瞌', + 'P' => '瞑', + 'Q' => '瞋', + 'R' => '磋', + 'S' => '磅', + 'T' => '確', + 'U' => '磊', + 'V' => '碾', + 'W' => '磕', + 'X' => '碼', + 'Y' => '磐', + 'Z' => '稿', + '[' => '稼', + '\\' => '穀', + ']' => '稽', + '^' => '稷', + '_' => '稻', + '`' => '窯', + 'a' => '窮', + 'b' => '箭', + 'c' => '箱', + 'd' => '範', + 'e' => '箴', + 'f' => '篆', + 'g' => '篇', + 'h' => '篁', + 'i' => '箠', + 'j' => '篌', + 'k' => '糊', + 'l' => '締', + 'm' => '練', + 'n' => '緯', + 'o' => '緻', + 'p' => '緘', + 'q' => '緬', + 'r' => '緝', + 's' => '編', + 't' => '緣', + 'u' => '線', + 'v' => '緞', + 'w' => '緩', + 'x' => '綞', + 'y' => '緙', + 'z' => '緲', + '{' => '緹', + '|' => '罵', + '}' => '罷', + '~' => '羯', + '' => '翩', + '' => '耦', + '' => '膛', + '' => '膜', + '' => '膝', + '' => '膠', + '' => '膚', + '' => '膘', + '' => '蔗', + '' => '蔽', + '' => '蔚', + '' => '蓮', + '' => '蔬', + '' => '蔭', + '' => '蔓', + '' => '蔑', + '' => '蔣', + '' => '蔡', + '' => '蔔', + '' => '蓬', + '' => '蔥', + '' => '蓿', + '' => '蔆', + '' => '螂', + '' => '蝴', + '' => '蝶', + '' => '蝠', + '' => '蝦', + '' => '蝸', + '' => '蝨', + '' => '蝙', + '' => '蝗', + '' => '蝌', + '' => '蝓', + '' => '衛', + '' => '衝', + '' => '褐', + '' => '複', + '' => '褒', + '' => '褓', + '' => '褕', + '' => '褊', + '' => '誼', + '' => '諒', + '' => '談', + '' => '諄', + '' => '誕', + '' => '請', + '' => '諸', + '' => '課', + '' => '諉', + '' => '諂', + '' => '調', + '' => '誰', + '' => '論', + '' => '諍', + '' => '誶', + '' => '誹', + '' => '諛', + '' => '豌', + '' => '豎', + '' => '豬', + '' => '賠', + '' => '賞', + '' => '賦', + '' => '賤', + '' => '賬', + '' => '賭', + '' => '賢', + '' => '賣', + '' => '賜', + '' => '質', + '' => '賡', + '' => '赭', + '' => '趟', + '' => '趣', + '' => '踫', + '' => '踐', + '' => '踝', + '' => '踢', + '' => '踏', + '' => '踩', + '' => '踟', + '' => '踡', + '' => '踞', + '' => '躺', + '' => '輝', + '' => '輛', + '' => '輟', + '' => '輩', + '' => '輦', + '' => '輪', + '' => '輜', + '' => '輞', + '@' => '輥', + 'A' => '適', + 'B' => '遮', + 'C' => '遨', + 'D' => '遭', + 'E' => '遷', + 'F' => '鄰', + 'G' => '鄭', + 'H' => '鄧', + 'I' => '鄱', + 'J' => '醇', + 'K' => '醉', + 'L' => '醋', + 'M' => '醃', + 'N' => '鋅', + 'O' => '銻', + 'P' => '銷', + 'Q' => '鋪', + 'R' => '銬', + 'S' => '鋤', + 'T' => '鋁', + 'U' => '銳', + 'V' => '銼', + 'W' => '鋒', + 'X' => '鋇', + 'Y' => '鋰', + 'Z' => '銲', + '[' => '閭', + '\\' => '閱', + ']' => '霄', + '^' => '霆', + '_' => '震', + '`' => '霉', + 'a' => '靠', + 'b' => '鞍', + 'c' => '鞋', + 'd' => '鞏', + 'e' => '頡', + 'f' => '頫', + 'g' => '頜', + 'h' => '颳', + 'i' => '養', + 'j' => '餓', + 'k' => '餒', + 'l' => '餘', + 'm' => '駝', + 'n' => '駐', + 'o' => '駟', + 'p' => '駛', + 'q' => '駑', + 'r' => '駕', + 's' => '駒', + 't' => '駙', + 'u' => '骷', + 'v' => '髮', + 'w' => '髯', + 'x' => '鬧', + 'y' => '魅', + 'z' => '魄', + '{' => '魷', + '|' => '魯', + '}' => '鴆', + '~' => '鴉', + '' => '鴃', + '' => '麩', + '' => '麾', + '' => '黎', + '' => '墨', + '' => '齒', + '' => '儒', + '' => '儘', + '' => '儔', + '' => '儐', + '' => '儕', + '' => '冀', + '' => '冪', + '' => '凝', + '' => '劑', + '' => '劓', + '' => '勳', + '' => '噙', + '' => '噫', + '' => '噹', + '' => '噩', + '' => '噤', + '' => '噸', + '' => '噪', + '' => '器', + '' => '噥', + '' => '噱', + '' => '噯', + '' => '噬', + '' => '噢', + '' => '噶', + '' => '壁', + '' => '墾', + '' => '壇', + '' => '壅', + '' => '奮', + '' => '嬝', + '' => '嬴', + '' => '學', + '' => '寰', + '' => '導', + '' => '彊', + '' => '憲', + '' => '憑', + '' => '憩', + '' => '憊', + '' => '懍', + '' => '憶', + '' => '憾', + '' => '懊', + '' => '懈', + '' => '戰', + '' => '擅', + '' => '擁', + '' => '擋', + '' => '撻', + '' => '撼', + '' => '據', + '' => '擄', + '' => '擇', + '' => '擂', + '' => '操', + '' => '撿', + '' => '擒', + '' => '擔', + '' => '撾', + '' => '整', + '' => '曆', + '' => '曉', + '' => '暹', + '' => '曄', + '' => '曇', + '' => '暸', + '' => '樽', + '' => '樸', + '' => '樺', + '' => '橙', + '' => '橫', + '' => '橘', + '' => '樹', + '' => '橄', + '' => '橢', + '' => '橡', + '' => '橋', + '' => '橇', + '' => '樵', + '' => '機', + '' => '橈', + '' => '歙', + '' => '歷', + '' => '氅', + '' => '濂', + '' => '澱', + '' => '澡', + '@' => '濃', + 'A' => '澤', + 'B' => '濁', + 'C' => '澧', + 'D' => '澳', + 'E' => '激', + 'F' => '澹', + 'G' => '澶', + 'H' => '澦', + 'I' => '澠', + 'J' => '澴', + 'K' => '熾', + 'L' => '燉', + 'M' => '燐', + 'N' => '燒', + 'O' => '燈', + 'P' => '燕', + 'Q' => '熹', + 'R' => '燎', + 'S' => '燙', + 'T' => '燜', + 'U' => '燃', + 'V' => '燄', + 'W' => '獨', + 'X' => '璜', + 'Y' => '璣', + 'Z' => '璘', + '[' => '璟', + '\\' => '璞', + ']' => '瓢', + '^' => '甌', + '_' => '甍', + '`' => '瘴', + 'a' => '瘸', + 'b' => '瘺', + 'c' => '盧', + 'd' => '盥', + 'e' => '瞠', + 'f' => '瞞', + 'g' => '瞟', + 'h' => '瞥', + 'i' => '磨', + 'j' => '磚', + 'k' => '磬', + 'l' => '磧', + 'm' => '禦', + 'n' => '積', + 'o' => '穎', + 'p' => '穆', + 'q' => '穌', + 'r' => '穋', + 's' => '窺', + 't' => '篙', + 'u' => '簑', + 'v' => '築', + 'w' => '篤', + 'x' => '篛', + 'y' => '篡', + 'z' => '篩', + '{' => '篦', + '|' => '糕', + '}' => '糖', + '~' => '縊', + '' => '縑', + '' => '縈', + '' => '縛', + '' => '縣', + '' => '縞', + '' => '縝', + '' => '縉', + '' => '縐', + '' => '罹', + '' => '羲', + '' => '翰', + '' => '翱', + '' => '翮', + '' => '耨', + '' => '膳', + '' => '膩', + '' => '膨', + '' => '臻', + '' => '興', + '' => '艘', + '' => '艙', + '' => '蕊', + '' => '蕙', + '' => '蕈', + '' => '蕨', + '' => '蕩', + '' => '蕃', + '' => '蕉', + '' => '蕭', + '' => '蕪', + '' => '蕞', + '' => '螃', + '' => '螟', + '' => '螞', + '' => '螢', + '' => '融', + '' => '衡', + '' => '褪', + '' => '褲', + '' => '褥', + '' => '褫', + '' => '褡', + '' => '親', + '' => '覦', + '' => '諦', + '' => '諺', + '' => '諫', + '' => '諱', + '' => '謀', + '' => '諜', + '' => '諧', + '' => '諮', + '' => '諾', + '' => '謁', + '' => '謂', + '' => '諷', + '' => '諭', + '' => '諳', + '' => '諶', + '' => '諼', + '' => '豫', + '' => '豭', + '' => '貓', + '' => '賴', + '' => '蹄', + '' => '踱', + '' => '踴', + '' => '蹂', + '' => '踹', + '' => '踵', + '' => '輻', + '' => '輯', + '' => '輸', + '' => '輳', + '' => '辨', + '' => '辦', + '' => '遵', + '' => '遴', + '' => '選', + '' => '遲', + '' => '遼', + '' => '遺', + '' => '鄴', + '' => '醒', + '' => '錠', + '' => '錶', + '' => '鋸', + '' => '錳', + '' => '錯', + '' => '錢', + '' => '鋼', + '' => '錫', + '' => '錄', + '' => '錚', + '@' => '錐', + 'A' => '錦', + 'B' => '錡', + 'C' => '錕', + 'D' => '錮', + 'E' => '錙', + 'F' => '閻', + 'G' => '隧', + 'H' => '隨', + 'I' => '險', + 'J' => '雕', + 'K' => '霎', + 'L' => '霑', + 'M' => '霖', + 'N' => '霍', + 'O' => '霓', + 'P' => '霏', + 'Q' => '靛', + 'R' => '靜', + 'S' => '靦', + 'T' => '鞘', + 'U' => '頰', + 'V' => '頸', + 'W' => '頻', + 'X' => '頷', + 'Y' => '頭', + 'Z' => '頹', + '[' => '頤', + '\\' => '餐', + ']' => '館', + '^' => '餞', + '_' => '餛', + '`' => '餡', + 'a' => '餚', + 'b' => '駭', + 'c' => '駢', + 'd' => '駱', + 'e' => '骸', + 'f' => '骼', + 'g' => '髻', + 'h' => '髭', + 'i' => '鬨', + 'j' => '鮑', + 'k' => '鴕', + 'l' => '鴣', + 'm' => '鴦', + 'n' => '鴨', + 'o' => '鴒', + 'p' => '鴛', + 'q' => '默', + 'r' => '黔', + 's' => '龍', + 't' => '龜', + 'u' => '優', + 'v' => '償', + 'w' => '儡', + 'x' => '儲', + 'y' => '勵', + 'z' => '嚎', + '{' => '嚀', + '|' => '嚐', + '}' => '嚅', + '~' => '嚇', + '' => '嚏', + '' => '壕', + '' => '壓', + '' => '壑', + '' => '壎', + '' => '嬰', + '' => '嬪', + '' => '嬤', + '' => '孺', + '' => '尷', + '' => '屨', + '' => '嶼', + '' => '嶺', + '' => '嶽', + '' => '嶸', + '' => '幫', + '' => '彌', + '' => '徽', + '' => '應', + '' => '懂', + '' => '懇', + '' => '懦', + '' => '懋', + '' => '戲', + '' => '戴', + '' => '擎', + '' => '擊', + '' => '擘', + '' => '擠', + '' => '擰', + '' => '擦', + '' => '擬', + '' => '擱', + '' => '擢', + '' => '擭', + '' => '斂', + '' => '斃', + '' => '曙', + '' => '曖', + '' => '檀', + '' => '檔', + '' => '檄', + '' => '檢', + '' => '檜', + '' => '櫛', + '' => '檣', + '' => '橾', + '' => '檗', + '' => '檐', + '' => '檠', + '' => '歜', + '' => '殮', + '' => '毚', + '' => '氈', + '' => '濘', + '' => '濱', + '' => '濟', + '' => '濠', + '' => '濛', + '' => '濤', + '' => '濫', + '' => '濯', + '' => '澀', + '' => '濬', + '' => '濡', + '' => '濩', + '' => '濕', + '' => '濮', + '' => '濰', + '' => '燧', + '' => '營', + '' => '燮', + '' => '燦', + '' => '燥', + '' => '燭', + '' => '燬', + '' => '燴', + '' => '燠', + '' => '爵', + '' => '牆', + '' => '獰', + '' => '獲', + '' => '璩', + '' => '環', + '' => '璦', + '' => '璨', + '' => '癆', + '' => '療', + '' => '癌', + '' => '盪', + '' => '瞳', + '' => '瞪', + '' => '瞰', + '' => '瞬', + '@' => '瞧', + 'A' => '瞭', + 'B' => '矯', + 'C' => '磷', + 'D' => '磺', + 'E' => '磴', + 'F' => '磯', + 'G' => '礁', + 'H' => '禧', + 'I' => '禪', + 'J' => '穗', + 'K' => '窿', + 'L' => '簇', + 'M' => '簍', + 'N' => '篾', + 'O' => '篷', + 'P' => '簌', + 'Q' => '篠', + 'R' => '糠', + 'S' => '糜', + 'T' => '糞', + 'U' => '糢', + 'V' => '糟', + 'W' => '糙', + 'X' => '糝', + 'Y' => '縮', + 'Z' => '績', + '[' => '繆', + '\\' => '縷', + ']' => '縲', + '^' => '繃', + '_' => '縫', + '`' => '總', + 'a' => '縱', + 'b' => '繅', + 'c' => '繁', + 'd' => '縴', + 'e' => '縹', + 'f' => '繈', + 'g' => '縵', + 'h' => '縿', + 'i' => '縯', + 'j' => '罄', + 'k' => '翳', + 'l' => '翼', + 'm' => '聱', + 'n' => '聲', + 'o' => '聰', + 'p' => '聯', + 'q' => '聳', + 'r' => '臆', + 's' => '臃', + 't' => '膺', + 'u' => '臂', + 'v' => '臀', + 'w' => '膿', + 'x' => '膽', + 'y' => '臉', + 'z' => '膾', + '{' => '臨', + '|' => '舉', + '}' => '艱', + '~' => '薪', + '' => '薄', + '' => '蕾', + '' => '薜', + '' => '薑', + '' => '薔', + '' => '薯', + '' => '薛', + '' => '薇', + '' => '薨', + '' => '薊', + '' => '虧', + '' => '蟀', + '' => '蟑', + '' => '螳', + '' => '蟒', + '' => '蟆', + '' => '螫', + '' => '螻', + '' => '螺', + '' => '蟈', + '' => '蟋', + '' => '褻', + '' => '褶', + '' => '襄', + '' => '褸', + '' => '褽', + '' => '覬', + '' => '謎', + '' => '謗', + '' => '謙', + '' => '講', + '' => '謊', + '' => '謠', + '' => '謝', + '' => '謄', + '' => '謐', + '' => '豁', + '' => '谿', + '' => '豳', + '' => '賺', + '' => '賽', + '' => '購', + '' => '賸', + '' => '賻', + '' => '趨', + '' => '蹉', + '' => '蹋', + '' => '蹈', + '' => '蹊', + '' => '轄', + '' => '輾', + '' => '轂', + '' => '轅', + '' => '輿', + '' => '避', + '' => '遽', + '' => '還', + '' => '邁', + '' => '邂', + '' => '邀', + '' => '鄹', + '' => '醣', + '' => '醞', + '' => '醜', + '' => '鍍', + '' => '鎂', + '' => '錨', + '' => '鍵', + '' => '鍊', + '' => '鍥', + '' => '鍋', + '' => '錘', + '' => '鍾', + '' => '鍬', + '' => '鍛', + '' => '鍰', + '' => '鍚', + '' => '鍔', + '' => '闊', + '' => '闋', + '' => '闌', + '' => '闈', + '' => '闆', + '' => '隱', + '' => '隸', + '' => '雖', + '' => '霜', + '' => '霞', + '' => '鞠', + '' => '韓', + '' => '顆', + '' => '颶', + '' => '餵', + '' => '騁', + '@' => '駿', + 'A' => '鮮', + 'B' => '鮫', + 'C' => '鮪', + 'D' => '鮭', + 'E' => '鴻', + 'F' => '鴿', + 'G' => '麋', + 'H' => '黏', + 'I' => '點', + 'J' => '黜', + 'K' => '黝', + 'L' => '黛', + 'M' => '鼾', + 'N' => '齋', + 'O' => '叢', + 'P' => '嚕', + 'Q' => '嚮', + 'R' => '壙', + 'S' => '壘', + 'T' => '嬸', + 'U' => '彝', + 'V' => '懣', + 'W' => '戳', + 'X' => '擴', + 'Y' => '擲', + 'Z' => '擾', + '[' => '攆', + '\\' => '擺', + ']' => '擻', + '^' => '擷', + '_' => '斷', + '`' => '曜', + 'a' => '朦', + 'b' => '檳', + 'c' => '檬', + 'd' => '櫃', + 'e' => '檻', + 'f' => '檸', + 'g' => '櫂', + 'h' => '檮', + 'i' => '檯', + 'j' => '歟', + 'k' => '歸', + 'l' => '殯', + 'm' => '瀉', + 'n' => '瀋', + 'o' => '濾', + 'p' => '瀆', + 'q' => '濺', + 'r' => '瀑', + 's' => '瀏', + 't' => '燻', + 'u' => '燼', + 'v' => '燾', + 'w' => '燸', + 'x' => '獷', + 'y' => '獵', + 'z' => '璧', + '{' => '璿', + '|' => '甕', + '}' => '癖', + '~' => '癘', + '¡' => '癒', + '¢' => '瞽', + '£' => '瞿', + '¤' => '瞻', + '¥' => '瞼', + '¦' => '礎', + '§' => '禮', + '¨' => '穡', + '©' => '穢', + 'ª' => '穠', + '«' => '竄', + '¬' => '竅', + '­' => '簫', + '®' => '簧', + '¯' => '簪', + '°' => '簞', + '±' => '簣', + '²' => '簡', + '³' => '糧', + '´' => '織', + 'µ' => '繕', + '¶' => '繞', + '·' => '繚', + '¸' => '繡', + '¹' => '繒', + 'º' => '繙', + '»' => '罈', + '¼' => '翹', + '½' => '翻', + '¾' => '職', + '¿' => '聶', + '' => '臍', + '' => '臏', + '' => '舊', + '' => '藏', + '' => '薩', + '' => '藍', + '' => '藐', + '' => '藉', + '' => '薰', + '' => '薺', + '' => '薹', + '' => '薦', + '' => '蟯', + '' => '蟬', + '' => '蟲', + '' => '蟠', + '' => '覆', + '' => '覲', + '' => '觴', + '' => '謨', + '' => '謹', + '' => '謬', + '' => '謫', + '' => '豐', + '' => '贅', + '' => '蹙', + '' => '蹣', + '' => '蹦', + '' => '蹤', + '' => '蹟', + '' => '蹕', + '' => '軀', + '' => '轉', + '' => '轍', + '' => '邇', + '' => '邃', + '' => '邈', + '' => '醫', + '' => '醬', + '' => '釐', + '' => '鎔', + '' => '鎊', + '' => '鎖', + '' => '鎢', + '' => '鎳', + '' => '鎮', + '' => '鎬', + '' => '鎰', + '' => '鎘', + '' => '鎚', + '' => '鎗', + '' => '闔', + '' => '闖', + '' => '闐', + '' => '闕', + '' => '離', + '' => '雜', + '' => '雙', + '' => '雛', + '' => '雞', + '' => '霤', + '' => '鞣', + '' => '鞦', + '@' => '鞭', + 'A' => '韹', + 'B' => '額', + 'C' => '顏', + 'D' => '題', + 'E' => '顎', + 'F' => '顓', + 'G' => '颺', + 'H' => '餾', + 'I' => '餿', + 'J' => '餽', + 'K' => '餮', + 'L' => '馥', + 'M' => '騎', + 'N' => '髁', + 'O' => '鬃', + 'P' => '鬆', + 'Q' => '魏', + 'R' => '魎', + 'S' => '魍', + 'T' => '鯊', + 'U' => '鯉', + 'V' => '鯽', + 'W' => '鯈', + 'X' => '鯀', + 'Y' => '鵑', + 'Z' => '鵝', + '[' => '鵠', + '\\' => '黠', + ']' => '鼕', + '^' => '鼬', + '_' => '儳', + '`' => '嚥', + 'a' => '壞', + 'b' => '壟', + 'c' => '壢', + 'd' => '寵', + 'e' => '龐', + 'f' => '廬', + 'g' => '懲', + 'h' => '懷', + 'i' => '懶', + 'j' => '懵', + 'k' => '攀', + 'l' => '攏', + 'm' => '曠', + 'n' => '曝', + 'o' => '櫥', + 'p' => '櫝', + 'q' => '櫚', + 'r' => '櫓', + 's' => '瀛', + 't' => '瀟', + 'u' => '瀨', + 'v' => '瀚', + 'w' => '瀝', + 'x' => '瀕', + 'y' => '瀘', + 'z' => '爆', + '{' => '爍', + '|' => '牘', + '}' => '犢', + '~' => '獸', + 'á' => '獺', + 'â' => '璽', + 'ã' => '瓊', + 'ä' => '瓣', + 'å' => '疇', + 'æ' => '疆', + 'ç' => '癟', + 'è' => '癡', + 'é' => '矇', + 'ê' => '礙', + 'ë' => '禱', + 'ì' => '穫', + 'í' => '穩', + 'î' => '簾', + 'ï' => '簿', + 'ð' => '簸', + 'ñ' => '簽', + 'ò' => '簷', + 'ó' => '籀', + 'ô' => '繫', + 'õ' => '繭', + 'ö' => '繹', + '÷' => '繩', + 'ø' => '繪', + 'ù' => '羅', + 'ú' => '繳', + 'û' => '羶', + 'ü' => '羹', + 'ý' => '羸', + 'þ' => '臘', + 'ÿ' => '藩', + '' => '藝', + '' => '藪', + '' => '藕', + '' => '藤', + '' => '藥', + '' => '藷', + '' => '蟻', + '' => '蠅', + '' => '蠍', + '' => '蟹', + '' => '蟾', + '' => '襠', + '' => '襟', + '' => '襖', + '' => '襞', + '' => '譁', + '' => '譜', + '' => '識', + '' => '證', + '' => '譚', + '' => '譎', + '' => '譏', + '' => '譆', + '' => '譙', + '' => '贈', + '' => '贊', + '' => '蹼', + '' => '蹲', + '' => '躇', + '' => '蹶', + '' => '蹬', + '' => '蹺', + '' => '蹴', + '' => '轔', + '' => '轎', + '' => '辭', + '' => '邊', + '' => '邋', + '' => '醱', + '' => '醮', + '' => '鏡', + '' => '鏑', + '' => '鏟', + '' => '鏃', + '' => '鏈', + '' => '鏜', + '' => '鏝', + '' => '鏖', + '' => '鏢', + '' => '鏍', + '' => '鏘', + '' => '鏤', + '' => '鏗', + '' => '鏨', + '' => '關', + '' => '隴', + '' => '難', + '' => '霪', + '' => '霧', + '' => '靡', + '' => '韜', + '' => '韻', + '' => '類', + '@' => '願', + 'A' => '顛', + 'B' => '颼', + 'C' => '饅', + 'D' => '饉', + 'E' => '騖', + 'F' => '騙', + 'G' => '鬍', + 'H' => '鯨', + 'I' => '鯧', + 'J' => '鯖', + 'K' => '鯛', + 'L' => '鶉', + 'M' => '鵡', + 'N' => '鵲', + 'O' => '鵪', + 'P' => '鵬', + 'Q' => '麒', + 'R' => '麗', + 'S' => '麓', + 'T' => '麴', + 'U' => '勸', + 'V' => '嚨', + 'W' => '嚷', + 'X' => '嚶', + 'Y' => '嚴', + 'Z' => '嚼', + '[' => '壤', + '\\' => '孀', + ']' => '孃', + '^' => '孽', + '_' => '寶', + '`' => '巉', + 'a' => '懸', + 'b' => '懺', + 'c' => '攘', + 'd' => '攔', + 'e' => '攙', + 'f' => '曦', + 'g' => '朧', + 'h' => '櫬', + 'i' => '瀾', + 'j' => '瀰', + 'k' => '瀲', + 'l' => '爐', + 'm' => '獻', + 'n' => '瓏', + 'o' => '癢', + 'p' => '癥', + 'q' => '礦', + 'r' => '礪', + 's' => '礬', + 't' => '礫', + 'u' => '竇', + 'v' => '競', + 'w' => '籌', + 'x' => '籃', + 'y' => '籍', + 'z' => '糯', + '{' => '糰', + '|' => '辮', + '}' => '繽', + '~' => '繼', + 'ġ' => '纂', + 'Ģ' => '罌', + 'ģ' => '耀', + 'Ĥ' => '臚', + 'ĥ' => '艦', + 'Ħ' => '藻', + 'ħ' => '藹', + 'Ĩ' => '蘑', + 'ĩ' => '藺', + 'Ī' => '蘆', + 'ī' => '蘋', + 'Ĭ' => '蘇', + 'ĭ' => '蘊', + 'Į' => '蠔', + 'į' => '蠕', + 'İ' => '襤', + 'ı' => '覺', + 'IJ' => '觸', + 'ij' => '議', + 'Ĵ' => '譬', + 'ĵ' => '警', + 'Ķ' => '譯', + 'ķ' => '譟', + 'ĸ' => '譫', + 'Ĺ' => '贏', + 'ĺ' => '贍', + 'Ļ' => '躉', + 'ļ' => '躁', + 'Ľ' => '躅', + 'ľ' => '躂', + 'Ŀ' => '醴', + '' => '釋', + '' => '鐘', + '' => '鐃', + '' => '鏽', + '' => '闡', + '' => '霰', + '' => '飄', + '' => '饒', + '' => '饑', + '' => '馨', + '' => '騫', + '' => '騰', + '' => '騷', + '' => '騵', + '' => '鰓', + '' => '鰍', + '' => '鹹', + '' => '麵', + '' => '黨', + '' => '鼯', + '' => '齟', + '' => '齣', + '' => '齡', + '' => '儷', + '' => '儸', + '' => '囁', + '' => '囀', + '' => '囂', + '' => '夔', + '' => '屬', + '' => '巍', + '' => '懼', + '' => '懾', + '' => '攝', + '' => '攜', + '' => '斕', + '' => '曩', + '' => '櫻', + '' => '欄', + '' => '櫺', + '' => '殲', + '' => '灌', + '' => '爛', + '' => '犧', + '' => '瓖', + '' => '瓔', + '' => '癩', + '' => '矓', + '' => '籐', + '' => '纏', + '' => '續', + '' => '羼', + '' => '蘗', + '' => '蘭', + '' => '蘚', + '' => '蠣', + '' => '蠢', + '' => '蠡', + '' => '蠟', + '' => '襪', + '' => '襬', + '' => '覽', + '' => '譴', + '@' => '護', + 'A' => '譽', + 'B' => '贓', + 'C' => '躊', + 'D' => '躍', + 'E' => '躋', + 'F' => '轟', + 'G' => '辯', + 'H' => '醺', + 'I' => '鐮', + 'J' => '鐳', + 'K' => '鐵', + 'L' => '鐺', + 'M' => '鐸', + 'N' => '鐲', + 'O' => '鐫', + 'P' => '闢', + 'Q' => '霸', + 'R' => '霹', + 'S' => '露', + 'T' => '響', + 'U' => '顧', + 'V' => '顥', + 'W' => '饗', + 'X' => '驅', + 'Y' => '驃', + 'Z' => '驀', + '[' => '騾', + '\\' => '髏', + ']' => '魔', + '^' => '魑', + '_' => '鰭', + '`' => '鰥', + 'a' => '鶯', + 'b' => '鶴', + 'c' => '鷂', + 'd' => '鶸', + 'e' => '麝', + 'f' => '黯', + 'g' => '鼙', + 'h' => '齜', + 'i' => '齦', + 'j' => '齧', + 'k' => '儼', + 'l' => '儻', + 'm' => '囈', + 'n' => '囊', + 'o' => '囉', + 'p' => '孿', + 'q' => '巔', + 'r' => '巒', + 's' => '彎', + 't' => '懿', + 'u' => '攤', + 'v' => '權', + 'w' => '歡', + 'x' => '灑', + 'y' => '灘', + 'z' => '玀', + '{' => '瓤', + '|' => '疊', + '}' => '癮', + '~' => '癬', + 'š' => '禳', + 'Ţ' => '籠', + 'ţ' => '籟', + 'Ť' => '聾', + 'ť' => '聽', + 'Ŧ' => '臟', + 'ŧ' => '襲', + 'Ũ' => '襯', + 'ũ' => '觼', + 'Ū' => '讀', + 'ū' => '贖', + 'Ŭ' => '贗', + 'ŭ' => '躑', + 'Ů' => '躓', + 'ů' => '轡', + 'Ű' => '酈', + 'ű' => '鑄', + 'Ų' => '鑑', + 'ų' => '鑒', + 'Ŵ' => '霽', + 'ŵ' => '霾', + 'Ŷ' => '韃', + 'ŷ' => '韁', + 'Ÿ' => '顫', + 'Ź' => '饕', + 'ź' => '驕', + 'Ż' => '驍', + 'ż' => '髒', + 'Ž' => '鬚', + 'ž' => '鱉', + 'ſ' => '鰱', + '' => '鰾', + '' => '鰻', + '' => '鷓', + '' => '鷗', + '' => '鼴', + '' => '齬', + '' => '齪', + '' => '龔', + '' => '囌', + '' => '巖', + '' => '戀', + '' => '攣', + '' => '攫', + '' => '攪', + '' => '曬', + '' => '欐', + '' => '瓚', + '' => '竊', + '' => '籤', + '' => '籣', + '' => '籥', + '' => '纓', + '' => '纖', + '' => '纔', + '' => '臢', + '' => '蘸', + '' => '蘿', + '' => '蠱', + '' => '變', + '' => '邐', + '' => '邏', + '' => '鑣', + '' => '鑠', + '' => '鑤', + '' => '靨', + '' => '顯', + '' => '饜', + '' => '驚', + '' => '驛', + '' => '驗', + '' => '髓', + '' => '體', + '' => '髑', + '' => '鱔', + '' => '鱗', + '' => '鱖', + '' => '鷥', + '' => '麟', + '' => '黴', + '' => '囑', + '' => '壩', + '' => '攬', + '' => '灞', + '' => '癱', + '' => '癲', + '' => '矗', + '' => '罐', + '' => '羈', + '' => '蠶', + '' => '蠹', + '' => '衢', + '' => '讓', + '' => '讒', + '@' => '讖', + 'A' => '艷', + 'B' => '贛', + 'C' => '釀', + 'D' => '鑪', + 'E' => '靂', + 'F' => '靈', + 'G' => '靄', + 'H' => '韆', + 'I' => '顰', + 'J' => '驟', + 'K' => '鬢', + 'L' => '魘', + 'M' => '鱟', + 'N' => '鷹', + 'O' => '鷺', + 'P' => '鹼', + 'Q' => '鹽', + 'R' => '鼇', + 'S' => '齷', + 'T' => '齲', + 'U' => '廳', + 'V' => '欖', + 'W' => '灣', + 'X' => '籬', + 'Y' => '籮', + 'Z' => '蠻', + '[' => '觀', + '\\' => '躡', + ']' => '釁', + '^' => '鑲', + '_' => '鑰', + '`' => '顱', + 'a' => '饞', + 'b' => '髖', + 'c' => '鬣', + 'd' => '黌', + 'e' => '灤', + 'f' => '矚', + 'g' => '讚', + 'h' => '鑷', + 'i' => '韉', + 'j' => '驢', + 'k' => '驥', + 'l' => '纜', + 'm' => '讜', + 'n' => '躪', + 'o' => '釅', + 'p' => '鑽', + 'q' => '鑾', + 'r' => '鑼', + 's' => '鱷', + 't' => '鱸', + 'u' => '黷', + 'v' => '豔', + 'w' => '鑿', + 'x' => '鸚', + 'y' => '爨', + 'z' => '驪', + '{' => '鬱', + '|' => '鸛', + '}' => '鸞', + '~' => '籲', + 'ơ' => 'ヾ', + 'Ƣ' => 'ゝ', + 'ƣ' => 'ゞ', + 'Ƥ' => '々', + 'ƥ' => 'ぁ', + 'Ʀ' => 'あ', + 'Ƨ' => 'ぃ', + 'ƨ' => 'い', + 'Ʃ' => 'ぅ', + 'ƪ' => 'う', + 'ƫ' => 'ぇ', + 'Ƭ' => 'え', + 'ƭ' => 'ぉ', + 'Ʈ' => 'お', + 'Ư' => 'か', + 'ư' => 'が', + 'Ʊ' => 'き', + 'Ʋ' => 'ぎ', + 'Ƴ' => 'く', + 'ƴ' => 'ぐ', + 'Ƶ' => 'け', + 'ƶ' => 'げ', + 'Ʒ' => 'こ', + 'Ƹ' => 'ご', + 'ƹ' => 'さ', + 'ƺ' => 'ざ', + 'ƻ' => 'し', + 'Ƽ' => 'じ', + 'ƽ' => 'す', + 'ƾ' => 'ず', + 'ƿ' => 'せ', + '' => 'ぜ', + '' => 'そ', + '' => 'ぞ', + '' => 'た', + '' => 'だ', + '' => 'ち', + '' => 'ぢ', + '' => 'っ', + '' => 'つ', + '' => 'づ', + '' => 'て', + '' => 'で', + '' => 'と', + '' => 'ど', + '' => 'な', + '' => 'に', + '' => 'ぬ', + '' => 'ね', + '' => 'の', + '' => 'は', + '' => 'ば', + '' => 'ぱ', + '' => 'ひ', + '' => 'び', + '' => 'ぴ', + '' => 'ふ', + '' => 'ぶ', + '' => 'ぷ', + '' => 'へ', + '' => 'べ', + '' => 'ぺ', + '' => 'ほ', + '' => 'ぼ', + '' => 'ぽ', + '' => 'ま', + '' => 'み', + '' => 'む', + '' => 'め', + '' => 'も', + '' => 'ゃ', + '' => 'や', + '' => 'ゅ', + '' => 'ゆ', + '' => 'ょ', + '' => 'よ', + '' => 'ら', + '' => 'り', + '' => 'る', + '' => 'れ', + '' => 'ろ', + '' => 'ゎ', + '' => 'わ', + '' => 'ゐ', + '' => 'ゑ', + '' => 'を', + '' => 'ん', + '' => 'ァ', + '' => 'ア', + '' => 'ィ', + '' => 'イ', + '' => 'ゥ', + '' => 'ウ', + '' => 'ェ', + '@' => 'エ', + 'A' => 'ォ', + 'B' => 'オ', + 'C' => 'カ', + 'D' => 'ガ', + 'E' => 'キ', + 'F' => 'ギ', + 'G' => 'ク', + 'H' => 'グ', + 'I' => 'ケ', + 'J' => 'ゲ', + 'K' => 'コ', + 'L' => 'ゴ', + 'M' => 'サ', + 'N' => 'ザ', + 'O' => 'シ', + 'P' => 'ジ', + 'Q' => 'ス', + 'R' => 'ズ', + 'S' => 'セ', + 'T' => 'ゼ', + 'U' => 'ソ', + 'V' => 'ゾ', + 'W' => 'タ', + 'X' => 'ダ', + 'Y' => 'チ', + 'Z' => 'ヂ', + '[' => 'ッ', + '\\' => 'ツ', + ']' => 'ヅ', + '^' => 'テ', + '_' => 'デ', + '`' => 'ト', + 'a' => 'ド', + 'b' => 'ナ', + 'c' => 'ニ', + 'd' => 'ヌ', + 'e' => 'ネ', + 'f' => 'ノ', + 'g' => 'ハ', + 'h' => 'バ', + 'i' => 'パ', + 'j' => 'ヒ', + 'k' => 'ビ', + 'l' => 'ピ', + 'm' => 'フ', + 'n' => 'ブ', + 'o' => 'プ', + 'p' => 'ヘ', + 'q' => 'ベ', + 'r' => 'ペ', + 's' => 'ホ', + 't' => 'ボ', + 'u' => 'ポ', + 'v' => 'マ', + 'w' => 'ミ', + 'x' => 'ム', + 'y' => 'メ', + 'z' => 'モ', + '{' => 'ャ', + '|' => 'ヤ', + '}' => 'ュ', + '~' => 'ユ', + 'ǡ' => 'ョ', + 'Ǣ' => 'ヨ', + 'ǣ' => 'ラ', + 'Ǥ' => 'リ', + 'ǥ' => 'ル', + 'Ǧ' => 'レ', + 'ǧ' => 'ロ', + 'Ǩ' => 'ヮ', + 'ǩ' => 'ワ', + 'Ǫ' => 'ヰ', + 'ǫ' => 'ヱ', + 'Ǭ' => 'ヲ', + 'ǭ' => 'ン', + 'Ǯ' => 'ヴ', + 'ǯ' => 'ヵ', + 'ǰ' => 'ヶ', + 'DZ' => 'Д', + 'Dz' => 'Е', + 'dz' => 'Ё', + 'Ǵ' => 'Ж', + 'ǵ' => 'З', + 'Ƕ' => 'И', + 'Ƿ' => 'Й', + 'Ǹ' => 'К', + 'ǹ' => 'Л', + 'Ǻ' => 'М', + 'ǻ' => 'У', + 'Ǽ' => 'Ф', + 'ǽ' => 'Х', + 'Ǿ' => 'Ц', + 'ǿ' => 'Ч', + '' => 'Ш', + '' => 'Щ', + '' => 'Ъ', + '' => 'Ы', + '' => 'Ь', + '' => 'Э', + '' => 'Ю', + '' => 'Я', + '' => 'а', + '' => 'б', + '' => 'в', + '' => 'г', + '' => 'д', + '' => 'е', + '' => 'ё', + '' => 'ж', + '' => 'з', + '' => 'и', + '' => 'й', + '' => 'к', + '' => 'л', + '' => 'м', + '' => 'н', + '' => 'о', + '' => 'п', + '' => 'р', + '' => 'с', + '' => 'т', + '' => 'у', + '' => 'ф', + '' => 'х', + '' => 'ц', + '' => 'ч', + '' => 'ш', + '' => 'щ', + '' => 'ъ', + '' => 'ы', + '' => 'ь', + '' => 'э', + '' => 'ю', + '' => 'я', + '' => '①', + '' => '②', + '' => '③', + '' => '④', + '' => '⑤', + '' => '⑥', + '' => '⑦', + '' => '⑧', + '' => '⑨', + '' => '⑩', + '' => '⑴', + '' => '⑵', + '' => '⑶', + '' => '⑷', + '' => '⑸', + '' => '⑹', + '' => '⑺', + '' => '⑻', + '' => '⑼', + '' => '⑽', + '@' => '乂', + 'A' => '乜', + 'B' => '凵', + 'C' => '匚', + 'D' => '厂', + 'E' => '万', + 'F' => '丌', + 'G' => '乇', + 'H' => '亍', + 'I' => '囗', + 'J' => '兀', + 'K' => '屮', + 'L' => '彳', + 'M' => '丏', + 'N' => '冇', + 'O' => '与', + 'P' => '丮', + 'Q' => '亓', + 'R' => '仂', + 'S' => '仉', + 'T' => '仈', + 'U' => '冘', + 'V' => '勼', + 'W' => '卬', + 'X' => '厹', + 'Y' => '圠', + 'Z' => '夃', + '[' => '夬', + '\\' => '尐', + ']' => '巿', + '^' => '旡', + '_' => '殳', + '`' => '毌', + 'a' => '气', + 'b' => '爿', + 'c' => '丱', + 'd' => '丼', + 'e' => '仨', + 'f' => '仜', + 'g' => '仩', + 'h' => '仡', + 'i' => '仝', + 'j' => '仚', + 'k' => '刌', + 'l' => '匜', + 'm' => '卌', + 'n' => '圢', + 'o' => '圣', + 'p' => '夗', + 'q' => '夯', + 'r' => '宁', + 's' => '宄', + 't' => '尒', + 'u' => '尻', + 'v' => '屴', + 'w' => '屳', + 'x' => '帄', + 'y' => '庀', + 'z' => '庂', + '{' => '忉', + '|' => '戉', + '}' => '扐', + '~' => '氕', + 'ɡ' => '氶', + 'ɢ' => '汃', + 'ɣ' => '氿', + 'ɤ' => '氻', + 'ɥ' => '犮', + 'ɦ' => '犰', + 'ɧ' => '玊', + 'ɨ' => '禸', + 'ɩ' => '肊', + 'ɪ' => '阞', + 'ɫ' => '伎', + 'ɬ' => '优', + 'ɭ' => '伬', + 'ɮ' => '仵', + 'ɯ' => '伔', + 'ɰ' => '仱', + 'ɱ' => '伀', + 'ɲ' => '价', + 'ɳ' => '伈', + 'ɴ' => '伝', + 'ɵ' => '伂', + 'ɶ' => '伅', + 'ɷ' => '伢', + 'ɸ' => '伓', + 'ɹ' => '伄', + 'ɺ' => '仴', + 'ɻ' => '伒', + 'ɼ' => '冱', + 'ɽ' => '刓', + 'ɾ' => '刉', + 'ɿ' => '刐', + '' => '劦', + '' => '匢', + '' => '匟', + '' => '卍', + '' => '厊', + '' => '吇', + '' => '囡', + '' => '囟', + '' => '圮', + '' => '圪', + '' => '圴', + '' => '夼', + '' => '妀', + '' => '奼', + '' => '妅', + '' => '奻', + '' => '奾', + '' => '奷', + '' => '奿', + '' => '孖', + '' => '尕', + '' => '尥', + '' => '屼', + '' => '屺', + '' => '屻', + '' => '屾', + '' => '巟', + '' => '幵', + '' => '庄', + '' => '异', + '' => '弚', + '' => '彴', + '' => '忕', + '' => '忔', + '' => '忏', + '' => '扜', + '' => '扞', + '' => '扤', + '' => '扡', + '' => '扦', + '' => '扢', + '' => '扙', + '' => '扠', + '' => '扚', + '' => '扥', + '' => '旯', + '' => '旮', + '' => '朾', + '' => '朹', + '' => '朸', + '' => '朻', + '' => '机', + '' => '朿', + '' => '朼', + '' => '朳', + '' => '氘', + '' => '汆', + '' => '汒', + '' => '汜', + '' => '汏', + '' => '汊', + '' => '汔', + '' => '汋', + '@' => '汌', + 'A' => '灱', + 'B' => '牞', + 'C' => '犴', + 'D' => '犵', + 'E' => '玎', + 'F' => '甪', + 'G' => '癿', + 'H' => '穵', + 'I' => '网', + 'J' => '艸', + 'K' => '艼', + 'L' => '芀', + 'M' => '艽', + 'N' => '艿', + 'O' => '虍', + 'P' => '襾', + 'Q' => '邙', + 'R' => '邗', + 'S' => '邘', + 'T' => '邛', + 'U' => '邔', + 'V' => '阢', + 'W' => '阤', + 'X' => '阠', + 'Y' => '阣', + 'Z' => '佖', + '[' => '伻', + '\\' => '佢', + ']' => '佉', + '^' => '体', + '_' => '佤', + '`' => '伾', + 'a' => '佧', + 'b' => '佒', + 'c' => '佟', + 'd' => '佁', + 'e' => '佘', + 'f' => '伭', + 'g' => '伳', + 'h' => '伿', + 'i' => '佡', + 'j' => '冏', + 'k' => '冹', + 'l' => '刜', + 'm' => '刞', + 'n' => '刡', + 'o' => '劭', + 'p' => '劮', + 'q' => '匉', + 'r' => '卣', + 's' => '卲', + 't' => '厎', + 'u' => '厏', + 'v' => '吰', + 'w' => '吷', + 'x' => '吪', + 'y' => '呔', + 'z' => '呅', + '{' => '吙', + '|' => '吜', + '}' => '吥', + '~' => '吘', + 'ʡ' => '吽', + 'ʢ' => '呏', + 'ʣ' => '呁', + 'ʤ' => '吨', + 'ʥ' => '吤', + 'ʦ' => '呇', + 'ʧ' => '囮', + 'ʨ' => '囧', + 'ʩ' => '囥', + 'ʪ' => '坁', + 'ʫ' => '坅', + 'ʬ' => '坌', + 'ʭ' => '坉', + 'ʮ' => '坋', + 'ʯ' => '坒', + 'ʰ' => '夆', + 'ʱ' => '奀', + 'ʲ' => '妦', + 'ʳ' => '妘', + 'ʴ' => '妠', + 'ʵ' => '妗', + 'ʶ' => '妎', + 'ʷ' => '妢', + 'ʸ' => '妐', + 'ʹ' => '妏', + 'ʺ' => '妧', + 'ʻ' => '妡', + 'ʼ' => '宎', + 'ʽ' => '宒', + 'ʾ' => '尨', + 'ʿ' => '尪', + '' => '岍', + '' => '岏', + '' => '岈', + '' => '岋', + '' => '岉', + '' => '岒', + '' => '岊', + '' => '岆', + '' => '岓', + '' => '岕', + '' => '巠', + '' => '帊', + '' => '帎', + '' => '庋', + '' => '庉', + '' => '庌', + '' => '庈', + '' => '庍', + '' => '弅', + '' => '弝', + '' => '彸', + '' => '彶', + '' => '忒', + '' => '忑', + '' => '忐', + '' => '忭', + '' => '忨', + '' => '忮', + '' => '忳', + '' => '忡', + '' => '忤', + '' => '忣', + '' => '忺', + '' => '忯', + '' => '忷', + '' => '忻', + '' => '怀', + '' => '忴', + '' => '戺', + '' => '抃', + '' => '抌', + '' => '抎', + '' => '抏', + '' => '抔', + '' => '抇', + '' => '扱', + '' => '扻', + '' => '扺', + '' => '扰', + '' => '抁', + '' => '抈', + '' => '扷', + '' => '扽', + '' => '扲', + '' => '扴', + '' => '攷', + '' => '旰', + '' => '旴', + '' => '旳', + '' => '旲', + '' => '旵', + '' => '杅', + '' => '杇', + '@' => '杙', + 'A' => '杕', + 'B' => '杌', + 'C' => '杈', + 'D' => '杝', + 'E' => '杍', + 'F' => '杚', + 'G' => '杋', + 'H' => '毐', + 'I' => '氙', + 'J' => '氚', + 'K' => '汸', + 'L' => '汧', + 'M' => '汫', + 'N' => '沄', + 'O' => '沋', + 'P' => '沏', + 'Q' => '汱', + 'R' => '汯', + 'S' => '汩', + 'T' => '沚', + 'U' => '汭', + 'V' => '沇', + 'W' => '沕', + 'X' => '沜', + 'Y' => '汦', + 'Z' => '汳', + '[' => '汥', + '\\' => '汻', + ']' => '沎', + '^' => '灴', + '_' => '灺', + '`' => '牣', + 'a' => '犿', + 'b' => '犽', + 'c' => '狃', + 'd' => '狆', + 'e' => '狁', + 'f' => '犺', + 'g' => '狅', + 'h' => '玕', + 'i' => '玗', + 'j' => '玓', + 'k' => '玔', + 'l' => '玒', + 'm' => '町', + 'n' => '甹', + 'o' => '疔', + 'p' => '疕', + 'q' => '皁', + 'r' => '礽', + 's' => '耴', + 't' => '肕', + 'u' => '肙', + 'v' => '肐', + 'w' => '肒', + 'x' => '肜', + 'y' => '芐', + 'z' => '芏', + '{' => '芅', + '|' => '芎', + '}' => '芑', + '~' => '芓', + 'ˡ' => '芊', + 'ˢ' => '芃', + 'ˣ' => '芄', + 'ˤ' => '豸', + '˥' => '迉', + '˦' => '辿', + '˧' => '邟', + '˨' => '邡', + '˩' => '邥', + '˪' => '邞', + '˫' => '邧', + 'ˬ' => '邠', + '˭' => '阰', + 'ˮ' => '阨', + '˯' => '阯', + '˰' => '阭', + '˱' => '丳', + '˲' => '侘', + '˳' => '佼', + '˴' => '侅', + '˵' => '佽', + '˶' => '侀', + '˷' => '侇', + '˸' => '佶', + '˹' => '佴', + '˺' => '侉', + '˻' => '侄', + '˼' => '佷', + '˽' => '佌', + '˾' => '侗', + '˿' => '佪', + '' => '侚', + '' => '佹', + '' => '侁', + '' => '佸', + '' => '侐', + '' => '侜', + '' => '侔', + '' => '侞', + '' => '侒', + '' => '侂', + '' => '侕', + '' => '佫', + '' => '佮', + '' => '冞', + '' => '冼', + '' => '冾', + '' => '刵', + '' => '刲', + '' => '刳', + '' => '剆', + '' => '刱', + '' => '劼', + '' => '匊', + '' => '匋', + '' => '匼', + '' => '厒', + '' => '厔', + '' => '咇', + '' => '呿', + '' => '咁', + '' => '咑', + '' => '咂', + '' => '咈', + '' => '呫', + '' => '呺', + '' => '呾', + '' => '呥', + '' => '呬', + '' => '呴', + '' => '呦', + '' => '咍', + '' => '呯', + '' => '呡', + '' => '呠', + '' => '咘', + '' => '呣', + '' => '呧', + '' => '呤', + '' => '囷', + '' => '囹', + '' => '坯', + '' => '坲', + '' => '坭', + '' => '坫', + '' => '坱', + '' => '坰', + '' => '坶', + '' => '垀', + '' => '坵', + '' => '坻', + '' => '坳', + '' => '坴', + '' => '坢', + '@' => '坨', + 'A' => '坽', + 'B' => '夌', + 'C' => '奅', + 'D' => '妵', + 'E' => '妺', + 'F' => '姏', + 'G' => '姎', + 'H' => '妲', + 'I' => '姌', + 'J' => '姁', + 'K' => '妶', + 'L' => '妼', + 'M' => '姃', + 'N' => '姖', + 'O' => '妱', + 'P' => '妽', + 'Q' => '姀', + 'R' => '姈', + 'S' => '妴', + 'T' => '姇', + 'U' => '孢', + 'V' => '孥', + 'W' => '宓', + 'X' => '宕', + 'Y' => '屄', + 'Z' => '屇', + '[' => '岮', + '\\' => '岤', + ']' => '岠', + '^' => '岵', + '_' => '岯', + '`' => '岨', + 'a' => '岬', + 'b' => '岟', + 'c' => '岣', + 'd' => '岭', + 'e' => '岢', + 'f' => '岪', + 'g' => '岧', + 'h' => '岝', + 'i' => '岥', + 'j' => '岶', + 'k' => '岰', + 'l' => '岦', + 'm' => '帗', + 'n' => '帔', + 'o' => '帙', + 'p' => '弨', + 'q' => '弢', + 'r' => '弣', + 's' => '弤', + 't' => '彔', + 'u' => '徂', + 'v' => '彾', + 'w' => '彽', + 'x' => '忞', + 'y' => '忥', + 'z' => '怭', + '{' => '怦', + '|' => '怙', + '}' => '怲', + '~' => '怋', + '̡' => '怴', + '̢' => '怊', + '̣' => '怗', + '̤' => '怳', + '̥' => '怚', + '̦' => '怞', + '̧' => '怬', + '̨' => '怢', + '̩' => '怍', + '̪' => '怐', + '̫' => '怮', + '̬' => '怓', + '̭' => '怑', + '̮' => '怌', + '̯' => '怉', + '̰' => '怜', + '̱' => '戔', + '̲' => '戽', + '̳' => '抭', + '̴' => '抴', + '̵' => '拑', + '̶' => '抾', + '̷' => '抪', + '̸' => '抶', + '̹' => '拊', + '̺' => '抮', + '̻' => '抳', + '̼' => '抯', + '̽' => '抻', + '̾' => '抩', + '̿' => '抰', + '' => '抸', + '' => '攽', + '' => '斨', + '' => '斻', + '' => '昉', + '' => '旼', + '' => '昄', + '' => '昒', + '' => '昈', + '' => '旻', + '' => '昃', + '' => '昋', + '' => '昍', + '' => '昅', + '' => '旽', + '' => '昑', + '' => '昐', + '' => '曶', + '' => '朊', + '' => '枅', + '' => '杬', + '' => '枎', + '' => '枒', + '' => '杶', + '' => '杻', + '' => '枘', + '' => '枆', + '' => '构', + '' => '杴', + '' => '枍', + '' => '枌', + '' => '杺', + '' => '枟', + '' => '枑', + '' => '枙', + '' => '枃', + '' => '杽', + '' => '极', + '' => '杸', + '' => '杹', + '' => '枔', + '' => '欥', + '' => '殀', + '' => '歾', + '' => '毞', + '' => '氝', + '' => '沓', + '' => '泬', + '' => '泫', + '' => '泮', + '' => '泙', + '' => '沶', + '' => '泔', + '' => '沭', + '' => '泧', + '' => '沷', + '' => '泐', + '' => '泂', + '' => '沺', + '' => '泃', + '' => '泆', + '' => '泭', + '' => '泲', + '@' => '泒', + 'A' => '泝', + 'B' => '沴', + 'C' => '沊', + 'D' => '沝', + 'E' => '沀', + 'F' => '泞', + 'G' => '泀', + 'H' => '洰', + 'I' => '泍', + 'J' => '泇', + 'K' => '沰', + 'L' => '泹', + 'M' => '泏', + 'N' => '泩', + 'O' => '泑', + 'P' => '炔', + 'Q' => '炘', + 'R' => '炅', + 'S' => '炓', + 'T' => '炆', + 'U' => '炄', + 'V' => '炑', + 'W' => '炖', + 'X' => '炂', + 'Y' => '炚', + 'Z' => '炃', + '[' => '牪', + '\\' => '狖', + ']' => '狋', + '^' => '狘', + '_' => '狉', + '`' => '狜', + 'a' => '狒', + 'b' => '狔', + 'c' => '狚', + 'd' => '狌', + 'e' => '狑', + 'f' => '玤', + 'g' => '玡', + 'h' => '玭', + 'i' => '玦', + 'j' => '玢', + 'k' => '玠', + 'l' => '玬', + 'm' => '玝', + 'n' => '瓝', + 'o' => '瓨', + 'p' => '甿', + 'q' => '畀', + 'r' => '甾', + 's' => '疌', + 't' => '疘', + 'u' => '皯', + 'v' => '盳', + 'w' => '盱', + 'x' => '盰', + 'y' => '盵', + 'z' => '矸', + '{' => '矼', + '|' => '矹', + '}' => '矻', + '~' => '矺', + '͡' => '矷', + '͢' => '祂', + 'ͣ' => '礿', + 'ͤ' => '秅', + 'ͥ' => '穸', + 'ͦ' => '穻', + 'ͧ' => '竻', + 'ͨ' => '籵', + 'ͩ' => '糽', + 'ͪ' => '耵', + 'ͫ' => '肏', + 'ͬ' => '肮', + 'ͭ' => '肣', + 'ͮ' => '肸', + 'ͯ' => '肵', + 'Ͱ' => '肭', + 'ͱ' => '舠', + 'Ͳ' => '芠', + 'ͳ' => '苀', + 'ʹ' => '芫', + '͵' => '芚', + 'Ͷ' => '芘', + 'ͷ' => '芛', + '͸' => '芵', + '͹' => '芧', + 'ͺ' => '芮', + 'ͻ' => '芼', + 'ͼ' => '芞', + 'ͽ' => '芺', + ';' => '芴', + 'Ϳ' => '芨', + '' => '芡', + '' => '芩', + '' => '苂', + '' => '芤', + '' => '苃', + '' => '芶', + '' => '芢', + '' => '虰', + '' => '虯', + '' => '虭', + '' => '虮', + '' => '豖', + '' => '迒', + '' => '迋', + '' => '迓', + '' => '迍', + '' => '迖', + '' => '迕', + '' => '迗', + '' => '邲', + '' => '邴', + '' => '邯', + '' => '邳', + '' => '邰', + '' => '阹', + '' => '阽', + '' => '阼', + '' => '阺', + '' => '陃', + '' => '俍', + '' => '俅', + '' => '俓', + '' => '侲', + '' => '俉', + '' => '俋', + '' => '俁', + '' => '俔', + '' => '俜', + '' => '俙', + '' => '侻', + '' => '侳', + '' => '俛', + '' => '俇', + '' => '俖', + '' => '侺', + '' => '俀', + '' => '侹', + '' => '俬', + '' => '剄', + '' => '剉', + '' => '勀', + '' => '勂', + '' => '匽', + '' => '卼', + '' => '厗', + '' => '厖', + '' => '厙', + '' => '厘', + '' => '咺', + '' => '咡', + '' => '咭', + '' => '咥', + '' => '哏', + '@' => '哃', + 'A' => '茍', + 'B' => '咷', + 'C' => '咮', + 'D' => '哖', + 'E' => '咶', + 'F' => '哅', + 'G' => '哆', + 'H' => '咠', + 'I' => '呰', + 'J' => '咼', + 'K' => '咢', + 'L' => '咾', + 'M' => '呲', + 'N' => '哞', + 'O' => '咰', + 'P' => '垵', + 'Q' => '垞', + 'R' => '垟', + 'S' => '垤', + 'T' => '垌', + 'U' => '垗', + 'V' => '垝', + 'W' => '垛', + 'X' => '垔', + 'Y' => '垘', + 'Z' => '垏', + '[' => '垙', + '\\' => '垥', + ']' => '垚', + '^' => '垕', + '_' => '壴', + '`' => '复', + 'a' => '奓', + 'b' => '姡', + 'c' => '姞', + 'd' => '姮', + 'e' => '娀', + 'f' => '姱', + 'g' => '姝', + 'h' => '姺', + 'i' => '姽', + 'j' => '姼', + 'k' => '姶', + 'l' => '姤', + 'm' => '姲', + 'n' => '姷', + 'o' => '姛', + 'p' => '姩', + 'q' => '姳', + 'r' => '姵', + 's' => '姠', + 't' => '姾', + 'u' => '姴', + 'v' => '姭', + 'w' => '宨', + 'x' => '屌', + 'y' => '峐', + 'z' => '峘', + '{' => '峌', + '|' => '峗', + '}' => '峋', + '~' => '峛', + 'Ρ' => '峞', + '΢' => '峚', + 'Σ' => '峉', + 'Τ' => '峇', + 'Υ' => '峊', + 'Φ' => '峖', + 'Χ' => '峓', + 'Ψ' => '峔', + 'Ω' => '峏', + 'Ϊ' => '峈', + 'Ϋ' => '峆', + 'ά' => '峎', + 'έ' => '峟', + 'ή' => '峸', + 'ί' => '巹', + 'ΰ' => '帡', + 'α' => '帢', + 'β' => '帣', + 'γ' => '帠', + 'δ' => '帤', + 'ε' => '庰', + 'ζ' => '庤', + 'η' => '庢', + 'θ' => '庛', + 'ι' => '庣', + 'κ' => '庥', + 'λ' => '弇', + 'μ' => '弮', + 'ν' => '彖', + 'ξ' => '徆', + 'ο' => '怷', + '' => '怹', + '' => '恔', + '' => '恲', + '' => '恞', + '' => '恅', + '' => '恓', + '' => '恇', + '' => '恉', + '' => '恛', + '' => '恌', + '' => '恀', + '' => '恂', + '' => '恟', + '' => '怤', + '' => '恄', + '' => '恘', + '' => '恦', + '' => '恮', + '' => '扂', + '' => '扃', + '' => '拏', + '' => '挍', + '' => '挋', + '' => '拵', + '' => '挎', + '' => '挃', + '' => '拫', + '' => '拹', + '' => '挏', + '' => '挌', + '' => '拸', + '' => '拶', + '' => '挀', + '' => '挓', + '' => '挔', + '' => '拺', + '' => '挕', + '' => '拻', + '' => '拰', + '' => '敁', + '' => '敃', + '' => '斪', + '' => '斿', + '' => '昶', + '' => '昡', + '' => '昲', + '' => '昵', + '' => '昜', + '' => '昦', + '' => '昢', + '' => '昳', + '' => '昫', + '' => '昺', + '' => '昝', + '' => '昴', + '' => '昹', + '' => '昮', + '' => '朏', + '' => '朐', + '' => '柁', + '' => '柲', + '' => '柈', + '' => '枺', + '@' => '柜', + 'A' => '枻', + 'B' => '柸', + 'C' => '柘', + 'D' => '柀', + 'E' => '枷', + 'F' => '柅', + 'G' => '柫', + 'H' => '柤', + 'I' => '柟', + 'J' => '枵', + 'K' => '柍', + 'L' => '枳', + 'M' => '柷', + 'N' => '柶', + 'O' => '柮', + 'P' => '柣', + 'Q' => '柂', + 'R' => '枹', + 'S' => '柎', + 'T' => '柧', + 'U' => '柰', + 'V' => '枲', + 'W' => '柼', + 'X' => '柆', + 'Y' => '柭', + 'Z' => '柌', + '[' => '枮', + '\\' => '柦', + ']' => '柛', + '^' => '柺', + '_' => '柉', + '`' => '柊', + 'a' => '柃', + 'b' => '柪', + 'c' => '柋', + 'd' => '欨', + 'e' => '殂', + 'f' => '殄', + 'g' => '殶', + 'h' => '毖', + 'i' => '毘', + 'j' => '毠', + 'k' => '氠', + 'l' => '氡', + 'm' => '洨', + 'n' => '洴', + 'o' => '洭', + 'p' => '洟', + 'q' => '洼', + 'r' => '洿', + 's' => '洒', + 't' => '洊', + 'u' => '泚', + 'v' => '洳', + 'w' => '洄', + 'x' => '洙', + 'y' => '洺', + 'z' => '洚', + '{' => '洑', + '|' => '洀', + '}' => '洝', + '~' => '浂', + 'ϡ' => '洁', + 'Ϣ' => '洘', + 'ϣ' => '洷', + 'Ϥ' => '洃', + 'ϥ' => '洏', + 'Ϧ' => '浀', + 'ϧ' => '洇', + 'Ϩ' => '洠', + 'ϩ' => '洬', + 'Ϫ' => '洈', + 'ϫ' => '洢', + 'Ϭ' => '洉', + 'ϭ' => '洐', + 'Ϯ' => '炷', + 'ϯ' => '炟', + 'ϰ' => '炾', + 'ϱ' => '炱', + 'ϲ' => '炰', + 'ϳ' => '炡', + 'ϴ' => '炴', + 'ϵ' => '炵', + '϶' => '炩', + 'Ϸ' => '牁', + 'ϸ' => '牉', + 'Ϲ' => '牊', + 'Ϻ' => '牬', + 'ϻ' => '牰', + 'ϼ' => '牳', + 'Ͻ' => '牮', + 'Ͼ' => '狊', + 'Ͽ' => '狤', + '' => '狨', + '' => '狫', + '' => '狟', + '' => '狪', + '' => '狦', + '' => '狣', + '' => '玅', + '' => '珌', + '' => '珂', + '' => '珈', + '' => '珅', + '' => '玹', + '' => '玶', + '' => '玵', + '' => '玴', + '' => '珫', + '' => '玿', + '' => '珇', + '' => '玾', + '' => '珃', + '' => '珆', + '' => '玸', + '' => '珋', + '' => '瓬', + '' => '瓮', + '' => '甮', + '' => '畇', + '' => '畈', + '' => '疧', + '' => '疪', + '' => '癹', + '' => '盄', + '' => '眈', + '' => '眃', + '' => '眄', + '' => '眅', + '' => '眊', + '' => '盷', + '' => '盻', + '' => '盺', + '' => '矧', + '' => '矨', + '' => '砆', + '' => '砑', + '' => '砒', + '' => '砅', + '' => '砐', + '' => '砏', + '' => '砎', + '' => '砉', + '' => '砃', + '' => '砓', + '' => '祊', + '' => '祌', + '' => '祋', + '' => '祅', + '' => '祄', + '' => '秕', + '' => '种', + '' => '秏', + '' => '秖', + '' => '秎', + '' => '窀', + '@' => '穾', + 'A' => '竑', + 'B' => '笀', + 'C' => '笁', + 'D' => '籺', + 'E' => '籸', + 'F' => '籹', + 'G' => '籿', + 'H' => '粀', + 'I' => '粁', + 'J' => '紃', + 'K' => '紈', + 'L' => '紁', + 'M' => '罘', + 'N' => '羑', + 'O' => '羍', + 'P' => '羾', + 'Q' => '耇', + 'R' => '耎', + 'S' => '耏', + 'T' => '耔', + 'U' => '耷', + 'V' => '胘', + 'W' => '胇', + 'X' => '胠', + 'Y' => '胑', + 'Z' => '胈', + '[' => '胂', + '\\' => '胐', + ']' => '胅', + '^' => '胣', + '_' => '胙', + '`' => '胜', + 'a' => '胊', + 'b' => '胕', + 'c' => '胉', + 'd' => '胏', + 'e' => '胗', + 'f' => '胦', + 'g' => '胍', + 'h' => '臿', + 'i' => '舡', + 'j' => '芔', + 'k' => '苙', + 'l' => '苾', + 'm' => '苹', + 'n' => '茇', + 'o' => '苨', + 'p' => '茀', + 'q' => '苕', + 'r' => '茺', + 's' => '苫', + 't' => '苖', + 'u' => '苴', + 'v' => '苬', + 'w' => '苡', + 'x' => '苲', + 'y' => '苵', + 'z' => '茌', + '{' => '苻', + '|' => '苶', + '}' => '苰', + '~' => '苪', + 'С' => '苤', + 'Т' => '苠', + 'У' => '苺', + 'Ф' => '苳', + 'Х' => '苭', + 'Ц' => '虷', + 'Ч' => '虴', + 'Ш' => '虼', + 'Щ' => '虳', + 'Ъ' => '衁', + 'Ы' => '衎', + 'Ь' => '衧', + 'Э' => '衪', + 'Ю' => '衩', + 'Я' => '觓', + 'а' => '訄', + 'б' => '訇', + 'в' => '赲', + 'г' => '迣', + 'д' => '迡', + 'е' => '迮', + 'ж' => '迠', + 'з' => '郱', + 'и' => '邽', + 'й' => '邿', + 'к' => '郕', + 'л' => '郅', + 'м' => '邾', + 'н' => '郇', + 'о' => '郋', + 'п' => '郈', + '' => '釔', + '' => '釓', + '' => '陔', + '' => '陏', + '' => '陑', + '' => '陓', + '' => '陊', + '' => '陎', + '' => '倞', + '' => '倅', + '' => '倇', + '' => '倓', + '' => '倢', + '' => '倰', + '' => '倛', + '' => '俵', + '' => '俴', + '' => '倳', + '' => '倷', + '' => '倬', + '' => '俶', + '' => '俷', + '' => '倗', + '' => '倜', + '' => '倠', + '' => '倧', + '' => '倵', + '' => '倯', + '' => '倱', + '' => '倎', + '' => '党', + '' => '冔', + '' => '冓', + '' => '凊', + '' => '凄', + '' => '凅', + '' => '凈', + '' => '凎', + '' => '剡', + '' => '剚', + '' => '剒', + '' => '剞', + '' => '剟', + '' => '剕', + '' => '剢', + '' => '勍', + '' => '匎', + '' => '厞', + '' => '唦', + '' => '哢', + '' => '唗', + '' => '唒', + '' => '哧', + '' => '哳', + '' => '哤', + '' => '唚', + '' => '哿', + '' => '唄', + '' => '唈', + '' => '哫', + '' => '唑', + '' => '唅', + '' => '哱', + '@' => '唊', + 'A' => '哻', + 'B' => '哷', + 'C' => '哸', + 'D' => '哠', + 'E' => '唎', + 'F' => '唃', + 'G' => '唋', + 'H' => '圁', + 'I' => '圂', + 'J' => '埌', + 'K' => '堲', + 'L' => '埕', + 'M' => '埒', + 'N' => '垺', + 'O' => '埆', + 'P' => '垽', + 'Q' => '垼', + 'R' => '垸', + 'S' => '垶', + 'T' => '垿', + 'U' => '埇', + 'V' => '埐', + 'W' => '垹', + 'X' => '埁', + 'Y' => '夎', + 'Z' => '奊', + '[' => '娙', + '\\' => '娖', + ']' => '娭', + '^' => '娮', + '_' => '娕', + '`' => '娏', + 'a' => '娗', + 'b' => '娊', + 'c' => '娞', + 'd' => '娳', + 'e' => '孬', + 'f' => '宧', + 'g' => '宭', + 'h' => '宬', + 'i' => '尃', + 'j' => '屖', + 'k' => '屔', + 'l' => '峬', + 'm' => '峿', + 'n' => '峮', + 'o' => '峱', + 'p' => '峷', + 'q' => '崀', + 'r' => '峹', + 's' => '帩', + 't' => '帨', + 'u' => '庨', + 'v' => '庮', + 'w' => '庪', + 'x' => '庬', + 'y' => '弳', + 'z' => '弰', + '{' => '彧', + '|' => '恝', + '}' => '恚', + '~' => '恧', + 'ѡ' => '恁', + 'Ѣ' => '悢', + 'ѣ' => '悈', + 'Ѥ' => '悀', + 'ѥ' => '悒', + 'Ѧ' => '悁', + 'ѧ' => '悝', + 'Ѩ' => '悃', + 'ѩ' => '悕', + 'Ѫ' => '悛', + 'ѫ' => '悗', + 'Ѭ' => '悇', + 'ѭ' => '悜', + 'Ѯ' => '悎', + 'ѯ' => '戙', + 'Ѱ' => '扆', + 'ѱ' => '拲', + 'Ѳ' => '挐', + 'ѳ' => '捖', + 'Ѵ' => '挬', + 'ѵ' => '捄', + 'Ѷ' => '捅', + 'ѷ' => '挶', + 'Ѹ' => '捃', + 'ѹ' => '揤', + 'Ѻ' => '挹', + 'ѻ' => '捋', + 'Ѽ' => '捊', + 'ѽ' => '挼', + 'Ѿ' => '挩', + 'ѿ' => '捁', + '' => '挴', + '' => '捘', + '' => '捔', + '' => '捙', + '' => '挭', + '' => '捇', + '' => '挳', + '' => '捚', + '' => '捑', + '' => '挸', + '' => '捗', + '' => '捀', + '' => '捈', + '' => '敊', + '' => '敆', + '' => '旆', + '' => '旃', + '' => '旄', + '' => '旂', + '' => '晊', + '' => '晟', + '' => '晇', + '' => '晑', + '' => '朒', + '' => '朓', + '' => '栟', + '' => '栚', + '' => '桉', + '' => '栲', + '' => '栳', + '' => '栻', + '' => '桋', + '' => '桏', + '' => '栖', + '' => '栱', + '' => '栜', + '' => '栵', + '' => '栫', + '' => '栭', + '' => '栯', + '' => '桎', + '' => '桄', + '' => '栴', + '' => '栝', + '' => '栒', + '' => '栔', + '' => '栦', + '' => '栨', + '' => '栮', + '' => '桍', + '' => '栺', + '' => '栥', + '' => '栠', + '' => '欬', + '' => '欯', + '' => '欭', + '' => '欱', + '' => '欴', + '' => '歭', + '' => '肂', + '' => '殈', + '' => '毦', + '' => '毤', + '@' => '毨', + 'A' => '毣', + 'B' => '毢', + 'C' => '毧', + 'D' => '氥', + 'E' => '浺', + 'F' => '浣', + 'G' => '浤', + 'H' => '浶', + 'I' => '洍', + 'J' => '浡', + 'K' => '涒', + 'L' => '浘', + 'M' => '浢', + 'N' => '浭', + 'O' => '浯', + 'P' => '涑', + 'Q' => '涍', + 'R' => '淯', + 'S' => '浿', + 'T' => '涆', + 'U' => '浞', + 'V' => '浧', + 'W' => '浠', + 'X' => '涗', + 'Y' => '浰', + 'Z' => '浼', + '[' => '浟', + '\\' => '涂', + ']' => '涘', + '^' => '洯', + '_' => '浨', + '`' => '涋', + 'a' => '浾', + 'b' => '涀', + 'c' => '涄', + 'd' => '洖', + 'e' => '涃', + 'f' => '浻', + 'g' => '浽', + 'h' => '浵', + 'i' => '涐', + 'j' => '烜', + 'k' => '烓', + 'l' => '烑', + 'm' => '烝', + 'n' => '烋', + 'o' => '缹', + 'p' => '烢', + 'q' => '烗', + 'r' => '烒', + 's' => '烞', + 't' => '烠', + 'u' => '烔', + 'v' => '烍', + 'w' => '烅', + 'x' => '烆', + 'y' => '烇', + 'z' => '烚', + '{' => '烎', + '|' => '烡', + '}' => '牂', + '~' => '牸', + 'ҡ' => '牷', + 'Ң' => '牶', + 'ң' => '猀', + 'Ҥ' => '狺', + 'ҥ' => '狴', + 'Ҧ' => '狾', + 'ҧ' => '狶', + 'Ҩ' => '狳', + 'ҩ' => '狻', + 'Ҫ' => '猁', + 'ҫ' => '珓', + 'Ҭ' => '珙', + 'ҭ' => '珥', + 'Ү' => '珖', + 'ү' => '玼', + 'Ұ' => '珧', + 'ұ' => '珣', + 'Ҳ' => '珩', + 'ҳ' => '珜', + 'Ҵ' => '珒', + 'ҵ' => '珛', + 'Ҷ' => '珔', + 'ҷ' => '珝', + 'Ҹ' => '珚', + 'ҹ' => '珗', + 'Һ' => '珘', + 'һ' => '珨', + 'Ҽ' => '瓞', + 'ҽ' => '瓟', + 'Ҿ' => '瓴', + 'ҿ' => '瓵', + '' => '甡', + '' => '畛', + '' => '畟', + '' => '疰', + '' => '痁', + '' => '疻', + '' => '痄', + '' => '痀', + '' => '疿', + '' => '疶', + '' => '疺', + '' => '皊', + '' => '盉', + '' => '眝', + '' => '眛', + '' => '眐', + '' => '眓', + '' => '眒', + '' => '眣', + '' => '眑', + '' => '眕', + '' => '眙', + '' => '眚', + '' => '眢', + '' => '眧', + '' => '砣', + '' => '砬', + '' => '砢', + '' => '砵', + '' => '砯', + '' => '砨', + '' => '砮', + '' => '砫', + '' => '砡', + '' => '砩', + '' => '砳', + '' => '砪', + '' => '砱', + '' => '祔', + '' => '祛', + '' => '祏', + '' => '祜', + '' => '祓', + '' => '祒', + '' => '祑', + '' => '秫', + '' => '秬', + '' => '秠', + '' => '秮', + '' => '秭', + '' => '秪', + '' => '秜', + '' => '秞', + '' => '秝', + '' => '窆', + '' => '窉', + '' => '窅', + '' => '窋', + '' => '窌', + '' => '窊', + '' => '窇', + '' => '竘', + '' => '笐', + '@' => '笄', + 'A' => '笓', + 'B' => '笅', + 'C' => '笏', + 'D' => '笈', + 'E' => '笊', + 'F' => '笎', + 'G' => '笉', + 'H' => '笒', + 'I' => '粄', + 'J' => '粑', + 'K' => '粊', + 'L' => '粌', + 'M' => '粈', + 'N' => '粍', + 'O' => '粅', + 'P' => '紞', + 'Q' => '紝', + 'R' => '紑', + 'S' => '紎', + 'T' => '紘', + 'U' => '紖', + 'V' => '紓', + 'W' => '紟', + 'X' => '紒', + 'Y' => '紏', + 'Z' => '紌', + '[' => '罜', + '\\' => '罡', + ']' => '罞', + '^' => '罠', + '_' => '罝', + '`' => '罛', + 'a' => '羖', + 'b' => '羒', + 'c' => '翃', + 'd' => '翂', + 'e' => '翀', + 'f' => '耖', + 'g' => '耾', + 'h' => '耹', + 'i' => '胺', + 'j' => '胲', + 'k' => '胹', + 'l' => '胵', + 'm' => '脁', + 'n' => '胻', + 'o' => '脀', + 'p' => '舁', + 'q' => '舯', + 'r' => '舥', + 's' => '茳', + 't' => '茭', + 'u' => '荄', + 'v' => '茙', + 'w' => '荑', + 'x' => '茥', + 'y' => '荖', + 'z' => '茿', + '{' => '荁', + '|' => '茦', + '}' => '茜', + '~' => '茢', + 'ӡ' => '荂', + 'Ӣ' => '荎', + 'ӣ' => '茛', + 'Ӥ' => '茪', + 'ӥ' => '茈', + 'Ӧ' => '茼', + 'ӧ' => '荍', + 'Ө' => '茖', + 'ө' => '茤', + 'Ӫ' => '茠', + 'ӫ' => '茷', + 'Ӭ' => '茯', + 'ӭ' => '茩', + 'Ӯ' => '荇', + 'ӯ' => '荅', + 'Ӱ' => '荌', + 'ӱ' => '荓', + 'Ӳ' => '茞', + 'ӳ' => '茬', + 'Ӵ' => '荋', + 'ӵ' => '茧', + 'Ӷ' => '荈', + 'ӷ' => '虓', + 'Ӹ' => '虒', + 'ӹ' => '蚢', + 'Ӻ' => '蚨', + 'ӻ' => '蚖', + 'Ӽ' => '蚍', + 'ӽ' => '蚑', + 'Ӿ' => '蚞', + 'ӿ' => '蚇', + '' => '蚗', + '' => '蚆', + '' => '蚋', + '' => '蚚', + '' => '蚅', + '' => '蚥', + '' => '蚙', + '' => '蚡', + '' => '蚧', + '' => '蚕', + '' => '蚘', + '' => '蚎', + '' => '蚝', + '' => '蚐', + '' => '蚔', + '' => '衃', + '' => '衄', + '' => '衭', + '' => '衵', + '' => '衶', + '' => '衲', + '' => '袀', + '' => '衱', + '' => '衿', + '' => '衯', + '' => '袃', + '' => '衾', + '' => '衴', + '' => '衼', + '' => '訒', + '' => '豇', + '' => '豗', + '' => '豻', + '' => '貤', + '' => '貣', + '' => '赶', + '' => '赸', + '' => '趵', + '' => '趷', + '' => '趶', + '' => '軑', + '' => '軓', + '' => '迾', + '' => '迵', + '' => '适', + '' => '迿', + '' => '迻', + '' => '逄', + '' => '迼', + '' => '迶', + '' => '郖', + '' => '郠', + '' => '郙', + '' => '郚', + '' => '郣', + '' => '郟', + '' => '郥', + '' => '郘', + '' => '郛', + '' => '郗', + '' => '郜', + '' => '郤', + '' => '酐', + '@' => '酎', + 'A' => '酏', + 'B' => '釕', + 'C' => '釢', + 'D' => '釚', + 'E' => '陜', + 'F' => '陟', + 'G' => '隼', + 'H' => '飣', + 'I' => '髟', + 'J' => '鬯', + 'K' => '乿', + 'L' => '偰', + 'M' => '偪', + 'N' => '偡', + 'O' => '偞', + 'P' => '偠', + 'Q' => '偓', + 'R' => '偋', + 'S' => '偝', + 'T' => '偲', + 'U' => '偈', + 'V' => '偍', + 'W' => '偁', + 'X' => '偛', + 'Y' => '偊', + 'Z' => '偢', + '[' => '倕', + '\\' => '偅', + ']' => '偟', + '^' => '偩', + '_' => '偫', + '`' => '偣', + 'a' => '偤', + 'b' => '偆', + 'c' => '偀', + 'd' => '偮', + 'e' => '偳', + 'f' => '偗', + 'g' => '偑', + 'h' => '凐', + 'i' => '剫', + 'j' => '剭', + 'k' => '剬', + 'l' => '剮', + 'm' => '勖', + 'n' => '勓', + 'o' => '匭', + 'p' => '厜', + 'q' => '啵', + 'r' => '啶', + 's' => '唼', + 't' => '啍', + 'u' => '啐', + 'v' => '唴', + 'w' => '唪', + 'x' => '啑', + 'y' => '啢', + 'z' => '唶', + '{' => '唵', + '|' => '唰', + '}' => '啒', + '~' => '啅', + 'ԡ' => '唌', + 'Ԣ' => '唲', + 'ԣ' => '啥', + 'Ԥ' => '啎', + 'ԥ' => '唹', + 'Ԧ' => '啈', + 'ԧ' => '唭', + 'Ԩ' => '唻', + 'ԩ' => '啀', + 'Ԫ' => '啋', + 'ԫ' => '圊', + 'Ԭ' => '圇', + 'ԭ' => '埻', + 'Ԯ' => '堔', + 'ԯ' => '埢', + '԰' => '埶', + 'Ա' => '埜', + 'Բ' => '埴', + 'Գ' => '堀', + 'Դ' => '埭', + 'Ե' => '埽', + 'Զ' => '堈', + 'Է' => '埸', + 'Ը' => '堋', + 'Թ' => '埳', + 'Ժ' => '埏', + 'Ի' => '堇', + 'Լ' => '埮', + 'Խ' => '埣', + 'Ծ' => '埲', + 'Կ' => '埥', + '' => '埬', + '' => '埡', + '' => '堎', + '' => '埼', + '' => '堐', + '' => '埧', + '' => '堁', + '' => '堌', + '' => '埱', + '' => '埩', + '' => '埰', + '' => '堍', + '' => '堄', + '' => '奜', + '' => '婠', + '' => '婘', + '' => '婕', + '' => '婧', + '' => '婞', + '' => '娸', + '' => '娵', + '' => '婭', + '' => '婐', + '' => '婟', + '' => '婥', + '' => '婬', + '' => '婓', + '' => '婤', + '' => '婗', + '' => '婃', + '' => '婝', + '' => '婒', + '' => '婄', + '' => '婛', + '' => '婈', + '' => '媎', + '' => '娾', + '' => '婍', + '' => '娹', + '' => '婌', + '' => '婰', + '' => '婩', + '' => '婇', + '' => '婑', + '' => '婖', + '' => '婂', + '' => '婜', + '' => '孲', + '' => '孮', + '' => '寁', + '' => '寀', + '' => '屙', + '' => '崞', + '' => '崋', + '' => '崝', + '' => '崚', + '' => '崠', + '' => '崌', + '' => '崨', + '' => '崍', + '' => '崦', + '' => '崥', + '' => '崏', + '@' => '崰', + 'A' => '崒', + 'B' => '崣', + 'C' => '崟', + 'D' => '崮', + 'E' => '帾', + 'F' => '帴', + 'G' => '庱', + 'H' => '庴', + 'I' => '庹', + 'J' => '庲', + 'K' => '庳', + 'L' => '弶', + 'M' => '弸', + 'N' => '徛', + 'O' => '徖', + 'P' => '徟', + 'Q' => '悊', + 'R' => '悐', + 'S' => '悆', + 'T' => '悾', + 'U' => '悰', + 'V' => '悺', + 'W' => '惓', + 'X' => '惔', + 'Y' => '惏', + 'Z' => '惤', + '[' => '惙', + '\\' => '惝', + ']' => '惈', + '^' => '悱', + '_' => '惛', + '`' => '悷', + 'a' => '惊', + 'b' => '悿', + 'c' => '惃', + 'd' => '惍', + 'e' => '惀', + 'f' => '挲', + 'g' => '捥', + 'h' => '掊', + 'i' => '掂', + 'j' => '捽', + 'k' => '掽', + 'l' => '掞', + 'm' => '掭', + 'n' => '掝', + 'o' => '掗', + 'p' => '掫', + 'q' => '掎', + 'r' => '捯', + 's' => '掇', + 't' => '掐', + 'u' => '据', + 'v' => '掯', + 'w' => '捵', + 'x' => '掜', + 'y' => '捭', + 'z' => '掮', + '{' => '捼', + '|' => '掤', + '}' => '挻', + '~' => '掟', + 'ա' => '捸', + 'բ' => '掅', + 'գ' => '掁', + 'դ' => '掑', + 'ե' => '掍', + 'զ' => '捰', + 'է' => '敓', + 'ը' => '旍', + 'թ' => '晥', + 'ժ' => '晡', + 'ի' => '晛', + 'լ' => '晙', + 'խ' => '晜', + 'ծ' => '晢', + 'կ' => '朘', + 'հ' => '桹', + 'ձ' => '梇', + 'ղ' => '梐', + 'ճ' => '梜', + 'մ' => '桭', + 'յ' => '桮', + 'ն' => '梮', + 'շ' => '梫', + 'ո' => '楖', + 'չ' => '桯', + 'պ' => '梣', + 'ջ' => '梬', + 'ռ' => '梩', + 'ս' => '桵', + 'վ' => '桴', + 'տ' => '梲', + '' => '梏', + '' => '桷', + '' => '梒', + '' => '桼', + '' => '桫', + '' => '桲', + '' => '梪', + '' => '梀', + '' => '桱', + '' => '桾', + '' => '梛', + '' => '梖', + '' => '梋', + '' => '梠', + '' => '梉', + '' => '梤', + '' => '桸', + '' => '桻', + '' => '梑', + '' => '梌', + '' => '梊', + '' => '桽', + '' => '欶', + '' => '欳', + '' => '欷', + '' => '欸', + '' => '殑', + '' => '殏', + '' => '殍', + '' => '殎', + '' => '殌', + '' => '氪', + '' => '淀', + '' => '涫', + '' => '涴', + '' => '涳', + '' => '湴', + '' => '涬', + '' => '淩', + '' => '淢', + '' => '涷', + '' => '淶', + '' => '淔', + '' => '渀', + '' => '淈', + '' => '淠', + '' => '淟', + '' => '淖', + '' => '涾', + '' => '淥', + '' => '淜', + '' => '淝', + '' => '淛', + '' => '淴', + '' => '淊', + '' => '涽', + '' => '淭', + '' => '淰', + '' => '涺', + '' => '淕', + '' => '淂', + '' => '淏', + '' => '淉', + '@' => '淐', + 'A' => '淲', + 'B' => '淓', + 'C' => '淽', + 'D' => '淗', + 'E' => '淍', + 'F' => '淣', + 'G' => '涻', + 'H' => '烺', + 'I' => '焍', + 'J' => '烷', + 'K' => '焗', + 'L' => '烴', + 'M' => '焌', + 'N' => '烰', + 'O' => '焄', + 'P' => '烳', + 'Q' => '焐', + 'R' => '烼', + 'S' => '烿', + 'T' => '焆', + 'U' => '焓', + 'V' => '焀', + 'W' => '烸', + 'X' => '烶', + 'Y' => '焋', + 'Z' => '焂', + '[' => '焎', + '\\' => '牾', + ']' => '牻', + '^' => '牼', + '_' => '牿', + '`' => '猝', + 'a' => '猗', + 'b' => '猇', + 'c' => '猑', + 'd' => '猘', + 'e' => '猊', + 'f' => '猈', + 'g' => '狿', + 'h' => '猏', + 'i' => '猞', + 'j' => '玈', + 'k' => '珶', + 'l' => '珸', + 'm' => '珵', + 'n' => '琄', + 'o' => '琁', + 'p' => '珽', + 'q' => '琇', + 'r' => '琀', + 's' => '珺', + 't' => '珼', + 'u' => '珿', + 'v' => '琌', + 'w' => '琋', + 'x' => '珴', + 'y' => '琈', + 'z' => '畤', + '{' => '畣', + '|' => '痎', + '}' => '痒', + '~' => '痏', + '֡' => '痋', + '֢' => '痌', + '֣' => '痑', + '֤' => '痐', + '֥' => '皏', + '֦' => '皉', + '֧' => '盓', + '֨' => '眹', + '֩' => '眯', + '֪' => '眭', + '֫' => '眱', + '֬' => '眲', + '֭' => '眴', + '֮' => '眳', + '֯' => '眽', + 'ְ' => '眥', + 'ֱ' => '眻', + 'ֲ' => '眵', + 'ֳ' => '硈', + 'ִ' => '硒', + 'ֵ' => '硉', + 'ֶ' => '硍', + 'ַ' => '硊', + 'ָ' => '硌', + 'ֹ' => '砦', + 'ֺ' => '硅', + 'ֻ' => '硐', + 'ּ' => '祤', + 'ֽ' => '祧', + '־' => '祩', + 'ֿ' => '祪', + '' => '祣', + '' => '祫', + '' => '祡', + '' => '离', + '' => '秺', + '' => '秸', + '' => '秶', + '' => '秷', + '' => '窏', + '' => '窔', + '' => '窐', + '' => '笵', + '' => '筇', + '' => '笴', + '' => '笥', + '' => '笰', + '' => '笢', + '' => '笤', + '' => '笳', + '' => '笘', + '' => '笪', + '' => '笝', + '' => '笱', + '' => '笫', + '' => '笭', + '' => '笯', + '' => '笲', + '' => '笸', + '' => '笚', + '' => '笣', + '' => '粔', + '' => '粘', + '' => '粖', + '' => '粣', + '' => '紵', + '' => '紽', + '' => '紸', + '' => '紶', + '' => '紺', + '' => '絅', + '' => '紬', + '' => '紩', + '' => '絁', + '' => '絇', + '' => '紾', + '' => '紿', + '' => '絊', + '' => '紻', + '' => '紨', + '' => '罣', + '' => '羕', + '' => '羜', + '' => '羝', + '' => '羛', + '' => '翊', + '' => '翋', + '' => '翍', + '' => '翐', + '' => '翑', + '' => '翇', + '' => '翏', + '' => '翉', + '' => '耟', + '@' => '耞', + 'A' => '耛', + 'B' => '聇', + 'C' => '聃', + 'D' => '聈', + 'E' => '脘', + 'F' => '脥', + 'G' => '脙', + 'H' => '脛', + 'I' => '脭', + 'J' => '脟', + 'K' => '脬', + 'L' => '脞', + 'M' => '脡', + 'N' => '脕', + 'O' => '脧', + 'P' => '脝', + 'Q' => '脢', + 'R' => '舑', + 'S' => '舸', + 'T' => '舳', + 'U' => '舺', + 'V' => '舴', + 'W' => '舲', + 'X' => '艴', + 'Y' => '莐', + 'Z' => '莣', + '[' => '莨', + '\\' => '莍', + ']' => '荺', + '^' => '荳', + '_' => '莤', + '`' => '荴', + 'a' => '莏', + 'b' => '莁', + 'c' => '莕', + 'd' => '莙', + 'e' => '荵', + 'f' => '莔', + 'g' => '莩', + 'h' => '荽', + 'i' => '莃', + 'j' => '莌', + 'k' => '莝', + 'l' => '莛', + 'm' => '莪', + 'n' => '莋', + 'o' => '荾', + 'p' => '莥', + 'q' => '莯', + 'r' => '莈', + 's' => '莗', + 't' => '莰', + 'u' => '荿', + 'v' => '莦', + 'w' => '莇', + 'x' => '莮', + 'y' => '荶', + 'z' => '莚', + '{' => '虙', + '|' => '虖', + '}' => '蚿', + '~' => '蚷', + 'ס' => '蛂', + 'ע' => '蛁', + 'ף' => '蛅', + 'פ' => '蚺', + 'ץ' => '蚰', + 'צ' => '蛈', + 'ק' => '蚹', + 'ר' => '蚳', + 'ש' => '蚸', + 'ת' => '蛌', + '׫' => '蚴', + '׬' => '蚻', + '׭' => '蚼', + '׮' => '蛃', + 'ׯ' => '蚽', + 'װ' => '蚾', + 'ױ' => '衒', + 'ײ' => '袉', + '׳' => '袕', + '״' => '袨', + '׵' => '袢', + '׶' => '袪', + '׷' => '袚', + '׸' => '袑', + '׹' => '袡', + '׺' => '袟', + '׻' => '袘', + '׼' => '袧', + '׽' => '袙', + '׾' => '袛', + '׿' => '袗', + '' => '袤', + '' => '袬', + '' => '袌', + '' => '袓', + '' => '袎', + '' => '覂', + '' => '觖', + '' => '觙', + '' => '觕', + '' => '訰', + '' => '訧', + '' => '訬', + '' => '訞', + '' => '谹', + '' => '谻', + '' => '豜', + '' => '豝', + '' => '豽', + '' => '貥', + '' => '赽', + '' => '赻', + '' => '赹', + '' => '趼', + '' => '跂', + '' => '趹', + '' => '趿', + '' => '跁', + '' => '軘', + '' => '軞', + '' => '軝', + '' => '軜', + '' => '軗', + '' => '軠', + '' => '軡', + '' => '逤', + '' => '逋', + '' => '逑', + '' => '逜', + '' => '逌', + '' => '逡', + '' => '郯', + '' => '郪', + '' => '郰', + '' => '郴', + '' => '郲', + '' => '郳', + '' => '郔', + '' => '郫', + '' => '郬', + '' => '郩', + '' => '酖', + '' => '酘', + '' => '酚', + '' => '酓', + '' => '酕', + '' => '釬', + '' => '釴', + '' => '釱', + '' => '釳', + '' => '釸', + '' => '釤', + '' => '釹', + '' => '釪', + '@' => '釫', + 'A' => '釷', + 'B' => '釨', + 'C' => '釮', + 'D' => '镺', + 'E' => '閆', + 'F' => '閈', + 'G' => '陼', + 'H' => '陭', + 'I' => '陫', + 'J' => '陱', + 'K' => '陯', + 'L' => '隿', + 'M' => '靪', + 'N' => '頄', + 'O' => '飥', + 'P' => '馗', + 'Q' => '傛', + 'R' => '傕', + 'S' => '傔', + 'T' => '傞', + 'U' => '傋', + 'V' => '傣', + 'W' => '傃', + 'X' => '傌', + 'Y' => '傎', + 'Z' => '傝', + '[' => '偨', + '\\' => '傜', + ']' => '傒', + '^' => '傂', + '_' => '傇', + '`' => '兟', + 'a' => '凔', + 'b' => '匒', + 'c' => '匑', + 'd' => '厤', + 'e' => '厧', + 'f' => '喑', + 'g' => '喨', + 'h' => '喥', + 'i' => '喭', + 'j' => '啷', + 'k' => '噅', + 'l' => '喢', + 'm' => '喓', + 'n' => '喈', + 'o' => '喏', + 'p' => '喵', + 'q' => '喁', + 'r' => '喣', + 's' => '喒', + 't' => '喤', + 'u' => '啽', + 'v' => '喌', + 'w' => '喦', + 'x' => '啿', + 'y' => '喕', + 'z' => '喡', + '{' => '喎', + '|' => '圌', + '}' => '堩', + '~' => '堷', + 'ء' => '堙', + 'آ' => '堞', + 'أ' => '堧', + 'ؤ' => '堣', + 'إ' => '堨', + 'ئ' => '埵', + 'ا' => '塈', + 'ب' => '堥', + 'ة' => '堜', + 'ت' => '堛', + 'ث' => '堳', + 'ج' => '堿', + 'ح' => '堶', + 'خ' => '堮', + 'د' => '堹', + 'ذ' => '堸', + 'ر' => '堭', + 'ز' => '堬', + 'س' => '堻', + 'ش' => '奡', + 'ص' => '媯', + 'ض' => '媔', + 'ط' => '媟', + 'ظ' => '婺', + 'ع' => '媢', + 'غ' => '媞', + 'ػ' => '婸', + 'ؼ' => '媦', + 'ؽ' => '婼', + 'ؾ' => '媥', + 'ؿ' => '媬', + '' => '媕', + '' => '媮', + '' => '娷', + '' => '媄', + '' => '媊', + '' => '媗', + '' => '媃', + '' => '媋', + '' => '媩', + '' => '婻', + '' => '婽', + '' => '媌', + '' => '媜', + '' => '媏', + '' => '媓', + '' => '媝', + '' => '寪', + '' => '寍', + '' => '寋', + '' => '寔', + '' => '寑', + '' => '寊', + '' => '寎', + '' => '尌', + '' => '尰', + '' => '崷', + '' => '嵃', + '' => '嵫', + '' => '嵁', + '' => '嵋', + '' => '崿', + '' => '崵', + '' => '嵑', + '' => '嵎', + '' => '嵕', + '' => '崳', + '' => '崺', + '' => '嵒', + '' => '崽', + '' => '崱', + '' => '嵙', + '' => '嵂', + '' => '崹', + '' => '嵉', + '' => '崸', + '' => '崼', + '' => '崲', + '' => '崶', + '' => '嵀', + '' => '嵅', + '' => '幄', + '' => '幁', + '' => '彘', + '' => '徦', + '' => '徥', + '' => '徫', + '' => '惉', + '' => '悹', + '' => '惌', + '' => '惢', + '' => '惎', + '' => '惄', + '' => '愔', + '@' => '惲', + 'A' => '愊', + 'B' => '愖', + 'C' => '愅', + 'D' => '惵', + 'E' => '愓', + 'F' => '惸', + 'G' => '惼', + 'H' => '惾', + 'I' => '惁', + 'J' => '愃', + 'K' => '愘', + 'L' => '愝', + 'M' => '愐', + 'N' => '惿', + 'O' => '愄', + 'P' => '愋', + 'Q' => '扊', + 'R' => '掔', + 'S' => '掱', + 'T' => '掰', + 'U' => '揎', + 'V' => '揥', + 'W' => '揨', + 'X' => '揯', + 'Y' => '揃', + 'Z' => '撝', + '[' => '揳', + '\\' => '揊', + ']' => '揠', + '^' => '揶', + '_' => '揕', + '`' => '揲', + 'a' => '揵', + 'b' => '摡', + 'c' => '揟', + 'd' => '掾', + 'e' => '揝', + 'f' => '揜', + 'g' => '揄', + 'h' => '揘', + 'i' => '揓', + 'j' => '揂', + 'k' => '揇', + 'l' => '揌', + 'm' => '揋', + 'n' => '揈', + 'o' => '揰', + 'p' => '揗', + 'q' => '揙', + 'r' => '攲', + 's' => '敧', + 't' => '敪', + 'u' => '敤', + 'v' => '敜', + 'w' => '敨', + 'x' => '敥', + 'y' => '斌', + 'z' => '斝', + '{' => '斞', + '|' => '斮', + '}' => '旐', + '~' => '旒', + '١' => '晼', + '٢' => '晬', + '٣' => '晻', + '٤' => '暀', + '٥' => '晱', + '٦' => '晹', + '٧' => '晪', + '٨' => '晲', + '٩' => '朁', + '٪' => '椌', + '٫' => '棓', + '٬' => '椄', + '٭' => '棜', + 'ٮ' => '椪', + 'ٯ' => '棬', + 'ٰ' => '棪', + 'ٱ' => '棱', + 'ٲ' => '椏', + 'ٳ' => '棖', + 'ٴ' => '棷', + 'ٵ' => '棫', + 'ٶ' => '棤', + 'ٷ' => '棶', + 'ٸ' => '椓', + 'ٹ' => '椐', + 'ٺ' => '棳', + 'ٻ' => '棡', + 'ټ' => '椇', + 'ٽ' => '棌', + 'پ' => '椈', + 'ٿ' => '楰', + '' => '梴', + '' => '椑', + '' => '棯', + '' => '棆', + '' => '椔', + '' => '棸', + '' => '棐', + '' => '棽', + '' => '棼', + '' => '棨', + '' => '椋', + '' => '椊', + '' => '椗', + '' => '棎', + '' => '棈', + '' => '棝', + '' => '棞', + '' => '棦', + '' => '棴', + '' => '棑', + '' => '椆', + '' => '棔', + '' => '棩', + '' => '椕', + '' => '椥', + '' => '棇', + '' => '欹', + '' => '欻', + '' => '欿', + '' => '欼', + '' => '殔', + '' => '殗', + '' => '殙', + '' => '殕', + '' => '殽', + '' => '毰', + '' => '毲', + '' => '毳', + '' => '氰', + '' => '淼', + '' => '湆', + '' => '湇', + '' => '渟', + '' => '湉', + '' => '溈', + '' => '渼', + '' => '渽', + '' => '湅', + '' => '湢', + '' => '渫', + '' => '渿', + '' => '湁', + '' => '湝', + '' => '湳', + '' => '渜', + '' => '渳', + '' => '湋', + '' => '湀', + '' => '湑', + '' => '渻', + '' => '渃', + '' => '渮', + '' => '湞', + '@' => '湨', + 'A' => '湜', + 'B' => '湡', + 'C' => '渱', + 'D' => '渨', + 'E' => '湠', + 'F' => '湱', + 'G' => '湫', + 'H' => '渹', + 'I' => '渢', + 'J' => '渰', + 'K' => '湓', + 'L' => '湥', + 'M' => '渧', + 'N' => '湸', + 'O' => '湤', + 'P' => '湷', + 'Q' => '湕', + 'R' => '湹', + 'S' => '湒', + 'T' => '湦', + 'U' => '渵', + 'V' => '渶', + 'W' => '湚', + 'X' => '焠', + 'Y' => '焞', + 'Z' => '焯', + '[' => '烻', + '\\' => '焮', + ']' => '焱', + '^' => '焣', + '_' => '焥', + '`' => '焢', + 'a' => '焲', + 'b' => '焟', + 'c' => '焨', + 'd' => '焺', + 'e' => '焛', + 'f' => '牋', + 'g' => '牚', + 'h' => '犈', + 'i' => '犉', + 'j' => '犆', + 'k' => '犅', + 'l' => '犋', + 'm' => '猒', + 'n' => '猋', + 'o' => '猰', + 'p' => '猢', + 'q' => '猱', + 'r' => '猳', + 's' => '猧', + 't' => '猲', + 'u' => '猭', + 'v' => '猦', + 'w' => '猣', + 'x' => '猵', + 'y' => '猌', + 'z' => '琮', + '{' => '琬', + '|' => '琰', + '}' => '琫', + '~' => '琖', + 'ڡ' => '琚', + 'ڢ' => '琡', + 'ڣ' => '琭', + 'ڤ' => '琱', + 'ڥ' => '琤', + 'ڦ' => '琣', + 'ڧ' => '琝', + 'ڨ' => '琩', + 'ک' => '琠', + 'ڪ' => '琲', + 'ګ' => '瓻', + 'ڬ' => '甯', + 'ڭ' => '畯', + 'ڮ' => '畬', + 'گ' => '痧', + 'ڰ' => '痚', + 'ڱ' => '痡', + 'ڲ' => '痦', + 'ڳ' => '痝', + 'ڴ' => '痟', + 'ڵ' => '痤', + 'ڶ' => '痗', + 'ڷ' => '皕', + 'ڸ' => '皒', + 'ڹ' => '盚', + 'ں' => '睆', + 'ڻ' => '睇', + 'ڼ' => '睄', + 'ڽ' => '睍', + 'ھ' => '睅', + 'ڿ' => '睊', + '' => '睎', + '' => '睋', + '' => '睌', + '' => '矞', + '' => '矬', + '' => '硠', + '' => '硤', + '' => '硥', + '' => '硜', + '' => '硭', + '' => '硱', + '' => '硪', + '' => '确', + '' => '硰', + '' => '硩', + '' => '硨', + '' => '硞', + '' => '硢', + '' => '祴', + '' => '祳', + '' => '祲', + '' => '祰', + '' => '稂', + '' => '稊', + '' => '稃', + '' => '稌', + '' => '稄', + '' => '窙', + '' => '竦', + '' => '竤', + '' => '筊', + '' => '笻', + '' => '筄', + '' => '筈', + '' => '筌', + '' => '筎', + '' => '筀', + '' => '筘', + '' => '筅', + '' => '粢', + '' => '粞', + '' => '粨', + '' => '粡', + '' => '絘', + '' => '絯', + '' => '絣', + '' => '絓', + '' => '絖', + '' => '絧', + '' => '絪', + '' => '絏', + '' => '絭', + '' => '絜', + '' => '絫', + '' => '絒', + '' => '絔', + '' => '絩', + '' => '絑', + '' => '絟', + '' => '絎', + '' => '缾', + '' => '缿', + '' => '罥', + '@' => '罦', + 'A' => '羢', + 'B' => '羠', + 'C' => '羡', + 'D' => '翗', + 'E' => '聑', + 'F' => '聏', + 'G' => '聐', + 'H' => '胾', + 'I' => '胔', + 'J' => '腃', + 'K' => '腊', + 'L' => '腒', + 'M' => '腏', + 'N' => '腇', + 'O' => '脽', + 'P' => '腍', + 'Q' => '脺', + 'R' => '臦', + 'S' => '臮', + 'T' => '臷', + 'U' => '臸', + 'V' => '臹', + 'W' => '舄', + 'X' => '舼', + 'Y' => '舽', + 'Z' => '舿', + '[' => '艵', + '\\' => '茻', + ']' => '菏', + '^' => '菹', + '_' => '萣', + '`' => '菀', + 'a' => '菨', + 'b' => '萒', + 'c' => '菧', + 'd' => '菤', + 'e' => '菼', + 'f' => '菶', + 'g' => '萐', + 'h' => '菆', + 'i' => '菈', + 'j' => '菫', + 'k' => '菣', + 'l' => '莿', + 'm' => '萁', + 'n' => '菝', + 'o' => '菥', + 'p' => '菘', + 'q' => '菿', + 'r' => '菡', + 's' => '菋', + 't' => '菎', + 'u' => '菖', + 'v' => '菵', + 'w' => '菉', + 'x' => '萉', + 'y' => '萏', + 'z' => '菞', + '{' => '萑', + '|' => '萆', + '}' => '菂', + '~' => '菳', + 'ۡ' => '菕', + 'ۢ' => '菺', + 'ۣ' => '菇', + 'ۤ' => '菑', + 'ۥ' => '菪', + 'ۦ' => '萓', + 'ۧ' => '菃', + 'ۨ' => '菬', + '۩' => '菮', + '۪' => '菄', + '۫' => '菻', + '۬' => '菗', + 'ۭ' => '菢', + 'ۮ' => '萛', + 'ۯ' => '菛', + '۰' => '菾', + '۱' => '蛘', + '۲' => '蛢', + '۳' => '蛦', + '۴' => '蛓', + '۵' => '蛣', + '۶' => '蛚', + '۷' => '蛪', + '۸' => '蛝', + '۹' => '蛫', + 'ۺ' => '蛜', + 'ۻ' => '蛬', + 'ۼ' => '蛩', + '۽' => '蛗', + '۾' => '蛨', + 'ۿ' => '蛑', + '' => '衈', + '' => '衖', + '' => '衕', + '' => '袺', + '' => '裗', + '' => '袹', + '' => '袸', + '' => '裀', + '' => '袾', + '' => '袶', + '' => '袼', + '' => '袷', + '' => '袽', + '' => '袲', + '' => '褁', + '' => '裉', + '' => '覕', + '' => '覘', + '' => '覗', + '' => '觝', + '' => '觚', + '' => '觛', + '' => '詎', + '' => '詍', + '' => '訹', + '' => '詙', + '' => '詀', + '' => '詗', + '' => '詘', + '' => '詄', + '' => '詅', + '' => '詒', + '' => '詈', + '' => '詑', + '' => '詊', + '' => '詌', + '' => '詏', + '' => '豟', + '' => '貁', + '' => '貀', + '' => '貺', + '' => '貾', + '' => '貰', + '' => '貹', + '' => '貵', + '' => '趄', + '' => '趀', + '' => '趉', + '' => '跘', + '' => '跓', + '' => '跍', + '' => '跇', + '' => '跖', + '' => '跜', + '' => '跏', + '' => '跕', + '' => '跙', + '' => '跈', + '' => '跗', + '' => '跅', + '' => '軯', + '' => '軷', + '' => '軺', + '@' => '軹', + 'A' => '軦', + 'B' => '軮', + 'C' => '軥', + 'D' => '軵', + 'E' => '軧', + 'F' => '軨', + 'G' => '軶', + 'H' => '軫', + 'I' => '軱', + 'J' => '軬', + 'K' => '軴', + 'L' => '軩', + 'M' => '逭', + 'N' => '逴', + 'O' => '逯', + 'P' => '鄆', + 'Q' => '鄬', + 'R' => '鄄', + 'S' => '郿', + 'T' => '郼', + 'U' => '鄈', + 'V' => '郹', + 'W' => '郻', + 'X' => '鄁', + 'Y' => '鄀', + 'Z' => '鄇', + '[' => '鄅', + '\\' => '鄃', + ']' => '酡', + '^' => '酤', + '_' => '酟', + '`' => '酢', + 'a' => '酠', + 'b' => '鈁', + 'c' => '鈊', + 'd' => '鈥', + 'e' => '鈃', + 'f' => '鈚', + 'g' => '鈦', + 'h' => '鈏', + 'i' => '鈌', + 'j' => '鈀', + 'k' => '鈒', + 'l' => '釿', + 'm' => '釽', + 'n' => '鈆', + 'o' => '鈄', + 'p' => '鈧', + 'q' => '鈂', + 'r' => '鈜', + 's' => '鈤', + 't' => '鈙', + 'u' => '鈗', + 'v' => '鈅', + 'w' => '鈖', + 'x' => '镻', + 'y' => '閍', + 'z' => '閌', + '{' => '閐', + '|' => '隇', + '}' => '陾', + '~' => '隈', + 'ܡ' => '隉', + 'ܢ' => '隃', + 'ܣ' => '隀', + 'ܤ' => '雂', + 'ܥ' => '雈', + 'ܦ' => '雃', + 'ܧ' => '雱', + 'ܨ' => '雰', + 'ܩ' => '靬', + 'ܪ' => '靰', + 'ܫ' => '靮', + 'ܬ' => '頇', + 'ܭ' => '颩', + 'ܮ' => '飫', + 'ܯ' => '鳦', + 'ܰ' => '黹', + 'ܱ' => '亃', + 'ܲ' => '亄', + 'ܳ' => '亶', + 'ܴ' => '傽', + 'ܵ' => '傿', + 'ܶ' => '僆', + 'ܷ' => '傮', + 'ܸ' => '僄', + 'ܹ' => '僊', + 'ܺ' => '傴', + 'ܻ' => '僈', + 'ܼ' => '僂', + 'ܽ' => '傰', + 'ܾ' => '僁', + 'ܿ' => '傺', + '' => '傱', + '' => '僋', + '' => '僉', + '' => '傶', + '' => '傸', + '' => '凗', + '' => '剺', + '' => '剸', + '' => '剻', + '' => '剼', + '' => '嗃', + '' => '嗛', + '' => '嗌', + '' => '嗐', + '' => '嗋', + '' => '嗊', + '' => '嗝', + '' => '嗀', + '' => '嗔', + '' => '嗄', + '' => '嗩', + '' => '喿', + '' => '嗒', + '' => '喍', + '' => '嗏', + '' => '嗕', + '' => '嗢', + '' => '嗖', + '' => '嗈', + '' => '嗲', + '' => '嗍', + '' => '嗙', + '' => '嗂', + '' => '圔', + '' => '塓', + '' => '塨', + '' => '塤', + '' => '塏', + '' => '塍', + '' => '塉', + '' => '塯', + '' => '塕', + '' => '塎', + '' => '塝', + '' => '塙', + '' => '塥', + '' => '塛', + '' => '堽', + '' => '塣', + '' => '塱', + '' => '壼', + '' => '嫇', + '' => '嫄', + '' => '嫋', + '' => '媺', + '' => '媸', + '' => '媱', + '' => '媵', + '' => '媰', + '' => '媿', + '' => '嫈', + '' => '媻', + '' => '嫆', + '@' => '媷', + 'A' => '嫀', + 'B' => '嫊', + 'C' => '媴', + 'D' => '媶', + 'E' => '嫍', + 'F' => '媹', + 'G' => '媐', + 'H' => '寖', + 'I' => '寘', + 'J' => '寙', + 'K' => '尟', + 'L' => '尳', + 'M' => '嵱', + 'N' => '嵣', + 'O' => '嵊', + 'P' => '嵥', + 'Q' => '嵲', + 'R' => '嵬', + 'S' => '嵞', + 'T' => '嵨', + 'U' => '嵧', + 'V' => '嵢', + 'W' => '巰', + 'X' => '幏', + 'Y' => '幎', + 'Z' => '幊', + '[' => '幍', + '\\' => '幋', + ']' => '廅', + '^' => '廌', + '_' => '廆', + '`' => '廋', + 'a' => '廇', + 'b' => '彀', + 'c' => '徯', + 'd' => '徭', + 'e' => '惷', + 'f' => '慉', + 'g' => '慊', + 'h' => '愫', + 'i' => '慅', + 'j' => '愶', + 'k' => '愲', + 'l' => '愮', + 'm' => '慆', + 'n' => '愯', + 'o' => '慏', + 'p' => '愩', + 'q' => '慀', + 'r' => '戠', + 's' => '酨', + 't' => '戣', + 'u' => '戥', + 'v' => '戤', + 'w' => '揅', + 'x' => '揱', + 'y' => '揫', + 'z' => '搐', + '{' => '搒', + '|' => '搉', + '}' => '搠', + '~' => '搤', + 'ݡ' => '搳', + 'ݢ' => '摃', + 'ݣ' => '搟', + 'ݤ' => '搕', + 'ݥ' => '搘', + 'ݦ' => '搹', + 'ݧ' => '搷', + 'ݨ' => '搢', + 'ݩ' => '搣', + 'ݪ' => '搌', + 'ݫ' => '搦', + 'ݬ' => '搰', + 'ݭ' => '搨', + 'ݮ' => '摁', + 'ݯ' => '搵', + 'ݰ' => '搯', + 'ݱ' => '搊', + 'ݲ' => '搚', + 'ݳ' => '摀', + 'ݴ' => '搥', + 'ݵ' => '搧', + 'ݶ' => '搋', + 'ݷ' => '揧', + 'ݸ' => '搛', + 'ݹ' => '搮', + 'ݺ' => '搡', + 'ݻ' => '搎', + 'ݼ' => '敯', + 'ݽ' => '斒', + 'ݾ' => '旓', + 'ݿ' => '暆', + '' => '暌', + '' => '暕', + '' => '暐', + '' => '暋', + '' => '暊', + '' => '暙', + '' => '暔', + '' => '晸', + '' => '朠', + '' => '楦', + '' => '楟', + '' => '椸', + '' => '楎', + '' => '楢', + '' => '楱', + '' => '椿', + '' => '楅', + '' => '楪', + '' => '椹', + '' => '楂', + '' => '楗', + '' => '楙', + '' => '楺', + '' => '楈', + '' => '楉', + '' => '椵', + '' => '楬', + '' => '椳', + '' => '椽', + '' => '楥', + '' => '棰', + '' => '楸', + '' => '椴', + '' => '楩', + '' => '楀', + '' => '楯', + '' => '楄', + '' => '楶', + '' => '楘', + '' => '楁', + '' => '楴', + '' => '楌', + '' => '椻', + '' => '楋', + '' => '椷', + '' => '楜', + '' => '楏', + '' => '楑', + '' => '椲', + '' => '楒', + '' => '椯', + '' => '楻', + '' => '椼', + '' => '歆', + '' => '歅', + '' => '歃', + '' => '歂', + '' => '歈', + '' => '歁', + '' => '殛', + '' => '嗀', + '' => '毻', + '' => '毼', + '@' => '毹', + 'A' => '毷', + 'B' => '毸', + 'C' => '溛', + 'D' => '滖', + 'E' => '滈', + 'F' => '溏', + 'G' => '滀', + 'H' => '溟', + 'I' => '溓', + 'J' => '溔', + 'K' => '溠', + 'L' => '溱', + 'M' => '溹', + 'N' => '滆', + 'O' => '滒', + 'P' => '溽', + 'Q' => '滁', + 'R' => '溞', + 'S' => '滉', + 'T' => '溷', + 'U' => '溰', + 'V' => '滍', + 'W' => '溦', + 'X' => '滏', + 'Y' => '溲', + 'Z' => '溾', + '[' => '滃', + '\\' => '滜', + ']' => '滘', + '^' => '溙', + '_' => '溒', + '`' => '溎', + 'a' => '溍', + 'b' => '溤', + 'c' => '溡', + 'd' => '溿', + 'e' => '溳', + 'f' => '滐', + 'g' => '滊', + 'h' => '溗', + 'i' => '溮', + 'j' => '溣', + 'k' => '煇', + 'l' => '煔', + 'm' => '煒', + 'n' => '煣', + 'o' => '煠', + 'p' => '煁', + 'q' => '煝', + 'r' => '煢', + 's' => '煲', + 't' => '煸', + 'u' => '煪', + 'v' => '煡', + 'w' => '煂', + 'x' => '煘', + 'y' => '煃', + 'z' => '煋', + '{' => '煰', + '|' => '煟', + '}' => '煐', + '~' => '煓', + 'ޡ' => '煄', + 'ޢ' => '煍', + 'ޣ' => '煚', + 'ޤ' => '牏', + 'ޥ' => '犍', + 'ަ' => '犌', + 'ާ' => '犑', + 'ި' => '犐', + 'ީ' => '犎', + 'ު' => '猼', + 'ޫ' => '獂', + 'ެ' => '猻', + 'ޭ' => '猺', + 'ޮ' => '獀', + 'ޯ' => '獊', + 'ް' => '獉', + 'ޱ' => '瑄', + '޲' => '瑊', + '޳' => '瑋', + '޴' => '瑒', + '޵' => '瑑', + '޶' => '瑗', + '޷' => '瑀', + '޸' => '瑏', + '޹' => '瑐', + '޺' => '瑎', + '޻' => '瑂', + '޼' => '瑆', + '޽' => '瑍', + '޾' => '瑔', + '޿' => '瓡', + '' => '瓿', + '' => '瓾', + '' => '瓽', + '' => '甝', + '' => '畹', + '' => '畷', + '' => '榃', + '' => '痯', + '' => '瘏', + '' => '瘃', + '' => '痷', + '' => '痾', + '' => '痼', + '' => '痹', + '' => '痸', + '' => '瘐', + '' => '痻', + '' => '痶', + '' => '痭', + '' => '痵', + '' => '痽', + '' => '皙', + '' => '皵', + '' => '盝', + '' => '睕', + '' => '睟', + '' => '睠', + '' => '睒', + '' => '睖', + '' => '睚', + '' => '睩', + '' => '睧', + '' => '睔', + '' => '睙', + '' => '睭', + '' => '矠', + '' => '碇', + '' => '碚', + '' => '碔', + '' => '碏', + '' => '碄', + '' => '碕', + '' => '碅', + '' => '碆', + '' => '碡', + '' => '碃', + '' => '硹', + '' => '碙', + '' => '碀', + '' => '碖', + '' => '硻', + '' => '祼', + '' => '禂', + '' => '祽', + '' => '祹', + '' => '稑', + '' => '稘', + '' => '稙', + '' => '稒', + '' => '稗', + '' => '稕', + '' => '稢', + '' => '稓', + '@' => '稛', + 'A' => '稐', + 'B' => '窣', + 'C' => '窢', + 'D' => '窞', + 'E' => '竫', + 'F' => '筦', + 'G' => '筤', + 'H' => '筭', + 'I' => '筴', + 'J' => '筩', + 'K' => '筲', + 'L' => '筥', + 'M' => '筳', + 'N' => '筱', + 'O' => '筰', + 'P' => '筡', + 'Q' => '筸', + 'R' => '筶', + 'S' => '筣', + 'T' => '粲', + 'U' => '粴', + 'V' => '粯', + 'W' => '綈', + 'X' => '綆', + 'Y' => '綀', + 'Z' => '綍', + '[' => '絿', + '\\' => '綅', + ']' => '絺', + '^' => '綎', + '_' => '絻', + '`' => '綃', + 'a' => '絼', + 'b' => '綌', + 'c' => '綔', + 'd' => '綄', + 'e' => '絽', + 'f' => '綒', + 'g' => '罭', + 'h' => '罫', + 'i' => '罧', + 'j' => '罨', + 'k' => '罬', + 'l' => '羦', + 'm' => '羥', + 'n' => '羧', + 'o' => '翛', + 'p' => '翜', + 'q' => '耡', + 'r' => '腤', + 's' => '腠', + 't' => '腷', + 'u' => '腜', + 'v' => '腩', + 'w' => '腛', + 'x' => '腢', + 'y' => '腲', + 'z' => '朡', + '{' => '腞', + '|' => '腶', + '}' => '腧', + '~' => '腯', + 'ߡ' => '腄', + 'ߢ' => '腡', + 'ߣ' => '舝', + 'ߤ' => '艉', + 'ߥ' => '艄', + 'ߦ' => '艀', + 'ߧ' => '艂', + 'ߨ' => '艅', + 'ߩ' => '蓱', + 'ߪ' => '萿', + '߫' => '葖', + '߬' => '葶', + '߭' => '葹', + '߮' => '蒏', + '߯' => '蒍', + '߰' => '葥', + '߱' => '葑', + '߲' => '葀', + '߳' => '蒆', + 'ߴ' => '葧', + 'ߵ' => '萰', + '߶' => '葍', + '߷' => '葽', + '߸' => '葚', + '߹' => '葙', + 'ߺ' => '葴', + '߻' => '葳', + '߼' => '葝', + '߽' => '蔇', + '߾' => '葞', + '߿' => '萷', + '' => '萺', + '' => '萴', + '' => '葺', + '' => '葃', + '' => '葸', + '' => '萲', + '' => '葅', + '' => '萩', + '' => '菙', + '' => '葋', + '' => '萯', + '' => '葂', + '' => '萭', + '' => '葟', + '' => '葰', + '' => '萹', + '' => '葎', + '' => '葌', + '' => '葒', + '' => '葯', + '' => '蓅', + '' => '蒎', + '' => '萻', + '' => '葇', + '' => '萶', + '' => '萳', + '' => '葨', + '' => '葾', + '' => '葄', + '' => '萫', + '' => '葠', + '' => '葔', + '' => '葮', + '' => '葐', + '' => '蜋', + '' => '蜄', + '' => '蛷', + '' => '蜌', + '' => '蛺', + '' => '蛖', + '' => '蛵', + '' => '蝍', + '' => '蛸', + '' => '蜎', + '' => '蜉', + '' => '蜁', + '' => '蛶', + '' => '蜍', + '' => '蜅', + '' => '裖', + '' => '裋', + '' => '裍', + '' => '裎', + '' => '裞', + '' => '裛', + '' => '裚', + '' => '裌', + '' => '裐', + '' => '覅', + '' => '覛', + '' => '觟', + '' => '觥', + '' => '觤', + '@' => '觡', + 'A' => '觠', + 'B' => '觢', + 'C' => '觜', + 'D' => '触', + 'E' => '詶', + 'F' => '誆', + 'G' => '詿', + 'H' => '詡', + 'I' => '訿', + 'J' => '詷', + 'K' => '誂', + 'L' => '誄', + 'M' => '詵', + 'N' => '誃', + 'O' => '誁', + 'P' => '詴', + 'Q' => '詺', + 'R' => '谼', + 'S' => '豋', + 'T' => '豊', + 'U' => '豥', + 'V' => '豤', + 'W' => '豦', + 'X' => '貆', + 'Y' => '貄', + 'Z' => '貅', + '[' => '賌', + '\\' => '赨', + ']' => '赩', + '^' => '趑', + '_' => '趌', + '`' => '趎', + 'a' => '趏', + 'b' => '趍', + 'c' => '趓', + 'd' => '趔', + 'e' => '趐', + 'f' => '趒', + 'g' => '跰', + 'h' => '跠', + 'i' => '跬', + 'j' => '跱', + 'k' => '跮', + 'l' => '跐', + 'm' => '跩', + 'n' => '跣', + 'o' => '跢', + 'p' => '跧', + 'q' => '跲', + 'r' => '跫', + 's' => '跴', + 't' => '輆', + 'u' => '軿', + 'v' => '輁', + 'w' => '輀', + 'x' => '輅', + 'y' => '輇', + 'z' => '輈', + '{' => '輂', + '|' => '輋', + '}' => '遒', + '~' => '逿', + '' => '遄', + '' => '遉', + '' => '逽', + '' => '鄐', + '' => '鄍', + '' => '鄏', + '' => '鄑', + '' => '鄖', + '' => '鄔', + '' => '鄋', + '' => '鄎', + '' => '酮', + '' => '酯', + '' => '鉈', + '' => '鉒', + '' => '鈰', + '' => '鈺', + '' => '鉦', + '' => '鈳', + '' => '鉥', + '' => '鉞', + '' => '銃', + '' => '鈮', + '' => '鉊', + '' => '鉆', + '' => '鉭', + '' => '鉬', + '' => '鉏', + '' => '鉠', + '' => '鉧', + '' => '鉯', + '' => '鈶', + '' => '鉡', + '' => '鉰', + '' => '鈱', + '' => '鉔', + '' => '鉣', + '' => '鉐', + '' => '鉲', + '' => '鉎', + '' => '鉓', + '' => '鉌', + '' => '鉖', + '' => '鈲', + '' => '閟', + '' => '閜', + '' => '閞', + '' => '閛', + '' => '隒', + '' => '隓', + '' => '隑', + '' => '隗', + '' => '雎', + '' => '雺', + '' => '雽', + '' => '雸', + '' => '雵', + '' => '靳', + '' => '靷', + '' => '靸', + '' => '靲', + '' => '頏', + '' => '頍', + '' => '頎', + '' => '颬', + '' => '飶', + '' => '飹', + '' => '馯', + '' => '馲', + '' => '馰', + '' => '馵', + '' => '骭', + '' => '骫', + '' => '魛', + '' => '鳪', + '' => '鳭', + '' => '鳧', + '' => '麀', + '' => '黽', + '' => '僦', + '' => '僔', + '' => '僗', + '' => '僨', + '' => '僳', + '' => '僛', + '' => '僪', + '' => '僝', + '' => '僤', + '' => '僓', + '' => '僬', + '' => '僰', + '' => '僯', + '' => '僣', + '' => '僠', + '@' => '凘', + 'A' => '劀', + 'B' => '劁', + 'C' => '勩', + 'D' => '勫', + 'E' => '匰', + 'F' => '厬', + 'G' => '嘧', + 'H' => '嘕', + 'I' => '嘌', + 'J' => '嘒', + 'K' => '嗼', + 'L' => '嘏', + 'M' => '嘜', + 'N' => '嘁', + 'O' => '嘓', + 'P' => '嘂', + 'Q' => '嗺', + 'R' => '嘝', + 'S' => '嘄', + 'T' => '嗿', + 'U' => '嗹', + 'V' => '墉', + 'W' => '塼', + 'X' => '墐', + 'Y' => '墘', + 'Z' => '墆', + '[' => '墁', + '\\' => '塿', + ']' => '塴', + '^' => '墋', + '_' => '塺', + '`' => '墇', + 'a' => '墑', + 'b' => '墎', + 'c' => '塶', + 'd' => '墂', + 'e' => '墈', + 'f' => '塻', + 'g' => '墔', + 'h' => '墏', + 'i' => '壾', + 'j' => '奫', + 'k' => '嫜', + 'l' => '嫮', + 'm' => '嫥', + 'n' => '嫕', + 'o' => '嫪', + 'p' => '嫚', + 'q' => '嫭', + 'r' => '嫫', + 's' => '嫳', + 't' => '嫢', + 'u' => '嫠', + 'v' => '嫛', + 'w' => '嫬', + 'x' => '嫞', + 'y' => '嫝', + 'z' => '嫙', + '{' => '嫨', + '|' => '嫟', + '}' => '孷', + '~' => '寠', + '' => '寣', + '' => '屣', + '' => '嶂', + '' => '嶀', + '' => '嵽', + '' => '嶆', + '' => '嵺', + '' => '嶁', + '' => '嵷', + '' => '嶊', + '' => '嶉', + '' => '嶈', + '' => '嵾', + '' => '嵼', + '' => '嶍', + '' => '嵹', + '' => '嵿', + '' => '幘', + '' => '幙', + '' => '幓', + '' => '廘', + '' => '廑', + '' => '廗', + '' => '廎', + '' => '廜', + '' => '廕', + '' => '廙', + '' => '廒', + '' => '廔', + '' => '彄', + '' => '彃', + '' => '彯', + '' => '徶', + '' => '愬', + '' => '愨', + '' => '慁', + '' => '慞', + '' => '慱', + '' => '慳', + '' => '慒', + '' => '慓', + '' => '慲', + '' => '慬', + '' => '憀', + '' => '慴', + '' => '慔', + '' => '慺', + '' => '慛', + '' => '慥', + '' => '愻', + '' => '慪', + '' => '慡', + '' => '慖', + '' => '戩', + '' => '戧', + '' => '戫', + '' => '搫', + '' => '摍', + '' => '摛', + '' => '摝', + '' => '摴', + '' => '摶', + '' => '摲', + '' => '摳', + '' => '摽', + '' => '摵', + '' => '摦', + '' => '撦', + '' => '摎', + '' => '撂', + '' => '摞', + '' => '摜', + '' => '摋', + '' => '摓', + '' => '摠', + '' => '摐', + '' => '摿', + '' => '搿', + '' => '摬', + '' => '摫', + '' => '摙', + '' => '摥', + '' => '摷', + '' => '敳', + '' => '斠', + '' => '暡', + '' => '暠', + '' => '暟', + '' => '朅', + '' => '朄', + '' => '朢', + '' => '榱', + '' => '榶', + '' => '槉', + '@' => '榠', + 'A' => '槎', + 'B' => '榖', + 'C' => '榰', + 'D' => '榬', + 'E' => '榼', + 'F' => '榑', + 'G' => '榙', + 'H' => '榎', + 'I' => '榧', + 'J' => '榍', + 'K' => '榩', + 'L' => '榾', + 'M' => '榯', + 'N' => '榿', + 'O' => '槄', + 'P' => '榽', + 'Q' => '榤', + 'R' => '槔', + 'S' => '榹', + 'T' => '槊', + 'U' => '榚', + 'V' => '槏', + 'W' => '榳', + 'X' => '榓', + 'Y' => '榪', + 'Z' => '榡', + '[' => '榞', + '\\' => '槙', + ']' => '榗', + '^' => '榐', + '_' => '槂', + '`' => '榵', + 'a' => '榥', + 'b' => '槆', + 'c' => '歊', + 'd' => '歍', + 'e' => '歋', + 'f' => '殞', + 'g' => '殟', + 'h' => '殠', + 'i' => '毃', + 'j' => '毄', + 'k' => '毾', + 'l' => '滎', + 'm' => '滵', + 'n' => '滱', + 'o' => '漃', + 'p' => '漥', + 'q' => '滸', + 'r' => '漷', + 's' => '滻', + 't' => '漮', + 'u' => '漉', + 'v' => '潎', + 'w' => '漙', + 'x' => '漚', + 'y' => '漧', + 'z' => '漘', + '{' => '漻', + '|' => '漒', + '}' => '滭', + '~' => '漊', + '' => '漶', + '' => '潳', + '' => '滹', + '' => '滮', + '' => '漭', + '' => '潀', + '' => '漰', + '' => '漼', + '' => '漵', + '' => '滫', + '' => '漇', + '' => '漎', + '' => '潃', + '' => '漅', + '' => '滽', + '' => '滶', + '' => '漹', + '' => '漜', + '' => '滼', + '' => '漺', + '' => '漟', + '' => '漍', + '' => '漞', + '' => '漈', + '' => '漡', + '' => '熇', + '' => '熐', + '' => '熉', + '' => '熀', + '' => '熅', + '' => '熂', + '' => '熏', + '' => '煻', + '' => '熆', + '' => '熁', + '' => '熗', + '' => '牄', + '' => '牓', + '' => '犗', + '' => '犕', + '' => '犓', + '' => '獃', + '' => '獍', + '' => '獑', + '' => '獌', + '' => '瑢', + '' => '瑳', + '' => '瑱', + '' => '瑵', + '' => '瑲', + '' => '瑧', + '' => '瑮', + '' => '甀', + '' => '甂', + '' => '甃', + '' => '畽', + '' => '疐', + '' => '瘖', + '' => '瘈', + '' => '瘌', + '' => '瘕', + '' => '瘑', + '' => '瘊', + '' => '瘔', + '' => '皸', + '' => '瞁', + '' => '睼', + '' => '瞅', + '' => '瞂', + '' => '睮', + '' => '瞀', + '' => '睯', + '' => '睾', + '' => '瞃', + '' => '碲', + '' => '碪', + '' => '碴', + '' => '碭', + '' => '碨', + '' => '硾', + '' => '碫', + '' => '碞', + '' => '碥', + '' => '碠', + '' => '碬', + '' => '碢', + '' => '碤', + '' => '禘', + '' => '禊', + '' => '禋', + '' => '禖', + '' => '禕', + '' => '禔', + '' => '禓', + '@' => '禗', + 'A' => '禈', + 'B' => '禒', + 'C' => '禐', + 'D' => '稫', + 'E' => '穊', + 'F' => '稰', + 'G' => '稯', + 'H' => '稨', + 'I' => '稦', + 'J' => '窨', + 'K' => '窫', + 'L' => '窬', + 'M' => '竮', + 'N' => '箈', + 'O' => '箜', + 'P' => '箊', + 'Q' => '箑', + 'R' => '箐', + 'S' => '箖', + 'T' => '箍', + 'U' => '箌', + 'V' => '箛', + 'W' => '箎', + 'X' => '箅', + 'Y' => '箘', + 'Z' => '劄', + '[' => '箙', + '\\' => '箤', + ']' => '箂', + '^' => '粻', + '_' => '粿', + '`' => '粼', + 'a' => '粺', + 'b' => '綧', + 'c' => '綷', + 'd' => '緂', + 'e' => '綣', + 'f' => '綪', + 'g' => '緁', + 'h' => '緀', + 'i' => '緅', + 'j' => '綝', + 'k' => '緎', + 'l' => '緄', + 'm' => '緆', + 'n' => '緋', + 'o' => '緌', + 'p' => '綯', + 'q' => '綹', + 'r' => '綖', + 's' => '綼', + 't' => '綟', + 'u' => '綦', + 'v' => '綮', + 'w' => '綩', + 'x' => '綡', + 'y' => '緉', + 'z' => '罳', + '{' => '翢', + '|' => '翣', + '}' => '翥', + '~' => '翞', + '' => '耤', + '' => '聝', + '' => '聜', + '' => '膉', + '' => '膆', + '' => '膃', + '' => '膇', + '' => '膍', + '' => '膌', + '' => '膋', + '' => '舕', + '' => '蒗', + '' => '蒤', + '' => '蒡', + '' => '蒟', + '' => '蒺', + '' => '蓎', + '' => '蓂', + '' => '蒬', + '' => '蒮', + '' => '蒫', + '' => '蒹', + '' => '蒴', + '' => '蓁', + '' => '蓍', + '' => '蒪', + '' => '蒚', + '' => '蒱', + '' => '蓐', + '' => '蒝', + '' => '蒧', + '' => '蒻', + '' => '蒢', + '' => '蒔', + '' => '蓇', + '' => '蓌', + '' => '蒛', + '' => '蒩', + '' => '蒯', + '' => '蒨', + '' => '蓖', + '' => '蒘', + '' => '蒶', + '' => '蓏', + '' => '蒠', + '' => '蓗', + '' => '蓔', + '' => '蓒', + '' => '蓛', + '' => '蒰', + '' => '蒑', + '' => '虡', + '' => '蜳', + '' => '蜣', + '' => '蜨', + '' => '蝫', + '' => '蝀', + '' => '蜮', + '' => '蜞', + '' => '蜡', + '' => '蜙', + '' => '蜛', + '' => '蝃', + '' => '蜬', + '' => '蝁', + '' => '蜾', + '' => '蝆', + '' => '蜠', + '' => '蜲', + '' => '蜪', + '' => '蜭', + '' => '蜼', + '' => '蜒', + '' => '蜺', + '' => '蜱', + '' => '蜵', + '' => '蝂', + '' => '蜦', + '' => '蜧', + '' => '蜸', + '' => '蜤', + '' => '蜚', + '' => '蜰', + '' => '蜑', + '' => '裷', + '' => '裧', + '' => '裱', + '' => '裲', + '' => '裺', + '' => '裾', + '' => '裮', + '' => '裼', + '' => '裶', + '' => '裻', + '@' => '裰', + 'A' => '裬', + 'B' => '裫', + 'C' => '覝', + 'D' => '覡', + 'E' => '覟', + 'F' => '覞', + 'G' => '觩', + 'H' => '觫', + 'I' => '觨', + 'J' => '誫', + 'K' => '誙', + 'L' => '誋', + 'M' => '誒', + 'N' => '誏', + 'O' => '誖', + 'P' => '谽', + 'Q' => '豨', + 'R' => '豩', + 'S' => '賕', + 'T' => '賏', + 'U' => '賗', + 'V' => '趖', + 'W' => '踉', + 'X' => '踂', + 'Y' => '跿', + 'Z' => '踍', + '[' => '跽', + '\\' => '踊', + ']' => '踃', + '^' => '踇', + '_' => '踆', + '`' => '踅', + 'a' => '跾', + 'b' => '踀', + 'c' => '踄', + 'd' => '輐', + 'e' => '輑', + 'f' => '輎', + 'g' => '輍', + 'h' => '鄣', + 'i' => '鄜', + 'j' => '鄠', + 'k' => '鄢', + 'l' => '鄟', + 'm' => '鄝', + 'n' => '鄚', + 'o' => '鄤', + 'p' => '鄡', + 'q' => '鄛', + 'r' => '酺', + 's' => '酲', + 't' => '酹', + 'u' => '酳', + 'v' => '銥', + 'w' => '銤', + 'x' => '鉶', + 'y' => '銛', + 'z' => '鉺', + '{' => '銠', + '|' => '銔', + '}' => '銪', + '~' => '銍', + '' => '銦', + '' => '銚', + '' => '銫', + '' => '鉹', + '' => '銗', + '' => '鉿', + '' => '銣', + '' => '鋮', + '' => '銎', + '' => '銂', + '' => '銕', + '' => '銢', + '' => '鉽', + '' => '銈', + '' => '銡', + '' => '銊', + '' => '銆', + '' => '銌', + '' => '銙', + '' => '銧', + '' => '鉾', + '' => '銇', + '' => '銩', + '' => '銝', + '' => '銋', + '' => '鈭', + '' => '隞', + '' => '隡', + '' => '雿', + '' => '靘', + '' => '靽', + '' => '靺', + '' => '靾', + '' => '鞃', + '' => '鞀', + '' => '鞂', + '' => '靻', + '' => '鞄', + '' => '鞁', + '' => '靿', + '' => '韎', + '' => '韍', + '' => '頖', + '' => '颭', + '' => '颮', + '' => '餂', + '' => '餀', + '' => '餇', + '' => '馝', + '' => '馜', + '' => '駃', + '' => '馹', + '' => '馻', + '' => '馺', + '' => '駂', + '' => '馽', + '' => '駇', + '' => '骱', + '' => '髣', + '' => '髧', + '' => '鬾', + '' => '鬿', + '' => '魠', + '' => '魡', + '' => '魟', + '' => '鳱', + '' => '鳲', + '' => '鳵', + '' => '麧', + '' => '僿', + '' => '儃', + '' => '儰', + '' => '僸', + '' => '儆', + '' => '儇', + '' => '僶', + '' => '僾', + '' => '儋', + '' => '儌', + '' => '僽', + '' => '儊', + '' => '劋', + '' => '劌', + '' => '勱', + '' => '勯', + '' => '噈', + '' => '噂', + '' => '噌', + '' => '嘵', + '' => '噁', + '' => '噊', + '' => '噉', + '' => '噆', + '' => '噘', + '@' => '噚', + 'A' => '噀', + 'B' => '嘳', + 'C' => '嘽', + 'D' => '嘬', + 'E' => '嘾', + 'F' => '嘸', + 'G' => '嘪', + 'H' => '嘺', + 'I' => '圚', + 'J' => '墫', + 'K' => '墝', + 'L' => '墱', + 'M' => '墠', + 'N' => '墣', + 'O' => '墯', + 'P' => '墬', + 'Q' => '墥', + 'R' => '墡', + 'S' => '壿', + 'T' => '嫿', + 'U' => '嫴', + 'V' => '嫽', + 'W' => '嫷', + 'X' => '嫶', + 'Y' => '嬃', + 'Z' => '嫸', + '[' => '嬂', + '\\' => '嫹', + ']' => '嬁', + '^' => '嬇', + '_' => '嬅', + '`' => '嬏', + 'a' => '屧', + 'b' => '嶙', + 'c' => '嶗', + 'd' => '嶟', + 'e' => '嶒', + 'f' => '嶢', + 'g' => '嶓', + 'h' => '嶕', + 'i' => '嶠', + 'j' => '嶜', + 'k' => '嶡', + 'l' => '嶚', + 'm' => '嶞', + 'n' => '幩', + 'o' => '幝', + 'p' => '幠', + 'q' => '幜', + 'r' => '緳', + 's' => '廛', + 't' => '廞', + 'u' => '廡', + 'v' => '彉', + 'w' => '徲', + 'x' => '憋', + 'y' => '憃', + 'z' => '慹', + '{' => '憱', + '|' => '憰', + '}' => '憢', + '~' => '憉', + '' => '憛', + '' => '憓', + '' => '憯', + '' => '憭', + '' => '憟', + '' => '憒', + '' => '憪', + '' => '憡', + '' => '憍', + '' => '慦', + '' => '憳', + '' => '戭', + '' => '摮', + '' => '摰', + '' => '撖', + '' => '撠', + '' => '撅', + '' => '撗', + '' => '撜', + '' => '撏', + '' => '撋', + '' => '撊', + '' => '撌', + '' => '撣', + '' => '撟', + '' => '摨', + '' => '撱', + '' => '撘', + '' => '敶', + '' => '敺', + '' => '敹', + '' => '敻', + '' => '斲', + '' => '斳', + '' => '暵', + '' => '暰', + '' => '暩', + '' => '暲', + '' => '暷', + '' => '暪', + '' => '暯', + '' => '樀', + '' => '樆', + '' => '樗', + '' => '槥', + '' => '槸', + '' => '樕', + '' => '槱', + '' => '槤', + '' => '樠', + '' => '槿', + '' => '槬', + '' => '槢', + '' => '樛', + '' => '樝', + '' => '槾', + '' => '樧', + '' => '槲', + '' => '槮', + '' => '樔', + '' => '槷', + '' => '槧', + '' => '橀', + '' => '樈', + '' => '槦', + '' => '槻', + '' => '樍', + '' => '槼', + '' => '槫', + '' => '樉', + '' => '樄', + '' => '樘', + '' => '樥', + '' => '樏', + '' => '槶', + '' => '樦', + '' => '樇', + '' => '槴', + '' => '樖', + '' => '歑', + '' => '殥', + '' => '殣', + '' => '殢', + '' => '殦', + '' => '氁', + '' => '氀', + '' => '毿', + '' => '氂', + '' => '潁', + '' => '漦', + '' => '潾', + '' => '澇', + '' => '濆', + '' => '澒', + '@' => '澍', + 'A' => '澉', + 'B' => '澌', + 'C' => '潢', + 'D' => '潏', + 'E' => '澅', + 'F' => '潚', + 'G' => '澖', + 'H' => '潶', + 'I' => '潬', + 'J' => '澂', + 'K' => '潕', + 'L' => '潲', + 'M' => '潒', + 'N' => '潐', + 'O' => '潗', + 'P' => '澔', + 'Q' => '澓', + 'R' => '潝', + 'S' => '漀', + 'T' => '潡', + 'U' => '潫', + 'V' => '潽', + 'W' => '潧', + 'X' => '澐', + 'Y' => '潓', + 'Z' => '澋', + '[' => '潩', + '\\' => '潿', + ']' => '澕', + '^' => '潣', + '_' => '潷', + '`' => '潪', + 'a' => '潻', + 'b' => '熲', + 'c' => '熯', + 'd' => '熛', + 'e' => '熰', + 'f' => '熠', + 'g' => '熚', + 'h' => '熩', + 'i' => '熵', + 'j' => '熝', + 'k' => '熥', + 'l' => '熞', + 'm' => '熤', + 'n' => '熡', + 'o' => '熪', + 'p' => '熜', + 'q' => '熧', + 'r' => '熳', + 's' => '犘', + 't' => '犚', + 'u' => '獘', + 'v' => '獒', + 'w' => '獞', + 'x' => '獟', + 'y' => '獠', + 'z' => '獝', + '{' => '獛', + '|' => '獡', + '}' => '獚', + '~' => '獙', + '' => '獢', + '' => '璇', + '' => '璉', + '' => '璊', + '' => '璆', + '' => '璁', + '' => '瑽', + '' => '璅', + '' => '璈', + '' => '瑼', + '' => '瑹', + '' => '甈', + '' => '甇', + '' => '畾', + '' => '瘥', + '' => '瘞', + '' => '瘙', + '' => '瘝', + '' => '瘜', + '' => '瘣', + '' => '瘚', + '' => '瘨', + '' => '瘛', + '' => '皜', + '' => '皝', + '' => '皞', + '' => '皛', + '' => '瞍', + '' => '瞏', + '' => '瞉', + '' => '瞈', + '' => '磍', + '' => '碻', + '' => '磏', + '' => '磌', + '' => '磑', + '' => '磎', + '' => '磔', + '' => '磈', + '' => '磃', + '' => '磄', + '' => '磉', + '' => '禚', + '' => '禡', + '' => '禠', + '' => '禜', + '' => '禢', + '' => '禛', + '' => '歶', + '' => '稹', + '' => '窲', + '' => '窴', + '' => '窳', + '' => '箷', + '' => '篋', + '' => '箾', + '' => '箬', + '' => '篎', + '' => '箯', + '' => '箹', + '' => '篊', + '' => '箵', + '' => '糅', + '' => '糈', + '' => '糌', + '' => '糋', + '' => '緷', + '' => '緛', + '' => '緪', + '' => '緧', + '' => '緗', + '' => '緡', + '' => '縃', + '' => '緺', + '' => '緦', + '' => '緶', + '' => '緱', + '' => '緰', + '' => '緮', + '' => '緟', + '' => '罶', + '' => '羬', + '' => '羰', + '' => '羭', + '' => '翭', + '' => '翫', + '' => '翪', + '' => '翬', + '' => '翦', + '' => '翨', + '' => '聤', + '' => '聧', + '' => '膣', + '' => '膟', + '@' => '膞', + 'A' => '膕', + 'B' => '膢', + 'C' => '膙', + 'D' => '膗', + 'E' => '舖', + 'F' => '艏', + 'G' => '艓', + 'H' => '艒', + 'I' => '艐', + 'J' => '艎', + 'K' => '艑', + 'L' => '蔤', + 'M' => '蔻', + 'N' => '蔏', + 'O' => '蔀', + 'P' => '蔩', + 'Q' => '蔎', + 'R' => '蔉', + 'S' => '蔍', + 'T' => '蔟', + 'U' => '蔊', + 'V' => '蔧', + 'W' => '蔜', + 'X' => '蓻', + 'Y' => '蔫', + 'Z' => '蓺', + '[' => '蔈', + '\\' => '蔌', + ']' => '蓴', + '^' => '蔪', + '_' => '蓲', + '`' => '蔕', + 'a' => '蓷', + 'b' => '蓫', + 'c' => '蓳', + 'd' => '蓼', + 'e' => '蔒', + 'f' => '蓪', + 'g' => '蓩', + 'h' => '蔖', + 'i' => '蓾', + 'j' => '蔨', + 'k' => '蔝', + 'l' => '蔮', + 'm' => '蔂', + 'n' => '蓽', + 'o' => '蔞', + 'p' => '蓶', + 'q' => '蔱', + 'r' => '蔦', + 's' => '蓧', + 't' => '蓨', + 'u' => '蓰', + 'v' => '蓯', + 'w' => '蓹', + 'x' => '蔘', + 'y' => '蔠', + 'z' => '蔰', + '{' => '蔋', + '|' => '蔙', + '}' => '蔯', + '~' => '虢', + '' => '蝖', + '' => '蝣', + '' => '蝤', + '' => '蝷', + '' => '蟡', + '' => '蝳', + '' => '蝘', + '' => '蝔', + '' => '蝛', + '' => '蝒', + '' => '蝡', + '' => '蝚', + '' => '蝑', + '' => '蝞', + '' => '蝭', + '' => '蝪', + '' => '蝐', + '' => '蝎', + '' => '蝟', + '' => '蝝', + '' => '蝯', + '' => '蝬', + '' => '蝺', + '' => '蝮', + '' => '蝜', + '' => '蝥', + '' => '蝏', + '' => '蝻', + '' => '蝵', + '' => '蝢', + '' => '蝧', + '' => '蝩', + '' => '衚', + '' => '褅', + '' => '褌', + '' => '褔', + '' => '褋', + '' => '褗', + '' => '褘', + '' => '褙', + '' => '褆', + '' => '褖', + '' => '褑', + '' => '褎', + '' => '褉', + '' => '覢', + '' => '覤', + '' => '覣', + '' => '觭', + '' => '觰', + '' => '觬', + '' => '諏', + '' => '諆', + '' => '誸', + '' => '諓', + '' => '諑', + '' => '諔', + '' => '諕', + '' => '誻', + '' => '諗', + '' => '誾', + '' => '諀', + '' => '諅', + '' => '諘', + '' => '諃', + '' => '誺', + '' => '誽', + '' => '諙', + '' => '谾', + '' => '豍', + '' => '貏', + '' => '賥', + '' => '賟', + '' => '賙', + '' => '賨', + '' => '賚', + '' => '賝', + '' => '賧', + '' => '趠', + '' => '趜', + '' => '趡', + '' => '趛', + '' => '踠', + '' => '踣', + '' => '踥', + '' => '踤', + '' => '踮', + '' => '踕', + '' => '踛', + '' => '踖', + '' => '踑', + '' => '踙', + '' => '踦', + '' => '踧', + '@' => '踔', + 'A' => '踒', + 'B' => '踘', + 'C' => '踓', + 'D' => '踜', + 'E' => '踗', + 'F' => '踚', + 'G' => '輬', + 'H' => '輤', + 'I' => '輘', + 'J' => '輚', + 'K' => '輠', + 'L' => '輣', + 'M' => '輖', + 'N' => '輗', + 'O' => '遳', + 'P' => '遰', + 'Q' => '遯', + 'R' => '遧', + 'S' => '遫', + 'T' => '鄯', + 'U' => '鄫', + 'V' => '鄩', + 'W' => '鄪', + 'X' => '鄲', + 'Y' => '鄦', + 'Z' => '鄮', + '[' => '醅', + '\\' => '醆', + ']' => '醊', + '^' => '醁', + '_' => '醂', + '`' => '醄', + 'a' => '醀', + 'b' => '鋐', + 'c' => '鋃', + 'd' => '鋄', + 'e' => '鋀', + 'f' => '鋙', + 'g' => '銶', + 'h' => '鋏', + 'i' => '鋱', + 'j' => '鋟', + 'k' => '鋘', + 'l' => '鋩', + 'm' => '鋗', + 'n' => '鋝', + 'o' => '鋌', + 'p' => '鋯', + 'q' => '鋂', + 'r' => '鋨', + 's' => '鋊', + 't' => '鋈', + 'u' => '鋎', + 'v' => '鋦', + 'w' => '鋍', + 'x' => '鋕', + 'y' => '鋉', + 'z' => '鋠', + '{' => '鋞', + '|' => '鋧', + '}' => '鋑', + '~' => '鋓', + '' => '銵', + '' => '鋡', + '' => '鋆', + '' => '銴', + '' => '镼', + '' => '閬', + '' => '閫', + '' => '閮', + '' => '閰', + '' => '隤', + '' => '隢', + '' => '雓', + '' => '霅', + '' => '霈', + '' => '霂', + '' => '靚', + '' => '鞊', + '' => '鞎', + '' => '鞈', + '' => '韐', + '' => '韏', + '' => '頞', + '' => '頝', + '' => '頦', + '' => '頩', + '' => '頨', + '' => '頠', + '' => '頛', + '' => '頧', + '' => '颲', + '' => '餈', + '' => '飺', + '' => '餑', + '' => '餔', + '' => '餖', + '' => '餗', + '' => '餕', + '' => '駜', + '' => '駍', + '' => '駏', + '' => '駓', + '' => '駔', + '' => '駎', + '' => '駉', + '' => '駖', + '' => '駘', + '' => '駋', + '' => '駗', + '' => '駌', + '' => '骳', + '' => '髬', + '' => '髫', + '' => '髳', + '' => '髲', + '' => '髱', + '' => '魆', + '' => '魃', + '' => '魧', + '' => '魴', + '' => '魱', + '' => '魦', + '' => '魶', + '' => '魵', + '' => '魰', + '' => '魨', + '' => '魤', + '' => '魬', + '' => '鳼', + '' => '鳺', + '' => '鳽', + '' => '鳿', + '' => '鳷', + '' => '鴇', + '' => '鴀', + '' => '鳹', + '' => '鳻', + '' => '鴈', + '' => '鴅', + '' => '鴄', + '' => '麃', + '' => '黓', + '' => '鼏', + '' => '鼐', + '' => '儜', + '' => '儓', + '' => '儗', + '' => '儚', + '' => '儑', + '' => '凞', + '' => '匴', + '' => '叡', + '' => '噰', + '' => '噠', + '' => '噮', + '@' => '噳', + 'A' => '噦', + 'B' => '噣', + 'C' => '噭', + 'D' => '噲', + 'E' => '噞', + 'F' => '噷', + 'G' => '圜', + 'H' => '圛', + 'I' => '壈', + 'J' => '墽', + 'K' => '壉', + 'L' => '墿', + 'M' => '墺', + 'N' => '壂', + 'O' => '墼', + 'P' => '壆', + 'Q' => '嬗', + 'R' => '嬙', + 'S' => '嬛', + 'T' => '嬡', + 'U' => '嬔', + 'V' => '嬓', + 'W' => '嬐', + 'X' => '嬖', + 'Y' => '嬨', + 'Z' => '嬚', + '[' => '嬠', + '\\' => '嬞', + ']' => '寯', + '^' => '嶬', + '_' => '嶱', + '`' => '嶩', + 'a' => '嶧', + 'b' => '嶵', + 'c' => '嶰', + 'd' => '嶮', + 'e' => '嶪', + 'f' => '嶨', + 'g' => '嶲', + 'h' => '嶭', + 'i' => '嶯', + 'j' => '嶴', + 'k' => '幧', + 'l' => '幨', + 'm' => '幦', + 'n' => '幯', + 'o' => '廩', + 'p' => '廧', + 'q' => '廦', + 'r' => '廨', + 's' => '廥', + 't' => '彋', + 'u' => '徼', + 'v' => '憝', + 'w' => '憨', + 'x' => '憖', + 'y' => '懅', + 'z' => '憴', + '{' => '懆', + '|' => '懁', + '}' => '懌', + '~' => '憺', + '' => '憿', + '' => '憸', + '' => '憌', + '' => '擗', + '' => '擖', + '' => '擐', + '' => '擏', + '' => '擉', + '' => '撽', + '' => '撉', + '' => '擃', + '' => '擛', + '' => '擳', + '' => '擙', + '' => '攳', + '' => '敿', + '' => '敼', + '' => '斢', + '' => '曈', + '' => '暾', + '' => '曀', + '' => '曊', + '' => '曋', + '' => '曏', + '' => '暽', + '' => '暻', + '' => '暺', + '' => '曌', + '' => '朣', + '' => '樴', + '' => '橦', + '' => '橉', + '' => '橧', + '' => '樲', + '' => '橨', + '' => '樾', + '' => '橝', + '' => '橭', + '' => '橶', + '' => '橛', + '' => '橑', + '' => '樨', + '' => '橚', + '' => '樻', + '' => '樿', + '' => '橁', + '' => '橪', + '' => '橤', + '' => '橐', + '' => '橏', + '' => '橔', + '' => '橯', + '' => '橩', + '' => '橠', + '' => '樼', + '' => '橞', + '' => '橖', + '' => '橕', + '' => '橍', + '' => '橎', + '' => '橆', + '' => '歕', + '' => '歔', + '' => '歖', + '' => '殧', + '' => '殪', + '' => '殫', + '' => '毈', + '' => '毇', + '' => '氄', + '' => '氃', + '' => '氆', + '' => '澭', + '' => '濋', + '' => '澣', + '' => '濇', + '' => '澼', + '' => '濎', + '' => '濈', + '' => '潞', + '' => '濄', + '' => '澽', + '' => '澞', + '' => '濊', + '' => '澨', + '' => '瀄', + '' => '澥', + '' => '澮', + '' => '澺', + '' => '澬', + '' => '澪', + '' => '濏', + '' => '澿', + '' => '澸', + '@' => '澢', + 'A' => '濉', + 'B' => '澫', + 'C' => '濍', + 'D' => '澯', + 'E' => '澲', + 'F' => '澰', + 'G' => '燅', + 'H' => '燂', + 'I' => '熿', + 'J' => '熸', + 'K' => '燖', + 'L' => '燀', + 'M' => '燁', + 'N' => '燋', + 'O' => '燔', + 'P' => '燊', + 'Q' => '燇', + 'R' => '燏', + 'S' => '熽', + 'T' => '燘', + 'U' => '熼', + 'V' => '燆', + 'W' => '燚', + 'X' => '燛', + 'Y' => '犝', + 'Z' => '犞', + '[' => '獩', + '\\' => '獦', + ']' => '獧', + '^' => '獬', + '_' => '獥', + '`' => '獫', + 'a' => '獪', + 'b' => '瑿', + 'c' => '璚', + 'd' => '璠', + 'e' => '璔', + 'f' => '璒', + 'g' => '璕', + 'h' => '璡', + 'i' => '甋', + 'j' => '疀', + 'k' => '瘯', + 'l' => '瘭', + 'm' => '瘱', + 'n' => '瘽', + 'o' => '瘳', + 'p' => '瘼', + 'q' => '瘵', + 'r' => '瘲', + 's' => '瘰', + 't' => '皻', + 'u' => '盦', + 'v' => '瞚', + 'w' => '瞝', + 'x' => '瞡', + 'y' => '瞜', + 'z' => '瞛', + '{' => '瞢', + '|' => '瞣', + '}' => '瞕', + '~' => '瞙', + '' => '瞗', + '' => '磝', + '' => '磩', + '' => '磥', + '' => '磪', + '' => '磞', + '' => '磣', + '' => '磛', + '' => '磡', + '' => '磢', + '' => '磭', + '' => '磟', + '' => '磠', + '' => '禤', + '' => '穄', + '' => '穈', + '' => '穇', + '' => '窶', + '' => '窸', + '' => '窵', + '' => '窱', + '' => '窷', + '' => '篞', + '' => '篣', + '' => '篧', + '' => '篝', + '' => '篕', + '' => '篥', + '' => '篚', + '' => '篨', + '' => '篹', + '' => '篔', + '' => '篪', + '' => '篢', + '' => '篜', + '' => '篫', + '' => '篘', + '' => '篟', + '' => '糒', + '' => '糔', + '' => '糗', + '' => '糐', + '' => '糑', + '' => '縒', + '' => '縡', + '' => '縗', + '' => '縌', + '' => '縟', + '' => '縠', + '' => '縓', + '' => '縎', + '' => '縜', + '' => '縕', + '' => '縚', + '' => '縢', + '' => '縋', + '' => '縏', + '' => '縖', + '' => '縍', + '' => '縔', + '' => '縥', + '' => '縤', + '' => '罃', + '' => '罻', + '' => '罼', + '' => '罺', + '' => '羱', + '' => '翯', + '' => '耪', + '' => '耩', + '' => '聬', + '' => '膱', + '' => '膦', + '' => '膮', + '' => '膹', + '' => '膵', + '' => '膫', + '' => '膰', + '' => '膬', + '' => '膴', + '' => '膲', + '' => '膷', + '' => '膧', + '' => '臲', + '' => '艕', + '' => '艖', + '' => '艗', + '' => '蕖', + '' => '蕅', + '' => '蕫', + '' => '蕍', + '' => '蕓', + '' => '蕡', + '' => '蕘', + '@' => '蕀', + 'A' => '蕆', + 'B' => '蕤', + 'C' => '蕁', + 'D' => '蕢', + 'E' => '蕄', + 'F' => '蕑', + 'G' => '蕇', + 'H' => '蕣', + 'I' => '蔾', + 'J' => '蕛', + 'K' => '蕱', + 'L' => '蕎', + 'M' => '蕮', + 'N' => '蕵', + 'O' => '蕕', + 'P' => '蕧', + 'Q' => '蕠', + 'R' => '薌', + 'S' => '蕦', + 'T' => '蕝', + 'U' => '蕔', + 'V' => '蕥', + 'W' => '蕬', + 'X' => '虣', + 'Y' => '虥', + 'Z' => '虤', + '[' => '螛', + '\\' => '螏', + ']' => '螗', + '^' => '螓', + '_' => '螒', + '`' => '螈', + 'a' => '螁', + 'b' => '螖', + 'c' => '螘', + 'd' => '蝹', + 'e' => '螇', + 'f' => '螣', + 'g' => '螅', + 'h' => '螐', + 'i' => '螑', + 'j' => '螝', + 'k' => '螄', + 'l' => '螔', + 'm' => '螜', + 'n' => '螚', + 'o' => '螉', + 'p' => '褞', + 'q' => '褦', + 'r' => '褰', + 's' => '褭', + 't' => '褮', + 'u' => '褧', + 'v' => '褱', + 'w' => '褢', + 'x' => '褩', + 'y' => '褣', + 'z' => '褯', + '{' => '褬', + '|' => '褟', + '}' => '觱', + '~' => '諠', + '' => '諢', + '' => '諲', + '' => '諴', + '' => '諵', + '' => '諝', + '' => '謔', + '' => '諤', + '' => '諟', + '' => '諰', + '' => '諈', + '' => '諞', + '' => '諡', + '' => '諨', + '' => '諿', + '' => '諯', + '' => '諻', + '' => '貑', + '' => '貒', + '' => '貐', + '' => '賵', + '' => '賮', + '' => '賱', + '' => '賰', + '' => '賳', + '' => '赬', + '' => '赮', + '' => '趥', + '' => '趧', + '' => '踳', + '' => '踾', + '' => '踸', + '' => '蹀', + '' => '蹅', + '' => '踶', + '' => '踼', + '' => '踽', + '' => '蹁', + '' => '踰', + '' => '踿', + '' => '躽', + '' => '輶', + '' => '輮', + '' => '輵', + '' => '輲', + '' => '輹', + '' => '輷', + '' => '輴', + '' => '遶', + '' => '遹', + '' => '遻', + '' => '邆', + '' => '郺', + '' => '鄳', + '' => '鄵', + '' => '鄶', + '' => '醓', + '' => '醐', + '' => '醑', + '' => '醍', + '' => '醏', + '' => '錧', + '' => '錞', + '' => '錈', + '' => '錟', + '' => '錆', + '' => '錏', + '' => '鍺', + '' => '錸', + '' => '錼', + '' => '錛', + '' => '錣', + '' => '錒', + '' => '錁', + '' => '鍆', + '' => '錭', + '' => '錎', + '' => '錍', + '' => '鋋', + '' => '錝', + '' => '鋺', + '' => '錥', + '' => '錓', + '' => '鋹', + '' => '鋷', + '' => '錴', + '' => '錂', + '' => '錤', + '' => '鋿', + '' => '錩', + '' => '錹', + '' => '錵', + '' => '錪', + '' => '錔', + '' => '錌', + '@' => '錋', + 'A' => '鋾', + 'B' => '錉', + 'C' => '錀', + 'D' => '鋻', + 'E' => '錖', + 'F' => '閼', + 'G' => '闍', + 'H' => '閾', + 'I' => '閹', + 'J' => '閺', + 'K' => '閶', + 'L' => '閿', + 'M' => '閵', + 'N' => '閽', + 'O' => '隩', + 'P' => '雔', + 'Q' => '霋', + 'R' => '霒', + 'S' => '霐', + 'T' => '鞙', + 'U' => '鞗', + 'V' => '鞔', + 'W' => '韰', + 'X' => '韸', + 'Y' => '頵', + 'Z' => '頯', + '[' => '頲', + '\\' => '餤', + ']' => '餟', + '^' => '餧', + '_' => '餩', + '`' => '馞', + 'a' => '駮', + 'b' => '駬', + 'c' => '駥', + 'd' => '駤', + 'e' => '駰', + 'f' => '駣', + 'g' => '駪', + 'h' => '駩', + 'i' => '駧', + 'j' => '骹', + 'k' => '骿', + 'l' => '骴', + 'm' => '骻', + 'n' => '髶', + 'o' => '髺', + 'p' => '髹', + 'q' => '髷', + 'r' => '鬳', + 's' => '鮀', + 't' => '鮅', + 'u' => '鮇', + 'v' => '魼', + 'w' => '魾', + 'x' => '魻', + 'y' => '鮂', + 'z' => '鮓', + '{' => '鮒', + '|' => '鮐', + '}' => '魺', + '~' => '鮕', + '' => '魽', + '' => '鮈', + '' => '鴥', + '' => '鴗', + '' => '鴠', + '' => '鴞', + '' => '鴔', + '' => '鴩', + '' => '鴝', + '' => '鴘', + '' => '鴢', + '' => '鴐', + '' => '鴙', + '' => '鴟', + '' => '麈', + '' => '麆', + '' => '麇', + '' => '麮', + '' => '麭', + '' => '黕', + '' => '黖', + '' => '黺', + '' => '鼒', + '' => '鼽', + '' => '儦', + '' => '儥', + '' => '儢', + '' => '儤', + '' => '儠', + '' => '儩', + '' => '勴', + '' => '嚓', + '' => '嚌', + '' => '嚍', + '' => '嚆', + '' => '嚄', + '' => '嚃', + '' => '噾', + '' => '嚂', + '' => '噿', + '' => '嚁', + '' => '壖', + '' => '壔', + '' => '壏', + '' => '壒', + '' => '嬭', + '' => '嬥', + '' => '嬲', + '' => '嬣', + '' => '嬬', + '' => '嬧', + '' => '嬦', + '' => '嬯', + '' => '嬮', + '' => '孻', + '' => '寱', + '' => '寲', + '' => '嶷', + '' => '幬', + '' => '幪', + '' => '徾', + '' => '徻', + '' => '懃', + '' => '憵', + '' => '憼', + '' => '懧', + '' => '懠', + '' => '懥', + '' => '懤', + '' => '懨', + '' => '懞', + '' => '擯', + '' => '擩', + '' => '擣', + '' => '擫', + '' => '擤', + '' => '擨', + '' => '斁', + '' => '斀', + '' => '斶', + '' => '旚', + '' => '曒', + '' => '檍', + '' => '檖', + '' => '檁', + '' => '檥', + '' => '檉', + '' => '檟', + '' => '檛', + '' => '檡', + '' => '檞', + '' => '檇', + '' => '檓', + '' => '檎', + '@' => '檕', + 'A' => '檃', + 'B' => '檨', + 'C' => '檤', + 'D' => '檑', + 'E' => '橿', + 'F' => '檦', + 'G' => '檚', + 'H' => '檅', + 'I' => '檌', + 'J' => '檒', + 'K' => '歛', + 'L' => '殭', + 'M' => '氉', + 'N' => '濌', + 'O' => '澩', + 'P' => '濴', + 'Q' => '濔', + 'R' => '濣', + 'S' => '濜', + 'T' => '濭', + 'U' => '濧', + 'V' => '濦', + 'W' => '濞', + 'X' => '濲', + 'Y' => '濝', + 'Z' => '濢', + '[' => '濨', + '\\' => '燡', + ']' => '燱', + '^' => '燨', + '_' => '燲', + '`' => '燤', + 'a' => '燰', + 'b' => '燢', + 'c' => '獳', + 'd' => '獮', + 'e' => '獯', + 'f' => '璗', + 'g' => '璲', + 'h' => '璫', + 'i' => '璐', + 'j' => '璪', + 'k' => '璭', + 'l' => '璱', + 'm' => '璥', + 'n' => '璯', + 'o' => '甐', + 'p' => '甑', + 'q' => '甒', + 'r' => '甏', + 's' => '疄', + 't' => '癃', + 'u' => '癈', + 'v' => '癉', + 'w' => '癇', + 'x' => '皤', + 'y' => '盩', + 'z' => '瞵', + '{' => '瞫', + '|' => '瞲', + '}' => '瞷', + '~' => '瞶', + '' => '瞴', + '' => '瞱', + '' => '瞨', + '' => '矰', + '' => '磳', + '' => '磽', + '' => '礂', + '' => '磻', + '' => '磼', + '' => '磲', + '' => '礅', + '' => '磹', + '' => '磾', + '' => '礄', + '' => '禫', + '' => '禨', + '' => '穜', + '' => '穛', + '' => '穖', + '' => '穘', + '' => '穔', + '' => '穚', + '' => '窾', + '' => '竀', + '' => '竁', + '' => '簅', + '' => '簏', + '' => '篲', + '' => '簀', + '' => '篿', + '' => '篻', + '' => '簎', + '' => '篴', + '' => '簋', + '' => '篳', + '' => '簂', + '' => '簉', + '' => '簃', + '' => '簁', + '' => '篸', + '' => '篽', + '' => '簆', + '' => '篰', + '' => '篱', + '' => '簐', + '' => '簊', + '' => '糨', + '' => '縭', + '' => '縼', + '' => '繂', + '' => '縳', + '' => '顈', + '' => '縸', + '' => '縪', + '' => '繉', + '' => '繀', + '' => '繇', + '' => '縩', + '' => '繌', + '' => '縰', + '' => '縻', + '' => '縶', + '' => '繄', + '' => '縺', + '' => '罅', + '' => '罿', + '' => '罾', + '' => '罽', + '' => '翴', + '' => '翲', + '' => '耬', + '' => '膻', + '' => '臄', + '' => '臌', + '' => '臊', + '' => '臅', + '' => '臇', + '' => '膼', + '' => '臩', + '' => '艛', + '' => '艚', + '' => '艜', + '' => '薃', + '' => '薀', + '' => '薏', + '' => '薧', + '' => '薕', + '' => '薠', + '' => '薋', + '' => '薣', + '' => '蕻', + '' => '薤', + '' => '薚', + '' => '薞', + '@' => '蕷', + 'A' => '蕼', + 'B' => '薉', + 'C' => '薡', + 'D' => '蕺', + 'E' => '蕸', + 'F' => '蕗', + 'G' => '薎', + 'H' => '薖', + 'I' => '薆', + 'J' => '薍', + 'K' => '薙', + 'L' => '薝', + 'M' => '薁', + 'N' => '薢', + 'O' => '薂', + 'P' => '薈', + 'Q' => '薅', + 'R' => '蕹', + 'S' => '蕶', + 'T' => '薘', + 'U' => '薐', + 'V' => '薟', + 'W' => '虨', + 'X' => '螾', + 'Y' => '螪', + 'Z' => '螭', + '[' => '蟅', + '\\' => '螰', + ']' => '螬', + '^' => '螹', + '_' => '螵', + '`' => '螼', + 'a' => '螮', + 'b' => '蟉', + 'c' => '蟃', + 'd' => '蟂', + 'e' => '蟌', + 'f' => '螷', + 'g' => '螯', + 'h' => '蟄', + 'i' => '蟊', + 'j' => '螴', + 'k' => '螶', + 'l' => '螿', + 'm' => '螸', + 'n' => '螽', + 'o' => '蟞', + 'p' => '螲', + 'q' => '褵', + 'r' => '褳', + 's' => '褼', + 't' => '褾', + 'u' => '襁', + 'v' => '襒', + 'w' => '褷', + 'x' => '襂', + 'y' => '覭', + 'z' => '覯', + '{' => '覮', + '|' => '觲', + '}' => '觳', + '~' => '謞', + '' => '謘', + '' => '謖', + '' => '謑', + '' => '謅', + '' => '謋', + '' => '謢', + '' => '謏', + '' => '謒', + '' => '謕', + '' => '謇', + '' => '謍', + '' => '謈', + '' => '謆', + '' => '謜', + '' => '謓', + '' => '謚', + '' => '豏', + '' => '豰', + '' => '豲', + '' => '豱', + '' => '豯', + '' => '貕', + '' => '貔', + '' => '賹', + '' => '赯', + '' => '蹎', + '' => '蹍', + '' => '蹓', + '' => '蹐', + '' => '蹌', + '' => '蹇', + '' => '轃', + '' => '轀', + '' => '邅', + '' => '遾', + '' => '鄸', + '' => '醚', + '' => '醢', + '' => '醛', + '' => '醙', + '' => '醟', + '' => '醡', + '' => '醝', + '' => '醠', + '' => '鎡', + '' => '鎃', + '' => '鎯', + '' => '鍤', + '' => '鍖', + '' => '鍇', + '' => '鍼', + '' => '鍘', + '' => '鍜', + '' => '鍶', + '' => '鍉', + '' => '鍐', + '' => '鍑', + '' => '鍠', + '' => '鍭', + '' => '鎏', + '' => '鍌', + '' => '鍪', + '' => '鍹', + '' => '鍗', + '' => '鍕', + '' => '鍒', + '' => '鍏', + '' => '鍱', + '' => '鍷', + '' => '鍻', + '' => '鍡', + '' => '鍞', + '' => '鍣', + '' => '鍧', + '' => '鎀', + '' => '鍎', + '' => '鍙', + '' => '闇', + '' => '闀', + '' => '闉', + '' => '闃', + '' => '闅', + '' => '閷', + '' => '隮', + '' => '隰', + '' => '隬', + '' => '霠', + '' => '霟', + '' => '霘', + '' => '霝', + '' => '霙', + '' => '鞚', + '' => '鞡', + '' => '鞜', + '@' => '鞞', + 'A' => '鞝', + 'B' => '韕', + 'C' => '韔', + 'D' => '韱', + 'E' => '顁', + 'F' => '顄', + 'G' => '顊', + 'H' => '顉', + 'I' => '顅', + 'J' => '顃', + 'K' => '餥', + 'L' => '餫', + 'M' => '餬', + 'N' => '餪', + 'O' => '餳', + 'P' => '餲', + 'Q' => '餯', + 'R' => '餭', + 'S' => '餱', + 'T' => '餰', + 'U' => '馘', + 'V' => '馣', + 'W' => '馡', + 'X' => '騂', + 'Y' => '駺', + 'Z' => '駴', + '[' => '駷', + '\\' => '駹', + ']' => '駸', + '^' => '駶', + '_' => '駻', + '`' => '駽', + 'a' => '駾', + 'b' => '駼', + 'c' => '騃', + 'd' => '骾', + 'e' => '髾', + 'f' => '髽', + 'g' => '鬁', + 'h' => '髼', + 'i' => '魈', + 'j' => '鮚', + 'k' => '鮨', + 'l' => '鮞', + 'm' => '鮛', + 'n' => '鮦', + 'o' => '鮡', + 'p' => '鮥', + 'q' => '鮤', + 'r' => '鮆', + 's' => '鮢', + 't' => '鮠', + 'u' => '鮯', + 'v' => '鴳', + 'w' => '鵁', + 'x' => '鵧', + 'y' => '鴶', + 'z' => '鴮', + '{' => '鴯', + '|' => '鴱', + '}' => '鴸', + '~' => '鴰', + '' => '鵅', + '' => '鵂', + '' => '鵃', + '' => '鴾', + '' => '鴷', + '' => '鵀', + '' => '鴽', + '' => '翵', + '' => '鴭', + '' => '麊', + '' => '麉', + '' => '麍', + '' => '麰', + '' => '黈', + '' => '黚', + '' => '黻', + '' => '黿', + '' => '鼤', + '' => '鼣', + '' => '鼢', + '' => '齔', + '' => '龠', + '' => '儱', + '' => '儭', + '' => '儮', + '' => '嚘', + '' => '嚜', + '' => '嚗', + '' => '嚚', + '' => '嚝', + '' => '嚙', + '' => '奰', + '' => '嬼', + '' => '屩', + '' => '屪', + '' => '巀', + '' => '幭', + '' => '幮', + '' => '懘', + '' => '懟', + '' => '懭', + '' => '懮', + '' => '懱', + '' => '懪', + '' => '懰', + '' => '懫', + '' => '懖', + '' => '懩', + '' => '擿', + '' => '攄', + '' => '擽', + '' => '擸', + '' => '攁', + '' => '攃', + '' => '擼', + '' => '斔', + '' => '旛', + '' => '曚', + '' => '曛', + '' => '曘', + '' => '櫅', + '' => '檹', + '' => '檽', + '' => '櫡', + '' => '櫆', + '' => '檺', + '' => '檶', + '' => '檷', + '' => '櫇', + '' => '檴', + '' => '檭', + '' => '歞', + '' => '毉', + '' => '氋', + '' => '瀇', + '' => '瀌', + '' => '瀍', + '' => '瀁', + '' => '瀅', + '' => '瀔', + '' => '瀎', + '' => '濿', + '' => '瀀', + '' => '濻', + '' => '瀦', + '' => '濼', + '' => '濷', + '' => '瀊', + '' => '爁', + '' => '燿', + '' => '燹', + '' => '爃', + '' => '燽', + '' => '獶', + '@' => '璸', + 'A' => '瓀', + 'B' => '璵', + 'C' => '瓁', + 'D' => '璾', + 'E' => '璶', + 'F' => '璻', + 'G' => '瓂', + 'H' => '甔', + 'I' => '甓', + 'J' => '癜', + 'K' => '癤', + 'L' => '癙', + 'M' => '癐', + 'N' => '癓', + 'O' => '癗', + 'P' => '癚', + 'Q' => '皦', + 'R' => '皽', + 'S' => '盬', + 'T' => '矂', + 'U' => '瞺', + 'V' => '磿', + 'W' => '礌', + 'X' => '礓', + 'Y' => '礔', + 'Z' => '礉', + '[' => '礐', + '\\' => '礒', + ']' => '礑', + '^' => '禭', + '_' => '禬', + '`' => '穟', + 'a' => '簜', + 'b' => '簩', + 'c' => '簙', + 'd' => '簠', + 'e' => '簟', + 'f' => '簭', + 'g' => '簝', + 'h' => '簦', + 'i' => '簨', + 'j' => '簢', + 'k' => '簥', + 'l' => '簰', + 'm' => '繜', + 'n' => '繐', + 'o' => '繖', + 'p' => '繣', + 'q' => '繘', + 'r' => '繢', + 's' => '繟', + 't' => '繑', + 'u' => '繠', + 'v' => '繗', + 'w' => '繓', + 'x' => '羵', + 'y' => '羳', + 'z' => '翷', + '{' => '翸', + '|' => '聵', + '}' => '臑', + '~' => '臒', + '' => '臐', + '' => '艟', + '' => '艞', + '' => '薴', + '' => '藆', + '' => '藀', + '' => '藃', + '' => '藂', + '' => '薳', + '' => '薵', + '' => '薽', + '' => '藇', + '' => '藄', + '' => '薿', + '' => '藋', + '' => '藎', + '' => '藈', + '' => '藅', + '' => '薱', + '' => '薶', + '' => '藒', + '' => '蘤', + '' => '薸', + '' => '薷', + '' => '薾', + '' => '虩', + '' => '蟧', + '' => '蟦', + '' => '蟢', + '' => '蟛', + '' => '蟫', + '' => '蟪', + '' => '蟥', + '' => '蟟', + '' => '蟳', + '' => '蟤', + '' => '蟔', + '' => '蟜', + '' => '蟓', + '' => '蟭', + '' => '蟘', + '' => '蟣', + '' => '螤', + '' => '蟗', + '' => '蟙', + '' => '蠁', + '' => '蟴', + '' => '蟨', + '' => '蟝', + '' => '襓', + '' => '襋', + '' => '襏', + '' => '襌', + '' => '襆', + '' => '襐', + '' => '襑', + '' => '襉', + '' => '謪', + '' => '謧', + '' => '謣', + '' => '謳', + '' => '謰', + '' => '謵', + '' => '譇', + '' => '謯', + '' => '謼', + '' => '謾', + '' => '謱', + '' => '謥', + '' => '謷', + '' => '謦', + '' => '謶', + '' => '謮', + '' => '謤', + '' => '謻', + '' => '謽', + '' => '謺', + '' => '豂', + '' => '豵', + '' => '貙', + '' => '貘', + '' => '貗', + '' => '賾', + '' => '贄', + '' => '贂', + '' => '贀', + '' => '蹜', + '' => '蹢', + '' => '蹠', + '' => '蹗', + '' => '蹖', + '' => '蹞', + '' => '蹥', + '' => '蹧', + '@' => '蹛', + 'A' => '蹚', + 'B' => '蹡', + 'C' => '蹝', + 'D' => '蹩', + 'E' => '蹔', + 'F' => '轆', + 'G' => '轇', + 'H' => '轈', + 'I' => '轋', + 'J' => '鄨', + 'K' => '鄺', + 'L' => '鄻', + 'M' => '鄾', + 'N' => '醨', + 'O' => '醥', + 'P' => '醧', + 'Q' => '醯', + 'R' => '醪', + 'S' => '鎵', + 'T' => '鎌', + 'U' => '鎒', + 'V' => '鎷', + 'W' => '鎛', + 'X' => '鎝', + 'Y' => '鎉', + 'Z' => '鎧', + '[' => '鎎', + '\\' => '鎪', + ']' => '鎞', + '^' => '鎦', + '_' => '鎕', + '`' => '鎈', + 'a' => '鎙', + 'b' => '鎟', + 'c' => '鎍', + 'd' => '鎱', + 'e' => '鎑', + 'f' => '鎲', + 'g' => '鎤', + 'h' => '鎨', + 'i' => '鎴', + 'j' => '鎣', + 'k' => '鎥', + 'l' => '闒', + 'm' => '闓', + 'n' => '闑', + 'o' => '隳', + 'p' => '雗', + 'q' => '雚', + 'r' => '巂', + 's' => '雟', + 't' => '雘', + 'u' => '雝', + 'v' => '霣', + 'w' => '霢', + 'x' => '霥', + 'y' => '鞬', + 'z' => '鞮', + '{' => '鞨', + '|' => '鞫', + '}' => '鞤', + '~' => '鞪', + '' => '鞢', + '' => '鞥', + '' => '韗', + '' => '韙', + '' => '韖', + '' => '韘', + '' => '韺', + '' => '顐', + '' => '顑', + '' => '顒', + '' => '颸', + '' => '饁', + '' => '餼', + '' => '餺', + '' => '騏', + '' => '騋', + '' => '騉', + '' => '騍', + '' => '騄', + '' => '騑', + '' => '騊', + '' => '騅', + '' => '騇', + '' => '騆', + '' => '髀', + '' => '髜', + '' => '鬈', + '' => '鬄', + '' => '鬅', + '' => '鬩', + '' => '鬵', + '' => '魊', + '' => '魌', + '' => '魋', + '' => '鯇', + '' => '鯆', + '' => '鯃', + '' => '鮿', + '' => '鯁', + '' => '鮵', + '' => '鮸', + '' => '鯓', + '' => '鮶', + '' => '鯄', + '' => '鮹', + '' => '鮽', + '' => '鵜', + '' => '鵓', + '' => '鵏', + '' => '鵊', + '' => '鵛', + '' => '鵋', + '' => '鵙', + '' => '鵖', + '' => '鵌', + '' => '鵗', + '' => '鵒', + '' => '鵔', + '' => '鵟', + '' => '鵘', + '' => '鵚', + '' => '麎', + '' => '麌', + '' => '黟', + '' => '鼁', + '' => '鼀', + '' => '鼖', + '' => '鼥', + '' => '鼫', + '' => '鼪', + '' => '鼩', + '' => '鼨', + '' => '齌', + '' => '齕', + '' => '儴', + '' => '儵', + '' => '劖', + '' => '勷', + '' => '厴', + '' => '嚫', + '' => '嚭', + '' => '嚦', + '' => '嚧', + '' => '嚪', + '' => '嚬', + '' => '壚', + '' => '壝', + '' => '壛', + '' => '夒', + '' => '嬽', + '' => '嬾', + '' => '嬿', + '' => '巃', + '' => '幰', + '@' => '徿', + 'A' => '懻', + 'B' => '攇', + 'C' => '攐', + 'D' => '攍', + 'E' => '攉', + 'F' => '攌', + 'G' => '攎', + 'H' => '斄', + 'I' => '旞', + 'J' => '旝', + 'K' => '曞', + 'L' => '櫧', + 'M' => '櫠', + 'N' => '櫌', + 'O' => '櫑', + 'P' => '櫙', + 'Q' => '櫋', + 'R' => '櫟', + 'S' => '櫜', + 'T' => '櫐', + 'U' => '櫫', + 'V' => '櫏', + 'W' => '櫍', + 'X' => '櫞', + 'Y' => '歠', + 'Z' => '殰', + '[' => '氌', + '\\' => '瀙', + ']' => '瀧', + '^' => '瀠', + '_' => '瀖', + '`' => '瀫', + 'a' => '瀡', + 'b' => '瀢', + 'c' => '瀣', + 'd' => '瀩', + 'e' => '瀗', + 'f' => '瀤', + 'g' => '瀜', + 'h' => '瀪', + 'i' => '爌', + 'j' => '爊', + 'k' => '爇', + 'l' => '爂', + 'm' => '爅', + 'n' => '犥', + 'o' => '犦', + 'p' => '犤', + 'q' => '犣', + 'r' => '犡', + 's' => '瓋', + 't' => '瓅', + 'u' => '璷', + 'v' => '瓃', + 'w' => '甖', + 'x' => '癠', + 'y' => '矉', + 'z' => '矊', + '{' => '矄', + '|' => '矱', + '}' => '礝', + '~' => '礛', + '' => '礡', + '' => '礜', + '' => '礗', + '' => '礞', + '' => '禰', + '' => '穧', + '' => '穨', + '' => '簳', + '' => '簼', + '' => '簹', + '' => '簬', + '' => '簻', + '' => '糬', + '' => '糪', + '' => '繶', + '' => '繵', + '' => '繸', + '' => '繰', + '' => '繷', + '' => '繯', + '' => '繺', + '' => '繲', + '' => '繴', + '' => '繨', + '' => '罋', + '' => '罊', + '' => '羃', + '' => '羆', + '' => '羷', + '' => '翽', + '' => '翾', + '' => '聸', + '' => '臗', + '' => '臕', + '' => '艤', + '' => '艡', + '' => '艣', + '' => '藫', + '' => '藱', + '' => '藭', + '' => '藙', + '' => '藡', + '' => '藨', + '' => '藚', + '' => '藗', + '' => '藬', + '' => '藲', + '' => '藸', + '' => '藘', + '' => '藟', + '' => '藣', + '' => '藜', + '' => '藑', + '' => '藰', + '' => '藦', + '' => '藯', + '' => '藞', + '' => '藢', + '' => '蠀', + '' => '蟺', + '' => '蠃', + '' => '蟶', + '' => '蟷', + '' => '蠉', + '' => '蠌', + '' => '蠋', + '' => '蠆', + '' => '蟼', + '' => '蠈', + '' => '蟿', + '' => '蠊', + '' => '蠂', + '' => '襢', + '' => '襚', + '' => '襛', + '' => '襗', + '' => '襡', + '' => '襜', + '' => '襘', + '' => '襝', + '' => '襙', + '' => '覈', + '' => '覷', + '' => '覶', + '' => '觶', + '' => '譐', + '' => '譈', + '' => '譊', + '' => '譀', + '' => '譓', + '' => '譖', + '' => '譔', + '' => '譋', + '' => '譕', + '@' => '譑', + 'A' => '譂', + 'B' => '譒', + 'C' => '譗', + 'D' => '豃', + 'E' => '豷', + 'F' => '豶', + 'G' => '貚', + 'H' => '贆', + 'I' => '贇', + 'J' => '贉', + 'K' => '趬', + 'L' => '趪', + 'M' => '趭', + 'N' => '趫', + 'O' => '蹭', + 'P' => '蹸', + 'Q' => '蹳', + 'R' => '蹪', + 'S' => '蹯', + 'T' => '蹻', + 'U' => '軂', + 'V' => '轒', + 'W' => '轑', + 'X' => '轏', + 'Y' => '轐', + 'Z' => '轓', + '[' => '辴', + '\\' => '酀', + ']' => '鄿', + '^' => '醰', + '_' => '醭', + '`' => '鏞', + 'a' => '鏇', + 'b' => '鏏', + 'c' => '鏂', + 'd' => '鏚', + 'e' => '鏐', + 'f' => '鏹', + 'g' => '鏬', + 'h' => '鏌', + 'i' => '鏙', + 'j' => '鎩', + 'k' => '鏦', + 'l' => '鏊', + 'm' => '鏔', + 'n' => '鏮', + 'o' => '鏣', + 'p' => '鏕', + 'q' => '鏄', + 'r' => '鏎', + 's' => '鏀', + 't' => '鏒', + 'u' => '鏧', + 'v' => '镽', + 'w' => '闚', + 'x' => '闛', + 'y' => '雡', + 'z' => '霩', + '{' => '霫', + '|' => '霬', + '}' => '霨', + '~' => '霦', + '' => '鞳', + '' => '鞷', + '' => '鞶', + '' => '韝', + '' => '韞', + '' => '韟', + '' => '顜', + '' => '顙', + '' => '顝', + '' => '顗', + '' => '颿', + '' => '颽', + '' => '颻', + '' => '颾', + '' => '饈', + '' => '饇', + '' => '饃', + '' => '馦', + '' => '馧', + '' => '騚', + '' => '騕', + '' => '騥', + '' => '騝', + '' => '騤', + '' => '騛', + '' => '騢', + '' => '騠', + '' => '騧', + '' => '騣', + '' => '騞', + '' => '騜', + '' => '騔', + '' => '髂', + '' => '鬋', + '' => '鬊', + '' => '鬎', + '' => '鬌', + '' => '鬷', + '' => '鯪', + '' => '鯫', + '' => '鯠', + '' => '鯞', + '' => '鯤', + '' => '鯦', + '' => '鯢', + '' => '鯰', + '' => '鯔', + '' => '鯗', + '' => '鯬', + '' => '鯜', + '' => '鯙', + '' => '鯥', + '' => '鯕', + '' => '鯡', + '' => '鯚', + '' => '鵷', + '' => '鶁', + '' => '鶊', + '' => '鶄', + '' => '鶈', + '' => '鵱', + '' => '鶀', + '' => '鵸', + '' => '鶆', + '' => '鶋', + '' => '鶌', + '' => '鵽', + '' => '鵫', + '' => '鵴', + '' => '鵵', + '' => '鵰', + '' => '鵩', + '' => '鶅', + '' => '鵳', + '' => '鵻', + '' => '鶂', + '' => '鵯', + '' => '鵹', + '' => '鵿', + '' => '鶇', + '' => '鵨', + '' => '麔', + '' => '麑', + '' => '黀', + '' => '黼', + '' => '鼭', + '' => '齀', + '' => '齁', + '' => '齍', + '' => '齖', + '' => '齗', + '' => '齘', + '' => '匷', + '' => '嚲', + '@' => '嚵', + 'A' => '嚳', + 'B' => '壣', + 'C' => '孅', + 'D' => '巆', + 'E' => '巇', + 'F' => '廮', + 'G' => '廯', + 'H' => '忀', + 'I' => '忁', + 'J' => '懹', + 'K' => '攗', + 'L' => '攖', + 'M' => '攕', + 'N' => '攓', + 'O' => '旟', + 'P' => '曨', + 'Q' => '曣', + 'R' => '曤', + 'S' => '櫳', + 'T' => '櫰', + 'U' => '櫪', + 'V' => '櫨', + 'W' => '櫹', + 'X' => '櫱', + 'Y' => '櫮', + 'Z' => '櫯', + '[' => '瀼', + '\\' => '瀵', + ']' => '瀯', + '^' => '瀷', + '_' => '瀴', + '`' => '瀱', + 'a' => '灂', + 'b' => '瀸', + 'c' => '瀿', + 'd' => '瀺', + 'e' => '瀹', + 'f' => '灀', + 'g' => '瀻', + 'h' => '瀳', + 'i' => '灁', + 'j' => '爓', + 'k' => '爔', + 'l' => '犨', + 'm' => '獽', + 'n' => '獼', + 'o' => '璺', + 'p' => '皫', + 'q' => '皪', + 'r' => '皾', + 's' => '盭', + 't' => '矌', + 'u' => '矎', + 'v' => '矏', + 'w' => '矍', + 'x' => '矲', + 'y' => '礥', + 'z' => '礣', + '{' => '礧', + '|' => '礨', + '}' => '礤', + '~' => '礩', + '' => '禲', + '' => '穮', + '' => '穬', + '' => '穭', + '' => '竷', + '' => '籉', + '' => '籈', + '' => '籊', + '' => '籇', + '' => '籅', + '' => '糮', + '' => '繻', + '' => '繾', + '' => '纁', + '' => '纀', + '' => '羺', + '' => '翿', + '' => '聹', + '' => '臛', + '' => '臙', + '' => '舋', + '' => '艨', + '' => '艩', + '' => '蘢', + '' => '藿', + '' => '蘁', + '' => '藾', + '' => '蘛', + '' => '蘀', + '' => '藶', + '' => '蘄', + '' => '蘉', + '' => '蘅', + '' => '蘌', + '' => '藽', + '' => '蠙', + '' => '蠐', + '' => '蠑', + '' => '蠗', + '' => '蠓', + '' => '蠖', + '' => '襣', + '' => '襦', + '' => '覹', + '' => '觷', + '' => '譠', + '' => '譪', + '' => '譝', + '' => '譨', + '' => '譣', + '' => '譥', + '' => '譧', + '' => '譭', + '' => '趮', + '' => '躆', + '' => '躈', + '' => '躄', + '' => '轙', + '' => '轖', + '' => '轗', + '' => '轕', + '' => '轘', + '' => '轚', + '' => '邍', + '' => '酃', + '' => '酁', + '' => '醷', + '' => '醵', + '' => '醲', + '' => '醳', + '' => '鐋', + '' => '鐓', + '' => '鏻', + '' => '鐠', + '' => '鐏', + '' => '鐔', + '' => '鏾', + '' => '鐕', + '' => '鐐', + '' => '鐨', + '' => '鐙', + '' => '鐍', + '' => '鏵', + '' => '鐀', + '' => '鏷', + '' => '鐇', + '' => '鐎', + '' => '鐖', + '' => '鐒', + '' => '鏺', + '' => '鐉', + '' => '鏸', + '' => '鐊', + '' => '鏿', + '@' => '鏼', + 'A' => '鐌', + 'B' => '鏶', + 'C' => '鐑', + 'D' => '鐆', + 'E' => '闞', + 'F' => '闠', + 'G' => '闟', + 'H' => '霮', + 'I' => '霯', + 'J' => '鞹', + 'K' => '鞻', + 'L' => '韽', + 'M' => '韾', + 'N' => '顠', + 'O' => '顢', + 'P' => '顣', + 'Q' => '顟', + 'R' => '飁', + 'S' => '飂', + 'T' => '饐', + 'U' => '饎', + 'V' => '饙', + 'W' => '饌', + 'X' => '饋', + 'Y' => '饓', + 'Z' => '騲', + '[' => '騴', + '\\' => '騱', + ']' => '騬', + '^' => '騪', + '_' => '騶', + '`' => '騩', + 'a' => '騮', + 'b' => '騸', + 'c' => '騭', + 'd' => '髇', + 'e' => '髊', + 'f' => '髆', + 'g' => '鬐', + 'h' => '鬒', + 'i' => '鬑', + 'j' => '鰋', + 'k' => '鰈', + 'l' => '鯷', + 'm' => '鰅', + 'n' => '鰒', + 'o' => '鯸', + 'p' => '鱀', + 'q' => '鰇', + 'r' => '鰎', + 's' => '鰆', + 't' => '鰗', + 'u' => '鰔', + 'v' => '鰉', + 'w' => '鶟', + 'x' => '鶙', + 'y' => '鶤', + 'z' => '鶝', + '{' => '鶒', + '|' => '鶘', + '}' => '鶐', + '~' => '鶛', + '' => '鶠', + '' => '鶔', + '' => '鶜', + '' => '鶪', + '' => '鶗', + '' => '鶡', + '' => '鶚', + '' => '鶢', + '' => '鶨', + '' => '鶞', + '' => '鶣', + '' => '鶿', + '' => '鶩', + '' => '鶖', + '' => '鶦', + '' => '鶧', + '' => '麙', + '' => '麛', + '' => '麚', + '' => '黥', + '' => '黤', + '' => '黧', + '' => '黦', + '' => '鼰', + '' => '鼮', + '' => '齛', + '' => '齠', + '' => '齞', + '' => '齝', + '' => '齙', + '' => '龑', + '' => '儺', + '' => '儹', + '' => '劘', + '' => '劗', + '' => '囃', + '' => '嚽', + '' => '嚾', + '' => '孈', + '' => '孇', + '' => '巋', + '' => '巏', + '' => '廱', + '' => '懽', + '' => '攛', + '' => '欂', + '' => '櫼', + '' => '欃', + '' => '櫸', + '' => '欀', + '' => '灃', + '' => '灄', + '' => '灊', + '' => '灈', + '' => '灉', + '' => '灅', + '' => '灆', + '' => '爝', + '' => '爚', + '' => '爙', + '' => '獾', + '' => '甗', + '' => '癪', + '' => '矐', + '' => '礭', + '' => '礱', + '' => '礯', + '' => '籔', + '' => '籓', + '' => '糲', + '' => '纊', + '' => '纇', + '' => '纈', + '' => '纋', + '' => '纆', + '' => '纍', + '' => '罍', + '' => '羻', + '' => '耰', + '' => '臝', + '' => '蘘', + '' => '蘪', + '' => '蘦', + '' => '蘟', + '' => '蘣', + '' => '蘜', + '' => '蘙', + '' => '蘧', + '' => '蘮', + '' => '蘡', + '' => '蘠', + '' => '蘩', + '' => '蘞', + '' => '蘥', + '@' => '蠩', + 'A' => '蠝', + 'B' => '蠛', + 'C' => '蠠', + 'D' => '蠤', + 'E' => '蠜', + 'F' => '蠫', + 'G' => '衊', + 'H' => '襭', + 'I' => '襩', + 'J' => '襮', + 'K' => '襫', + 'L' => '觺', + 'M' => '譹', + 'N' => '譸', + 'O' => '譅', + 'P' => '譺', + 'Q' => '譻', + 'R' => '贐', + 'S' => '贔', + 'T' => '趯', + 'U' => '躎', + 'V' => '躌', + 'W' => '轞', + 'X' => '轛', + 'Y' => '轝', + 'Z' => '酆', + '[' => '酄', + '\\' => '酅', + ']' => '醹', + '^' => '鐿', + '_' => '鐻', + '`' => '鐶', + 'a' => '鐩', + 'b' => '鐽', + 'c' => '鐼', + 'd' => '鐰', + 'e' => '鐹', + 'f' => '鐪', + 'g' => '鐷', + 'h' => '鐬', + 'i' => '鑀', + 'j' => '鐱', + 'k' => '闥', + 'l' => '闤', + 'm' => '闣', + 'n' => '霵', + 'o' => '霺', + 'p' => '鞿', + 'q' => '韡', + 'r' => '顤', + 's' => '飉', + 't' => '飆', + 'u' => '飀', + 'v' => '饘', + 'w' => '饖', + 'x' => '騹', + 'y' => '騽', + 'z' => '驆', + '{' => '驄', + '|' => '驂', + '}' => '驁', + '~' => '騺', + '' => '騿', + '' => '髍', + '' => '鬕', + '' => '鬗', + '' => '鬘', + '' => '鬖', + '' => '鬺', + '' => '魒', + '' => '鰫', + '' => '鰝', + '' => '鰜', + '' => '鰬', + '' => '鰣', + '' => '鰨', + '' => '鰩', + '' => '鰤', + '' => '鰡', + '' => '鶷', + '' => '鶶', + '' => '鶼', + '' => '鷁', + '' => '鷇', + '' => '鷊', + '' => '鷏', + '' => '鶾', + '' => '鷅', + '' => '鷃', + '' => '鶻', + '' => '鶵', + '' => '鷎', + '' => '鶹', + '' => '鶺', + '' => '鶬', + '' => '鷈', + '' => '鶱', + '' => '鶭', + '' => '鷌', + '' => '鶳', + '' => '鷍', + '' => '鶲', + '' => '鹺', + '' => '麜', + '' => '黫', + '' => '黮', + '' => '黭', + '' => '鼛', + '' => '鼘', + '' => '鼚', + '' => '鼱', + '' => '齎', + '' => '齥', + '' => '齤', + '' => '龒', + '' => '亹', + '' => '囆', + '' => '囅', + '' => '囋', + '' => '奱', + '' => '孋', + '' => '孌', + '' => '巕', + '' => '巑', + '' => '廲', + '' => '攡', + '' => '攠', + '' => '攦', + '' => '攢', + '' => '欋', + '' => '欈', + '' => '欉', + '' => '氍', + '' => '灕', + '' => '灖', + '' => '灗', + '' => '灒', + '' => '爞', + '' => '爟', + '' => '犩', + '' => '獿', + '' => '瓘', + '' => '瓕', + '' => '瓙', + '' => '瓗', + '' => '癭', + '' => '皭', + '' => '礵', + '' => '禴', + '' => '穰', + '' => '穱', + '' => '籗', + '' => '籜', + '' => '籙', + '' => '籛', + '' => '籚', + '@' => '糴', + 'A' => '糱', + 'B' => '纑', + 'C' => '罏', + 'D' => '羇', + 'E' => '臞', + 'F' => '艫', + 'G' => '蘴', + 'H' => '蘵', + 'I' => '蘳', + 'J' => '蘬', + 'K' => '蘲', + 'L' => '蘶', + 'M' => '蠬', + 'N' => '蠨', + 'O' => '蠦', + 'P' => '蠪', + 'Q' => '蠥', + 'R' => '襱', + 'S' => '覿', + 'T' => '覾', + 'U' => '觻', + 'V' => '譾', + 'W' => '讄', + 'X' => '讂', + 'Y' => '讆', + 'Z' => '讅', + '[' => '譿', + '\\' => '贕', + ']' => '躕', + '^' => '躔', + '_' => '躚', + '`' => '躒', + 'a' => '躐', + 'b' => '躖', + 'c' => '躗', + 'd' => '轠', + 'e' => '轢', + 'f' => '酇', + 'g' => '鑌', + 'h' => '鑐', + 'i' => '鑊', + 'j' => '鑋', + 'k' => '鑏', + 'l' => '鑇', + 'm' => '鑅', + 'n' => '鑈', + 'o' => '鑉', + 'p' => '鑆', + 'q' => '霿', + 'r' => '韣', + 's' => '顪', + 't' => '顩', + 'u' => '飋', + 'v' => '饔', + 'w' => '饛', + 'x' => '驎', + 'y' => '驓', + 'z' => '驔', + '{' => '驌', + '|' => '驏', + '}' => '驈', + '~' => '驊', + '' => '驉', + '' => '驒', + '' => '驐', + '' => '髐', + '' => '鬙', + '' => '鬫', + '' => '鬻', + '' => '魖', + '' => '魕', + '' => '鱆', + '' => '鱈', + '' => '鰿', + '' => '鱄', + '' => '鰹', + '' => '鰳', + '' => '鱁', + '' => '鰼', + '' => '鰷', + '' => '鰴', + '' => '鰲', + '' => '鰽', + '' => '鰶', + '' => '鷛', + '' => '鷒', + '' => '鷞', + '' => '鷚', + '' => '鷋', + '' => '鷐', + '' => '鷜', + '' => '鷑', + '' => '鷟', + '' => '鷩', + '' => '鷙', + '' => '鷘', + '' => '鷖', + '' => '鷵', + '' => '鷕', + '' => '鷝', + '' => '麶', + '' => '黰', + '' => '鼵', + '' => '鼳', + '' => '鼲', + '' => '齂', + '' => '齫', + '' => '龕', + '' => '龢', + '' => '儽', + '' => '劙', + '' => '壨', + '' => '壧', + '' => '奲', + '' => '孍', + '' => '巘', + '' => '蠯', + '' => '彏', + '' => '戁', + '' => '戃', + '' => '戄', + '' => '攩', + '' => '攥', + '' => '斖', + '' => '曫', + '' => '欑', + '' => '欒', + '' => '欏', + '' => '毊', + '' => '灛', + '' => '灚', + '' => '爢', + '' => '玂', + '' => '玁', + '' => '玃', + '' => '癰', + '' => '矔', + '' => '籧', + '' => '籦', + '' => '纕', + '' => '艬', + '' => '蘺', + '' => '虀', + '' => '蘹', + '' => '蘼', + '' => '蘱', + '' => '蘻', + '' => '蘾', + '' => '蠰', + '' => '蠲', + '' => '蠮', + '' => '蠳', + '' => '襶', + '' => '襴', + '' => '襳', + '' => '觾', + '@' => '讌', + 'A' => '讎', + 'B' => '讋', + 'C' => '讈', + 'D' => '豅', + 'E' => '贙', + 'F' => '躘', + 'G' => '轤', + 'H' => '轣', + 'I' => '醼', + 'J' => '鑢', + 'K' => '鑕', + 'L' => '鑝', + 'M' => '鑗', + 'N' => '鑞', + 'O' => '韄', + 'P' => '韅', + 'Q' => '頀', + 'R' => '驖', + 'S' => '驙', + 'T' => '鬞', + 'U' => '鬟', + 'V' => '鬠', + 'W' => '鱒', + 'X' => '鱘', + 'Y' => '鱐', + 'Z' => '鱊', + '[' => '鱍', + '\\' => '鱋', + ']' => '鱕', + '^' => '鱙', + '_' => '鱌', + '`' => '鱎', + 'a' => '鷻', + 'b' => '鷷', + 'c' => '鷯', + 'd' => '鷣', + 'e' => '鷫', + 'f' => '鷸', + 'g' => '鷤', + 'h' => '鷶', + 'i' => '鷡', + 'j' => '鷮', + 'k' => '鷦', + 'l' => '鷲', + 'm' => '鷰', + 'n' => '鷢', + 'o' => '鷬', + 'p' => '鷴', + 'q' => '鷳', + 'r' => '鷨', + 's' => '鷭', + 't' => '黂', + 'u' => '黐', + 'v' => '黲', + 'w' => '黳', + 'x' => '鼆', + 'y' => '鼜', + 'z' => '鼸', + '{' => '鼷', + '|' => '鼶', + '}' => '齃', + '~' => '齏', + '' => '齱', + '' => '齰', + '' => '齮', + '' => '齯', + '' => '囓', + '' => '囍', + '' => '孎', + '' => '屭', + '' => '攭', + '' => '曭', + '' => '曮', + '' => '欓', + '' => '灟', + '' => '灡', + '' => '灝', + '' => '灠', + '' => '爣', + '' => '瓛', + '' => '瓥', + '' => '矕', + '' => '礸', + '' => '禷', + '' => '禶', + '' => '籪', + '' => '纗', + '' => '羉', + '' => '艭', + '' => '虃', + '' => '蠸', + '' => '蠷', + '' => '蠵', + '' => '衋', + '' => '讔', + '' => '讕', + '' => '躞', + '' => '躟', + '' => '躠', + '' => '躝', + '' => '醾', + '' => '醽', + '' => '釂', + '' => '鑫', + '' => '鑨', + '' => '鑩', + '' => '雥', + '' => '靆', + '' => '靃', + '' => '靇', + '' => '韇', + '' => '韥', + '' => '驞', + '' => '髕', + '' => '魙', + '' => '鱣', + '' => '鱧', + '' => '鱦', + '' => '鱢', + '' => '鱞', + '' => '鱠', + '' => '鸂', + '' => '鷾', + '' => '鸇', + '' => '鸃', + '' => '鸆', + '' => '鸅', + '' => '鸀', + '' => '鸁', + '' => '鸉', + '' => '鷿', + '' => '鷽', + '' => '鸄', + '' => '麠', + '' => '鼞', + '' => '齆', + '' => '齴', + '' => '齵', + '' => '齶', + '' => '囔', + '' => '攮', + '' => '斸', + '' => '欘', + '' => '欙', + '' => '欗', + '' => '欚', + '' => '灢', + '' => '爦', + '' => '犪', + '' => '矘', + '' => '矙', + '' => '礹', + '' => '籩', + '' => '籫', + '' => '糶', + '' => '纚', + '@' => '纘', + 'A' => '纛', + 'B' => '纙', + 'C' => '臠', + 'D' => '臡', + 'E' => '虆', + 'F' => '虇', + 'G' => '虈', + 'H' => '襹', + 'I' => '襺', + 'J' => '襼', + 'K' => '襻', + 'L' => '觿', + 'M' => '讘', + 'N' => '讙', + 'O' => '躥', + 'P' => '躤', + 'Q' => '躣', + 'R' => '鑮', + 'S' => '鑭', + 'T' => '鑯', + 'U' => '鑱', + 'V' => '鑳', + 'W' => '靉', + 'X' => '顲', + 'Y' => '饟', + 'Z' => '鱨', + '[' => '鱮', + '\\' => '鱭', + ']' => '鸋', + '^' => '鸍', + '_' => '鸐', + '`' => '鸏', + 'a' => '鸒', + 'b' => '鸑', + 'c' => '麡', + 'd' => '黵', + 'e' => '鼉', + 'f' => '齇', + 'g' => '齸', + 'h' => '齻', + 'i' => '齺', + 'j' => '齹', + 'k' => '圞', + 'l' => '灦', + 'm' => '籯', + 'n' => '蠼', + 'o' => '趲', + 'p' => '躦', + 'q' => '釃', + 'r' => '鑴', + 's' => '鑸', + 't' => '鑶', + 'u' => '鑵', + 'v' => '驠', + 'w' => '鱴', + 'x' => '鱳', + 'y' => '鱱', + 'z' => '鱵', + '{' => '鸔', + '|' => '鸓', + '}' => '黶', + '~' => '鼊', + '' => '龤', + '' => '灨', + '' => '灥', + '' => '糷', + '' => '虪', + '' => '蠾', + '' => '蠽', + '' => '蠿', + '' => '讞', + '' => '貜', + '' => '躩', + '' => '軉', + '' => '靋', + '' => '顳', + '' => '顴', + '' => '飌', + '' => '饡', + '' => '馫', + '' => '驤', + '' => '驦', + '' => '驧', + '' => '鬤', + '' => '鸕', + '' => '鸗', + '' => '齈', + '' => '戇', + '' => '欞', + '' => '爧', + '' => '虌', + '' => '躨', + '' => '钂', + '' => '钀', + '' => '钁', + '' => '驩', + '' => '驨', + '' => '鬮', + '' => '鸙', + '' => '爩', + '' => '虋', + '' => '讟', + '' => '钃', + '' => '鱹', + '' => '麷', + '' => '癵', + '' => '驫', + '' => '鱺', + '' => '鸝', + '' => '灩', + '' => '灪', + '' => '麤', + '' => '齾', + '' => '齉', + '' => '龘', +); + +$result =& $data; +unset($data); + +return $result; diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php new file mode 100644 index 000000000..a014e4b45 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp037.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php new file mode 100644 index 000000000..2b5e7beb9 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1006.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php new file mode 100644 index 000000000..aba455b5e Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp1026.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php new file mode 100644 index 000000000..e8e237030 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp424.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php new file mode 100644 index 000000000..e3ebb45c9 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp437.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php new file mode 100644 index 000000000..3771c8f62 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp500.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php new file mode 100644 index 000000000..2d67d33f9 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp737.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php new file mode 100644 index 000000000..1fbc4cdc6 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp775.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php new file mode 100644 index 000000000..0b314c80b Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp850.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php new file mode 100644 index 000000000..f8c318cad Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp852.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php new file mode 100644 index 000000000..48440ba1a Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp855.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php new file mode 100644 index 000000000..c9cac0c35 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp856.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php new file mode 100644 index 000000000..3e7770ad5 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp857.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php new file mode 100644 index 000000000..2a52d4736 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp860.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php new file mode 100644 index 000000000..4ba6573c3 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp861.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php new file mode 100644 index 000000000..d2a29a228 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp862.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php new file mode 100644 index 000000000..1f36b9a24 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp863.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php new file mode 100644 index 000000000..953e46350 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp864.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php new file mode 100644 index 000000000..2668bcc4e Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp865.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php new file mode 100644 index 000000000..a7b47f8f3 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp866.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php new file mode 100644 index 000000000..0f040548b Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp869.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php new file mode 100644 index 000000000..479945691 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp874.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php new file mode 100644 index 000000000..856164536 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp875.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php new file mode 100644 index 000000000..0bf828ffd Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp932.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php new file mode 100644 index 000000000..a593d05de Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp936.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php new file mode 100644 index 000000000..d4e99f1f4 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp949.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php new file mode 100644 index 000000000..267b19066 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.cp950.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php new file mode 100644 index 000000000..d7a217c93 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-1.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php new file mode 100644 index 000000000..d60f6473a Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-10.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php new file mode 100644 index 000000000..d69220bff Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-11.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php new file mode 100644 index 000000000..838783f1b Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-13.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php new file mode 100644 index 000000000..65a48ee39 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-14.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php new file mode 100644 index 000000000..42e50e0fd Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-15.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php new file mode 100644 index 000000000..46758a6a7 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-16.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php new file mode 100644 index 000000000..5f23f515c Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-2.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php new file mode 100644 index 000000000..b31bb83f4 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-3.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php new file mode 100644 index 000000000..9cbf9f37a Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-4.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php new file mode 100644 index 000000000..fd0388230 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-5.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php new file mode 100644 index 000000000..ed6f72f36 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-6.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php new file mode 100644 index 000000000..cf723ac68 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-7.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php new file mode 100644 index 000000000..c978731a4 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-8.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php new file mode 100644 index 000000000..2a3e36a48 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.iso-8859-9.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php new file mode 100644 index 000000000..d83c2125b Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-r.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php new file mode 100644 index 000000000..dbbf96be1 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.koi8-u.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php new file mode 100644 index 000000000..94a93b280 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.us-ascii.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php new file mode 100644 index 000000000..d1d5e6f25 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1250.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php new file mode 100644 index 000000000..f422a71fc Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1251.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php new file mode 100644 index 000000000..ba6d203dc Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1252.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php new file mode 100644 index 000000000..c04dc8f0e Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1253.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php new file mode 100644 index 000000000..1cfadcf2b Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1254.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php new file mode 100644 index 000000000..f73cbb6ff Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1255.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php new file mode 100644 index 000000000..953704f6e Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1256.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php new file mode 100644 index 000000000..78580ece0 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1257.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php new file mode 100644 index 000000000..de1609d85 Binary files /dev/null and b/vendor/symfony/polyfill-iconv/Resources/charset/from.windows-1258.php differ diff --git a/vendor/symfony/polyfill-iconv/Resources/charset/translit.php b/vendor/symfony/polyfill-iconv/Resources/charset/translit.php new file mode 100644 index 000000000..829ea1275 --- /dev/null +++ b/vendor/symfony/polyfill-iconv/Resources/charset/translit.php @@ -0,0 +1,3969 @@ + 'μ', + '¼' => ' 1⁄4 ', + '½' => ' 1⁄2 ', + '¾' => ' 3⁄4 ', + 'IJ' => 'IJ', + 'ij' => 'ij', + 'Ŀ' => 'L·', + 'ŀ' => 'l·', + 'ʼn' => 'ʼn', + 'ſ' => 's', + 'DŽ' => 'DŽ', + 'Dž' => 'Dž', + 'dž' => 'dž', + 'LJ' => 'LJ', + 'Lj' => 'Lj', + 'lj' => 'lj', + 'NJ' => 'NJ', + 'Nj' => 'Nj', + 'nj' => 'nj', + 'DZ' => 'DZ', + 'Dz' => 'Dz', + 'dz' => 'dz', + 'ϐ' => 'β', + 'ϑ' => 'θ', + 'ϒ' => 'Υ', + 'ϕ' => 'φ', + 'ϖ' => 'π', + 'ϰ' => 'κ', + 'ϱ' => 'ρ', + 'ϲ' => 'ς', + 'ϴ' => 'Θ', + 'ϵ' => 'ε', + 'Ϲ' => 'Σ', + 'և' => 'եւ', + 'ٵ' => 'اٴ', + 'ٶ' => 'وٴ', + 'ٷ' => 'ۇٴ', + 'ٸ' => 'يٴ', + 'ำ' => 'ํา', + 'ຳ' => 'ໍາ', + 'ໜ' => 'ຫນ', + 'ໝ' => 'ຫມ', + 'ཷ' => 'ྲཱྀ', + 'ཹ' => 'ླཱྀ', + 'ẚ' => 'aʾ', + '․' => '.', + '‥' => '..', + '…' => '...', + '″' => '′′', + '‴' => '′′′', + '‶' => '‵‵', + '‷' => '‵‵‵', + '‼' => '!!', + '⁇' => '??', + '⁈' => '?!', + '⁉' => '!?', + '⁗' => '′′′′', + '₨' => 'Rs', + '℀' => 'a/c', + '℁' => 'a/s', + 'ℂ' => 'C', + '℃' => '°C', + '℅' => 'c/o', + '℆' => 'c/u', + 'ℇ' => 'Ɛ', + '℉' => '°F', + 'ℊ' => 'g', + 'ℋ' => 'H', + 'ℌ' => 'H', + 'ℍ' => 'H', + 'ℎ' => 'h', + 'ℏ' => 'ħ', + 'ℐ' => 'I', + 'ℑ' => 'I', + 'ℒ' => 'L', + 'ℓ' => 'l', + 'ℕ' => 'N', + '№' => 'No', + 'ℙ' => 'P', + 'ℚ' => 'Q', + 'ℛ' => 'R', + 'ℜ' => 'R', + 'ℝ' => 'R', + '℡' => 'TEL', + 'ℤ' => 'Z', + 'ℨ' => 'Z', + 'ℬ' => 'B', + 'ℭ' => 'C', + 'ℯ' => 'e', + 'ℰ' => 'E', + 'ℱ' => 'F', + 'ℳ' => 'M', + 'ℴ' => 'o', + 'ℵ' => 'א', + 'ℶ' => 'ב', + 'ℷ' => 'ג', + 'ℸ' => 'ד', + 'ℹ' => 'i', + '℻' => 'FAX', + 'ℼ' => 'π', + 'ℽ' => 'γ', + 'ℾ' => 'Γ', + 'ℿ' => 'Π', + '⅀' => '∑', + 'ⅅ' => 'D', + 'ⅆ' => 'd', + 'ⅇ' => 'e', + 'ⅈ' => 'i', + 'ⅉ' => 'j', + '⅐' => ' 1⁄7 ', + '⅑' => ' 1⁄9 ', + '⅒' => ' 1⁄10 ', + '⅓' => ' 1⁄3 ', + '⅔' => ' 2⁄3 ', + '⅕' => ' 1⁄5 ', + '⅖' => ' 2⁄5 ', + '⅗' => ' 3⁄5 ', + '⅘' => ' 4⁄5 ', + '⅙' => ' 1⁄6 ', + '⅚' => ' 5⁄6 ', + '⅛' => ' 1⁄8 ', + '⅜' => ' 3⁄8 ', + '⅝' => ' 5⁄8 ', + '⅞' => ' 7⁄8 ', + '⅟' => ' 1⁄ ', + 'Ⅰ' => 'I', + 'Ⅱ' => 'II', + 'Ⅲ' => 'III', + 'Ⅳ' => 'IV', + 'Ⅴ' => 'V', + 'Ⅵ' => 'VI', + 'Ⅶ' => 'VII', + 'Ⅷ' => 'VIII', + 'Ⅸ' => 'IX', + 'Ⅹ' => 'X', + 'Ⅺ' => 'XI', + 'Ⅻ' => 'XII', + 'Ⅼ' => 'L', + 'Ⅽ' => 'C', + 'Ⅾ' => 'D', + 'Ⅿ' => 'M', + 'ⅰ' => 'i', + 'ⅱ' => 'ii', + 'ⅲ' => 'iii', + 'ⅳ' => 'iv', + 'ⅴ' => 'v', + 'ⅵ' => 'vi', + 'ⅶ' => 'vii', + 'ⅷ' => 'viii', + 'ⅸ' => 'ix', + 'ⅹ' => 'x', + 'ⅺ' => 'xi', + 'ⅻ' => 'xii', + 'ⅼ' => 'l', + 'ⅽ' => 'c', + 'ⅾ' => 'd', + 'ⅿ' => 'm', + '↉' => ' 0⁄3 ', + '∬' => '∫∫', + '∭' => '∫∫∫', + '∯' => '∮∮', + '∰' => '∮∮∮', + '①' => '(1)', + '②' => '(2)', + '③' => '(3)', + '④' => '(4)', + '⑤' => '(5)', + '⑥' => '(6)', + '⑦' => '(7)', + '⑧' => '(8)', + '⑨' => '(9)', + '⑩' => '(10)', + '⑪' => '(11)', + '⑫' => '(12)', + '⑬' => '(13)', + '⑭' => '(14)', + '⑮' => '(15)', + '⑯' => '(16)', + '⑰' => '(17)', + '⑱' => '(18)', + '⑲' => '(19)', + '⑳' => '(20)', + '⑴' => '(1)', + '⑵' => '(2)', + '⑶' => '(3)', + '⑷' => '(4)', + '⑸' => '(5)', + '⑹' => '(6)', + '⑺' => '(7)', + '⑻' => '(8)', + '⑼' => '(9)', + '⑽' => '(10)', + '⑾' => '(11)', + '⑿' => '(12)', + '⒀' => '(13)', + '⒁' => '(14)', + '⒂' => '(15)', + '⒃' => '(16)', + '⒄' => '(17)', + '⒅' => '(18)', + '⒆' => '(19)', + '⒇' => '(20)', + '⒈' => '1.', + '⒉' => '2.', + '⒊' => '3.', + '⒋' => '4.', + '⒌' => '5.', + '⒍' => '6.', + '⒎' => '7.', + '⒏' => '8.', + '⒐' => '9.', + '⒑' => '10.', + '⒒' => '11.', + '⒓' => '12.', + '⒔' => '13.', + '⒕' => '14.', + '⒖' => '15.', + '⒗' => '16.', + '⒘' => '17.', + '⒙' => '18.', + '⒚' => '19.', + '⒛' => '20.', + '⒜' => '(a)', + '⒝' => '(b)', + '⒞' => '(c)', + '⒟' => '(d)', + '⒠' => '(e)', + '⒡' => '(f)', + '⒢' => '(g)', + '⒣' => '(h)', + '⒤' => '(i)', + '⒥' => '(j)', + '⒦' => '(k)', + '⒧' => '(l)', + '⒨' => '(m)', + '⒩' => '(n)', + '⒪' => '(o)', + '⒫' => '(p)', + '⒬' => '(q)', + '⒭' => '(r)', + '⒮' => '(s)', + '⒯' => '(t)', + '⒰' => '(u)', + '⒱' => '(v)', + '⒲' => '(w)', + '⒳' => '(x)', + '⒴' => '(y)', + '⒵' => '(z)', + 'Ⓐ' => '(A)', + 'Ⓑ' => '(B)', + 'Ⓒ' => '(C)', + 'Ⓓ' => '(D)', + 'Ⓔ' => '(E)', + 'Ⓕ' => '(F)', + 'Ⓖ' => '(G)', + 'Ⓗ' => '(H)', + 'Ⓘ' => '(I)', + 'Ⓙ' => '(J)', + 'Ⓚ' => '(K)', + 'Ⓛ' => '(L)', + 'Ⓜ' => '(M)', + 'Ⓝ' => '(N)', + 'Ⓞ' => '(O)', + 'Ⓟ' => '(P)', + 'Ⓠ' => '(Q)', + 'Ⓡ' => '(R)', + 'Ⓢ' => '(S)', + 'Ⓣ' => '(T)', + 'Ⓤ' => '(U)', + 'Ⓥ' => '(V)', + 'Ⓦ' => '(W)', + 'Ⓧ' => '(X)', + 'Ⓨ' => '(Y)', + 'Ⓩ' => '(Z)', + 'ⓐ' => '(a)', + 'ⓑ' => '(b)', + 'ⓒ' => '(c)', + 'ⓓ' => '(d)', + 'ⓔ' => '(e)', + 'ⓕ' => '(f)', + 'ⓖ' => '(g)', + 'ⓗ' => '(h)', + 'ⓘ' => '(i)', + 'ⓙ' => '(j)', + 'ⓚ' => '(k)', + 'ⓛ' => '(l)', + 'ⓜ' => '(m)', + 'ⓝ' => '(n)', + 'ⓞ' => '(o)', + 'ⓟ' => '(p)', + 'ⓠ' => '(q)', + 'ⓡ' => '(r)', + 'ⓢ' => '(s)', + 'ⓣ' => '(t)', + 'ⓤ' => '(u)', + 'ⓥ' => '(v)', + 'ⓦ' => '(w)', + 'ⓧ' => '(x)', + 'ⓨ' => '(y)', + 'ⓩ' => '(z)', + '⓪' => '(0)', + '⨌' => '∫∫∫∫', + '⩴' => '::=', + '⩵' => '==', + '⩶' => '===', + '⺟' => '母', + '⻳' => '龟', + '⼀' => '一', + '⼁' => '丨', + '⼂' => '丶', + '⼃' => '丿', + '⼄' => '乙', + '⼅' => '亅', + '⼆' => '二', + '⼇' => '亠', + '⼈' => '人', + '⼉' => '儿', + '⼊' => '入', + '⼋' => '八', + '⼌' => '冂', + '⼍' => '冖', + '⼎' => '冫', + '⼏' => '几', + '⼐' => '凵', + '⼑' => '刀', + '⼒' => '力', + '⼓' => '勹', + '⼔' => '匕', + '⼕' => '匚', + '⼖' => '匸', + '⼗' => '十', + '⼘' => '卜', + '⼙' => '卩', + '⼚' => '厂', + '⼛' => '厶', + '⼜' => '又', + '⼝' => '口', + '⼞' => '囗', + '⼟' => '土', + '⼠' => '士', + '⼡' => '夂', + '⼢' => '夊', + '⼣' => '夕', + '⼤' => '大', + '⼥' => '女', + '⼦' => '子', + '⼧' => '宀', + '⼨' => '寸', + '⼩' => '小', + '⼪' => '尢', + '⼫' => '尸', + '⼬' => '屮', + '⼭' => '山', + '⼮' => '巛', + '⼯' => '工', + '⼰' => '己', + '⼱' => '巾', + '⼲' => '干', + '⼳' => '幺', + '⼴' => '广', + '⼵' => '廴', + '⼶' => '廾', + '⼷' => '弋', + '⼸' => '弓', + '⼹' => '彐', + '⼺' => '彡', + '⼻' => '彳', + '⼼' => '心', + '⼽' => '戈', + '⼾' => '戶', + '⼿' => '手', + '⽀' => '支', + '⽁' => '攴', + '⽂' => '文', + '⽃' => '斗', + '⽄' => '斤', + '⽅' => '方', + '⽆' => '无', + '⽇' => '日', + '⽈' => '曰', + '⽉' => '月', + '⽊' => '木', + '⽋' => '欠', + '⽌' => '止', + '⽍' => '歹', + '⽎' => '殳', + '⽏' => '毋', + '⽐' => '比', + '⽑' => '毛', + '⽒' => '氏', + '⽓' => '气', + '⽔' => '水', + '⽕' => '火', + '⽖' => '爪', + '⽗' => '父', + '⽘' => '爻', + '⽙' => '爿', + '⽚' => '片', + '⽛' => '牙', + '⽜' => '牛', + '⽝' => '犬', + '⽞' => '玄', + '⽟' => '玉', + '⽠' => '瓜', + '⽡' => '瓦', + '⽢' => '甘', + '⽣' => '生', + '⽤' => '用', + '⽥' => '田', + '⽦' => '疋', + '⽧' => '疒', + '⽨' => '癶', + '⽩' => '白', + '⽪' => '皮', + '⽫' => '皿', + '⽬' => '目', + '⽭' => '矛', + '⽮' => '矢', + '⽯' => '石', + '⽰' => '示', + '⽱' => '禸', + '⽲' => '禾', + '⽳' => '穴', + '⽴' => '立', + '⽵' => '竹', + '⽶' => '米', + '⽷' => '糸', + '⽸' => '缶', + '⽹' => '网', + '⽺' => '羊', + '⽻' => '羽', + '⽼' => '老', + '⽽' => '而', + '⽾' => '耒', + '⽿' => '耳', + '⾀' => '聿', + '⾁' => '肉', + '⾂' => '臣', + '⾃' => '自', + '⾄' => '至', + '⾅' => '臼', + '⾆' => '舌', + '⾇' => '舛', + '⾈' => '舟', + '⾉' => '艮', + '⾊' => '色', + '⾋' => '艸', + '⾌' => '虍', + '⾍' => '虫', + '⾎' => '血', + '⾏' => '行', + '⾐' => '衣', + '⾑' => '襾', + '⾒' => '見', + '⾓' => '角', + '⾔' => '言', + '⾕' => '谷', + '⾖' => '豆', + '⾗' => '豕', + '⾘' => '豸', + '⾙' => '貝', + '⾚' => '赤', + '⾛' => '走', + '⾜' => '足', + '⾝' => '身', + '⾞' => '車', + '⾟' => '辛', + '⾠' => '辰', + '⾡' => '辵', + '⾢' => '邑', + '⾣' => '酉', + '⾤' => '釆', + '⾥' => '里', + '⾦' => '金', + '⾧' => '長', + '⾨' => '門', + '⾩' => '阜', + '⾪' => '隶', + '⾫' => '隹', + '⾬' => '雨', + '⾭' => '靑', + '⾮' => '非', + '⾯' => '面', + '⾰' => '革', + '⾱' => '韋', + '⾲' => '韭', + '⾳' => '音', + '⾴' => '頁', + '⾵' => '風', + '⾶' => '飛', + '⾷' => '食', + '⾸' => '首', + '⾹' => '香', + '⾺' => '馬', + '⾻' => '骨', + '⾼' => '高', + '⾽' => '髟', + '⾾' => '鬥', + '⾿' => '鬯', + '⿀' => '鬲', + '⿁' => '鬼', + '⿂' => '魚', + '⿃' => '鳥', + '⿄' => '鹵', + '⿅' => '鹿', + '⿆' => '麥', + '⿇' => '麻', + '⿈' => '黃', + '⿉' => '黍', + '⿊' => '黑', + '⿋' => '黹', + '⿌' => '黽', + '⿍' => '鼎', + '⿎' => '鼓', + '⿏' => '鼠', + '⿐' => '鼻', + '⿑' => '齊', + '⿒' => '齒', + '⿓' => '龍', + '⿔' => '龜', + '⿕' => '龠', + ' ' => ' ', + '〶' => '〒', + '〸' => '十', + '〹' => '卄', + '〺' => '卅', + 'ㄱ' => 'ᄀ', + 'ㄲ' => 'ᄁ', + 'ㄳ' => 'ᆪ', + 'ㄴ' => 'ᄂ', + 'ㄵ' => 'ᆬ', + 'ㄶ' => 'ᆭ', + 'ㄷ' => 'ᄃ', + 'ㄸ' => 'ᄄ', + 'ㄹ' => 'ᄅ', + 'ㄺ' => 'ᆰ', + 'ㄻ' => 'ᆱ', + 'ㄼ' => 'ᆲ', + 'ㄽ' => 'ᆳ', + 'ㄾ' => 'ᆴ', + 'ㄿ' => 'ᆵ', + 'ㅀ' => 'ᄚ', + 'ㅁ' => 'ᄆ', + 'ㅂ' => 'ᄇ', + 'ㅃ' => 'ᄈ', + 'ㅄ' => 'ᄡ', + 'ㅅ' => 'ᄉ', + 'ㅆ' => 'ᄊ', + 'ㅇ' => 'ᄋ', + 'ㅈ' => 'ᄌ', + 'ㅉ' => 'ᄍ', + 'ㅊ' => 'ᄎ', + 'ㅋ' => 'ᄏ', + 'ㅌ' => 'ᄐ', + 'ㅍ' => 'ᄑ', + 'ㅎ' => 'ᄒ', + 'ㅏ' => 'ᅡ', + 'ㅐ' => 'ᅢ', + 'ㅑ' => 'ᅣ', + 'ㅒ' => 'ᅤ', + 'ㅓ' => 'ᅥ', + 'ㅔ' => 'ᅦ', + 'ㅕ' => 'ᅧ', + 'ㅖ' => 'ᅨ', + 'ㅗ' => 'ᅩ', + 'ㅘ' => 'ᅪ', + 'ㅙ' => 'ᅫ', + 'ㅚ' => 'ᅬ', + 'ㅛ' => 'ᅭ', + 'ㅜ' => 'ᅮ', + 'ㅝ' => 'ᅯ', + 'ㅞ' => 'ᅰ', + 'ㅟ' => 'ᅱ', + 'ㅠ' => 'ᅲ', + 'ㅡ' => 'ᅳ', + 'ㅢ' => 'ᅴ', + 'ㅣ' => 'ᅵ', + 'ㅤ' => 'ᅠ', + 'ㅥ' => 'ᄔ', + 'ㅦ' => 'ᄕ', + 'ㅧ' => 'ᇇ', + 'ㅨ' => 'ᇈ', + 'ㅩ' => 'ᇌ', + 'ㅪ' => 'ᇎ', + 'ㅫ' => 'ᇓ', + 'ㅬ' => 'ᇗ', + 'ㅭ' => 'ᇙ', + 'ㅮ' => 'ᄜ', + 'ㅯ' => 'ᇝ', + 'ㅰ' => 'ᇟ', + 'ㅱ' => 'ᄝ', + 'ㅲ' => 'ᄞ', + 'ㅳ' => 'ᄠ', + 'ㅴ' => 'ᄢ', + 'ㅵ' => 'ᄣ', + 'ㅶ' => 'ᄧ', + 'ㅷ' => 'ᄩ', + 'ㅸ' => 'ᄫ', + 'ㅹ' => 'ᄬ', + 'ㅺ' => 'ᄭ', + 'ㅻ' => 'ᄮ', + 'ㅼ' => 'ᄯ', + 'ㅽ' => 'ᄲ', + 'ㅾ' => 'ᄶ', + 'ㅿ' => 'ᅀ', + 'ㆀ' => 'ᅇ', + 'ㆁ' => 'ᅌ', + 'ㆂ' => 'ᇱ', + 'ㆃ' => 'ᇲ', + 'ㆄ' => 'ᅗ', + 'ㆅ' => 'ᅘ', + 'ㆆ' => 'ᅙ', + 'ㆇ' => 'ᆄ', + 'ㆈ' => 'ᆅ', + 'ㆉ' => 'ᆈ', + 'ㆊ' => 'ᆑ', + 'ㆋ' => 'ᆒ', + 'ㆌ' => 'ᆔ', + 'ㆍ' => 'ᆞ', + 'ㆎ' => 'ᆡ', + '㈀' => '(ᄀ)', + '㈁' => '(ᄂ)', + '㈂' => '(ᄃ)', + '㈃' => '(ᄅ)', + '㈄' => '(ᄆ)', + '㈅' => '(ᄇ)', + '㈆' => '(ᄉ)', + '㈇' => '(ᄋ)', + '㈈' => '(ᄌ)', + '㈉' => '(ᄎ)', + '㈊' => '(ᄏ)', + '㈋' => '(ᄐ)', + '㈌' => '(ᄑ)', + '㈍' => '(ᄒ)', + '㈎' => '(가)', + '㈏' => '(나)', + '㈐' => '(다)', + '㈑' => '(라)', + '㈒' => '(마)', + '㈓' => '(바)', + '㈔' => '(사)', + '㈕' => '(아)', + '㈖' => '(자)', + '㈗' => '(차)', + '㈘' => '(카)', + '㈙' => '(타)', + '㈚' => '(파)', + '㈛' => '(하)', + '㈜' => '(주)', + '㈝' => '(오전)', + '㈞' => '(오후)', + '㈠' => '(一)', + '㈡' => '(二)', + '㈢' => '(三)', + '㈣' => '(四)', + '㈤' => '(五)', + '㈥' => '(六)', + '㈦' => '(七)', + '㈧' => '(八)', + '㈨' => '(九)', + '㈩' => '(十)', + '㈪' => '(月)', + '㈫' => '(火)', + '㈬' => '(水)', + '㈭' => '(木)', + '㈮' => '(金)', + '㈯' => '(土)', + '㈰' => '(日)', + '㈱' => '(株)', + '㈲' => '(有)', + '㈳' => '(社)', + '㈴' => '(名)', + '㈵' => '(特)', + '㈶' => '(財)', + '㈷' => '(祝)', + '㈸' => '(労)', + '㈹' => '(代)', + '㈺' => '(呼)', + '㈻' => '(学)', + '㈼' => '(監)', + '㈽' => '(企)', + '㈾' => '(資)', + '㈿' => '(協)', + '㉀' => '(祭)', + '㉁' => '(休)', + '㉂' => '(自)', + '㉃' => '(至)', + '㉄' => '(問)', + '㉅' => '(幼)', + '㉆' => '(文)', + '㉇' => '(箏)', + '㉐' => 'PTE', + '㉑' => '(21)', + '㉒' => '(22)', + '㉓' => '(23)', + '㉔' => '(24)', + '㉕' => '(25)', + '㉖' => '(26)', + '㉗' => '(27)', + '㉘' => '(28)', + '㉙' => '(29)', + '㉚' => '(30)', + '㉛' => '(31)', + '㉜' => '(32)', + '㉝' => '(33)', + '㉞' => '(34)', + '㉟' => '(35)', + '㉠' => '(ᄀ)', + '㉡' => '(ᄂ)', + '㉢' => '(ᄃ)', + '㉣' => '(ᄅ)', + '㉤' => '(ᄆ)', + '㉥' => '(ᄇ)', + '㉦' => '(ᄉ)', + '㉧' => '(ᄋ)', + '㉨' => '(ᄌ)', + '㉩' => '(ᄎ)', + '㉪' => '(ᄏ)', + '㉫' => '(ᄐ)', + '㉬' => '(ᄑ)', + '㉭' => '(ᄒ)', + '㉮' => '(가)', + '㉯' => '(나)', + '㉰' => '(다)', + '㉱' => '(라)', + '㉲' => '(마)', + '㉳' => '(바)', + '㉴' => '(사)', + '㉵' => '(아)', + '㉶' => '(자)', + '㉷' => '(차)', + '㉸' => '(카)', + '㉹' => '(타)', + '㉺' => '(파)', + '㉻' => '(하)', + '㉼' => '(참고)', + '㉽' => '(주의)', + '㉾' => '(우)', + '㊀' => '(一)', + '㊁' => '(二)', + '㊂' => '(三)', + '㊃' => '(四)', + '㊄' => '(五)', + '㊅' => '(六)', + '㊆' => '(七)', + '㊇' => '(八)', + '㊈' => '(九)', + '㊉' => '(十)', + '㊊' => '(月)', + '㊋' => '(火)', + '㊌' => '(水)', + '㊍' => '(木)', + '㊎' => '(金)', + '㊏' => '(土)', + '㊐' => '(日)', + '㊑' => '(株)', + '㊒' => '(有)', + '㊓' => '(社)', + '㊔' => '(名)', + '㊕' => '(特)', + '㊖' => '(財)', + '㊗' => '(祝)', + '㊘' => '(労)', + '㊙' => '(秘)', + '㊚' => '(男)', + '㊛' => '(女)', + '㊜' => '(適)', + '㊝' => '(優)', + '㊞' => '(印)', + '㊟' => '(注)', + '㊠' => '(項)', + '㊡' => '(休)', + '㊢' => '(写)', + '㊣' => '(正)', + '㊤' => '(上)', + '㊥' => '(中)', + '㊦' => '(下)', + '㊧' => '(左)', + '㊨' => '(右)', + '㊩' => '(医)', + '㊪' => '(宗)', + '㊫' => '(学)', + '㊬' => '(監)', + '㊭' => '(企)', + '㊮' => '(資)', + '㊯' => '(協)', + '㊰' => '(夜)', + '㊱' => '(36)', + '㊲' => '(37)', + '㊳' => '(38)', + '㊴' => '(39)', + '㊵' => '(40)', + '㊶' => '(41)', + '㊷' => '(42)', + '㊸' => '(43)', + '㊹' => '(44)', + '㊺' => '(45)', + '㊻' => '(46)', + '㊼' => '(47)', + '㊽' => '(48)', + '㊾' => '(49)', + '㊿' => '(50)', + '㋀' => '1月', + '㋁' => '2月', + '㋂' => '3月', + '㋃' => '4月', + '㋄' => '5月', + '㋅' => '6月', + '㋆' => '7月', + '㋇' => '8月', + '㋈' => '9月', + '㋉' => '10月', + '㋊' => '11月', + '㋋' => '12月', + '㋌' => 'Hg', + '㋍' => 'erg', + '㋎' => 'eV', + '㋏' => 'LTD', + '㋐' => '(ア)', + '㋑' => '(イ)', + '㋒' => '(ウ)', + '㋓' => '(エ)', + '㋔' => '(オ)', + '㋕' => '(カ)', + '㋖' => '(キ)', + '㋗' => '(ク)', + '㋘' => '(ケ)', + '㋙' => '(コ)', + '㋚' => '(サ)', + '㋛' => '(シ)', + '㋜' => '(ス)', + '㋝' => '(セ)', + '㋞' => '(ソ)', + '㋟' => '(タ)', + '㋠' => '(チ)', + '㋡' => '(ツ)', + '㋢' => '(テ)', + '㋣' => '(ト)', + '㋤' => '(ナ)', + '㋥' => '(ニ)', + '㋦' => '(ヌ)', + '㋧' => '(ネ)', + '㋨' => '(ノ)', + '㋩' => '(ハ)', + '㋪' => '(ヒ)', + '㋫' => '(フ)', + '㋬' => '(ヘ)', + '㋭' => '(ホ)', + '㋮' => '(マ)', + '㋯' => '(ミ)', + '㋰' => '(ム)', + '㋱' => '(メ)', + '㋲' => '(モ)', + '㋳' => '(ヤ)', + '㋴' => '(ユ)', + '㋵' => '(ヨ)', + '㋶' => '(ラ)', + '㋷' => '(リ)', + '㋸' => '(ル)', + '㋹' => '(レ)', + '㋺' => '(ロ)', + '㋻' => '(ワ)', + '㋼' => '(ヰ)', + '㋽' => '(ヱ)', + '㋾' => '(ヲ)', + '㌀' => 'アパート', + '㌁' => 'アルファ', + '㌂' => 'アンペア', + '㌃' => 'アール', + '㌄' => 'イニング', + '㌅' => 'インチ', + '㌆' => 'ウォン', + '㌇' => 'エスクード', + '㌈' => 'エーカー', + '㌉' => 'オンス', + '㌊' => 'オーム', + '㌋' => 'カイリ', + '㌌' => 'カラット', + '㌍' => 'カロリー', + '㌎' => 'ガロン', + '㌏' => 'ガンマ', + '㌐' => 'ギガ', + '㌑' => 'ギニー', + '㌒' => 'キュリー', + '㌓' => 'ギルダー', + '㌔' => 'キロ', + '㌕' => 'キログラム', + '㌖' => 'キロメートル', + '㌗' => 'キロワット', + '㌘' => 'グラム', + '㌙' => 'グラムトン', + '㌚' => 'クルゼイロ', + '㌛' => 'クローネ', + '㌜' => 'ケース', + '㌝' => 'コルナ', + '㌞' => 'コーポ', + '㌟' => 'サイクル', + '㌠' => 'サンチーム', + '㌡' => 'シリング', + '㌢' => 'センチ', + '㌣' => 'セント', + '㌤' => 'ダース', + '㌥' => 'デシ', + '㌦' => 'ドル', + '㌧' => 'トン', + '㌨' => 'ナノ', + '㌩' => 'ノット', + '㌪' => 'ハイツ', + '㌫' => 'パーセント', + '㌬' => 'パーツ', + '㌭' => 'バーレル', + '㌮' => 'ピアストル', + '㌯' => 'ピクル', + '㌰' => 'ピコ', + '㌱' => 'ビル', + '㌲' => 'ファラッド', + '㌳' => 'フィート', + '㌴' => 'ブッシェル', + '㌵' => 'フラン', + '㌶' => 'ヘクタール', + '㌷' => 'ペソ', + '㌸' => 'ペニヒ', + '㌹' => 'ヘルツ', + '㌺' => 'ペンス', + '㌻' => 'ページ', + '㌼' => 'ベータ', + '㌽' => 'ポイント', + '㌾' => 'ボルト', + '㌿' => 'ホン', + '㍀' => 'ポンド', + '㍁' => 'ホール', + '㍂' => 'ホーン', + '㍃' => 'マイクロ', + '㍄' => 'マイル', + '㍅' => 'マッハ', + '㍆' => 'マルク', + '㍇' => 'マンション', + '㍈' => 'ミクロン', + '㍉' => 'ミリ', + '㍊' => 'ミリバール', + '㍋' => 'メガ', + '㍌' => 'メガトン', + '㍍' => 'メートル', + '㍎' => 'ヤード', + '㍏' => 'ヤール', + '㍐' => 'ユアン', + '㍑' => 'リットル', + '㍒' => 'リラ', + '㍓' => 'ルピー', + '㍔' => 'ルーブル', + '㍕' => 'レム', + '㍖' => 'レントゲン', + '㍗' => 'ワット', + '㍘' => '0点', + '㍙' => '1点', + '㍚' => '2点', + '㍛' => '3点', + '㍜' => '4点', + '㍝' => '5点', + '㍞' => '6点', + '㍟' => '7点', + '㍠' => '8点', + '㍡' => '9点', + '㍢' => '10点', + '㍣' => '11点', + '㍤' => '12点', + '㍥' => '13点', + '㍦' => '14点', + '㍧' => '15点', + '㍨' => '16点', + '㍩' => '17点', + '㍪' => '18点', + '㍫' => '19点', + '㍬' => '20点', + '㍭' => '21点', + '㍮' => '22点', + '㍯' => '23点', + '㍰' => '24点', + '㍱' => 'hPa', + '㍲' => 'da', + '㍳' => 'AU', + '㍴' => 'bar', + '㍵' => 'oV', + '㍶' => 'pc', + '㍷' => 'dm', + '㍸' => 'dm²', + '㍹' => 'dm³', + '㍺' => 'IU', + '㍻' => '平成', + '㍼' => '昭和', + '㍽' => '大正', + '㍾' => '明治', + '㍿' => '株式会社', + '㎀' => 'pA', + '㎁' => 'nA', + '㎂' => 'μA', + '㎃' => 'mA', + '㎄' => 'kA', + '㎅' => 'KB', + '㎆' => 'MB', + '㎇' => 'GB', + '㎈' => 'cal', + '㎉' => 'kcal', + '㎊' => 'pF', + '㎋' => 'nF', + '㎌' => 'μF', + '㎍' => 'μg', + '㎎' => 'mg', + '㎏' => 'kg', + '㎐' => 'Hz', + '㎑' => 'kHz', + '㎒' => 'MHz', + '㎓' => 'GHz', + '㎔' => 'THz', + '㎕' => 'μℓ', + '㎖' => 'mℓ', + '㎗' => 'dℓ', + '㎘' => 'kℓ', + '㎙' => 'fm', + '㎚' => 'nm', + '㎛' => 'μm', + '㎜' => 'mm', + '㎝' => 'cm', + '㎞' => 'km', + '㎟' => 'mm²', + '㎠' => 'cm²', + '㎡' => 'm²', + '㎢' => 'km²', + '㎣' => 'mm³', + '㎤' => 'cm³', + '㎥' => 'm³', + '㎦' => 'km³', + '㎧' => 'm∕s', + '㎨' => 'm∕s²', + '㎩' => 'Pa', + '㎪' => 'kPa', + '㎫' => 'MPa', + '㎬' => 'GPa', + '㎭' => 'rad', + '㎮' => 'rad∕s', + '㎯' => 'rad∕s²', + '㎰' => 'ps', + '㎱' => 'ns', + '㎲' => 'μs', + '㎳' => 'ms', + '㎴' => 'pV', + '㎵' => 'nV', + '㎶' => 'μV', + '㎷' => 'mV', + '㎸' => 'kV', + '㎹' => 'MV', + '㎺' => 'pW', + '㎻' => 'nW', + '㎼' => 'μW', + '㎽' => 'mW', + '㎾' => 'kW', + '㎿' => 'MW', + '㏀' => 'kΩ', + '㏁' => 'MΩ', + '㏂' => 'a.m.', + '㏃' => 'Bq', + '㏄' => 'cc', + '㏅' => 'cd', + '㏆' => 'C∕kg', + '㏇' => 'Co.', + '㏈' => 'dB', + '㏉' => 'Gy', + '㏊' => 'ha', + '㏋' => 'HP', + '㏌' => 'in', + '㏍' => 'KK', + '㏎' => 'KM', + '㏏' => 'kt', + '㏐' => 'lm', + '㏑' => 'ln', + '㏒' => 'log', + '㏓' => 'lx', + '㏔' => 'mb', + '㏕' => 'mil', + '㏖' => 'mol', + '㏗' => 'PH', + '㏘' => 'p.m.', + '㏙' => 'PPM', + '㏚' => 'PR', + '㏛' => 'sr', + '㏜' => 'Sv', + '㏝' => 'Wb', + '㏞' => 'V∕m', + '㏟' => 'A∕m', + '㏠' => '1日', + '㏡' => '2日', + '㏢' => '3日', + '㏣' => '4日', + '㏤' => '5日', + '㏥' => '6日', + '㏦' => '7日', + '㏧' => '8日', + '㏨' => '9日', + '㏩' => '10日', + '㏪' => '11日', + '㏫' => '12日', + '㏬' => '13日', + '㏭' => '14日', + '㏮' => '15日', + '㏯' => '16日', + '㏰' => '17日', + '㏱' => '18日', + '㏲' => '19日', + '㏳' => '20日', + '㏴' => '21日', + '㏵' => '22日', + '㏶' => '23日', + '㏷' => '24日', + '㏸' => '25日', + '㏹' => '26日', + '㏺' => '27日', + '㏻' => '28日', + '㏼' => '29日', + '㏽' => '30日', + '㏾' => '31日', + '㏿' => 'gal', + '豈' => '豈', + '更' => '更', + '車' => '車', + '賈' => '賈', + '滑' => '滑', + '串' => '串', + '句' => '句', + '龜' => '龜', + '龜' => '龜', + '契' => '契', + '金' => '金', + '喇' => '喇', + '奈' => '奈', + '懶' => '懶', + '癩' => '癩', + '羅' => '羅', + '蘿' => '蘿', + '螺' => '螺', + '裸' => '裸', + '邏' => '邏', + '樂' => '樂', + '洛' => '洛', + '烙' => '烙', + '珞' => '珞', + '落' => '落', + '酪' => '酪', + '駱' => '駱', + '亂' => '亂', + '卵' => '卵', + '欄' => '欄', + '爛' => '爛', + '蘭' => '蘭', + '鸞' => '鸞', + '嵐' => '嵐', + '濫' => '濫', + '藍' => '藍', + '襤' => '襤', + '拉' => '拉', + '臘' => '臘', + '蠟' => '蠟', + '廊' => '廊', + '朗' => '朗', + '浪' => '浪', + '狼' => '狼', + '郎' => '郎', + '來' => '來', + '冷' => '冷', + '勞' => '勞', + '擄' => '擄', + '櫓' => '櫓', + '爐' => '爐', + '盧' => '盧', + '老' => '老', + '蘆' => '蘆', + '虜' => '虜', + '路' => '路', + '露' => '露', + '魯' => '魯', + '鷺' => '鷺', + '碌' => '碌', + '祿' => '祿', + '綠' => '綠', + '菉' => '菉', + '錄' => '錄', + '鹿' => '鹿', + '論' => '論', + '壟' => '壟', + '弄' => '弄', + '籠' => '籠', + '聾' => '聾', + '牢' => '牢', + '磊' => '磊', + '賂' => '賂', + '雷' => '雷', + '壘' => '壘', + '屢' => '屢', + '樓' => '樓', + '淚' => '淚', + '漏' => '漏', + '累' => '累', + '縷' => '縷', + '陋' => '陋', + '勒' => '勒', + '肋' => '肋', + '凜' => '凜', + '凌' => '凌', + '稜' => '稜', + '綾' => '綾', + '菱' => '菱', + '陵' => '陵', + '讀' => '讀', + '拏' => '拏', + '樂' => '樂', + '諾' => '諾', + '丹' => '丹', + '寧' => '寧', + '怒' => '怒', + '率' => '率', + '異' => '異', + '北' => '北', + '磻' => '磻', + '便' => '便', + '復' => '復', + '不' => '不', + '泌' => '泌', + '數' => '數', + '索' => '索', + '參' => '參', + '塞' => '塞', + '省' => '省', + '葉' => '葉', + '說' => '說', + '殺' => '殺', + '辰' => '辰', + '沈' => '沈', + '拾' => '拾', + '若' => '若', + '掠' => '掠', + '略' => '略', + '亮' => '亮', + '兩' => '兩', + '凉' => '凉', + '梁' => '梁', + '糧' => '糧', + '良' => '良', + '諒' => '諒', + '量' => '量', + '勵' => '勵', + '呂' => '呂', + '女' => '女', + '廬' => '廬', + '旅' => '旅', + '濾' => '濾', + '礪' => '礪', + '閭' => '閭', + '驪' => '驪', + '麗' => '麗', + '黎' => '黎', + '力' => '力', + '曆' => '曆', + '歷' => '歷', + '轢' => '轢', + '年' => '年', + '憐' => '憐', + '戀' => '戀', + '撚' => '撚', + '漣' => '漣', + '煉' => '煉', + '璉' => '璉', + '秊' => '秊', + '練' => '練', + '聯' => '聯', + '輦' => '輦', + '蓮' => '蓮', + '連' => '連', + '鍊' => '鍊', + '列' => '列', + '劣' => '劣', + '咽' => '咽', + '烈' => '烈', + '裂' => '裂', + '說' => '說', + '廉' => '廉', + '念' => '念', + '捻' => '捻', + '殮' => '殮', + '簾' => '簾', + '獵' => '獵', + '令' => '令', + '囹' => '囹', + '寧' => '寧', + '嶺' => '嶺', + '怜' => '怜', + '玲' => '玲', + '瑩' => '瑩', + '羚' => '羚', + '聆' => '聆', + '鈴' => '鈴', + '零' => '零', + '靈' => '靈', + '領' => '領', + '例' => '例', + '禮' => '禮', + '醴' => '醴', + '隸' => '隸', + '惡' => '惡', + '了' => '了', + '僚' => '僚', + '寮' => '寮', + '尿' => '尿', + '料' => '料', + '樂' => '樂', + '燎' => '燎', + '療' => '療', + '蓼' => '蓼', + '遼' => '遼', + '龍' => '龍', + '暈' => '暈', + '阮' => '阮', + '劉' => '劉', + '杻' => '杻', + '柳' => '柳', + '流' => '流', + '溜' => '溜', + '琉' => '琉', + '留' => '留', + '硫' => '硫', + '紐' => '紐', + '類' => '類', + '六' => '六', + '戮' => '戮', + '陸' => '陸', + '倫' => '倫', + '崙' => '崙', + '淪' => '淪', + '輪' => '輪', + '律' => '律', + '慄' => '慄', + '栗' => '栗', + '率' => '率', + '隆' => '隆', + '利' => '利', + '吏' => '吏', + '履' => '履', + '易' => '易', + '李' => '李', + '梨' => '梨', + '泥' => '泥', + '理' => '理', + '痢' => '痢', + '罹' => '罹', + '裏' => '裏', + '裡' => '裡', + '里' => '里', + '離' => '離', + '匿' => '匿', + '溺' => '溺', + '吝' => '吝', + '燐' => '燐', + '璘' => '璘', + '藺' => '藺', + '隣' => '隣', + '鱗' => '鱗', + '麟' => '麟', + '林' => '林', + '淋' => '淋', + '臨' => '臨', + '立' => '立', + '笠' => '笠', + '粒' => '粒', + '狀' => '狀', + '炙' => '炙', + '識' => '識', + '什' => '什', + '茶' => '茶', + '刺' => '刺', + '切' => '切', + '度' => '度', + '拓' => '拓', + '糖' => '糖', + '宅' => '宅', + '洞' => '洞', + '暴' => '暴', + '輻' => '輻', + '行' => '行', + '降' => '降', + '見' => '見', + '廓' => '廓', + '兀' => '兀', + '嗀' => '嗀', + '﨎' => '', + '﨏' => '', + '塚' => '塚', + '﨑' => '', + '晴' => '晴', + '﨓' => '', + '﨔' => '', + '凞' => '凞', + '猪' => '猪', + '益' => '益', + '礼' => '礼', + '神' => '神', + '祥' => '祥', + '福' => '福', + '靖' => '靖', + '精' => '精', + '羽' => '羽', + '﨟' => '', + '蘒' => '蘒', + '﨡' => '', + '諸' => '諸', + '﨣' => '', + '﨤' => '', + '逸' => '逸', + '都' => '都', + '﨧' => '', + '﨨' => '', + '﨩' => '', + '飯' => '飯', + '飼' => '飼', + '館' => '館', + '鶴' => '鶴', + '郞' => '郞', + '隷' => '隷', + '侮' => '侮', + '僧' => '僧', + '免' => '免', + '勉' => '勉', + '勤' => '勤', + '卑' => '卑', + '喝' => '喝', + '嘆' => '嘆', + '器' => '器', + '塀' => '塀', + '墨' => '墨', + '層' => '層', + '屮' => '屮', + '悔' => '悔', + '慨' => '慨', + '憎' => '憎', + '懲' => '懲', + '敏' => '敏', + '既' => '既', + '暑' => '暑', + '梅' => '梅', + '海' => '海', + '渚' => '渚', + '漢' => '漢', + '煮' => '煮', + '爫' => '爫', + '琢' => '琢', + '碑' => '碑', + '社' => '社', + '祉' => '祉', + '祈' => '祈', + '祐' => '祐', + '祖' => '祖', + '祝' => '祝', + '禍' => '禍', + '禎' => '禎', + '穀' => '穀', + '突' => '突', + '節' => '節', + '練' => '練', + '縉' => '縉', + '繁' => '繁', + '署' => '署', + '者' => '者', + '臭' => '臭', + '艹' => '艹', + '艹' => '艹', + '著' => '著', + '褐' => '褐', + '視' => '視', + '謁' => '謁', + '謹' => '謹', + '賓' => '賓', + '贈' => '贈', + '辶' => '辶', + '逸' => '逸', + '難' => '難', + '響' => '響', + '頻' => '頻', + '恵' => '恵', + '𤋮' => '𤋮', + '舘' => '舘', + '並' => '並', + '况' => '况', + '全' => '全', + '侀' => '侀', + '充' => '充', + '冀' => '冀', + '勇' => '勇', + '勺' => '勺', + '喝' => '喝', + '啕' => '啕', + '喙' => '喙', + '嗢' => '嗢', + '塚' => '塚', + '墳' => '墳', + '奄' => '奄', + '奔' => '奔', + '婢' => '婢', + '嬨' => '嬨', + '廒' => '廒', + '廙' => '廙', + '彩' => '彩', + '徭' => '徭', + '惘' => '惘', + '慎' => '慎', + '愈' => '愈', + '憎' => '憎', + '慠' => '慠', + '懲' => '懲', + '戴' => '戴', + '揄' => '揄', + '搜' => '搜', + '摒' => '摒', + '敖' => '敖', + '晴' => '晴', + '朗' => '朗', + '望' => '望', + '杖' => '杖', + '歹' => '歹', + '殺' => '殺', + '流' => '流', + '滛' => '滛', + '滋' => '滋', + '漢' => '漢', + '瀞' => '瀞', + '煮' => '煮', + '瞧' => '瞧', + '爵' => '爵', + '犯' => '犯', + '猪' => '猪', + '瑱' => '瑱', + '甆' => '甆', + '画' => '画', + '瘝' => '瘝', + '瘟' => '瘟', + '益' => '益', + '盛' => '盛', + '直' => '直', + '睊' => '睊', + '着' => '着', + '磌' => '磌', + '窱' => '窱', + '節' => '節', + '类' => '类', + '絛' => '絛', + '練' => '練', + '缾' => '缾', + '者' => '者', + '荒' => '荒', + '華' => '華', + '蝹' => '蝹', + '襁' => '襁', + '覆' => '覆', + '視' => '視', + '調' => '調', + '諸' => '諸', + '請' => '請', + '謁' => '謁', + '諾' => '諾', + '諭' => '諭', + '謹' => '謹', + '變' => '變', + '贈' => '贈', + '輸' => '輸', + '遲' => '遲', + '醙' => '醙', + '鉶' => '鉶', + '陼' => '陼', + '難' => '難', + '靖' => '靖', + '韛' => '韛', + '響' => '響', + '頋' => '頋', + '頻' => '頻', + '鬒' => '鬒', + '龜' => '龜', + '𢡊' => '𢡊', + '𢡄' => '𢡄', + '𣏕' => '𣏕', + '㮝' => '㮝', + '䀘' => '䀘', + '䀹' => '䀹', + '𥉉' => '𥉉', + '𥳐' => '𥳐', + '𧻓' => '𧻓', + '齃' => '齃', + '龎' => '龎', + 'ff' => 'ff', + 'fi' => 'fi', + 'fl' => 'fl', + 'ffi' => 'ffi', + 'ffl' => 'ffl', + 'ſt' => 'ſt', + 'st' => 'st', + 'ﬓ' => 'մն', + 'ﬔ' => 'մե', + 'ﬕ' => 'մի', + 'ﬖ' => 'վն', + 'ﬗ' => 'մխ', + 'ﬠ' => 'ע', + 'ﬡ' => 'א', + 'ﬢ' => 'ד', + 'ﬣ' => 'ה', + 'ﬤ' => 'כ', + 'ﬥ' => 'ל', + 'ﬦ' => 'ם', + 'ﬧ' => 'ר', + 'ﬨ' => 'ת', + '﬩' => '+', + 'ﭏ' => 'אל', + '﹉' => '‾', + '﹊' => '‾', + '﹋' => '‾', + '﹌' => '‾', + '﹍' => '_', + '﹎' => '_', + '﹏' => '_', + '﹐' => ',', + '﹑' => '、', + '﹒' => '.', + '﹔' => ';', + '﹕' => ':', + '﹖' => '?', + '﹗' => '!', + '﹘' => '—', + '﹙' => '(', + '﹚' => ')', + '﹛' => '{', + '﹜' => '}', + '﹝' => '〔', + '﹞' => '〕', + '﹟' => '#', + '﹠' => '&', + '﹡' => '*', + '﹢' => '+', + '﹣' => '-', + '﹤' => '<', + '﹥' => '>', + '﹦' => '=', + '﹨' => '\\', + '﹩' => '$', + '﹪' => '%', + '﹫' => '@', + '!' => '!', + '"' => '"', + '#' => '#', + '$' => '$', + '%' => '%', + '&' => '&', + ''' => '\'', + '(' => '(', + ')' => ')', + '*' => '*', + '+' => '+', + ',' => ',', + '-' => '-', + '.' => '.', + '/' => '/', + '0' => '0', + '1' => '1', + '2' => '2', + '3' => '3', + '4' => '4', + '5' => '5', + '6' => '6', + '7' => '7', + '8' => '8', + '9' => '9', + ':' => ':', + ';' => ';', + '<' => '<', + '=' => '=', + '>' => '>', + '?' => '?', + '@' => '@', + 'A' => 'A', + 'B' => 'B', + 'C' => 'C', + 'D' => 'D', + 'E' => 'E', + 'F' => 'F', + 'G' => 'G', + 'H' => 'H', + 'I' => 'I', + 'J' => 'J', + 'K' => 'K', + 'L' => 'L', + 'M' => 'M', + 'N' => 'N', + 'O' => 'O', + 'P' => 'P', + 'Q' => 'Q', + 'R' => 'R', + 'S' => 'S', + 'T' => 'T', + 'U' => 'U', + 'V' => 'V', + 'W' => 'W', + 'X' => 'X', + 'Y' => 'Y', + 'Z' => 'Z', + '[' => '[', + '\' => '\\', + ']' => ']', + '^' => '^', + '_' => '_', + '`' => '`', + 'a' => 'a', + 'b' => 'b', + 'c' => 'c', + 'd' => 'd', + 'e' => 'e', + 'f' => 'f', + 'g' => 'g', + 'h' => 'h', + 'i' => 'i', + 'j' => 'j', + 'k' => 'k', + 'l' => 'l', + 'm' => 'm', + 'n' => 'n', + 'o' => 'o', + 'p' => 'p', + 'q' => 'q', + 'r' => 'r', + 's' => 's', + 't' => 't', + 'u' => 'u', + 'v' => 'v', + 'w' => 'w', + 'x' => 'x', + 'y' => 'y', + 'z' => 'z', + '{' => '{', + '|' => '|', + '}' => '}', + '~' => '~', + '⦅' => '⦅', + '⦆' => '⦆', + '。' => '。', + '「' => '「', + '」' => '」', + '、' => '、', + '・' => '・', + 'ヲ' => 'ヲ', + 'ァ' => 'ァ', + 'ィ' => 'ィ', + 'ゥ' => 'ゥ', + 'ェ' => 'ェ', + 'ォ' => 'ォ', + 'ャ' => 'ャ', + 'ュ' => 'ュ', + 'ョ' => 'ョ', + 'ッ' => 'ッ', + 'ー' => 'ー', + 'ア' => 'ア', + 'イ' => 'イ', + 'ウ' => 'ウ', + 'エ' => 'エ', + 'オ' => 'オ', + 'カ' => 'カ', + 'キ' => 'キ', + 'ク' => 'ク', + 'ケ' => 'ケ', + 'コ' => 'コ', + 'サ' => 'サ', + 'シ' => 'シ', + 'ス' => 'ス', + 'セ' => 'セ', + 'ソ' => 'ソ', + 'タ' => 'タ', + 'チ' => 'チ', + 'ツ' => 'ツ', + 'テ' => 'テ', + 'ト' => 'ト', + 'ナ' => 'ナ', + 'ニ' => 'ニ', + 'ヌ' => 'ヌ', + 'ネ' => 'ネ', + 'ノ' => 'ノ', + 'ハ' => 'ハ', + 'ヒ' => 'ヒ', + 'フ' => 'フ', + 'ヘ' => 'ヘ', + 'ホ' => 'ホ', + 'マ' => 'マ', + 'ミ' => 'ミ', + 'ム' => 'ム', + 'メ' => 'メ', + 'モ' => 'モ', + 'ヤ' => 'ヤ', + 'ユ' => 'ユ', + 'ヨ' => 'ヨ', + 'ラ' => 'ラ', + 'リ' => 'リ', + 'ル' => 'ル', + 'レ' => 'レ', + 'ロ' => 'ロ', + 'ワ' => 'ワ', + 'ン' => 'ン', + '゙' => '゙', + '゚' => '゚', + 'ᅠ' => 'ㅤ', + 'ᄀ' => 'ㄱ', + 'ᄁ' => 'ㄲ', + 'ᆪ' => 'ㄳ', + 'ᄂ' => 'ㄴ', + 'ᆬ' => 'ㄵ', + 'ᆭ' => 'ㄶ', + 'ᄃ' => 'ㄷ', + 'ᄄ' => 'ㄸ', + 'ᄅ' => 'ㄹ', + 'ᆰ' => 'ㄺ', + 'ᆱ' => 'ㄻ', + 'ᆲ' => 'ㄼ', + 'ᆳ' => 'ㄽ', + 'ᆴ' => 'ㄾ', + 'ᆵ' => 'ㄿ', + 'ᄚ' => 'ㅀ', + 'ᄆ' => 'ㅁ', + 'ᄇ' => 'ㅂ', + 'ᄈ' => 'ㅃ', + 'ᄡ' => 'ㅄ', + 'ᄉ' => 'ㅅ', + 'ᄊ' => 'ㅆ', + 'ᄋ' => 'ㅇ', + 'ᄌ' => 'ㅈ', + 'ᄍ' => 'ㅉ', + 'ᄎ' => 'ㅊ', + 'ᄏ' => 'ㅋ', + 'ᄐ' => 'ㅌ', + 'ᄑ' => 'ㅍ', + 'ᄒ' => 'ㅎ', + 'ᅡ' => 'ㅏ', + 'ᅢ' => 'ㅐ', + 'ᅣ' => 'ㅑ', + 'ᅤ' => 'ㅒ', + 'ᅥ' => 'ㅓ', + 'ᅦ' => 'ㅔ', + 'ᅧ' => 'ㅕ', + 'ᅨ' => 'ㅖ', + 'ᅩ' => 'ㅗ', + 'ᅪ' => 'ㅘ', + 'ᅫ' => 'ㅙ', + 'ᅬ' => 'ㅚ', + 'ᅭ' => 'ㅛ', + 'ᅮ' => 'ㅜ', + 'ᅯ' => 'ㅝ', + 'ᅰ' => 'ㅞ', + 'ᅱ' => 'ㅟ', + 'ᅲ' => 'ㅠ', + 'ᅳ' => 'ㅡ', + 'ᅴ' => 'ㅢ', + 'ᅵ' => 'ㅣ', + '¢' => '¢', + '£' => '£', + '¬' => '¬', + ' ̄' => '¯', + '¦' => '¦', + '¥' => '¥', + '₩' => '₩', + '│' => '│', + '←' => '←', + '↑' => '↑', + '→' => '→', + '↓' => '↓', + '■' => '■', + '○' => '○', + '𝐀' => 'A', + '𝐁' => 'B', + '𝐂' => 'C', + '𝐃' => 'D', + '𝐄' => 'E', + '𝐅' => 'F', + '𝐆' => 'G', + '𝐇' => 'H', + '𝐈' => 'I', + '𝐉' => 'J', + '𝐊' => 'K', + '𝐋' => 'L', + '𝐌' => 'M', + '𝐍' => 'N', + '𝐎' => 'O', + '𝐏' => 'P', + '𝐐' => 'Q', + '𝐑' => 'R', + '𝐒' => 'S', + '𝐓' => 'T', + '𝐔' => 'U', + '𝐕' => 'V', + '𝐖' => 'W', + '𝐗' => 'X', + '𝐘' => 'Y', + '𝐙' => 'Z', + '𝐚' => 'a', + '𝐛' => 'b', + '𝐜' => 'c', + '𝐝' => 'd', + '𝐞' => 'e', + '𝐟' => 'f', + '𝐠' => 'g', + '𝐡' => 'h', + '𝐢' => 'i', + '𝐣' => 'j', + '𝐤' => 'k', + '𝐥' => 'l', + '𝐦' => 'm', + '𝐧' => 'n', + '𝐨' => 'o', + '𝐩' => 'p', + '𝐪' => 'q', + '𝐫' => 'r', + '𝐬' => 's', + '𝐭' => 't', + '𝐮' => 'u', + '𝐯' => 'v', + '𝐰' => 'w', + '𝐱' => 'x', + '𝐲' => 'y', + '𝐳' => 'z', + '𝐴' => 'A', + '𝐵' => 'B', + '𝐶' => 'C', + '𝐷' => 'D', + '𝐸' => 'E', + '𝐹' => 'F', + '𝐺' => 'G', + '𝐻' => 'H', + '𝐼' => 'I', + '𝐽' => 'J', + '𝐾' => 'K', + '𝐿' => 'L', + '𝑀' => 'M', + '𝑁' => 'N', + '𝑂' => 'O', + '𝑃' => 'P', + '𝑄' => 'Q', + '𝑅' => 'R', + '𝑆' => 'S', + '𝑇' => 'T', + '𝑈' => 'U', + '𝑉' => 'V', + '𝑊' => 'W', + '𝑋' => 'X', + '𝑌' => 'Y', + '𝑍' => 'Z', + '𝑎' => 'a', + '𝑏' => 'b', + '𝑐' => 'c', + '𝑑' => 'd', + '𝑒' => 'e', + '𝑓' => 'f', + '𝑔' => 'g', + '𝑖' => 'i', + '𝑗' => 'j', + '𝑘' => 'k', + '𝑙' => 'l', + '𝑚' => 'm', + '𝑛' => 'n', + '𝑜' => 'o', + '𝑝' => 'p', + '𝑞' => 'q', + '𝑟' => 'r', + '𝑠' => 's', + '𝑡' => 't', + '𝑢' => 'u', + '𝑣' => 'v', + '𝑤' => 'w', + '𝑥' => 'x', + '𝑦' => 'y', + '𝑧' => 'z', + '𝑨' => 'A', + '𝑩' => 'B', + '𝑪' => 'C', + '𝑫' => 'D', + '𝑬' => 'E', + '𝑭' => 'F', + '𝑮' => 'G', + '𝑯' => 'H', + '𝑰' => 'I', + '𝑱' => 'J', + '𝑲' => 'K', + '𝑳' => 'L', + '𝑴' => 'M', + '𝑵' => 'N', + '𝑶' => 'O', + '𝑷' => 'P', + '𝑸' => 'Q', + '𝑹' => 'R', + '𝑺' => 'S', + '𝑻' => 'T', + '𝑼' => 'U', + '𝑽' => 'V', + '𝑾' => 'W', + '𝑿' => 'X', + '𝒀' => 'Y', + '𝒁' => 'Z', + '𝒂' => 'a', + '𝒃' => 'b', + '𝒄' => 'c', + '𝒅' => 'd', + '𝒆' => 'e', + '𝒇' => 'f', + '𝒈' => 'g', + '𝒉' => 'h', + '𝒊' => 'i', + '𝒋' => 'j', + '𝒌' => 'k', + '𝒍' => 'l', + '𝒎' => 'm', + '𝒏' => 'n', + '𝒐' => 'o', + '𝒑' => 'p', + '𝒒' => 'q', + '𝒓' => 'r', + '𝒔' => 's', + '𝒕' => 't', + '𝒖' => 'u', + '𝒗' => 'v', + '𝒘' => 'w', + '𝒙' => 'x', + '𝒚' => 'y', + '𝒛' => 'z', + '𝒜' => 'A', + '𝒞' => 'C', + '𝒟' => 'D', + '𝒢' => 'G', + '𝒥' => 'J', + '𝒦' => 'K', + '𝒩' => 'N', + '𝒪' => 'O', + '𝒫' => 'P', + '𝒬' => 'Q', + '𝒮' => 'S', + '𝒯' => 'T', + '𝒰' => 'U', + '𝒱' => 'V', + '𝒲' => 'W', + '𝒳' => 'X', + '𝒴' => 'Y', + '𝒵' => 'Z', + '𝒶' => 'a', + '𝒷' => 'b', + '𝒸' => 'c', + '𝒹' => 'd', + '𝒻' => 'f', + '𝒽' => 'h', + '𝒾' => 'i', + '𝒿' => 'j', + '𝓀' => 'k', + '𝓁' => 'l', + '𝓂' => 'm', + '𝓃' => 'n', + '𝓅' => 'p', + '𝓆' => 'q', + '𝓇' => 'r', + '𝓈' => 's', + '𝓉' => 't', + '𝓊' => 'u', + '𝓋' => 'v', + '𝓌' => 'w', + '𝓍' => 'x', + '𝓎' => 'y', + '𝓏' => 'z', + '𝓐' => 'A', + '𝓑' => 'B', + '𝓒' => 'C', + '𝓓' => 'D', + '𝓔' => 'E', + '𝓕' => 'F', + '𝓖' => 'G', + '𝓗' => 'H', + '𝓘' => 'I', + '𝓙' => 'J', + '𝓚' => 'K', + '𝓛' => 'L', + '𝓜' => 'M', + '𝓝' => 'N', + '𝓞' => 'O', + '𝓟' => 'P', + '𝓠' => 'Q', + '𝓡' => 'R', + '𝓢' => 'S', + '𝓣' => 'T', + '𝓤' => 'U', + '𝓥' => 'V', + '𝓦' => 'W', + '𝓧' => 'X', + '𝓨' => 'Y', + '𝓩' => 'Z', + '𝓪' => 'a', + '𝓫' => 'b', + '𝓬' => 'c', + '𝓭' => 'd', + '𝓮' => 'e', + '𝓯' => 'f', + '𝓰' => 'g', + '𝓱' => 'h', + '𝓲' => 'i', + '𝓳' => 'j', + '𝓴' => 'k', + '𝓵' => 'l', + '𝓶' => 'm', + '𝓷' => 'n', + '𝓸' => 'o', + '𝓹' => 'p', + '𝓺' => 'q', + '𝓻' => 'r', + '𝓼' => 's', + '𝓽' => 't', + '𝓾' => 'u', + '𝓿' => 'v', + '𝔀' => 'w', + '𝔁' => 'x', + '𝔂' => 'y', + '𝔃' => 'z', + '𝔄' => 'A', + '𝔅' => 'B', + '𝔇' => 'D', + '𝔈' => 'E', + '𝔉' => 'F', + '𝔊' => 'G', + '𝔍' => 'J', + '𝔎' => 'K', + '𝔏' => 'L', + '𝔐' => 'M', + '𝔑' => 'N', + '𝔒' => 'O', + '𝔓' => 'P', + '𝔔' => 'Q', + '𝔖' => 'S', + '𝔗' => 'T', + '𝔘' => 'U', + '𝔙' => 'V', + '𝔚' => 'W', + '𝔛' => 'X', + '𝔜' => 'Y', + '𝔞' => 'a', + '𝔟' => 'b', + '𝔠' => 'c', + '𝔡' => 'd', + '𝔢' => 'e', + '𝔣' => 'f', + '𝔤' => 'g', + '𝔥' => 'h', + '𝔦' => 'i', + '𝔧' => 'j', + '𝔨' => 'k', + '𝔩' => 'l', + '𝔪' => 'm', + '𝔫' => 'n', + '𝔬' => 'o', + '𝔭' => 'p', + '𝔮' => 'q', + '𝔯' => 'r', + '𝔰' => 's', + '𝔱' => 't', + '𝔲' => 'u', + '𝔳' => 'v', + '𝔴' => 'w', + '𝔵' => 'x', + '𝔶' => 'y', + '𝔷' => 'z', + '𝔸' => 'A', + '𝔹' => 'B', + '𝔻' => 'D', + '𝔼' => 'E', + '𝔽' => 'F', + '𝔾' => 'G', + '𝕀' => 'I', + '𝕁' => 'J', + '𝕂' => 'K', + '𝕃' => 'L', + '𝕄' => 'M', + '𝕆' => 'O', + '𝕊' => 'S', + '𝕋' => 'T', + '𝕌' => 'U', + '𝕍' => 'V', + '𝕎' => 'W', + '𝕏' => 'X', + '𝕐' => 'Y', + '𝕒' => 'a', + '𝕓' => 'b', + '𝕔' => 'c', + '𝕕' => 'd', + '𝕖' => 'e', + '𝕗' => 'f', + '𝕘' => 'g', + '𝕙' => 'h', + '𝕚' => 'i', + '𝕛' => 'j', + '𝕜' => 'k', + '𝕝' => 'l', + '𝕞' => 'm', + '𝕟' => 'n', + '𝕠' => 'o', + '𝕡' => 'p', + '𝕢' => 'q', + '𝕣' => 'r', + '𝕤' => 's', + '𝕥' => 't', + '𝕦' => 'u', + '𝕧' => 'v', + '𝕨' => 'w', + '𝕩' => 'x', + '𝕪' => 'y', + '𝕫' => 'z', + '𝕬' => 'A', + '𝕭' => 'B', + '𝕮' => 'C', + '𝕯' => 'D', + '𝕰' => 'E', + '𝕱' => 'F', + '𝕲' => 'G', + '𝕳' => 'H', + '𝕴' => 'I', + '𝕵' => 'J', + '𝕶' => 'K', + '𝕷' => 'L', + '𝕸' => 'M', + '𝕹' => 'N', + '𝕺' => 'O', + '𝕻' => 'P', + '𝕼' => 'Q', + '𝕽' => 'R', + '𝕾' => 'S', + '𝕿' => 'T', + '𝖀' => 'U', + '𝖁' => 'V', + '𝖂' => 'W', + '𝖃' => 'X', + '𝖄' => 'Y', + '𝖅' => 'Z', + '𝖆' => 'a', + '𝖇' => 'b', + '𝖈' => 'c', + '𝖉' => 'd', + '𝖊' => 'e', + '𝖋' => 'f', + '𝖌' => 'g', + '𝖍' => 'h', + '𝖎' => 'i', + '𝖏' => 'j', + '𝖐' => 'k', + '𝖑' => 'l', + '𝖒' => 'm', + '𝖓' => 'n', + '𝖔' => 'o', + '𝖕' => 'p', + '𝖖' => 'q', + '𝖗' => 'r', + '𝖘' => 's', + '𝖙' => 't', + '𝖚' => 'u', + '𝖛' => 'v', + '𝖜' => 'w', + '𝖝' => 'x', + '𝖞' => 'y', + '𝖟' => 'z', + '𝖠' => 'A', + '𝖡' => 'B', + '𝖢' => 'C', + '𝖣' => 'D', + '𝖤' => 'E', + '𝖥' => 'F', + '𝖦' => 'G', + '𝖧' => 'H', + '𝖨' => 'I', + '𝖩' => 'J', + '𝖪' => 'K', + '𝖫' => 'L', + '𝖬' => 'M', + '𝖭' => 'N', + '𝖮' => 'O', + '𝖯' => 'P', + '𝖰' => 'Q', + '𝖱' => 'R', + '𝖲' => 'S', + '𝖳' => 'T', + '𝖴' => 'U', + '𝖵' => 'V', + '𝖶' => 'W', + '𝖷' => 'X', + '𝖸' => 'Y', + '𝖹' => 'Z', + '𝖺' => 'a', + '𝖻' => 'b', + '𝖼' => 'c', + '𝖽' => 'd', + '𝖾' => 'e', + '𝖿' => 'f', + '𝗀' => 'g', + '𝗁' => 'h', + '𝗂' => 'i', + '𝗃' => 'j', + '𝗄' => 'k', + '𝗅' => 'l', + '𝗆' => 'm', + '𝗇' => 'n', + '𝗈' => 'o', + '𝗉' => 'p', + '𝗊' => 'q', + '𝗋' => 'r', + '𝗌' => 's', + '𝗍' => 't', + '𝗎' => 'u', + '𝗏' => 'v', + '𝗐' => 'w', + '𝗑' => 'x', + '𝗒' => 'y', + '𝗓' => 'z', + '𝗔' => 'A', + '𝗕' => 'B', + '𝗖' => 'C', + '𝗗' => 'D', + '𝗘' => 'E', + '𝗙' => 'F', + '𝗚' => 'G', + '𝗛' => 'H', + '𝗜' => 'I', + '𝗝' => 'J', + '𝗞' => 'K', + '𝗟' => 'L', + '𝗠' => 'M', + '𝗡' => 'N', + '𝗢' => 'O', + '𝗣' => 'P', + '𝗤' => 'Q', + '𝗥' => 'R', + '𝗦' => 'S', + '𝗧' => 'T', + '𝗨' => 'U', + '𝗩' => 'V', + '𝗪' => 'W', + '𝗫' => 'X', + '𝗬' => 'Y', + '𝗭' => 'Z', + '𝗮' => 'a', + '𝗯' => 'b', + '𝗰' => 'c', + '𝗱' => 'd', + '𝗲' => 'e', + '𝗳' => 'f', + '𝗴' => 'g', + '𝗵' => 'h', + '𝗶' => 'i', + '𝗷' => 'j', + '𝗸' => 'k', + '𝗹' => 'l', + '𝗺' => 'm', + '𝗻' => 'n', + '𝗼' => 'o', + '𝗽' => 'p', + '𝗾' => 'q', + '𝗿' => 'r', + '𝘀' => 's', + '𝘁' => 't', + '𝘂' => 'u', + '𝘃' => 'v', + '𝘄' => 'w', + '𝘅' => 'x', + '𝘆' => 'y', + '𝘇' => 'z', + '𝘈' => 'A', + '𝘉' => 'B', + '𝘊' => 'C', + '𝘋' => 'D', + '𝘌' => 'E', + '𝘍' => 'F', + '𝘎' => 'G', + '𝘏' => 'H', + '𝘐' => 'I', + '𝘑' => 'J', + '𝘒' => 'K', + '𝘓' => 'L', + '𝘔' => 'M', + '𝘕' => 'N', + '𝘖' => 'O', + '𝘗' => 'P', + '𝘘' => 'Q', + '𝘙' => 'R', + '𝘚' => 'S', + '𝘛' => 'T', + '𝘜' => 'U', + '𝘝' => 'V', + '𝘞' => 'W', + '𝘟' => 'X', + '𝘠' => 'Y', + '𝘡' => 'Z', + '𝘢' => 'a', + '𝘣' => 'b', + '𝘤' => 'c', + '𝘥' => 'd', + '𝘦' => 'e', + '𝘧' => 'f', + '𝘨' => 'g', + '𝘩' => 'h', + '𝘪' => 'i', + '𝘫' => 'j', + '𝘬' => 'k', + '𝘭' => 'l', + '𝘮' => 'm', + '𝘯' => 'n', + '𝘰' => 'o', + '𝘱' => 'p', + '𝘲' => 'q', + '𝘳' => 'r', + '𝘴' => 's', + '𝘵' => 't', + '𝘶' => 'u', + '𝘷' => 'v', + '𝘸' => 'w', + '𝘹' => 'x', + '𝘺' => 'y', + '𝘻' => 'z', + '𝘼' => 'A', + '𝘽' => 'B', + '𝘾' => 'C', + '𝘿' => 'D', + '𝙀' => 'E', + '𝙁' => 'F', + '𝙂' => 'G', + '𝙃' => 'H', + '𝙄' => 'I', + '𝙅' => 'J', + '𝙆' => 'K', + '𝙇' => 'L', + '𝙈' => 'M', + '𝙉' => 'N', + '𝙊' => 'O', + '𝙋' => 'P', + '𝙌' => 'Q', + '𝙍' => 'R', + '𝙎' => 'S', + '𝙏' => 'T', + '𝙐' => 'U', + '𝙑' => 'V', + '𝙒' => 'W', + '𝙓' => 'X', + '𝙔' => 'Y', + '𝙕' => 'Z', + '𝙖' => 'a', + '𝙗' => 'b', + '𝙘' => 'c', + '𝙙' => 'd', + '𝙚' => 'e', + '𝙛' => 'f', + '𝙜' => 'g', + '𝙝' => 'h', + '𝙞' => 'i', + '𝙟' => 'j', + '𝙠' => 'k', + '𝙡' => 'l', + '𝙢' => 'm', + '𝙣' => 'n', + '𝙤' => 'o', + '𝙥' => 'p', + '𝙦' => 'q', + '𝙧' => 'r', + '𝙨' => 's', + '𝙩' => 't', + '𝙪' => 'u', + '𝙫' => 'v', + '𝙬' => 'w', + '𝙭' => 'x', + '𝙮' => 'y', + '𝙯' => 'z', + '𝙰' => 'A', + '𝙱' => 'B', + '𝙲' => 'C', + '𝙳' => 'D', + '𝙴' => 'E', + '𝙵' => 'F', + '𝙶' => 'G', + '𝙷' => 'H', + '𝙸' => 'I', + '𝙹' => 'J', + '𝙺' => 'K', + '𝙻' => 'L', + '𝙼' => 'M', + '𝙽' => 'N', + '𝙾' => 'O', + '𝙿' => 'P', + '𝚀' => 'Q', + '𝚁' => 'R', + '𝚂' => 'S', + '𝚃' => 'T', + '𝚄' => 'U', + '𝚅' => 'V', + '𝚆' => 'W', + '𝚇' => 'X', + '𝚈' => 'Y', + '𝚉' => 'Z', + '𝚊' => 'a', + '𝚋' => 'b', + '𝚌' => 'c', + '𝚍' => 'd', + '𝚎' => 'e', + '𝚏' => 'f', + '𝚐' => 'g', + '𝚑' => 'h', + '𝚒' => 'i', + '𝚓' => 'j', + '𝚔' => 'k', + '𝚕' => 'l', + '𝚖' => 'm', + '𝚗' => 'n', + '𝚘' => 'o', + '𝚙' => 'p', + '𝚚' => 'q', + '𝚛' => 'r', + '𝚜' => 's', + '𝚝' => 't', + '𝚞' => 'u', + '𝚟' => 'v', + '𝚠' => 'w', + '𝚡' => 'x', + '𝚢' => 'y', + '𝚣' => 'z', + '𝚤' => 'ı', + '𝚥' => 'ȷ', + '𝚨' => 'Α', + '𝚩' => 'Β', + '𝚪' => 'Γ', + '𝚫' => 'Δ', + '𝚬' => 'Ε', + '𝚭' => 'Ζ', + '𝚮' => 'Η', + '𝚯' => 'Θ', + '𝚰' => 'Ι', + '𝚱' => 'Κ', + '𝚲' => 'Λ', + '𝚳' => 'Μ', + '𝚴' => 'Ν', + '𝚵' => 'Ξ', + '𝚶' => 'Ο', + '𝚷' => 'Π', + '𝚸' => 'Ρ', + '𝚹' => 'ϴ', + '𝚺' => 'Σ', + '𝚻' => 'Τ', + '𝚼' => 'Υ', + '𝚽' => 'Φ', + '𝚾' => 'Χ', + '𝚿' => 'Ψ', + '𝛀' => 'Ω', + '𝛁' => '∇', + '𝛂' => 'α', + '𝛃' => 'β', + '𝛄' => 'γ', + '𝛅' => 'δ', + '𝛆' => 'ε', + '𝛇' => 'ζ', + '𝛈' => 'η', + '𝛉' => 'θ', + '𝛊' => 'ι', + '𝛋' => 'κ', + '𝛌' => 'λ', + '𝛍' => 'μ', + '𝛎' => 'ν', + '𝛏' => 'ξ', + '𝛐' => 'ο', + '𝛑' => 'π', + '𝛒' => 'ρ', + '𝛓' => 'ς', + '𝛔' => 'σ', + '𝛕' => 'τ', + '𝛖' => 'υ', + '𝛗' => 'φ', + '𝛘' => 'χ', + '𝛙' => 'ψ', + '𝛚' => 'ω', + '𝛛' => '∂', + '𝛜' => 'ϵ', + '𝛝' => 'ϑ', + '𝛞' => 'ϰ', + '𝛟' => 'ϕ', + '𝛠' => 'ϱ', + '𝛡' => 'ϖ', + '𝛢' => 'Α', + '𝛣' => 'Β', + '𝛤' => 'Γ', + '𝛥' => 'Δ', + '𝛦' => 'Ε', + '𝛧' => 'Ζ', + '𝛨' => 'Η', + '𝛩' => 'Θ', + '𝛪' => 'Ι', + '𝛫' => 'Κ', + '𝛬' => 'Λ', + '𝛭' => 'Μ', + '𝛮' => 'Ν', + '𝛯' => 'Ξ', + '𝛰' => 'Ο', + '𝛱' => 'Π', + '𝛲' => 'Ρ', + '𝛳' => 'ϴ', + '𝛴' => 'Σ', + '𝛵' => 'Τ', + '𝛶' => 'Υ', + '𝛷' => 'Φ', + '𝛸' => 'Χ', + '𝛹' => 'Ψ', + '𝛺' => 'Ω', + '𝛻' => '∇', + '𝛼' => 'α', + '𝛽' => 'β', + '𝛾' => 'γ', + '𝛿' => 'δ', + '𝜀' => 'ε', + '𝜁' => 'ζ', + '𝜂' => 'η', + '𝜃' => 'θ', + '𝜄' => 'ι', + '𝜅' => 'κ', + '𝜆' => 'λ', + '𝜇' => 'μ', + '𝜈' => 'ν', + '𝜉' => 'ξ', + '𝜊' => 'ο', + '𝜋' => 'π', + '𝜌' => 'ρ', + '𝜍' => 'ς', + '𝜎' => 'σ', + '𝜏' => 'τ', + '𝜐' => 'υ', + '𝜑' => 'φ', + '𝜒' => 'χ', + '𝜓' => 'ψ', + '𝜔' => 'ω', + '𝜕' => '∂', + '𝜖' => 'ϵ', + '𝜗' => 'ϑ', + '𝜘' => 'ϰ', + '𝜙' => 'ϕ', + '𝜚' => 'ϱ', + '𝜛' => 'ϖ', + '𝜜' => 'Α', + '𝜝' => 'Β', + '𝜞' => 'Γ', + '𝜟' => 'Δ', + '𝜠' => 'Ε', + '𝜡' => 'Ζ', + '𝜢' => 'Η', + '𝜣' => 'Θ', + '𝜤' => 'Ι', + '𝜥' => 'Κ', + '𝜦' => 'Λ', + '𝜧' => 'Μ', + '𝜨' => 'Ν', + '𝜩' => 'Ξ', + '𝜪' => 'Ο', + '𝜫' => 'Π', + '𝜬' => 'Ρ', + '𝜭' => 'ϴ', + '𝜮' => 'Σ', + '𝜯' => 'Τ', + '𝜰' => 'Υ', + '𝜱' => 'Φ', + '𝜲' => 'Χ', + '𝜳' => 'Ψ', + '𝜴' => 'Ω', + '𝜵' => '∇', + '𝜶' => 'α', + '𝜷' => 'β', + '𝜸' => 'γ', + '𝜹' => 'δ', + '𝜺' => 'ε', + '𝜻' => 'ζ', + '𝜼' => 'η', + '𝜽' => 'θ', + '𝜾' => 'ι', + '𝜿' => 'κ', + '𝝀' => 'λ', + '𝝁' => 'μ', + '𝝂' => 'ν', + '𝝃' => 'ξ', + '𝝄' => 'ο', + '𝝅' => 'π', + '𝝆' => 'ρ', + '𝝇' => 'ς', + '𝝈' => 'σ', + '𝝉' => 'τ', + '𝝊' => 'υ', + '𝝋' => 'φ', + '𝝌' => 'χ', + '𝝍' => 'ψ', + '𝝎' => 'ω', + '𝝏' => '∂', + '𝝐' => 'ϵ', + '𝝑' => 'ϑ', + '𝝒' => 'ϰ', + '𝝓' => 'ϕ', + '𝝔' => 'ϱ', + '𝝕' => 'ϖ', + '𝝖' => 'Α', + '𝝗' => 'Β', + '𝝘' => 'Γ', + '𝝙' => 'Δ', + '𝝚' => 'Ε', + '𝝛' => 'Ζ', + '𝝜' => 'Η', + '𝝝' => 'Θ', + '𝝞' => 'Ι', + '𝝟' => 'Κ', + '𝝠' => 'Λ', + '𝝡' => 'Μ', + '𝝢' => 'Ν', + '𝝣' => 'Ξ', + '𝝤' => 'Ο', + '𝝥' => 'Π', + '𝝦' => 'Ρ', + '𝝧' => 'ϴ', + '𝝨' => 'Σ', + '𝝩' => 'Τ', + '𝝪' => 'Υ', + '𝝫' => 'Φ', + '𝝬' => 'Χ', + '𝝭' => 'Ψ', + '𝝮' => 'Ω', + '𝝯' => '∇', + '𝝰' => 'α', + '𝝱' => 'β', + '𝝲' => 'γ', + '𝝳' => 'δ', + '𝝴' => 'ε', + '𝝵' => 'ζ', + '𝝶' => 'η', + '𝝷' => 'θ', + '𝝸' => 'ι', + '𝝹' => 'κ', + '𝝺' => 'λ', + '𝝻' => 'μ', + '𝝼' => 'ν', + '𝝽' => 'ξ', + '𝝾' => 'ο', + '𝝿' => 'π', + '𝞀' => 'ρ', + '𝞁' => 'ς', + '𝞂' => 'σ', + '𝞃' => 'τ', + '𝞄' => 'υ', + '𝞅' => 'φ', + '𝞆' => 'χ', + '𝞇' => 'ψ', + '𝞈' => 'ω', + '𝞉' => '∂', + '𝞊' => 'ϵ', + '𝞋' => 'ϑ', + '𝞌' => 'ϰ', + '𝞍' => 'ϕ', + '𝞎' => 'ϱ', + '𝞏' => 'ϖ', + '𝞐' => 'Α', + '𝞑' => 'Β', + '𝞒' => 'Γ', + '𝞓' => 'Δ', + '𝞔' => 'Ε', + '𝞕' => 'Ζ', + '𝞖' => 'Η', + '𝞗' => 'Θ', + '𝞘' => 'Ι', + '𝞙' => 'Κ', + '𝞚' => 'Λ', + '𝞛' => 'Μ', + '𝞜' => 'Ν', + '𝞝' => 'Ξ', + '𝞞' => 'Ο', + '𝞟' => 'Π', + '𝞠' => 'Ρ', + '𝞡' => 'ϴ', + '𝞢' => 'Σ', + '𝞣' => 'Τ', + '𝞤' => 'Υ', + '𝞥' => 'Φ', + '𝞦' => 'Χ', + '𝞧' => 'Ψ', + '𝞨' => 'Ω', + '𝞩' => '∇', + '𝞪' => 'α', + '𝞫' => 'β', + '𝞬' => 'γ', + '𝞭' => 'δ', + '𝞮' => 'ε', + '𝞯' => 'ζ', + '𝞰' => 'η', + '𝞱' => 'θ', + '𝞲' => 'ι', + '𝞳' => 'κ', + '𝞴' => 'λ', + '𝞵' => 'μ', + '𝞶' => 'ν', + '𝞷' => 'ξ', + '𝞸' => 'ο', + '𝞹' => 'π', + '𝞺' => 'ρ', + '𝞻' => 'ς', + '𝞼' => 'σ', + '𝞽' => 'τ', + '𝞾' => 'υ', + '𝞿' => 'φ', + '𝟀' => 'χ', + '𝟁' => 'ψ', + '𝟂' => 'ω', + '𝟃' => '∂', + '𝟄' => 'ϵ', + '𝟅' => 'ϑ', + '𝟆' => 'ϰ', + '𝟇' => 'ϕ', + '𝟈' => 'ϱ', + '𝟉' => 'ϖ', + '𝟊' => 'Ϝ', + '𝟋' => 'ϝ', + '𝟎' => '0', + '𝟏' => '1', + '𝟐' => '2', + '𝟑' => '3', + '𝟒' => '4', + '𝟓' => '5', + '𝟔' => '6', + '𝟕' => '7', + '𝟖' => '8', + '𝟗' => '9', + '𝟘' => '0', + '𝟙' => '1', + '𝟚' => '2', + '𝟛' => '3', + '𝟜' => '4', + '𝟝' => '5', + '𝟞' => '6', + '𝟟' => '7', + '𝟠' => '8', + '𝟡' => '9', + '𝟢' => '0', + '𝟣' => '1', + '𝟤' => '2', + '𝟥' => '3', + '𝟦' => '4', + '𝟧' => '5', + '𝟨' => '6', + '𝟩' => '7', + '𝟪' => '8', + '𝟫' => '9', + '𝟬' => '0', + '𝟭' => '1', + '𝟮' => '2', + '𝟯' => '3', + '𝟰' => '4', + '𝟱' => '5', + '𝟲' => '6', + '𝟳' => '7', + '𝟴' => '8', + '𝟵' => '9', + '𝟶' => '0', + '𝟷' => '1', + '𝟸' => '2', + '𝟹' => '3', + '𝟺' => '4', + '𝟻' => '5', + '𝟼' => '6', + '𝟽' => '7', + '𝟾' => '8', + '𝟿' => '9', + '𞸀' => 'ا', + '𞸁' => 'ب', + '𞸂' => 'ج', + '𞸃' => 'د', + '𞸅' => 'و', + '𞸆' => 'ز', + '𞸇' => 'ح', + '𞸈' => 'ط', + '𞸉' => 'ي', + '𞸊' => 'ك', + '𞸋' => 'ل', + '𞸌' => 'م', + '𞸍' => 'ن', + '𞸎' => 'س', + '𞸏' => 'ع', + '𞸐' => 'ف', + '𞸑' => 'ص', + '𞸒' => 'ق', + '𞸓' => 'ر', + '𞸔' => 'ش', + '𞸕' => 'ت', + '𞸖' => 'ث', + '𞸗' => 'خ', + '𞸘' => 'ذ', + '𞸙' => 'ض', + '𞸚' => 'ظ', + '𞸛' => 'غ', + '𞸜' => 'ٮ', + '𞸝' => 'ں', + '𞸞' => 'ڡ', + '𞸟' => 'ٯ', + '𞸡' => 'ب', + '𞸢' => 'ج', + '𞸤' => 'ه', + '𞸧' => 'ح', + '𞸩' => 'ي', + '𞸪' => 'ك', + '𞸫' => 'ل', + '𞸬' => 'م', + '𞸭' => 'ن', + '𞸮' => 'س', + '𞸯' => 'ع', + '𞸰' => 'ف', + '𞸱' => 'ص', + '𞸲' => 'ق', + '𞸴' => 'ش', + '𞸵' => 'ت', + '𞸶' => 'ث', + '𞸷' => 'خ', + '𞸹' => 'ض', + '𞸻' => 'غ', + '𞹂' => 'ج', + '𞹇' => 'ح', + '𞹉' => 'ي', + '𞹋' => 'ل', + '𞹍' => 'ن', + '𞹎' => 'س', + '𞹏' => 'ع', + '𞹑' => 'ص', + '𞹒' => 'ق', + '𞹔' => 'ش', + '𞹗' => 'خ', + '𞹙' => 'ض', + '𞹛' => 'غ', + '𞹝' => 'ں', + '𞹟' => 'ٯ', + '𞹡' => 'ب', + '𞹢' => 'ج', + '𞹤' => 'ه', + '𞹧' => 'ح', + '𞹨' => 'ط', + '𞹩' => 'ي', + '𞹪' => 'ك', + '𞹬' => 'م', + '𞹭' => 'ن', + '𞹮' => 'س', + '𞹯' => 'ع', + '𞹰' => 'ف', + '𞹱' => 'ص', + '𞹲' => 'ق', + '𞹴' => 'ش', + '𞹵' => 'ت', + '𞹶' => 'ث', + '𞹷' => 'خ', + '𞹹' => 'ض', + '𞹺' => 'ظ', + '𞹻' => 'غ', + '𞹼' => 'ٮ', + '𞹾' => 'ڡ', + '𞺀' => 'ا', + '𞺁' => 'ب', + '𞺂' => 'ج', + '𞺃' => 'د', + '𞺄' => 'ه', + '𞺅' => 'و', + '𞺆' => 'ز', + '𞺇' => 'ح', + '𞺈' => 'ط', + '𞺉' => 'ي', + '𞺋' => 'ل', + '𞺌' => 'م', + '𞺍' => 'ن', + '𞺎' => 'س', + '𞺏' => 'ع', + '𞺐' => 'ف', + '𞺑' => 'ص', + '𞺒' => 'ق', + '𞺓' => 'ر', + '𞺔' => 'ش', + '𞺕' => 'ت', + '𞺖' => 'ث', + '𞺗' => 'خ', + '𞺘' => 'ذ', + '𞺙' => 'ض', + '𞺚' => 'ظ', + '𞺛' => 'غ', + '𞺡' => 'ب', + '𞺢' => 'ج', + '𞺣' => 'د', + '𞺥' => 'و', + '𞺦' => 'ز', + '𞺧' => 'ح', + '𞺨' => 'ط', + '𞺩' => 'ي', + '𞺫' => 'ل', + '𞺬' => 'م', + '𞺭' => 'ن', + '𞺮' => 'س', + '𞺯' => 'ع', + '𞺰' => 'ف', + '𞺱' => 'ص', + '𞺲' => 'ق', + '𞺳' => 'ر', + '𞺴' => 'ش', + '𞺵' => 'ت', + '𞺶' => 'ث', + '𞺷' => 'خ', + '𞺸' => 'ذ', + '𞺹' => 'ض', + '𞺺' => 'ظ', + '𞺻' => 'غ', + '🄀' => '0.', + '🄁' => '0,', + '🄂' => '1,', + '🄃' => '2,', + '🄄' => '3,', + '🄅' => '4,', + '🄆' => '5,', + '🄇' => '6,', + '🄈' => '7,', + '🄉' => '8,', + '🄊' => '9,', + '🄐' => '(A)', + '🄑' => '(B)', + '🄒' => '(C)', + '🄓' => '(D)', + '🄔' => '(E)', + '🄕' => '(F)', + '🄖' => '(G)', + '🄗' => '(H)', + '🄘' => '(I)', + '🄙' => '(J)', + '🄚' => '(K)', + '🄛' => '(L)', + '🄜' => '(M)', + '🄝' => '(N)', + '🄞' => '(O)', + '🄟' => '(P)', + '🄠' => '(Q)', + '🄡' => '(R)', + '🄢' => '(S)', + '🄣' => '(T)', + '🄤' => '(U)', + '🄥' => '(V)', + '🄦' => '(W)', + '🄧' => '(X)', + '🄨' => '(Y)', + '🄩' => '(Z)', + '🄪' => '〔S〕', + '🄫' => '(C)', + '🄬' => '(R)', + '🄭' => '(CD)', + '🄮' => '(WZ)', + '🄰' => 'A', + '🄱' => 'B', + '🄲' => 'C', + '🄳' => 'D', + '🄴' => 'E', + '🄵' => 'F', + '🄶' => 'G', + '🄷' => 'H', + '🄸' => 'I', + '🄹' => 'J', + '🄺' => 'K', + '🄻' => 'L', + '🄼' => 'M', + '🄽' => 'N', + '🄾' => 'O', + '🄿' => 'P', + '🅀' => 'Q', + '🅁' => 'R', + '🅂' => 'S', + '🅃' => 'T', + '🅄' => 'U', + '🅅' => 'V', + '🅆' => 'W', + '🅇' => 'X', + '🅈' => 'Y', + '🅉' => 'Z', + '🅊' => 'HV', + '🅋' => 'MV', + '🅌' => 'SD', + '🅍' => 'SS', + '🅎' => 'PPV', + '🅏' => 'WC', + '🆐' => 'DJ', + '🈀' => 'ほか', + '🈁' => 'ココ', + '🈂' => 'サ', + '🈐' => '手', + '🈑' => '字', + '🈒' => '双', + '🈓' => 'デ', + '🈔' => '二', + '🈕' => '多', + '🈖' => '解', + '🈗' => '天', + '🈘' => '交', + '🈙' => '映', + '🈚' => '無', + '🈛' => '料', + '🈜' => '前', + '🈝' => '後', + '🈞' => '再', + '🈟' => '新', + '🈠' => '初', + '🈡' => '終', + '🈢' => '生', + '🈣' => '販', + '🈤' => '声', + '🈥' => '吹', + '🈦' => '演', + '🈧' => '投', + '🈨' => '捕', + '🈩' => '一', + '🈪' => '三', + '🈫' => '遊', + '🈬' => '左', + '🈭' => '中', + '🈮' => '右', + '🈯' => '指', + '🈰' => '走', + '🈱' => '打', + '🈲' => '禁', + '🈳' => '空', + '🈴' => '合', + '🈵' => '満', + '🈶' => '有', + '🈷' => '月', + '🈸' => '申', + '🈹' => '割', + '🈺' => '営', + '🉀' => '〔本〕', + '🉁' => '〔三〕', + '🉂' => '〔二〕', + '🉃' => '〔安〕', + '🉄' => '〔点〕', + '🉅' => '〔打〕', + '🉆' => '〔盗〕', + '🉇' => '〔勝〕', + '🉈' => '〔敗〕', + '🉐' => '(得)', + '🉑' => '(可)', + '丽' => '丽', + '丸' => '丸', + '乁' => '乁', + '𠄢' => '𠄢', + '你' => '你', + '侮' => '侮', + '侻' => '侻', + '倂' => '倂', + '偺' => '偺', + '備' => '備', + '僧' => '僧', + '像' => '像', + '㒞' => '㒞', + '𠘺' => '𠘺', + '免' => '免', + '兔' => '兔', + '兤' => '兤', + '具' => '具', + '𠔜' => '𠔜', + '㒹' => '㒹', + '內' => '內', + '再' => '再', + '𠕋' => '𠕋', + '冗' => '冗', + '冤' => '冤', + '仌' => '仌', + '冬' => '冬', + '况' => '况', + '𩇟' => '𩇟', + '凵' => '凵', + '刃' => '刃', + '㓟' => '㓟', + '刻' => '刻', + '剆' => '剆', + '割' => '割', + '剷' => '剷', + '㔕' => '㔕', + '勇' => '勇', + '勉' => '勉', + '勤' => '勤', + '勺' => '勺', + '包' => '包', + '匆' => '匆', + '北' => '北', + '卉' => '卉', + '卑' => '卑', + '博' => '博', + '即' => '即', + '卽' => '卽', + '卿' => '卿', + '卿' => '卿', + '卿' => '卿', + '𠨬' => '𠨬', + '灰' => '灰', + '及' => '及', + '叟' => '叟', + '𠭣' => '𠭣', + '叫' => '叫', + '叱' => '叱', + '吆' => '吆', + '咞' => '咞', + '吸' => '吸', + '呈' => '呈', + '周' => '周', + '咢' => '咢', + '哶' => '哶', + '唐' => '唐', + '啓' => '啓', + '啣' => '啣', + '善' => '善', + '善' => '善', + '喙' => '喙', + '喫' => '喫', + '喳' => '喳', + '嗂' => '嗂', + '圖' => '圖', + '嘆' => '嘆', + '圗' => '圗', + '噑' => '噑', + '噴' => '噴', + '切' => '切', + '壮' => '壮', + '城' => '城', + '埴' => '埴', + '堍' => '堍', + '型' => '型', + '堲' => '堲', + '報' => '報', + '墬' => '墬', + '𡓤' => '𡓤', + '売' => '売', + '壷' => '壷', + '夆' => '夆', + '多' => '多', + '夢' => '夢', + '奢' => '奢', + '𡚨' => '𡚨', + '𡛪' => '𡛪', + '姬' => '姬', + '娛' => '娛', + '娧' => '娧', + '姘' => '姘', + '婦' => '婦', + '㛮' => '㛮', + '㛼' => '㛼', + '嬈' => '嬈', + '嬾' => '嬾', + '嬾' => '嬾', + '𡧈' => '𡧈', + '寃' => '寃', + '寘' => '寘', + '寧' => '寧', + '寳' => '寳', + '𡬘' => '𡬘', + '寿' => '寿', + '将' => '将', + '当' => '当', + '尢' => '尢', + '㞁' => '㞁', + '屠' => '屠', + '屮' => '屮', + '峀' => '峀', + '岍' => '岍', + '𡷤' => '𡷤', + '嵃' => '嵃', + '𡷦' => '𡷦', + '嵮' => '嵮', + '嵫' => '嵫', + '嵼' => '嵼', + '巡' => '巡', + '巢' => '巢', + '㠯' => '㠯', + '巽' => '巽', + '帨' => '帨', + '帽' => '帽', + '幩' => '幩', + '㡢' => '㡢', + '𢆃' => '𢆃', + '㡼' => '㡼', + '庰' => '庰', + '庳' => '庳', + '庶' => '庶', + '廊' => '廊', + '𪎒' => '𪎒', + '廾' => '廾', + '𢌱' => '𢌱', + '𢌱' => '𢌱', + '舁' => '舁', + '弢' => '弢', + '弢' => '弢', + '㣇' => '㣇', + '𣊸' => '𣊸', + '𦇚' => '𦇚', + '形' => '形', + '彫' => '彫', + '㣣' => '㣣', + '徚' => '徚', + '忍' => '忍', + '志' => '志', + '忹' => '忹', + '悁' => '悁', + '㤺' => '㤺', + '㤜' => '㤜', + '悔' => '悔', + '𢛔' => '𢛔', + '惇' => '惇', + '慈' => '慈', + '慌' => '慌', + '慎' => '慎', + '慌' => '慌', + '慺' => '慺', + '憎' => '憎', + '憲' => '憲', + '憤' => '憤', + '憯' => '憯', + '懞' => '懞', + '懲' => '懲', + '懶' => '懶', + '成' => '成', + '戛' => '戛', + '扝' => '扝', + '抱' => '抱', + '拔' => '拔', + '捐' => '捐', + '𢬌' => '𢬌', + '挽' => '挽', + '拼' => '拼', + '捨' => '捨', + '掃' => '掃', + '揤' => '揤', + '𢯱' => '𢯱', + '搢' => '搢', + '揅' => '揅', + '掩' => '掩', + '㨮' => '㨮', + '摩' => '摩', + '摾' => '摾', + '撝' => '撝', + '摷' => '摷', + '㩬' => '㩬', + '敏' => '敏', + '敬' => '敬', + '𣀊' => '𣀊', + '旣' => '旣', + '書' => '書', + '晉' => '晉', + '㬙' => '㬙', + '暑' => '暑', + '㬈' => '㬈', + '㫤' => '㫤', + '冒' => '冒', + '冕' => '冕', + '最' => '最', + '暜' => '暜', + '肭' => '肭', + '䏙' => '䏙', + '朗' => '朗', + '望' => '望', + '朡' => '朡', + '杞' => '杞', + '杓' => '杓', + '𣏃' => '𣏃', + '㭉' => '㭉', + '柺' => '柺', + '枅' => '枅', + '桒' => '桒', + '梅' => '梅', + '𣑭' => '𣑭', + '梎' => '梎', + '栟' => '栟', + '椔' => '椔', + '㮝' => '㮝', + '楂' => '楂', + '榣' => '榣', + '槪' => '槪', + '檨' => '檨', + '𣚣' => '𣚣', + '櫛' => '櫛', + '㰘' => '㰘', + '次' => '次', + '𣢧' => '𣢧', + '歔' => '歔', + '㱎' => '㱎', + '歲' => '歲', + '殟' => '殟', + '殺' => '殺', + '殻' => '殻', + '𣪍' => '𣪍', + '𡴋' => '𡴋', + '𣫺' => '𣫺', + '汎' => '汎', + '𣲼' => '𣲼', + '沿' => '沿', + '泍' => '泍', + '汧' => '汧', + '洖' => '洖', + '派' => '派', + '海' => '海', + '流' => '流', + '浩' => '浩', + '浸' => '浸', + '涅' => '涅', + '𣴞' => '𣴞', + '洴' => '洴', + '港' => '港', + '湮' => '湮', + '㴳' => '㴳', + '滋' => '滋', + '滇' => '滇', + '𣻑' => '𣻑', + '淹' => '淹', + '潮' => '潮', + '𣽞' => '𣽞', + '𣾎' => '𣾎', + '濆' => '濆', + '瀹' => '瀹', + '瀞' => '瀞', + '瀛' => '瀛', + '㶖' => '㶖', + '灊' => '灊', + '災' => '災', + '灷' => '灷', + '炭' => '炭', + '𠔥' => '𠔥', + '煅' => '煅', + '𤉣' => '𤉣', + '熜' => '熜', + '𤎫' => '𤎫', + '爨' => '爨', + '爵' => '爵', + '牐' => '牐', + '𤘈' => '𤘈', + '犀' => '犀', + '犕' => '犕', + '𤜵' => '𤜵', + '𤠔' => '𤠔', + '獺' => '獺', + '王' => '王', + '㺬' => '㺬', + '玥' => '玥', + '㺸' => '㺸', + '㺸' => '㺸', + '瑇' => '瑇', + '瑜' => '瑜', + '瑱' => '瑱', + '璅' => '璅', + '瓊' => '瓊', + '㼛' => '㼛', + '甤' => '甤', + '𤰶' => '𤰶', + '甾' => '甾', + '𤲒' => '𤲒', + '異' => '異', + '𢆟' => '𢆟', + '瘐' => '瘐', + '𤾡' => '𤾡', + '𤾸' => '𤾸', + '𥁄' => '𥁄', + '㿼' => '㿼', + '䀈' => '䀈', + '直' => '直', + '𥃳' => '𥃳', + '𥃲' => '𥃲', + '𥄙' => '𥄙', + '𥄳' => '𥄳', + '眞' => '眞', + '真' => '真', + '真' => '真', + '睊' => '睊', + '䀹' => '䀹', + '瞋' => '瞋', + '䁆' => '䁆', + '䂖' => '䂖', + '𥐝' => '𥐝', + '硎' => '硎', + '碌' => '碌', + '磌' => '磌', + '䃣' => '䃣', + '𥘦' => '𥘦', + '祖' => '祖', + '𥚚' => '𥚚', + '𥛅' => '𥛅', + '福' => '福', + '秫' => '秫', + '䄯' => '䄯', + '穀' => '穀', + '穊' => '穊', + '穏' => '穏', + '𥥼' => '𥥼', + '𥪧' => '𥪧', + '𥪧' => '𥪧', + '竮' => '竮', + '䈂' => '䈂', + '𥮫' => '𥮫', + '篆' => '篆', + '築' => '築', + '䈧' => '䈧', + '𥲀' => '𥲀', + '糒' => '糒', + '䊠' => '䊠', + '糨' => '糨', + '糣' => '糣', + '紀' => '紀', + '𥾆' => '𥾆', + '絣' => '絣', + '䌁' => '䌁', + '緇' => '緇', + '縂' => '縂', + '繅' => '繅', + '䌴' => '䌴', + '𦈨' => '𦈨', + '𦉇' => '𦉇', + '䍙' => '䍙', + '𦋙' => '𦋙', + '罺' => '罺', + '𦌾' => '𦌾', + '羕' => '羕', + '翺' => '翺', + '者' => '者', + '𦓚' => '𦓚', + '𦔣' => '𦔣', + '聠' => '聠', + '𦖨' => '𦖨', + '聰' => '聰', + '𣍟' => '𣍟', + '䏕' => '䏕', + '育' => '育', + '脃' => '脃', + '䐋' => '䐋', + '脾' => '脾', + '媵' => '媵', + '𦞧' => '𦞧', + '𦞵' => '𦞵', + '𣎓' => '𣎓', + '𣎜' => '𣎜', + '舁' => '舁', + '舄' => '舄', + '辞' => '辞', + '䑫' => '䑫', + '芑' => '芑', + '芋' => '芋', + '芝' => '芝', + '劳' => '劳', + '花' => '花', + '芳' => '芳', + '芽' => '芽', + '苦' => '苦', + '𦬼' => '𦬼', + '若' => '若', + '茝' => '茝', + '荣' => '荣', + '莭' => '莭', + '茣' => '茣', + '莽' => '莽', + '菧' => '菧', + '著' => '著', + '荓' => '荓', + '菊' => '菊', + '菌' => '菌', + '菜' => '菜', + '𦰶' => '𦰶', + '𦵫' => '𦵫', + '𦳕' => '𦳕', + '䔫' => '䔫', + '蓱' => '蓱', + '蓳' => '蓳', + '蔖' => '蔖', + '𧏊' => '𧏊', + '蕤' => '蕤', + '𦼬' => '𦼬', + '䕝' => '䕝', + '䕡' => '䕡', + '𦾱' => '𦾱', + '𧃒' => '𧃒', + '䕫' => '䕫', + '虐' => '虐', + '虜' => '虜', + '虧' => '虧', + '虩' => '虩', + '蚩' => '蚩', + '蚈' => '蚈', + '蜎' => '蜎', + '蛢' => '蛢', + '蝹' => '蝹', + '蜨' => '蜨', + '蝫' => '蝫', + '螆' => '螆', + '䗗' => '䗗', + '蟡' => '蟡', + '蠁' => '蠁', + '䗹' => '䗹', + '衠' => '衠', + '衣' => '衣', + '𧙧' => '𧙧', + '裗' => '裗', + '裞' => '裞', + '䘵' => '䘵', + '裺' => '裺', + '㒻' => '㒻', + '𧢮' => '𧢮', + '𧥦' => '𧥦', + '䚾' => '䚾', + '䛇' => '䛇', + '誠' => '誠', + '諭' => '諭', + '變' => '變', + '豕' => '豕', + '𧲨' => '𧲨', + '貫' => '貫', + '賁' => '賁', + '贛' => '贛', + '起' => '起', + '𧼯' => '𧼯', + '𠠄' => '𠠄', + '跋' => '跋', + '趼' => '趼', + '跰' => '跰', + '𠣞' => '𠣞', + '軔' => '軔', + '輸' => '輸', + '𨗒' => '𨗒', + '𨗭' => '𨗭', + '邔' => '邔', + '郱' => '郱', + '鄑' => '鄑', + '𨜮' => '𨜮', + '鄛' => '鄛', + '鈸' => '鈸', + '鋗' => '鋗', + '鋘' => '鋘', + '鉼' => '鉼', + '鏹' => '鏹', + '鐕' => '鐕', + '𨯺' => '𨯺', + '開' => '開', + '䦕' => '䦕', + '閷' => '閷', + '𨵷' => '𨵷', + '䧦' => '䧦', + '雃' => '雃', + '嶲' => '嶲', + '霣' => '霣', + '𩅅' => '𩅅', + '𩈚' => '𩈚', + '䩮' => '䩮', + '䩶' => '䩶', + '韠' => '韠', + '𩐊' => '𩐊', + '䪲' => '䪲', + '𩒖' => '𩒖', + '頋' => '頋', + '頋' => '頋', + '頩' => '頩', + '𩖶' => '𩖶', + '飢' => '飢', + '䬳' => '䬳', + '餩' => '餩', + '馧' => '馧', + '駂' => '駂', + '駾' => '駾', + '䯎' => '䯎', + '𩬰' => '𩬰', + '鬒' => '鬒', + '鱀' => '鱀', + '鳽' => '鳽', + '䳎' => '䳎', + '䳭' => '䳭', + '鵧' => '鵧', + '𪃎' => '𪃎', + '䳸' => '䳸', + '𪄅' => '𪄅', + '𪈎' => '𪈎', + '𪊑' => '𪊑', + '麻' => '麻', + '䵖' => '䵖', + '黹' => '黹', + '黾' => '黾', + '鼅' => '鼅', + '鼏' => '鼏', + '鼖' => '鼖', + '鼻' => '鼻', + '𪘀' => '𪘀', + 'Æ' => 'AE', + 'Ð' => 'D', + 'Ø' => 'O', + 'Þ' => 'TH', + 'ß' => 'ss', + 'æ' => 'ae', + 'ð' => 'd', + 'ø' => 'o', + 'þ' => 'th', + 'Đ' => 'D', + 'đ' => 'd', + 'Ħ' => 'H', + 'ħ' => 'h', + 'ı' => 'i', + 'ĸ' => 'q', + 'Ł' => 'L', + 'ł' => 'l', + 'Ŋ' => 'N', + 'ŋ' => 'n', + 'Œ' => 'OE', + 'œ' => 'oe', + 'Ŧ' => 'T', + 'ŧ' => 't', + 'ƀ' => 'b', + 'Ɓ' => 'B', + 'Ƃ' => 'B', + 'ƃ' => 'b', + 'Ƈ' => 'C', + 'ƈ' => 'c', + 'Ɖ' => 'D', + 'Ɗ' => 'D', + 'Ƌ' => 'D', + 'ƌ' => 'd', + 'Ɛ' => 'E', + 'Ƒ' => 'F', + 'ƒ' => 'f', + 'Ɠ' => 'G', + 'ƕ' => 'hv', + 'Ɩ' => 'I', + 'Ɨ' => 'I', + 'Ƙ' => 'K', + 'ƙ' => 'k', + 'ƚ' => 'l', + 'Ɲ' => 'N', + 'ƞ' => 'n', + 'Ƣ' => 'OI', + 'ƣ' => 'oi', + 'Ƥ' => 'P', + 'ƥ' => 'p', + 'ƫ' => 't', + 'Ƭ' => 'T', + 'ƭ' => 't', + 'Ʈ' => 'T', + 'Ʋ' => 'V', + 'Ƴ' => 'Y', + 'ƴ' => 'y', + 'Ƶ' => 'Z', + 'ƶ' => 'z', + 'Ǥ' => 'G', + 'ǥ' => 'g', + 'ȡ' => 'd', + 'Ȥ' => 'Z', + 'ȥ' => 'z', + 'ȴ' => 'l', + 'ȵ' => 'n', + 'ȶ' => 't', + 'ȷ' => 'j', + 'ȸ' => 'db', + 'ȹ' => 'qp', + 'Ⱥ' => 'A', + 'Ȼ' => 'C', + 'ȼ' => 'c', + 'Ƚ' => 'L', + 'Ⱦ' => 'T', + 'ȿ' => 's', + 'ɀ' => 'z', + 'Ƀ' => 'B', + 'Ʉ' => 'U', + 'Ɇ' => 'E', + 'ɇ' => 'e', + 'Ɉ' => 'J', + 'ɉ' => 'j', + 'Ɍ' => 'R', + 'ɍ' => 'r', + 'Ɏ' => 'Y', + 'ɏ' => 'y', + 'ɓ' => 'b', + 'ɕ' => 'c', + 'ɖ' => 'd', + 'ɗ' => 'd', + 'ɛ' => 'e', + 'ɟ' => 'j', + 'ɠ' => 'g', + 'ɡ' => 'g', + 'ɢ' => 'G', + 'ɦ' => 'h', + 'ɧ' => 'h', + 'ɨ' => 'i', + 'ɪ' => 'I', + 'ɫ' => 'l', + 'ɬ' => 'l', + 'ɭ' => 'l', + 'ɱ' => 'm', + 'ɲ' => 'n', + 'ɳ' => 'n', + 'ɴ' => 'N', + 'ɶ' => 'OE', + 'ɼ' => 'r', + 'ɽ' => 'r', + 'ɾ' => 'r', + 'ʀ' => 'R', + 'ʂ' => 's', + 'ʈ' => 't', + 'ʉ' => 'u', + 'ʋ' => 'v', + 'ʏ' => 'Y', + 'ʐ' => 'z', + 'ʑ' => 'z', + 'ʙ' => 'B', + 'ʛ' => 'G', + 'ʜ' => 'H', + 'ʝ' => 'j', + 'ʟ' => 'L', + 'ʠ' => 'q', + 'ʣ' => 'dz', + 'ʥ' => 'dz', + 'ʦ' => 'ts', + 'ʪ' => 'ls', + 'ʫ' => 'lz', + 'ᴀ' => 'A', + 'ᴁ' => 'AE', + 'ᴃ' => 'B', + 'ᴄ' => 'C', + 'ᴅ' => 'D', + 'ᴆ' => 'D', + 'ᴇ' => 'E', + 'ᴊ' => 'J', + 'ᴋ' => 'K', + 'ᴌ' => 'L', + 'ᴍ' => 'M', + 'ᴏ' => 'O', + 'ᴘ' => 'P', + 'ᴛ' => 'T', + 'ᴜ' => 'U', + 'ᴠ' => 'V', + 'ᴡ' => 'W', + 'ᴢ' => 'Z', + 'ᵫ' => 'ue', + 'ᵬ' => 'b', + 'ᵭ' => 'd', + 'ᵮ' => 'f', + 'ᵯ' => 'm', + 'ᵰ' => 'n', + 'ᵱ' => 'p', + 'ᵲ' => 'r', + 'ᵳ' => 'r', + 'ᵴ' => 's', + 'ᵵ' => 't', + 'ᵶ' => 'z', + 'ᵺ' => 'th', + 'ᵻ' => 'I', + 'ᵽ' => 'p', + 'ᵾ' => 'U', + 'ᶀ' => 'b', + 'ᶁ' => 'd', + 'ᶂ' => 'f', + 'ᶃ' => 'g', + 'ᶄ' => 'k', + 'ᶅ' => 'l', + 'ᶆ' => 'm', + 'ᶇ' => 'n', + 'ᶈ' => 'p', + 'ᶉ' => 'r', + 'ᶊ' => 's', + 'ᶌ' => 'v', + 'ᶍ' => 'x', + 'ᶎ' => 'z', + 'ᶏ' => 'a', + 'ᶑ' => 'd', + 'ᶒ' => 'e', + 'ᶓ' => 'e', + 'ᶖ' => 'i', + 'ᶙ' => 'u', + 'ẜ' => 's', + 'ẝ' => 's', + 'ẞ' => 'SS', + 'Ỻ' => 'LL', + 'ỻ' => 'll', + 'Ỽ' => 'V', + 'ỽ' => 'v', + 'Ỿ' => 'Y', + 'ỿ' => 'y', + '©' => '(C)', + '®' => '(R)', + '₠' => 'CE', + '₢' => 'Cr', + '₣' => 'Fr.', + '₤' => 'L.', + '₧' => 'Pts', + '₺' => 'TL', + '₹' => 'Rs', + '℞' => 'Rx', + '〇' => '0', + '‘' => '\'', + '’' => '\'', + '‚' => ',', + '‛' => '\'', + '“' => '"', + '”' => '"', + '„' => ',,', + '‟' => '"', + '′' => '\'', + '〝' => '"', + '〞' => '"', + '«' => '<<', + '»' => '>>', + '‹' => '<', + '›' => '>', + '‐' => '-', + '‑' => '-', + '‒' => '-', + '–' => '-', + '—' => '-', + '―' => '-', + '︱' => '-', + '︲' => '-', + '‖' => '||', + '⁄' => '/', + '⁅' => '[', + '⁆' => ']', + '⁎' => '*', + '、' => ',', + '。' => '.', + '〈' => '<', + '〉' => '>', + '《' => '<<', + '》' => '>>', + '〔' => '[', + '〕' => ']', + '〘' => '[', + '〙' => ']', + '〚' => '[', + '〛' => ']', + '︐' => ',', + '︑' => ',', + '︒' => '.', + '︓' => ':', + '︔' => ';', + '︕' => '!', + '︖' => '?', + '︙' => '...', + '︰' => '..', + '︵' => '(', + '︶' => ')', + '︷' => '{', + '︸' => '}', + '︹' => '[', + '︺' => ']', + '︽' => '<<', + '︾' => '>>', + '︿' => '<', + '﹀' => '>', + '﹇' => '[', + '﹈' => ']', + '×' => '*', + '÷' => '/', + '−' => '-', + '∕' => '/', + '∖' => '\\', + '∣' => '|', + '∥' => '||', + '≪' => '<<', + '≫' => '>>', + '⦅' => '((', + '⦆' => '))', +); + +$result =& $data; +unset($data); + +return $result; diff --git a/vendor/symfony/polyfill-iconv/composer.json b/vendor/symfony/polyfill-iconv/composer.json index 8bf4dd6c1..7ea72cf35 100644 --- a/vendor/symfony/polyfill-iconv/composer.json +++ b/vendor/symfony/polyfill-iconv/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } } } diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php index 31f678bd6..934cfcff0 100644 --- a/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -15,6 +15,7 @@ namespace Symfony\Polyfill\Mbstring; * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. * * Implemented: + * - mb_chr - Returns a specific character from its Unicode code point * - mb_convert_encoding - Convert character encoding * - mb_convert_variables - Convert character code in variable(s) * - mb_decode_mimeheader - Decode string in MIME header field @@ -25,7 +26,9 @@ namespace Symfony\Polyfill\Mbstring; * - mb_http_output - Set/Get HTTP output character encoding * - mb_internal_encoding - Set/Get internal character encoding * - mb_list_encodings - Returns an array of all supported encodings + * - mb_ord - Returns the Unicode code point of a character * - mb_output_handler - Callback function converts character encoding in output buffer + * - mb_scrub - Replaces ill-formed byte sequences with substitute characters * - mb_strlen - Get string length * - mb_strpos - Find position of first occurrence of string in a string * - mb_strrpos - Find position of last occurrence of a string in a string @@ -96,7 +99,7 @@ final class Mbstring $fromEncoding = 'Windows-1252'; } if ('UTF-8' !== $fromEncoding) { - $s = iconv($fromEncoding, 'UTF-8', $s); + $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); } return preg_replace_callback('/[\x80-\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s); @@ -107,7 +110,7 @@ final class Mbstring $fromEncoding = 'UTF-8'; } - return iconv($fromEncoding, $toEncoding, $s); + return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); } public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) @@ -145,7 +148,7 @@ final class Mbstring if ('UTF-8' === $encoding) { $encoding = null; } else { - $s = iconv($encoding, 'UTF-8', $s); + $s = iconv($encoding, 'UTF-8//IGNORE', $s); } if (MB_CASE_TITLE == $mode) { @@ -202,7 +205,7 @@ final class Mbstring return $s; } - return iconv('UTF-8', $encoding, $s); + return iconv('UTF-8', $encoding.'//IGNORE', $s); } public static function mb_internal_encoding($encoding = null) @@ -333,9 +336,13 @@ final class Mbstring public static function mb_strlen($s, $encoding = null) { - $encoding = self::getEncoding($encoding); + switch ($encoding = self::getEncoding($encoding)) { + case 'ASCII': + case 'CP850': + return strlen($s); + } - return iconv_strlen($s, $encoding); + return @iconv_strlen($s, $encoding); } public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) @@ -510,7 +517,7 @@ final class Mbstring $encoding = self::getEncoding($encoding); if ('UTF-8' !== $encoding) { - $s = iconv($encoding, 'UTF-8', $s); + $s = iconv($encoding, 'UTF-8//IGNORE', $s); } $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); @@ -528,6 +535,45 @@ final class Mbstring return $contents; } + public static function mb_chr($code, $encoding = null) + { + if (0x80 > $code %= 0x200000) { + $s = chr($code); + } elseif (0x800 > $code) { + $s = chr(0xC0 | $code >> 6).chr(0x80 | $code & 0x3F); + } elseif (0x10000 > $code) { + $s = chr(0xE0 | $code >> 12).chr(0x80 | $code >> 6 & 0x3F).chr(0x80 | $code & 0x3F); + } else { + $s = chr(0xF0 | $code >> 18).chr(0x80 | $code >> 12 & 0x3F).chr(0x80 | $code >> 6 & 0x3F).chr(0x80 | $code & 0x3F); + } + + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, $encoding, 'UTF-8'); + } + + return $s; + } + + public static function mb_ord($s, $encoding = null) + { + if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { + $s = mb_convert_encoding($s, 'UTF-8', $encoding); + } + + $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $s[2] - 0x80; + } + + return $code; + } + private static function getSubpart($pos, $part, $haystack, $encoding) { if (false === $pos) { @@ -577,8 +623,8 @@ final class Mbstring private static function getData($file) { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.ser')) { - return unserialize(file_get_contents($file)); + if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { + return require $file; } return false; diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php new file mode 100644 index 000000000..3ca16416a --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php @@ -0,0 +1,1101 @@ + 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + 'À' => 'à', + 'Á' => 'á', + 'Â' => 'â', + 'Ã' => 'ã', + 'Ä' => 'ä', + 'Å' => 'å', + 'Æ' => 'æ', + 'Ç' => 'ç', + 'È' => 'è', + 'É' => 'é', + 'Ê' => 'ê', + 'Ë' => 'ë', + 'Ì' => 'ì', + 'Í' => 'í', + 'Î' => 'î', + 'Ï' => 'ï', + 'Ð' => 'ð', + 'Ñ' => 'ñ', + 'Ò' => 'ò', + 'Ó' => 'ó', + 'Ô' => 'ô', + 'Õ' => 'õ', + 'Ö' => 'ö', + 'Ø' => 'ø', + 'Ù' => 'ù', + 'Ú' => 'ú', + 'Û' => 'û', + 'Ü' => 'ü', + 'Ý' => 'ý', + 'Þ' => 'þ', + 'Ā' => 'ā', + 'Ă' => 'ă', + 'Ą' => 'ą', + 'Ć' => 'ć', + 'Ĉ' => 'ĉ', + 'Ċ' => 'ċ', + 'Č' => 'č', + 'Ď' => 'ď', + 'Đ' => 'đ', + 'Ē' => 'ē', + 'Ĕ' => 'ĕ', + 'Ė' => 'ė', + 'Ę' => 'ę', + 'Ě' => 'ě', + 'Ĝ' => 'ĝ', + 'Ğ' => 'ğ', + 'Ġ' => 'ġ', + 'Ģ' => 'ģ', + 'Ĥ' => 'ĥ', + 'Ħ' => 'ħ', + 'Ĩ' => 'ĩ', + 'Ī' => 'ī', + 'Ĭ' => 'ĭ', + 'Į' => 'į', + 'İ' => 'i', + 'IJ' => 'ij', + 'Ĵ' => 'ĵ', + 'Ķ' => 'ķ', + 'Ĺ' => 'ĺ', + 'Ļ' => 'ļ', + 'Ľ' => 'ľ', + 'Ŀ' => 'ŀ', + 'Ł' => 'ł', + 'Ń' => 'ń', + 'Ņ' => 'ņ', + 'Ň' => 'ň', + 'Ŋ' => 'ŋ', + 'Ō' => 'ō', + 'Ŏ' => 'ŏ', + 'Ő' => 'ő', + 'Œ' => 'œ', + 'Ŕ' => 'ŕ', + 'Ŗ' => 'ŗ', + 'Ř' => 'ř', + 'Ś' => 'ś', + 'Ŝ' => 'ŝ', + 'Ş' => 'ş', + 'Š' => 'š', + 'Ţ' => 'ţ', + 'Ť' => 'ť', + 'Ŧ' => 'ŧ', + 'Ũ' => 'ũ', + 'Ū' => 'ū', + 'Ŭ' => 'ŭ', + 'Ů' => 'ů', + 'Ű' => 'ű', + 'Ų' => 'ų', + 'Ŵ' => 'ŵ', + 'Ŷ' => 'ŷ', + 'Ÿ' => 'ÿ', + 'Ź' => 'ź', + 'Ż' => 'ż', + 'Ž' => 'ž', + 'Ɓ' => 'ɓ', + 'Ƃ' => 'ƃ', + 'Ƅ' => 'ƅ', + 'Ɔ' => 'ɔ', + 'Ƈ' => 'ƈ', + 'Ɖ' => 'ɖ', + 'Ɗ' => 'ɗ', + 'Ƌ' => 'ƌ', + 'Ǝ' => 'ǝ', + 'Ə' => 'ə', + 'Ɛ' => 'ɛ', + 'Ƒ' => 'ƒ', + 'Ɠ' => 'ɠ', + 'Ɣ' => 'ɣ', + 'Ɩ' => 'ɩ', + 'Ɨ' => 'ɨ', + 'Ƙ' => 'ƙ', + 'Ɯ' => 'ɯ', + 'Ɲ' => 'ɲ', + 'Ɵ' => 'ɵ', + 'Ơ' => 'ơ', + 'Ƣ' => 'ƣ', + 'Ƥ' => 'ƥ', + 'Ʀ' => 'ʀ', + 'Ƨ' => 'ƨ', + 'Ʃ' => 'ʃ', + 'Ƭ' => 'ƭ', + 'Ʈ' => 'ʈ', + 'Ư' => 'ư', + 'Ʊ' => 'ʊ', + 'Ʋ' => 'ʋ', + 'Ƴ' => 'ƴ', + 'Ƶ' => 'ƶ', + 'Ʒ' => 'ʒ', + 'Ƹ' => 'ƹ', + 'Ƽ' => 'ƽ', + 'DŽ' => 'dž', + 'Dž' => 'dž', + 'LJ' => 'lj', + 'Lj' => 'lj', + 'NJ' => 'nj', + 'Nj' => 'nj', + 'Ǎ' => 'ǎ', + 'Ǐ' => 'ǐ', + 'Ǒ' => 'ǒ', + 'Ǔ' => 'ǔ', + 'Ǖ' => 'ǖ', + 'Ǘ' => 'ǘ', + 'Ǚ' => 'ǚ', + 'Ǜ' => 'ǜ', + 'Ǟ' => 'ǟ', + 'Ǡ' => 'ǡ', + 'Ǣ' => 'ǣ', + 'Ǥ' => 'ǥ', + 'Ǧ' => 'ǧ', + 'Ǩ' => 'ǩ', + 'Ǫ' => 'ǫ', + 'Ǭ' => 'ǭ', + 'Ǯ' => 'ǯ', + 'DZ' => 'dz', + 'Dz' => 'dz', + 'Ǵ' => 'ǵ', + 'Ƕ' => 'ƕ', + 'Ƿ' => 'ƿ', + 'Ǹ' => 'ǹ', + 'Ǻ' => 'ǻ', + 'Ǽ' => 'ǽ', + 'Ǿ' => 'ǿ', + 'Ȁ' => 'ȁ', + 'Ȃ' => 'ȃ', + 'Ȅ' => 'ȅ', + 'Ȇ' => 'ȇ', + 'Ȉ' => 'ȉ', + 'Ȋ' => 'ȋ', + 'Ȍ' => 'ȍ', + 'Ȏ' => 'ȏ', + 'Ȑ' => 'ȑ', + 'Ȓ' => 'ȓ', + 'Ȕ' => 'ȕ', + 'Ȗ' => 'ȗ', + 'Ș' => 'ș', + 'Ț' => 'ț', + 'Ȝ' => 'ȝ', + 'Ȟ' => 'ȟ', + 'Ƞ' => 'ƞ', + 'Ȣ' => 'ȣ', + 'Ȥ' => 'ȥ', + 'Ȧ' => 'ȧ', + 'Ȩ' => 'ȩ', + 'Ȫ' => 'ȫ', + 'Ȭ' => 'ȭ', + 'Ȯ' => 'ȯ', + 'Ȱ' => 'ȱ', + 'Ȳ' => 'ȳ', + 'Ⱥ' => 'ⱥ', + 'Ȼ' => 'ȼ', + 'Ƚ' => 'ƚ', + 'Ⱦ' => 'ⱦ', + 'Ɂ' => 'ɂ', + 'Ƀ' => 'ƀ', + 'Ʉ' => 'ʉ', + 'Ʌ' => 'ʌ', + 'Ɇ' => 'ɇ', + 'Ɉ' => 'ɉ', + 'Ɋ' => 'ɋ', + 'Ɍ' => 'ɍ', + 'Ɏ' => 'ɏ', + 'Ͱ' => 'ͱ', + 'Ͳ' => 'ͳ', + 'Ͷ' => 'ͷ', + 'Ϳ' => 'ϳ', + 'Ά' => 'ά', + 'Έ' => 'έ', + 'Ή' => 'ή', + 'Ί' => 'ί', + 'Ό' => 'ό', + 'Ύ' => 'ύ', + 'Ώ' => 'ώ', + 'Α' => 'α', + 'Β' => 'β', + 'Γ' => 'γ', + 'Δ' => 'δ', + 'Ε' => 'ε', + 'Ζ' => 'ζ', + 'Η' => 'η', + 'Θ' => 'θ', + 'Ι' => 'ι', + 'Κ' => 'κ', + 'Λ' => 'λ', + 'Μ' => 'μ', + 'Ν' => 'ν', + 'Ξ' => 'ξ', + 'Ο' => 'ο', + 'Π' => 'π', + 'Ρ' => 'ρ', + 'Σ' => 'σ', + 'Τ' => 'τ', + 'Υ' => 'υ', + 'Φ' => 'φ', + 'Χ' => 'χ', + 'Ψ' => 'ψ', + 'Ω' => 'ω', + 'Ϊ' => 'ϊ', + 'Ϋ' => 'ϋ', + 'Ϗ' => 'ϗ', + 'Ϙ' => 'ϙ', + 'Ϛ' => 'ϛ', + 'Ϝ' => 'ϝ', + 'Ϟ' => 'ϟ', + 'Ϡ' => 'ϡ', + 'Ϣ' => 'ϣ', + 'Ϥ' => 'ϥ', + 'Ϧ' => 'ϧ', + 'Ϩ' => 'ϩ', + 'Ϫ' => 'ϫ', + 'Ϭ' => 'ϭ', + 'Ϯ' => 'ϯ', + 'ϴ' => 'θ', + 'Ϸ' => 'ϸ', + 'Ϲ' => 'ϲ', + 'Ϻ' => 'ϻ', + 'Ͻ' => 'ͻ', + 'Ͼ' => 'ͼ', + 'Ͽ' => 'ͽ', + 'Ѐ' => 'ѐ', + 'Ё' => 'ё', + 'Ђ' => 'ђ', + 'Ѓ' => 'ѓ', + 'Є' => 'є', + 'Ѕ' => 'ѕ', + 'І' => 'і', + 'Ї' => 'ї', + 'Ј' => 'ј', + 'Љ' => 'љ', + 'Њ' => 'њ', + 'Ћ' => 'ћ', + 'Ќ' => 'ќ', + 'Ѝ' => 'ѝ', + 'Ў' => 'ў', + 'Џ' => 'џ', + 'А' => 'а', + 'Б' => 'б', + 'В' => 'в', + 'Г' => 'г', + 'Д' => 'д', + 'Е' => 'е', + 'Ж' => 'ж', + 'З' => 'з', + 'И' => 'и', + 'Й' => 'й', + 'К' => 'к', + 'Л' => 'л', + 'М' => 'м', + 'Н' => 'н', + 'О' => 'о', + 'П' => 'п', + 'Р' => 'р', + 'С' => 'с', + 'Т' => 'т', + 'У' => 'у', + 'Ф' => 'ф', + 'Х' => 'х', + 'Ц' => 'ц', + 'Ч' => 'ч', + 'Ш' => 'ш', + 'Щ' => 'щ', + 'Ъ' => 'ъ', + 'Ы' => 'ы', + 'Ь' => 'ь', + 'Э' => 'э', + 'Ю' => 'ю', + 'Я' => 'я', + 'Ѡ' => 'ѡ', + 'Ѣ' => 'ѣ', + 'Ѥ' => 'ѥ', + 'Ѧ' => 'ѧ', + 'Ѩ' => 'ѩ', + 'Ѫ' => 'ѫ', + 'Ѭ' => 'ѭ', + 'Ѯ' => 'ѯ', + 'Ѱ' => 'ѱ', + 'Ѳ' => 'ѳ', + 'Ѵ' => 'ѵ', + 'Ѷ' => 'ѷ', + 'Ѹ' => 'ѹ', + 'Ѻ' => 'ѻ', + 'Ѽ' => 'ѽ', + 'Ѿ' => 'ѿ', + 'Ҁ' => 'ҁ', + 'Ҋ' => 'ҋ', + 'Ҍ' => 'ҍ', + 'Ҏ' => 'ҏ', + 'Ґ' => 'ґ', + 'Ғ' => 'ғ', + 'Ҕ' => 'ҕ', + 'Җ' => 'җ', + 'Ҙ' => 'ҙ', + 'Қ' => 'қ', + 'Ҝ' => 'ҝ', + 'Ҟ' => 'ҟ', + 'Ҡ' => 'ҡ', + 'Ң' => 'ң', + 'Ҥ' => 'ҥ', + 'Ҧ' => 'ҧ', + 'Ҩ' => 'ҩ', + 'Ҫ' => 'ҫ', + 'Ҭ' => 'ҭ', + 'Ү' => 'ү', + 'Ұ' => 'ұ', + 'Ҳ' => 'ҳ', + 'Ҵ' => 'ҵ', + 'Ҷ' => 'ҷ', + 'Ҹ' => 'ҹ', + 'Һ' => 'һ', + 'Ҽ' => 'ҽ', + 'Ҿ' => 'ҿ', + 'Ӏ' => 'ӏ', + 'Ӂ' => 'ӂ', + 'Ӄ' => 'ӄ', + 'Ӆ' => 'ӆ', + 'Ӈ' => 'ӈ', + 'Ӊ' => 'ӊ', + 'Ӌ' => 'ӌ', + 'Ӎ' => 'ӎ', + 'Ӑ' => 'ӑ', + 'Ӓ' => 'ӓ', + 'Ӕ' => 'ӕ', + 'Ӗ' => 'ӗ', + 'Ә' => 'ә', + 'Ӛ' => 'ӛ', + 'Ӝ' => 'ӝ', + 'Ӟ' => 'ӟ', + 'Ӡ' => 'ӡ', + 'Ӣ' => 'ӣ', + 'Ӥ' => 'ӥ', + 'Ӧ' => 'ӧ', + 'Ө' => 'ө', + 'Ӫ' => 'ӫ', + 'Ӭ' => 'ӭ', + 'Ӯ' => 'ӯ', + 'Ӱ' => 'ӱ', + 'Ӳ' => 'ӳ', + 'Ӵ' => 'ӵ', + 'Ӷ' => 'ӷ', + 'Ӹ' => 'ӹ', + 'Ӻ' => 'ӻ', + 'Ӽ' => 'ӽ', + 'Ӿ' => 'ӿ', + 'Ԁ' => 'ԁ', + 'Ԃ' => 'ԃ', + 'Ԅ' => 'ԅ', + 'Ԇ' => 'ԇ', + 'Ԉ' => 'ԉ', + 'Ԋ' => 'ԋ', + 'Ԍ' => 'ԍ', + 'Ԏ' => 'ԏ', + 'Ԑ' => 'ԑ', + 'Ԓ' => 'ԓ', + 'Ԕ' => 'ԕ', + 'Ԗ' => 'ԗ', + 'Ԙ' => 'ԙ', + 'Ԛ' => 'ԛ', + 'Ԝ' => 'ԝ', + 'Ԟ' => 'ԟ', + 'Ԡ' => 'ԡ', + 'Ԣ' => 'ԣ', + 'Ԥ' => 'ԥ', + 'Ԧ' => 'ԧ', + 'Ԩ' => 'ԩ', + 'Ԫ' => 'ԫ', + 'Ԭ' => 'ԭ', + 'Ԯ' => 'ԯ', + 'Ա' => 'ա', + 'Բ' => 'բ', + 'Գ' => 'գ', + 'Դ' => 'դ', + 'Ե' => 'ե', + 'Զ' => 'զ', + 'Է' => 'է', + 'Ը' => 'ը', + 'Թ' => 'թ', + 'Ժ' => 'ժ', + 'Ի' => 'ի', + 'Լ' => 'լ', + 'Խ' => 'խ', + 'Ծ' => 'ծ', + 'Կ' => 'կ', + 'Հ' => 'հ', + 'Ձ' => 'ձ', + 'Ղ' => 'ղ', + 'Ճ' => 'ճ', + 'Մ' => 'մ', + 'Յ' => 'յ', + 'Ն' => 'ն', + 'Շ' => 'շ', + 'Ո' => 'ո', + 'Չ' => 'չ', + 'Պ' => 'պ', + 'Ջ' => 'ջ', + 'Ռ' => 'ռ', + 'Ս' => 'ս', + 'Վ' => 'վ', + 'Տ' => 'տ', + 'Ր' => 'ր', + 'Ց' => 'ց', + 'Ւ' => 'ւ', + 'Փ' => 'փ', + 'Ք' => 'ք', + 'Օ' => 'օ', + 'Ֆ' => 'ֆ', + 'Ⴀ' => 'ⴀ', + 'Ⴁ' => 'ⴁ', + 'Ⴂ' => 'ⴂ', + 'Ⴃ' => 'ⴃ', + 'Ⴄ' => 'ⴄ', + 'Ⴅ' => 'ⴅ', + 'Ⴆ' => 'ⴆ', + 'Ⴇ' => 'ⴇ', + 'Ⴈ' => 'ⴈ', + 'Ⴉ' => 'ⴉ', + 'Ⴊ' => 'ⴊ', + 'Ⴋ' => 'ⴋ', + 'Ⴌ' => 'ⴌ', + 'Ⴍ' => 'ⴍ', + 'Ⴎ' => 'ⴎ', + 'Ⴏ' => 'ⴏ', + 'Ⴐ' => 'ⴐ', + 'Ⴑ' => 'ⴑ', + 'Ⴒ' => 'ⴒ', + 'Ⴓ' => 'ⴓ', + 'Ⴔ' => 'ⴔ', + 'Ⴕ' => 'ⴕ', + 'Ⴖ' => 'ⴖ', + 'Ⴗ' => 'ⴗ', + 'Ⴘ' => 'ⴘ', + 'Ⴙ' => 'ⴙ', + 'Ⴚ' => 'ⴚ', + 'Ⴛ' => 'ⴛ', + 'Ⴜ' => 'ⴜ', + 'Ⴝ' => 'ⴝ', + 'Ⴞ' => 'ⴞ', + 'Ⴟ' => 'ⴟ', + 'Ⴠ' => 'ⴠ', + 'Ⴡ' => 'ⴡ', + 'Ⴢ' => 'ⴢ', + 'Ⴣ' => 'ⴣ', + 'Ⴤ' => 'ⴤ', + 'Ⴥ' => 'ⴥ', + 'Ⴧ' => 'ⴧ', + 'Ⴭ' => 'ⴭ', + 'Ḁ' => 'ḁ', + 'Ḃ' => 'ḃ', + 'Ḅ' => 'ḅ', + 'Ḇ' => 'ḇ', + 'Ḉ' => 'ḉ', + 'Ḋ' => 'ḋ', + 'Ḍ' => 'ḍ', + 'Ḏ' => 'ḏ', + 'Ḑ' => 'ḑ', + 'Ḓ' => 'ḓ', + 'Ḕ' => 'ḕ', + 'Ḗ' => 'ḗ', + 'Ḙ' => 'ḙ', + 'Ḛ' => 'ḛ', + 'Ḝ' => 'ḝ', + 'Ḟ' => 'ḟ', + 'Ḡ' => 'ḡ', + 'Ḣ' => 'ḣ', + 'Ḥ' => 'ḥ', + 'Ḧ' => 'ḧ', + 'Ḩ' => 'ḩ', + 'Ḫ' => 'ḫ', + 'Ḭ' => 'ḭ', + 'Ḯ' => 'ḯ', + 'Ḱ' => 'ḱ', + 'Ḳ' => 'ḳ', + 'Ḵ' => 'ḵ', + 'Ḷ' => 'ḷ', + 'Ḹ' => 'ḹ', + 'Ḻ' => 'ḻ', + 'Ḽ' => 'ḽ', + 'Ḿ' => 'ḿ', + 'Ṁ' => 'ṁ', + 'Ṃ' => 'ṃ', + 'Ṅ' => 'ṅ', + 'Ṇ' => 'ṇ', + 'Ṉ' => 'ṉ', + 'Ṋ' => 'ṋ', + 'Ṍ' => 'ṍ', + 'Ṏ' => 'ṏ', + 'Ṑ' => 'ṑ', + 'Ṓ' => 'ṓ', + 'Ṕ' => 'ṕ', + 'Ṗ' => 'ṗ', + 'Ṙ' => 'ṙ', + 'Ṛ' => 'ṛ', + 'Ṝ' => 'ṝ', + 'Ṟ' => 'ṟ', + 'Ṡ' => 'ṡ', + 'Ṣ' => 'ṣ', + 'Ṥ' => 'ṥ', + 'Ṧ' => 'ṧ', + 'Ṩ' => 'ṩ', + 'Ṫ' => 'ṫ', + 'Ṭ' => 'ṭ', + 'Ṯ' => 'ṯ', + 'Ṱ' => 'ṱ', + 'Ṳ' => 'ṳ', + 'Ṵ' => 'ṵ', + 'Ṷ' => 'ṷ', + 'Ṹ' => 'ṹ', + 'Ṻ' => 'ṻ', + 'Ṽ' => 'ṽ', + 'Ṿ' => 'ṿ', + 'Ẁ' => 'ẁ', + 'Ẃ' => 'ẃ', + 'Ẅ' => 'ẅ', + 'Ẇ' => 'ẇ', + 'Ẉ' => 'ẉ', + 'Ẋ' => 'ẋ', + 'Ẍ' => 'ẍ', + 'Ẏ' => 'ẏ', + 'Ẑ' => 'ẑ', + 'Ẓ' => 'ẓ', + 'Ẕ' => 'ẕ', + 'ẞ' => 'ß', + 'Ạ' => 'ạ', + 'Ả' => 'ả', + 'Ấ' => 'ấ', + 'Ầ' => 'ầ', + 'Ẩ' => 'ẩ', + 'Ẫ' => 'ẫ', + 'Ậ' => 'ậ', + 'Ắ' => 'ắ', + 'Ằ' => 'ằ', + 'Ẳ' => 'ẳ', + 'Ẵ' => 'ẵ', + 'Ặ' => 'ặ', + 'Ẹ' => 'ẹ', + 'Ẻ' => 'ẻ', + 'Ẽ' => 'ẽ', + 'Ế' => 'ế', + 'Ề' => 'ề', + 'Ể' => 'ể', + 'Ễ' => 'ễ', + 'Ệ' => 'ệ', + 'Ỉ' => 'ỉ', + 'Ị' => 'ị', + 'Ọ' => 'ọ', + 'Ỏ' => 'ỏ', + 'Ố' => 'ố', + 'Ồ' => 'ồ', + 'Ổ' => 'ổ', + 'Ỗ' => 'ỗ', + 'Ộ' => 'ộ', + 'Ớ' => 'ớ', + 'Ờ' => 'ờ', + 'Ở' => 'ở', + 'Ỡ' => 'ỡ', + 'Ợ' => 'ợ', + 'Ụ' => 'ụ', + 'Ủ' => 'ủ', + 'Ứ' => 'ứ', + 'Ừ' => 'ừ', + 'Ử' => 'ử', + 'Ữ' => 'ữ', + 'Ự' => 'ự', + 'Ỳ' => 'ỳ', + 'Ỵ' => 'ỵ', + 'Ỷ' => 'ỷ', + 'Ỹ' => 'ỹ', + 'Ỻ' => 'ỻ', + 'Ỽ' => 'ỽ', + 'Ỿ' => 'ỿ', + 'Ἀ' => 'ἀ', + 'Ἁ' => 'ἁ', + 'Ἂ' => 'ἂ', + 'Ἃ' => 'ἃ', + 'Ἄ' => 'ἄ', + 'Ἅ' => 'ἅ', + 'Ἆ' => 'ἆ', + 'Ἇ' => 'ἇ', + 'Ἐ' => 'ἐ', + 'Ἑ' => 'ἑ', + 'Ἒ' => 'ἒ', + 'Ἓ' => 'ἓ', + 'Ἔ' => 'ἔ', + 'Ἕ' => 'ἕ', + 'Ἠ' => 'ἠ', + 'Ἡ' => 'ἡ', + 'Ἢ' => 'ἢ', + 'Ἣ' => 'ἣ', + 'Ἤ' => 'ἤ', + 'Ἥ' => 'ἥ', + 'Ἦ' => 'ἦ', + 'Ἧ' => 'ἧ', + 'Ἰ' => 'ἰ', + 'Ἱ' => 'ἱ', + 'Ἲ' => 'ἲ', + 'Ἳ' => 'ἳ', + 'Ἴ' => 'ἴ', + 'Ἵ' => 'ἵ', + 'Ἶ' => 'ἶ', + 'Ἷ' => 'ἷ', + 'Ὀ' => 'ὀ', + 'Ὁ' => 'ὁ', + 'Ὂ' => 'ὂ', + 'Ὃ' => 'ὃ', + 'Ὄ' => 'ὄ', + 'Ὅ' => 'ὅ', + 'Ὑ' => 'ὑ', + 'Ὓ' => 'ὓ', + 'Ὕ' => 'ὕ', + 'Ὗ' => 'ὗ', + 'Ὠ' => 'ὠ', + 'Ὡ' => 'ὡ', + 'Ὢ' => 'ὢ', + 'Ὣ' => 'ὣ', + 'Ὤ' => 'ὤ', + 'Ὥ' => 'ὥ', + 'Ὦ' => 'ὦ', + 'Ὧ' => 'ὧ', + 'ᾈ' => 'ᾀ', + 'ᾉ' => 'ᾁ', + 'ᾊ' => 'ᾂ', + 'ᾋ' => 'ᾃ', + 'ᾌ' => 'ᾄ', + 'ᾍ' => 'ᾅ', + 'ᾎ' => 'ᾆ', + 'ᾏ' => 'ᾇ', + 'ᾘ' => 'ᾐ', + 'ᾙ' => 'ᾑ', + 'ᾚ' => 'ᾒ', + 'ᾛ' => 'ᾓ', + 'ᾜ' => 'ᾔ', + 'ᾝ' => 'ᾕ', + 'ᾞ' => 'ᾖ', + 'ᾟ' => 'ᾗ', + 'ᾨ' => 'ᾠ', + 'ᾩ' => 'ᾡ', + 'ᾪ' => 'ᾢ', + 'ᾫ' => 'ᾣ', + 'ᾬ' => 'ᾤ', + 'ᾭ' => 'ᾥ', + 'ᾮ' => 'ᾦ', + 'ᾯ' => 'ᾧ', + 'Ᾰ' => 'ᾰ', + 'Ᾱ' => 'ᾱ', + 'Ὰ' => 'ὰ', + 'Ά' => 'ά', + 'ᾼ' => 'ᾳ', + 'Ὲ' => 'ὲ', + 'Έ' => 'έ', + 'Ὴ' => 'ὴ', + 'Ή' => 'ή', + 'ῌ' => 'ῃ', + 'Ῐ' => 'ῐ', + 'Ῑ' => 'ῑ', + 'Ὶ' => 'ὶ', + 'Ί' => 'ί', + 'Ῠ' => 'ῠ', + 'Ῡ' => 'ῡ', + 'Ὺ' => 'ὺ', + 'Ύ' => 'ύ', + 'Ῥ' => 'ῥ', + 'Ὸ' => 'ὸ', + 'Ό' => 'ό', + 'Ὼ' => 'ὼ', + 'Ώ' => 'ώ', + 'ῼ' => 'ῳ', + 'Ω' => 'ω', + 'K' => 'k', + 'Å' => 'å', + 'Ⅎ' => 'ⅎ', + 'Ⅰ' => 'ⅰ', + 'Ⅱ' => 'ⅱ', + 'Ⅲ' => 'ⅲ', + 'Ⅳ' => 'ⅳ', + 'Ⅴ' => 'ⅴ', + 'Ⅵ' => 'ⅵ', + 'Ⅶ' => 'ⅶ', + 'Ⅷ' => 'ⅷ', + 'Ⅸ' => 'ⅸ', + 'Ⅹ' => 'ⅹ', + 'Ⅺ' => 'ⅺ', + 'Ⅻ' => 'ⅻ', + 'Ⅼ' => 'ⅼ', + 'Ⅽ' => 'ⅽ', + 'Ⅾ' => 'ⅾ', + 'Ⅿ' => 'ⅿ', + 'Ↄ' => 'ↄ', + 'Ⓐ' => 'ⓐ', + 'Ⓑ' => 'ⓑ', + 'Ⓒ' => 'ⓒ', + 'Ⓓ' => 'ⓓ', + 'Ⓔ' => 'ⓔ', + 'Ⓕ' => 'ⓕ', + 'Ⓖ' => 'ⓖ', + 'Ⓗ' => 'ⓗ', + 'Ⓘ' => 'ⓘ', + 'Ⓙ' => 'ⓙ', + 'Ⓚ' => 'ⓚ', + 'Ⓛ' => 'ⓛ', + 'Ⓜ' => 'ⓜ', + 'Ⓝ' => 'ⓝ', + 'Ⓞ' => 'ⓞ', + 'Ⓟ' => 'ⓟ', + 'Ⓠ' => 'ⓠ', + 'Ⓡ' => 'ⓡ', + 'Ⓢ' => 'ⓢ', + 'Ⓣ' => 'ⓣ', + 'Ⓤ' => 'ⓤ', + 'Ⓥ' => 'ⓥ', + 'Ⓦ' => 'ⓦ', + 'Ⓧ' => 'ⓧ', + 'Ⓨ' => 'ⓨ', + 'Ⓩ' => 'ⓩ', + 'Ⰰ' => 'ⰰ', + 'Ⰱ' => 'ⰱ', + 'Ⰲ' => 'ⰲ', + 'Ⰳ' => 'ⰳ', + 'Ⰴ' => 'ⰴ', + 'Ⰵ' => 'ⰵ', + 'Ⰶ' => 'ⰶ', + 'Ⰷ' => 'ⰷ', + 'Ⰸ' => 'ⰸ', + 'Ⰹ' => 'ⰹ', + 'Ⰺ' => 'ⰺ', + 'Ⰻ' => 'ⰻ', + 'Ⰼ' => 'ⰼ', + 'Ⰽ' => 'ⰽ', + 'Ⰾ' => 'ⰾ', + 'Ⰿ' => 'ⰿ', + 'Ⱀ' => 'ⱀ', + 'Ⱁ' => 'ⱁ', + 'Ⱂ' => 'ⱂ', + 'Ⱃ' => 'ⱃ', + 'Ⱄ' => 'ⱄ', + 'Ⱅ' => 'ⱅ', + 'Ⱆ' => 'ⱆ', + 'Ⱇ' => 'ⱇ', + 'Ⱈ' => 'ⱈ', + 'Ⱉ' => 'ⱉ', + 'Ⱊ' => 'ⱊ', + 'Ⱋ' => 'ⱋ', + 'Ⱌ' => 'ⱌ', + 'Ⱍ' => 'ⱍ', + 'Ⱎ' => 'ⱎ', + 'Ⱏ' => 'ⱏ', + 'Ⱐ' => 'ⱐ', + 'Ⱑ' => 'ⱑ', + 'Ⱒ' => 'ⱒ', + 'Ⱓ' => 'ⱓ', + 'Ⱔ' => 'ⱔ', + 'Ⱕ' => 'ⱕ', + 'Ⱖ' => 'ⱖ', + 'Ⱗ' => 'ⱗ', + 'Ⱘ' => 'ⱘ', + 'Ⱙ' => 'ⱙ', + 'Ⱚ' => 'ⱚ', + 'Ⱛ' => 'ⱛ', + 'Ⱜ' => 'ⱜ', + 'Ⱝ' => 'ⱝ', + 'Ⱞ' => 'ⱞ', + 'Ⱡ' => 'ⱡ', + 'Ɫ' => 'ɫ', + 'Ᵽ' => 'ᵽ', + 'Ɽ' => 'ɽ', + 'Ⱨ' => 'ⱨ', + 'Ⱪ' => 'ⱪ', + 'Ⱬ' => 'ⱬ', + 'Ɑ' => 'ɑ', + 'Ɱ' => 'ɱ', + 'Ɐ' => 'ɐ', + 'Ɒ' => 'ɒ', + 'Ⱳ' => 'ⱳ', + 'Ⱶ' => 'ⱶ', + 'Ȿ' => 'ȿ', + 'Ɀ' => 'ɀ', + 'Ⲁ' => 'ⲁ', + 'Ⲃ' => 'ⲃ', + 'Ⲅ' => 'ⲅ', + 'Ⲇ' => 'ⲇ', + 'Ⲉ' => 'ⲉ', + 'Ⲋ' => 'ⲋ', + 'Ⲍ' => 'ⲍ', + 'Ⲏ' => 'ⲏ', + 'Ⲑ' => 'ⲑ', + 'Ⲓ' => 'ⲓ', + 'Ⲕ' => 'ⲕ', + 'Ⲗ' => 'ⲗ', + 'Ⲙ' => 'ⲙ', + 'Ⲛ' => 'ⲛ', + 'Ⲝ' => 'ⲝ', + 'Ⲟ' => 'ⲟ', + 'Ⲡ' => 'ⲡ', + 'Ⲣ' => 'ⲣ', + 'Ⲥ' => 'ⲥ', + 'Ⲧ' => 'ⲧ', + 'Ⲩ' => 'ⲩ', + 'Ⲫ' => 'ⲫ', + 'Ⲭ' => 'ⲭ', + 'Ⲯ' => 'ⲯ', + 'Ⲱ' => 'ⲱ', + 'Ⲳ' => 'ⲳ', + 'Ⲵ' => 'ⲵ', + 'Ⲷ' => 'ⲷ', + 'Ⲹ' => 'ⲹ', + 'Ⲻ' => 'ⲻ', + 'Ⲽ' => 'ⲽ', + 'Ⲿ' => 'ⲿ', + 'Ⳁ' => 'ⳁ', + 'Ⳃ' => 'ⳃ', + 'Ⳅ' => 'ⳅ', + 'Ⳇ' => 'ⳇ', + 'Ⳉ' => 'ⳉ', + 'Ⳋ' => 'ⳋ', + 'Ⳍ' => 'ⳍ', + 'Ⳏ' => 'ⳏ', + 'Ⳑ' => 'ⳑ', + 'Ⳓ' => 'ⳓ', + 'Ⳕ' => 'ⳕ', + 'Ⳗ' => 'ⳗ', + 'Ⳙ' => 'ⳙ', + 'Ⳛ' => 'ⳛ', + 'Ⳝ' => 'ⳝ', + 'Ⳟ' => 'ⳟ', + 'Ⳡ' => 'ⳡ', + 'Ⳣ' => 'ⳣ', + 'Ⳬ' => 'ⳬ', + 'Ⳮ' => 'ⳮ', + 'Ⳳ' => 'ⳳ', + 'Ꙁ' => 'ꙁ', + 'Ꙃ' => 'ꙃ', + 'Ꙅ' => 'ꙅ', + 'Ꙇ' => 'ꙇ', + 'Ꙉ' => 'ꙉ', + 'Ꙋ' => 'ꙋ', + 'Ꙍ' => 'ꙍ', + 'Ꙏ' => 'ꙏ', + 'Ꙑ' => 'ꙑ', + 'Ꙓ' => 'ꙓ', + 'Ꙕ' => 'ꙕ', + 'Ꙗ' => 'ꙗ', + 'Ꙙ' => 'ꙙ', + 'Ꙛ' => 'ꙛ', + 'Ꙝ' => 'ꙝ', + 'Ꙟ' => 'ꙟ', + 'Ꙡ' => 'ꙡ', + 'Ꙣ' => 'ꙣ', + 'Ꙥ' => 'ꙥ', + 'Ꙧ' => 'ꙧ', + 'Ꙩ' => 'ꙩ', + 'Ꙫ' => 'ꙫ', + 'Ꙭ' => 'ꙭ', + 'Ꚁ' => 'ꚁ', + 'Ꚃ' => 'ꚃ', + 'Ꚅ' => 'ꚅ', + 'Ꚇ' => 'ꚇ', + 'Ꚉ' => 'ꚉ', + 'Ꚋ' => 'ꚋ', + 'Ꚍ' => 'ꚍ', + 'Ꚏ' => 'ꚏ', + 'Ꚑ' => 'ꚑ', + 'Ꚓ' => 'ꚓ', + 'Ꚕ' => 'ꚕ', + 'Ꚗ' => 'ꚗ', + 'Ꚙ' => 'ꚙ', + 'Ꚛ' => 'ꚛ', + 'Ꜣ' => 'ꜣ', + 'Ꜥ' => 'ꜥ', + 'Ꜧ' => 'ꜧ', + 'Ꜩ' => 'ꜩ', + 'Ꜫ' => 'ꜫ', + 'Ꜭ' => 'ꜭ', + 'Ꜯ' => 'ꜯ', + 'Ꜳ' => 'ꜳ', + 'Ꜵ' => 'ꜵ', + 'Ꜷ' => 'ꜷ', + 'Ꜹ' => 'ꜹ', + 'Ꜻ' => 'ꜻ', + 'Ꜽ' => 'ꜽ', + 'Ꜿ' => 'ꜿ', + 'Ꝁ' => 'ꝁ', + 'Ꝃ' => 'ꝃ', + 'Ꝅ' => 'ꝅ', + 'Ꝇ' => 'ꝇ', + 'Ꝉ' => 'ꝉ', + 'Ꝋ' => 'ꝋ', + 'Ꝍ' => 'ꝍ', + 'Ꝏ' => 'ꝏ', + 'Ꝑ' => 'ꝑ', + 'Ꝓ' => 'ꝓ', + 'Ꝕ' => 'ꝕ', + 'Ꝗ' => 'ꝗ', + 'Ꝙ' => 'ꝙ', + 'Ꝛ' => 'ꝛ', + 'Ꝝ' => 'ꝝ', + 'Ꝟ' => 'ꝟ', + 'Ꝡ' => 'ꝡ', + 'Ꝣ' => 'ꝣ', + 'Ꝥ' => 'ꝥ', + 'Ꝧ' => 'ꝧ', + 'Ꝩ' => 'ꝩ', + 'Ꝫ' => 'ꝫ', + 'Ꝭ' => 'ꝭ', + 'Ꝯ' => 'ꝯ', + 'Ꝺ' => 'ꝺ', + 'Ꝼ' => 'ꝼ', + 'Ᵹ' => 'ᵹ', + 'Ꝿ' => 'ꝿ', + 'Ꞁ' => 'ꞁ', + 'Ꞃ' => 'ꞃ', + 'Ꞅ' => 'ꞅ', + 'Ꞇ' => 'ꞇ', + 'Ꞌ' => 'ꞌ', + 'Ɥ' => 'ɥ', + 'Ꞑ' => 'ꞑ', + 'Ꞓ' => 'ꞓ', + 'Ꞗ' => 'ꞗ', + 'Ꞙ' => 'ꞙ', + 'Ꞛ' => 'ꞛ', + 'Ꞝ' => 'ꞝ', + 'Ꞟ' => 'ꞟ', + 'Ꞡ' => 'ꞡ', + 'Ꞣ' => 'ꞣ', + 'Ꞥ' => 'ꞥ', + 'Ꞧ' => 'ꞧ', + 'Ꞩ' => 'ꞩ', + 'Ɦ' => 'ɦ', + 'Ɜ' => 'ɜ', + 'Ɡ' => 'ɡ', + 'Ɬ' => 'ɬ', + 'Ʞ' => 'ʞ', + 'Ʇ' => 'ʇ', + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '𐐀' => '𐐨', + '𐐁' => '𐐩', + '𐐂' => '𐐪', + '𐐃' => '𐐫', + '𐐄' => '𐐬', + '𐐅' => '𐐭', + '𐐆' => '𐐮', + '𐐇' => '𐐯', + '𐐈' => '𐐰', + '𐐉' => '𐐱', + '𐐊' => '𐐲', + '𐐋' => '𐐳', + '𐐌' => '𐐴', + '𐐍' => '𐐵', + '𐐎' => '𐐶', + '𐐏' => '𐐷', + '𐐐' => '𐐸', + '𐐑' => '𐐹', + '𐐒' => '𐐺', + '𐐓' => '𐐻', + '𐐔' => '𐐼', + '𐐕' => '𐐽', + '𐐖' => '𐐾', + '𐐗' => '𐐿', + '𐐘' => '𐑀', + '𐐙' => '𐑁', + '𐐚' => '𐑂', + '𐐛' => '𐑃', + '𐐜' => '𐑄', + '𐐝' => '𐑅', + '𐐞' => '𐑆', + '𐐟' => '𐑇', + '𐐠' => '𐑈', + '𐐡' => '𐑉', + '𐐢' => '𐑊', + '𐐣' => '𐑋', + '𐐤' => '𐑌', + '𐐥' => '𐑍', + '𐐦' => '𐑎', + '𐐧' => '𐑏', + '𑢠' => '𑣀', + '𑢡' => '𑣁', + '𑢢' => '𑣂', + '𑢣' => '𑣃', + '𑢤' => '𑣄', + '𑢥' => '𑣅', + '𑢦' => '𑣆', + '𑢧' => '𑣇', + '𑢨' => '𑣈', + '𑢩' => '𑣉', + '𑢪' => '𑣊', + '𑢫' => '𑣋', + '𑢬' => '𑣌', + '𑢭' => '𑣍', + '𑢮' => '𑣎', + '𑢯' => '𑣏', + '𑢰' => '𑣐', + '𑢱' => '𑣑', + '𑢲' => '𑣒', + '𑢳' => '𑣓', + '𑢴' => '𑣔', + '𑢵' => '𑣕', + '𑢶' => '𑣖', + '𑢷' => '𑣗', + '𑢸' => '𑣘', + '𑢹' => '𑣙', + '𑢺' => '𑣚', + '𑢻' => '𑣛', + '𑢼' => '𑣜', + '𑢽' => '𑣝', + '𑢾' => '𑣞', + '𑢿' => '𑣟', +); + +$result =& $data; +unset($data); + +return $result; diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php new file mode 100644 index 000000000..ec9422121 --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php @@ -0,0 +1,1109 @@ + 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + 'µ' => 'Μ', + 'à' => 'À', + 'á' => 'Á', + 'â' => 'Â', + 'ã' => 'Ã', + 'ä' => 'Ä', + 'å' => 'Å', + 'æ' => 'Æ', + 'ç' => 'Ç', + 'è' => 'È', + 'é' => 'É', + 'ê' => 'Ê', + 'ë' => 'Ë', + 'ì' => 'Ì', + 'í' => 'Í', + 'î' => 'Î', + 'ï' => 'Ï', + 'ð' => 'Ð', + 'ñ' => 'Ñ', + 'ò' => 'Ò', + 'ó' => 'Ó', + 'ô' => 'Ô', + 'õ' => 'Õ', + 'ö' => 'Ö', + 'ø' => 'Ø', + 'ù' => 'Ù', + 'ú' => 'Ú', + 'û' => 'Û', + 'ü' => 'Ü', + 'ý' => 'Ý', + 'þ' => 'Þ', + 'ÿ' => 'Ÿ', + 'ā' => 'Ā', + 'ă' => 'Ă', + 'ą' => 'Ą', + 'ć' => 'Ć', + 'ĉ' => 'Ĉ', + 'ċ' => 'Ċ', + 'č' => 'Č', + 'ď' => 'Ď', + 'đ' => 'Đ', + 'ē' => 'Ē', + 'ĕ' => 'Ĕ', + 'ė' => 'Ė', + 'ę' => 'Ę', + 'ě' => 'Ě', + 'ĝ' => 'Ĝ', + 'ğ' => 'Ğ', + 'ġ' => 'Ġ', + 'ģ' => 'Ģ', + 'ĥ' => 'Ĥ', + 'ħ' => 'Ħ', + 'ĩ' => 'Ĩ', + 'ī' => 'Ī', + 'ĭ' => 'Ĭ', + 'į' => 'Į', + 'ı' => 'I', + 'ij' => 'IJ', + 'ĵ' => 'Ĵ', + 'ķ' => 'Ķ', + 'ĺ' => 'Ĺ', + 'ļ' => 'Ļ', + 'ľ' => 'Ľ', + 'ŀ' => 'Ŀ', + 'ł' => 'Ł', + 'ń' => 'Ń', + 'ņ' => 'Ņ', + 'ň' => 'Ň', + 'ŋ' => 'Ŋ', + 'ō' => 'Ō', + 'ŏ' => 'Ŏ', + 'ő' => 'Ő', + 'œ' => 'Œ', + 'ŕ' => 'Ŕ', + 'ŗ' => 'Ŗ', + 'ř' => 'Ř', + 'ś' => 'Ś', + 'ŝ' => 'Ŝ', + 'ş' => 'Ş', + 'š' => 'Š', + 'ţ' => 'Ţ', + 'ť' => 'Ť', + 'ŧ' => 'Ŧ', + 'ũ' => 'Ũ', + 'ū' => 'Ū', + 'ŭ' => 'Ŭ', + 'ů' => 'Ů', + 'ű' => 'Ű', + 'ų' => 'Ų', + 'ŵ' => 'Ŵ', + 'ŷ' => 'Ŷ', + 'ź' => 'Ź', + 'ż' => 'Ż', + 'ž' => 'Ž', + 'ſ' => 'S', + 'ƀ' => 'Ƀ', + 'ƃ' => 'Ƃ', + 'ƅ' => 'Ƅ', + 'ƈ' => 'Ƈ', + 'ƌ' => 'Ƌ', + 'ƒ' => 'Ƒ', + 'ƕ' => 'Ƕ', + 'ƙ' => 'Ƙ', + 'ƚ' => 'Ƚ', + 'ƞ' => 'Ƞ', + 'ơ' => 'Ơ', + 'ƣ' => 'Ƣ', + 'ƥ' => 'Ƥ', + 'ƨ' => 'Ƨ', + 'ƭ' => 'Ƭ', + 'ư' => 'Ư', + 'ƴ' => 'Ƴ', + 'ƶ' => 'Ƶ', + 'ƹ' => 'Ƹ', + 'ƽ' => 'Ƽ', + 'ƿ' => 'Ƿ', + 'Dž' => 'DŽ', + 'dž' => 'DŽ', + 'Lj' => 'LJ', + 'lj' => 'LJ', + 'Nj' => 'NJ', + 'nj' => 'NJ', + 'ǎ' => 'Ǎ', + 'ǐ' => 'Ǐ', + 'ǒ' => 'Ǒ', + 'ǔ' => 'Ǔ', + 'ǖ' => 'Ǖ', + 'ǘ' => 'Ǘ', + 'ǚ' => 'Ǚ', + 'ǜ' => 'Ǜ', + 'ǝ' => 'Ǝ', + 'ǟ' => 'Ǟ', + 'ǡ' => 'Ǡ', + 'ǣ' => 'Ǣ', + 'ǥ' => 'Ǥ', + 'ǧ' => 'Ǧ', + 'ǩ' => 'Ǩ', + 'ǫ' => 'Ǫ', + 'ǭ' => 'Ǭ', + 'ǯ' => 'Ǯ', + 'Dz' => 'DZ', + 'dz' => 'DZ', + 'ǵ' => 'Ǵ', + 'ǹ' => 'Ǹ', + 'ǻ' => 'Ǻ', + 'ǽ' => 'Ǽ', + 'ǿ' => 'Ǿ', + 'ȁ' => 'Ȁ', + 'ȃ' => 'Ȃ', + 'ȅ' => 'Ȅ', + 'ȇ' => 'Ȇ', + 'ȉ' => 'Ȉ', + 'ȋ' => 'Ȋ', + 'ȍ' => 'Ȍ', + 'ȏ' => 'Ȏ', + 'ȑ' => 'Ȑ', + 'ȓ' => 'Ȓ', + 'ȕ' => 'Ȕ', + 'ȗ' => 'Ȗ', + 'ș' => 'Ș', + 'ț' => 'Ț', + 'ȝ' => 'Ȝ', + 'ȟ' => 'Ȟ', + 'ȣ' => 'Ȣ', + 'ȥ' => 'Ȥ', + 'ȧ' => 'Ȧ', + 'ȩ' => 'Ȩ', + 'ȫ' => 'Ȫ', + 'ȭ' => 'Ȭ', + 'ȯ' => 'Ȯ', + 'ȱ' => 'Ȱ', + 'ȳ' => 'Ȳ', + 'ȼ' => 'Ȼ', + 'ȿ' => 'Ȿ', + 'ɀ' => 'Ɀ', + 'ɂ' => 'Ɂ', + 'ɇ' => 'Ɇ', + 'ɉ' => 'Ɉ', + 'ɋ' => 'Ɋ', + 'ɍ' => 'Ɍ', + 'ɏ' => 'Ɏ', + 'ɐ' => 'Ɐ', + 'ɑ' => 'Ɑ', + 'ɒ' => 'Ɒ', + 'ɓ' => 'Ɓ', + 'ɔ' => 'Ɔ', + 'ɖ' => 'Ɖ', + 'ɗ' => 'Ɗ', + 'ə' => 'Ə', + 'ɛ' => 'Ɛ', + 'ɜ' => 'Ɜ', + 'ɠ' => 'Ɠ', + 'ɡ' => 'Ɡ', + 'ɣ' => 'Ɣ', + 'ɥ' => 'Ɥ', + 'ɦ' => 'Ɦ', + 'ɨ' => 'Ɨ', + 'ɩ' => 'Ɩ', + 'ɫ' => 'Ɫ', + 'ɬ' => 'Ɬ', + 'ɯ' => 'Ɯ', + 'ɱ' => 'Ɱ', + 'ɲ' => 'Ɲ', + 'ɵ' => 'Ɵ', + 'ɽ' => 'Ɽ', + 'ʀ' => 'Ʀ', + 'ʃ' => 'Ʃ', + 'ʇ' => 'Ʇ', + 'ʈ' => 'Ʈ', + 'ʉ' => 'Ʉ', + 'ʊ' => 'Ʊ', + 'ʋ' => 'Ʋ', + 'ʌ' => 'Ʌ', + 'ʒ' => 'Ʒ', + 'ʞ' => 'Ʞ', + 'ͅ' => 'Ι', + 'ͱ' => 'Ͱ', + 'ͳ' => 'Ͳ', + 'ͷ' => 'Ͷ', + 'ͻ' => 'Ͻ', + 'ͼ' => 'Ͼ', + 'ͽ' => 'Ͽ', + 'ά' => 'Ά', + 'έ' => 'Έ', + 'ή' => 'Ή', + 'ί' => 'Ί', + 'α' => 'Α', + 'β' => 'Β', + 'γ' => 'Γ', + 'δ' => 'Δ', + 'ε' => 'Ε', + 'ζ' => 'Ζ', + 'η' => 'Η', + 'θ' => 'Θ', + 'ι' => 'Ι', + 'κ' => 'Κ', + 'λ' => 'Λ', + 'μ' => 'Μ', + 'ν' => 'Ν', + 'ξ' => 'Ξ', + 'ο' => 'Ο', + 'π' => 'Π', + 'ρ' => 'Ρ', + 'ς' => 'Σ', + 'σ' => 'Σ', + 'τ' => 'Τ', + 'υ' => 'Υ', + 'φ' => 'Φ', + 'χ' => 'Χ', + 'ψ' => 'Ψ', + 'ω' => 'Ω', + 'ϊ' => 'Ϊ', + 'ϋ' => 'Ϋ', + 'ό' => 'Ό', + 'ύ' => 'Ύ', + 'ώ' => 'Ώ', + 'ϐ' => 'Β', + 'ϑ' => 'Θ', + 'ϕ' => 'Φ', + 'ϖ' => 'Π', + 'ϗ' => 'Ϗ', + 'ϙ' => 'Ϙ', + 'ϛ' => 'Ϛ', + 'ϝ' => 'Ϝ', + 'ϟ' => 'Ϟ', + 'ϡ' => 'Ϡ', + 'ϣ' => 'Ϣ', + 'ϥ' => 'Ϥ', + 'ϧ' => 'Ϧ', + 'ϩ' => 'Ϩ', + 'ϫ' => 'Ϫ', + 'ϭ' => 'Ϭ', + 'ϯ' => 'Ϯ', + 'ϰ' => 'Κ', + 'ϱ' => 'Ρ', + 'ϲ' => 'Ϲ', + 'ϳ' => 'Ϳ', + 'ϵ' => 'Ε', + 'ϸ' => 'Ϸ', + 'ϻ' => 'Ϻ', + 'а' => 'А', + 'б' => 'Б', + 'в' => 'В', + 'г' => 'Г', + 'д' => 'Д', + 'е' => 'Е', + 'ж' => 'Ж', + 'з' => 'З', + 'и' => 'И', + 'й' => 'Й', + 'к' => 'К', + 'л' => 'Л', + 'м' => 'М', + 'н' => 'Н', + 'о' => 'О', + 'п' => 'П', + 'р' => 'Р', + 'с' => 'С', + 'т' => 'Т', + 'у' => 'У', + 'ф' => 'Ф', + 'х' => 'Х', + 'ц' => 'Ц', + 'ч' => 'Ч', + 'ш' => 'Ш', + 'щ' => 'Щ', + 'ъ' => 'Ъ', + 'ы' => 'Ы', + 'ь' => 'Ь', + 'э' => 'Э', + 'ю' => 'Ю', + 'я' => 'Я', + 'ѐ' => 'Ѐ', + 'ё' => 'Ё', + 'ђ' => 'Ђ', + 'ѓ' => 'Ѓ', + 'є' => 'Є', + 'ѕ' => 'Ѕ', + 'і' => 'І', + 'ї' => 'Ї', + 'ј' => 'Ј', + 'љ' => 'Љ', + 'њ' => 'Њ', + 'ћ' => 'Ћ', + 'ќ' => 'Ќ', + 'ѝ' => 'Ѝ', + 'ў' => 'Ў', + 'џ' => 'Џ', + 'ѡ' => 'Ѡ', + 'ѣ' => 'Ѣ', + 'ѥ' => 'Ѥ', + 'ѧ' => 'Ѧ', + 'ѩ' => 'Ѩ', + 'ѫ' => 'Ѫ', + 'ѭ' => 'Ѭ', + 'ѯ' => 'Ѯ', + 'ѱ' => 'Ѱ', + 'ѳ' => 'Ѳ', + 'ѵ' => 'Ѵ', + 'ѷ' => 'Ѷ', + 'ѹ' => 'Ѹ', + 'ѻ' => 'Ѻ', + 'ѽ' => 'Ѽ', + 'ѿ' => 'Ѿ', + 'ҁ' => 'Ҁ', + 'ҋ' => 'Ҋ', + 'ҍ' => 'Ҍ', + 'ҏ' => 'Ҏ', + 'ґ' => 'Ґ', + 'ғ' => 'Ғ', + 'ҕ' => 'Ҕ', + 'җ' => 'Җ', + 'ҙ' => 'Ҙ', + 'қ' => 'Қ', + 'ҝ' => 'Ҝ', + 'ҟ' => 'Ҟ', + 'ҡ' => 'Ҡ', + 'ң' => 'Ң', + 'ҥ' => 'Ҥ', + 'ҧ' => 'Ҧ', + 'ҩ' => 'Ҩ', + 'ҫ' => 'Ҫ', + 'ҭ' => 'Ҭ', + 'ү' => 'Ү', + 'ұ' => 'Ұ', + 'ҳ' => 'Ҳ', + 'ҵ' => 'Ҵ', + 'ҷ' => 'Ҷ', + 'ҹ' => 'Ҹ', + 'һ' => 'Һ', + 'ҽ' => 'Ҽ', + 'ҿ' => 'Ҿ', + 'ӂ' => 'Ӂ', + 'ӄ' => 'Ӄ', + 'ӆ' => 'Ӆ', + 'ӈ' => 'Ӈ', + 'ӊ' => 'Ӊ', + 'ӌ' => 'Ӌ', + 'ӎ' => 'Ӎ', + 'ӏ' => 'Ӏ', + 'ӑ' => 'Ӑ', + 'ӓ' => 'Ӓ', + 'ӕ' => 'Ӕ', + 'ӗ' => 'Ӗ', + 'ә' => 'Ә', + 'ӛ' => 'Ӛ', + 'ӝ' => 'Ӝ', + 'ӟ' => 'Ӟ', + 'ӡ' => 'Ӡ', + 'ӣ' => 'Ӣ', + 'ӥ' => 'Ӥ', + 'ӧ' => 'Ӧ', + 'ө' => 'Ө', + 'ӫ' => 'Ӫ', + 'ӭ' => 'Ӭ', + 'ӯ' => 'Ӯ', + 'ӱ' => 'Ӱ', + 'ӳ' => 'Ӳ', + 'ӵ' => 'Ӵ', + 'ӷ' => 'Ӷ', + 'ӹ' => 'Ӹ', + 'ӻ' => 'Ӻ', + 'ӽ' => 'Ӽ', + 'ӿ' => 'Ӿ', + 'ԁ' => 'Ԁ', + 'ԃ' => 'Ԃ', + 'ԅ' => 'Ԅ', + 'ԇ' => 'Ԇ', + 'ԉ' => 'Ԉ', + 'ԋ' => 'Ԋ', + 'ԍ' => 'Ԍ', + 'ԏ' => 'Ԏ', + 'ԑ' => 'Ԑ', + 'ԓ' => 'Ԓ', + 'ԕ' => 'Ԕ', + 'ԗ' => 'Ԗ', + 'ԙ' => 'Ԙ', + 'ԛ' => 'Ԛ', + 'ԝ' => 'Ԝ', + 'ԟ' => 'Ԟ', + 'ԡ' => 'Ԡ', + 'ԣ' => 'Ԣ', + 'ԥ' => 'Ԥ', + 'ԧ' => 'Ԧ', + 'ԩ' => 'Ԩ', + 'ԫ' => 'Ԫ', + 'ԭ' => 'Ԭ', + 'ԯ' => 'Ԯ', + 'ա' => 'Ա', + 'բ' => 'Բ', + 'գ' => 'Գ', + 'դ' => 'Դ', + 'ե' => 'Ե', + 'զ' => 'Զ', + 'է' => 'Է', + 'ը' => 'Ը', + 'թ' => 'Թ', + 'ժ' => 'Ժ', + 'ի' => 'Ի', + 'լ' => 'Լ', + 'խ' => 'Խ', + 'ծ' => 'Ծ', + 'կ' => 'Կ', + 'հ' => 'Հ', + 'ձ' => 'Ձ', + 'ղ' => 'Ղ', + 'ճ' => 'Ճ', + 'մ' => 'Մ', + 'յ' => 'Յ', + 'ն' => 'Ն', + 'շ' => 'Շ', + 'ո' => 'Ո', + 'չ' => 'Չ', + 'պ' => 'Պ', + 'ջ' => 'Ջ', + 'ռ' => 'Ռ', + 'ս' => 'Ս', + 'վ' => 'Վ', + 'տ' => 'Տ', + 'ր' => 'Ր', + 'ց' => 'Ց', + 'ւ' => 'Ւ', + 'փ' => 'Փ', + 'ք' => 'Ք', + 'օ' => 'Օ', + 'ֆ' => 'Ֆ', + 'ᵹ' => 'Ᵹ', + 'ᵽ' => 'Ᵽ', + 'ḁ' => 'Ḁ', + 'ḃ' => 'Ḃ', + 'ḅ' => 'Ḅ', + 'ḇ' => 'Ḇ', + 'ḉ' => 'Ḉ', + 'ḋ' => 'Ḋ', + 'ḍ' => 'Ḍ', + 'ḏ' => 'Ḏ', + 'ḑ' => 'Ḑ', + 'ḓ' => 'Ḓ', + 'ḕ' => 'Ḕ', + 'ḗ' => 'Ḗ', + 'ḙ' => 'Ḙ', + 'ḛ' => 'Ḛ', + 'ḝ' => 'Ḝ', + 'ḟ' => 'Ḟ', + 'ḡ' => 'Ḡ', + 'ḣ' => 'Ḣ', + 'ḥ' => 'Ḥ', + 'ḧ' => 'Ḧ', + 'ḩ' => 'Ḩ', + 'ḫ' => 'Ḫ', + 'ḭ' => 'Ḭ', + 'ḯ' => 'Ḯ', + 'ḱ' => 'Ḱ', + 'ḳ' => 'Ḳ', + 'ḵ' => 'Ḵ', + 'ḷ' => 'Ḷ', + 'ḹ' => 'Ḹ', + 'ḻ' => 'Ḻ', + 'ḽ' => 'Ḽ', + 'ḿ' => 'Ḿ', + 'ṁ' => 'Ṁ', + 'ṃ' => 'Ṃ', + 'ṅ' => 'Ṅ', + 'ṇ' => 'Ṇ', + 'ṉ' => 'Ṉ', + 'ṋ' => 'Ṋ', + 'ṍ' => 'Ṍ', + 'ṏ' => 'Ṏ', + 'ṑ' => 'Ṑ', + 'ṓ' => 'Ṓ', + 'ṕ' => 'Ṕ', + 'ṗ' => 'Ṗ', + 'ṙ' => 'Ṙ', + 'ṛ' => 'Ṛ', + 'ṝ' => 'Ṝ', + 'ṟ' => 'Ṟ', + 'ṡ' => 'Ṡ', + 'ṣ' => 'Ṣ', + 'ṥ' => 'Ṥ', + 'ṧ' => 'Ṧ', + 'ṩ' => 'Ṩ', + 'ṫ' => 'Ṫ', + 'ṭ' => 'Ṭ', + 'ṯ' => 'Ṯ', + 'ṱ' => 'Ṱ', + 'ṳ' => 'Ṳ', + 'ṵ' => 'Ṵ', + 'ṷ' => 'Ṷ', + 'ṹ' => 'Ṹ', + 'ṻ' => 'Ṻ', + 'ṽ' => 'Ṽ', + 'ṿ' => 'Ṿ', + 'ẁ' => 'Ẁ', + 'ẃ' => 'Ẃ', + 'ẅ' => 'Ẅ', + 'ẇ' => 'Ẇ', + 'ẉ' => 'Ẉ', + 'ẋ' => 'Ẋ', + 'ẍ' => 'Ẍ', + 'ẏ' => 'Ẏ', + 'ẑ' => 'Ẑ', + 'ẓ' => 'Ẓ', + 'ẕ' => 'Ẕ', + 'ẛ' => 'Ṡ', + 'ạ' => 'Ạ', + 'ả' => 'Ả', + 'ấ' => 'Ấ', + 'ầ' => 'Ầ', + 'ẩ' => 'Ẩ', + 'ẫ' => 'Ẫ', + 'ậ' => 'Ậ', + 'ắ' => 'Ắ', + 'ằ' => 'Ằ', + 'ẳ' => 'Ẳ', + 'ẵ' => 'Ẵ', + 'ặ' => 'Ặ', + 'ẹ' => 'Ẹ', + 'ẻ' => 'Ẻ', + 'ẽ' => 'Ẽ', + 'ế' => 'Ế', + 'ề' => 'Ề', + 'ể' => 'Ể', + 'ễ' => 'Ễ', + 'ệ' => 'Ệ', + 'ỉ' => 'Ỉ', + 'ị' => 'Ị', + 'ọ' => 'Ọ', + 'ỏ' => 'Ỏ', + 'ố' => 'Ố', + 'ồ' => 'Ồ', + 'ổ' => 'Ổ', + 'ỗ' => 'Ỗ', + 'ộ' => 'Ộ', + 'ớ' => 'Ớ', + 'ờ' => 'Ờ', + 'ở' => 'Ở', + 'ỡ' => 'Ỡ', + 'ợ' => 'Ợ', + 'ụ' => 'Ụ', + 'ủ' => 'Ủ', + 'ứ' => 'Ứ', + 'ừ' => 'Ừ', + 'ử' => 'Ử', + 'ữ' => 'Ữ', + 'ự' => 'Ự', + 'ỳ' => 'Ỳ', + 'ỵ' => 'Ỵ', + 'ỷ' => 'Ỷ', + 'ỹ' => 'Ỹ', + 'ỻ' => 'Ỻ', + 'ỽ' => 'Ỽ', + 'ỿ' => 'Ỿ', + 'ἀ' => 'Ἀ', + 'ἁ' => 'Ἁ', + 'ἂ' => 'Ἂ', + 'ἃ' => 'Ἃ', + 'ἄ' => 'Ἄ', + 'ἅ' => 'Ἅ', + 'ἆ' => 'Ἆ', + 'ἇ' => 'Ἇ', + 'ἐ' => 'Ἐ', + 'ἑ' => 'Ἑ', + 'ἒ' => 'Ἒ', + 'ἓ' => 'Ἓ', + 'ἔ' => 'Ἔ', + 'ἕ' => 'Ἕ', + 'ἠ' => 'Ἠ', + 'ἡ' => 'Ἡ', + 'ἢ' => 'Ἢ', + 'ἣ' => 'Ἣ', + 'ἤ' => 'Ἤ', + 'ἥ' => 'Ἥ', + 'ἦ' => 'Ἦ', + 'ἧ' => 'Ἧ', + 'ἰ' => 'Ἰ', + 'ἱ' => 'Ἱ', + 'ἲ' => 'Ἲ', + 'ἳ' => 'Ἳ', + 'ἴ' => 'Ἴ', + 'ἵ' => 'Ἵ', + 'ἶ' => 'Ἶ', + 'ἷ' => 'Ἷ', + 'ὀ' => 'Ὀ', + 'ὁ' => 'Ὁ', + 'ὂ' => 'Ὂ', + 'ὃ' => 'Ὃ', + 'ὄ' => 'Ὄ', + 'ὅ' => 'Ὅ', + 'ὑ' => 'Ὑ', + 'ὓ' => 'Ὓ', + 'ὕ' => 'Ὕ', + 'ὗ' => 'Ὗ', + 'ὠ' => 'Ὠ', + 'ὡ' => 'Ὡ', + 'ὢ' => 'Ὢ', + 'ὣ' => 'Ὣ', + 'ὤ' => 'Ὤ', + 'ὥ' => 'Ὥ', + 'ὦ' => 'Ὦ', + 'ὧ' => 'Ὧ', + 'ὰ' => 'Ὰ', + 'ά' => 'Ά', + 'ὲ' => 'Ὲ', + 'έ' => 'Έ', + 'ὴ' => 'Ὴ', + 'ή' => 'Ή', + 'ὶ' => 'Ὶ', + 'ί' => 'Ί', + 'ὸ' => 'Ὸ', + 'ό' => 'Ό', + 'ὺ' => 'Ὺ', + 'ύ' => 'Ύ', + 'ὼ' => 'Ὼ', + 'ώ' => 'Ώ', + 'ᾀ' => 'ᾈ', + 'ᾁ' => 'ᾉ', + 'ᾂ' => 'ᾊ', + 'ᾃ' => 'ᾋ', + 'ᾄ' => 'ᾌ', + 'ᾅ' => 'ᾍ', + 'ᾆ' => 'ᾎ', + 'ᾇ' => 'ᾏ', + 'ᾐ' => 'ᾘ', + 'ᾑ' => 'ᾙ', + 'ᾒ' => 'ᾚ', + 'ᾓ' => 'ᾛ', + 'ᾔ' => 'ᾜ', + 'ᾕ' => 'ᾝ', + 'ᾖ' => 'ᾞ', + 'ᾗ' => 'ᾟ', + 'ᾠ' => 'ᾨ', + 'ᾡ' => 'ᾩ', + 'ᾢ' => 'ᾪ', + 'ᾣ' => 'ᾫ', + 'ᾤ' => 'ᾬ', + 'ᾥ' => 'ᾭ', + 'ᾦ' => 'ᾮ', + 'ᾧ' => 'ᾯ', + 'ᾰ' => 'Ᾰ', + 'ᾱ' => 'Ᾱ', + 'ᾳ' => 'ᾼ', + 'ι' => 'Ι', + 'ῃ' => 'ῌ', + 'ῐ' => 'Ῐ', + 'ῑ' => 'Ῑ', + 'ῠ' => 'Ῠ', + 'ῡ' => 'Ῡ', + 'ῥ' => 'Ῥ', + 'ῳ' => 'ῼ', + 'ⅎ' => 'Ⅎ', + 'ⅰ' => 'Ⅰ', + 'ⅱ' => 'Ⅱ', + 'ⅲ' => 'Ⅲ', + 'ⅳ' => 'Ⅳ', + 'ⅴ' => 'Ⅴ', + 'ⅵ' => 'Ⅵ', + 'ⅶ' => 'Ⅶ', + 'ⅷ' => 'Ⅷ', + 'ⅸ' => 'Ⅸ', + 'ⅹ' => 'Ⅹ', + 'ⅺ' => 'Ⅺ', + 'ⅻ' => 'Ⅻ', + 'ⅼ' => 'Ⅼ', + 'ⅽ' => 'Ⅽ', + 'ⅾ' => 'Ⅾ', + 'ⅿ' => 'Ⅿ', + 'ↄ' => 'Ↄ', + 'ⓐ' => 'Ⓐ', + 'ⓑ' => 'Ⓑ', + 'ⓒ' => 'Ⓒ', + 'ⓓ' => 'Ⓓ', + 'ⓔ' => 'Ⓔ', + 'ⓕ' => 'Ⓕ', + 'ⓖ' => 'Ⓖ', + 'ⓗ' => 'Ⓗ', + 'ⓘ' => 'Ⓘ', + 'ⓙ' => 'Ⓙ', + 'ⓚ' => 'Ⓚ', + 'ⓛ' => 'Ⓛ', + 'ⓜ' => 'Ⓜ', + 'ⓝ' => 'Ⓝ', + 'ⓞ' => 'Ⓞ', + 'ⓟ' => 'Ⓟ', + 'ⓠ' => 'Ⓠ', + 'ⓡ' => 'Ⓡ', + 'ⓢ' => 'Ⓢ', + 'ⓣ' => 'Ⓣ', + 'ⓤ' => 'Ⓤ', + 'ⓥ' => 'Ⓥ', + 'ⓦ' => 'Ⓦ', + 'ⓧ' => 'Ⓧ', + 'ⓨ' => 'Ⓨ', + 'ⓩ' => 'Ⓩ', + 'ⰰ' => 'Ⰰ', + 'ⰱ' => 'Ⰱ', + 'ⰲ' => 'Ⰲ', + 'ⰳ' => 'Ⰳ', + 'ⰴ' => 'Ⰴ', + 'ⰵ' => 'Ⰵ', + 'ⰶ' => 'Ⰶ', + 'ⰷ' => 'Ⰷ', + 'ⰸ' => 'Ⰸ', + 'ⰹ' => 'Ⰹ', + 'ⰺ' => 'Ⰺ', + 'ⰻ' => 'Ⰻ', + 'ⰼ' => 'Ⰼ', + 'ⰽ' => 'Ⰽ', + 'ⰾ' => 'Ⰾ', + 'ⰿ' => 'Ⰿ', + 'ⱀ' => 'Ⱀ', + 'ⱁ' => 'Ⱁ', + 'ⱂ' => 'Ⱂ', + 'ⱃ' => 'Ⱃ', + 'ⱄ' => 'Ⱄ', + 'ⱅ' => 'Ⱅ', + 'ⱆ' => 'Ⱆ', + 'ⱇ' => 'Ⱇ', + 'ⱈ' => 'Ⱈ', + 'ⱉ' => 'Ⱉ', + 'ⱊ' => 'Ⱊ', + 'ⱋ' => 'Ⱋ', + 'ⱌ' => 'Ⱌ', + 'ⱍ' => 'Ⱍ', + 'ⱎ' => 'Ⱎ', + 'ⱏ' => 'Ⱏ', + 'ⱐ' => 'Ⱐ', + 'ⱑ' => 'Ⱑ', + 'ⱒ' => 'Ⱒ', + 'ⱓ' => 'Ⱓ', + 'ⱔ' => 'Ⱔ', + 'ⱕ' => 'Ⱕ', + 'ⱖ' => 'Ⱖ', + 'ⱗ' => 'Ⱗ', + 'ⱘ' => 'Ⱘ', + 'ⱙ' => 'Ⱙ', + 'ⱚ' => 'Ⱚ', + 'ⱛ' => 'Ⱛ', + 'ⱜ' => 'Ⱜ', + 'ⱝ' => 'Ⱝ', + 'ⱞ' => 'Ⱞ', + 'ⱡ' => 'Ⱡ', + 'ⱥ' => 'Ⱥ', + 'ⱦ' => 'Ⱦ', + 'ⱨ' => 'Ⱨ', + 'ⱪ' => 'Ⱪ', + 'ⱬ' => 'Ⱬ', + 'ⱳ' => 'Ⱳ', + 'ⱶ' => 'Ⱶ', + 'ⲁ' => 'Ⲁ', + 'ⲃ' => 'Ⲃ', + 'ⲅ' => 'Ⲅ', + 'ⲇ' => 'Ⲇ', + 'ⲉ' => 'Ⲉ', + 'ⲋ' => 'Ⲋ', + 'ⲍ' => 'Ⲍ', + 'ⲏ' => 'Ⲏ', + 'ⲑ' => 'Ⲑ', + 'ⲓ' => 'Ⲓ', + 'ⲕ' => 'Ⲕ', + 'ⲗ' => 'Ⲗ', + 'ⲙ' => 'Ⲙ', + 'ⲛ' => 'Ⲛ', + 'ⲝ' => 'Ⲝ', + 'ⲟ' => 'Ⲟ', + 'ⲡ' => 'Ⲡ', + 'ⲣ' => 'Ⲣ', + 'ⲥ' => 'Ⲥ', + 'ⲧ' => 'Ⲧ', + 'ⲩ' => 'Ⲩ', + 'ⲫ' => 'Ⲫ', + 'ⲭ' => 'Ⲭ', + 'ⲯ' => 'Ⲯ', + 'ⲱ' => 'Ⲱ', + 'ⲳ' => 'Ⲳ', + 'ⲵ' => 'Ⲵ', + 'ⲷ' => 'Ⲷ', + 'ⲹ' => 'Ⲹ', + 'ⲻ' => 'Ⲻ', + 'ⲽ' => 'Ⲽ', + 'ⲿ' => 'Ⲿ', + 'ⳁ' => 'Ⳁ', + 'ⳃ' => 'Ⳃ', + 'ⳅ' => 'Ⳅ', + 'ⳇ' => 'Ⳇ', + 'ⳉ' => 'Ⳉ', + 'ⳋ' => 'Ⳋ', + 'ⳍ' => 'Ⳍ', + 'ⳏ' => 'Ⳏ', + 'ⳑ' => 'Ⳑ', + 'ⳓ' => 'Ⳓ', + 'ⳕ' => 'Ⳕ', + 'ⳗ' => 'Ⳗ', + 'ⳙ' => 'Ⳙ', + 'ⳛ' => 'Ⳛ', + 'ⳝ' => 'Ⳝ', + 'ⳟ' => 'Ⳟ', + 'ⳡ' => 'Ⳡ', + 'ⳣ' => 'Ⳣ', + 'ⳬ' => 'Ⳬ', + 'ⳮ' => 'Ⳮ', + 'ⳳ' => 'Ⳳ', + 'ⴀ' => 'Ⴀ', + 'ⴁ' => 'Ⴁ', + 'ⴂ' => 'Ⴂ', + 'ⴃ' => 'Ⴃ', + 'ⴄ' => 'Ⴄ', + 'ⴅ' => 'Ⴅ', + 'ⴆ' => 'Ⴆ', + 'ⴇ' => 'Ⴇ', + 'ⴈ' => 'Ⴈ', + 'ⴉ' => 'Ⴉ', + 'ⴊ' => 'Ⴊ', + 'ⴋ' => 'Ⴋ', + 'ⴌ' => 'Ⴌ', + 'ⴍ' => 'Ⴍ', + 'ⴎ' => 'Ⴎ', + 'ⴏ' => 'Ⴏ', + 'ⴐ' => 'Ⴐ', + 'ⴑ' => 'Ⴑ', + 'ⴒ' => 'Ⴒ', + 'ⴓ' => 'Ⴓ', + 'ⴔ' => 'Ⴔ', + 'ⴕ' => 'Ⴕ', + 'ⴖ' => 'Ⴖ', + 'ⴗ' => 'Ⴗ', + 'ⴘ' => 'Ⴘ', + 'ⴙ' => 'Ⴙ', + 'ⴚ' => 'Ⴚ', + 'ⴛ' => 'Ⴛ', + 'ⴜ' => 'Ⴜ', + 'ⴝ' => 'Ⴝ', + 'ⴞ' => 'Ⴞ', + 'ⴟ' => 'Ⴟ', + 'ⴠ' => 'Ⴠ', + 'ⴡ' => 'Ⴡ', + 'ⴢ' => 'Ⴢ', + 'ⴣ' => 'Ⴣ', + 'ⴤ' => 'Ⴤ', + 'ⴥ' => 'Ⴥ', + 'ⴧ' => 'Ⴧ', + 'ⴭ' => 'Ⴭ', + 'ꙁ' => 'Ꙁ', + 'ꙃ' => 'Ꙃ', + 'ꙅ' => 'Ꙅ', + 'ꙇ' => 'Ꙇ', + 'ꙉ' => 'Ꙉ', + 'ꙋ' => 'Ꙋ', + 'ꙍ' => 'Ꙍ', + 'ꙏ' => 'Ꙏ', + 'ꙑ' => 'Ꙑ', + 'ꙓ' => 'Ꙓ', + 'ꙕ' => 'Ꙕ', + 'ꙗ' => 'Ꙗ', + 'ꙙ' => 'Ꙙ', + 'ꙛ' => 'Ꙛ', + 'ꙝ' => 'Ꙝ', + 'ꙟ' => 'Ꙟ', + 'ꙡ' => 'Ꙡ', + 'ꙣ' => 'Ꙣ', + 'ꙥ' => 'Ꙥ', + 'ꙧ' => 'Ꙧ', + 'ꙩ' => 'Ꙩ', + 'ꙫ' => 'Ꙫ', + 'ꙭ' => 'Ꙭ', + 'ꚁ' => 'Ꚁ', + 'ꚃ' => 'Ꚃ', + 'ꚅ' => 'Ꚅ', + 'ꚇ' => 'Ꚇ', + 'ꚉ' => 'Ꚉ', + 'ꚋ' => 'Ꚋ', + 'ꚍ' => 'Ꚍ', + 'ꚏ' => 'Ꚏ', + 'ꚑ' => 'Ꚑ', + 'ꚓ' => 'Ꚓ', + 'ꚕ' => 'Ꚕ', + 'ꚗ' => 'Ꚗ', + 'ꚙ' => 'Ꚙ', + 'ꚛ' => 'Ꚛ', + 'ꜣ' => 'Ꜣ', + 'ꜥ' => 'Ꜥ', + 'ꜧ' => 'Ꜧ', + 'ꜩ' => 'Ꜩ', + 'ꜫ' => 'Ꜫ', + 'ꜭ' => 'Ꜭ', + 'ꜯ' => 'Ꜯ', + 'ꜳ' => 'Ꜳ', + 'ꜵ' => 'Ꜵ', + 'ꜷ' => 'Ꜷ', + 'ꜹ' => 'Ꜹ', + 'ꜻ' => 'Ꜻ', + 'ꜽ' => 'Ꜽ', + 'ꜿ' => 'Ꜿ', + 'ꝁ' => 'Ꝁ', + 'ꝃ' => 'Ꝃ', + 'ꝅ' => 'Ꝅ', + 'ꝇ' => 'Ꝇ', + 'ꝉ' => 'Ꝉ', + 'ꝋ' => 'Ꝋ', + 'ꝍ' => 'Ꝍ', + 'ꝏ' => 'Ꝏ', + 'ꝑ' => 'Ꝑ', + 'ꝓ' => 'Ꝓ', + 'ꝕ' => 'Ꝕ', + 'ꝗ' => 'Ꝗ', + 'ꝙ' => 'Ꝙ', + 'ꝛ' => 'Ꝛ', + 'ꝝ' => 'Ꝝ', + 'ꝟ' => 'Ꝟ', + 'ꝡ' => 'Ꝡ', + 'ꝣ' => 'Ꝣ', + 'ꝥ' => 'Ꝥ', + 'ꝧ' => 'Ꝧ', + 'ꝩ' => 'Ꝩ', + 'ꝫ' => 'Ꝫ', + 'ꝭ' => 'Ꝭ', + 'ꝯ' => 'Ꝯ', + 'ꝺ' => 'Ꝺ', + 'ꝼ' => 'Ꝼ', + 'ꝿ' => 'Ꝿ', + 'ꞁ' => 'Ꞁ', + 'ꞃ' => 'Ꞃ', + 'ꞅ' => 'Ꞅ', + 'ꞇ' => 'Ꞇ', + 'ꞌ' => 'Ꞌ', + 'ꞑ' => 'Ꞑ', + 'ꞓ' => 'Ꞓ', + 'ꞗ' => 'Ꞗ', + 'ꞙ' => 'Ꞙ', + 'ꞛ' => 'Ꞛ', + 'ꞝ' => 'Ꞝ', + 'ꞟ' => 'Ꞟ', + 'ꞡ' => 'Ꞡ', + 'ꞣ' => 'Ꞣ', + 'ꞥ' => 'Ꞥ', + 'ꞧ' => 'Ꞧ', + 'ꞩ' => 'Ꞩ', + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '𐐨' => '𐐀', + '𐐩' => '𐐁', + '𐐪' => '𐐂', + '𐐫' => '𐐃', + '𐐬' => '𐐄', + '𐐭' => '𐐅', + '𐐮' => '𐐆', + '𐐯' => '𐐇', + '𐐰' => '𐐈', + '𐐱' => '𐐉', + '𐐲' => '𐐊', + '𐐳' => '𐐋', + '𐐴' => '𐐌', + '𐐵' => '𐐍', + '𐐶' => '𐐎', + '𐐷' => '𐐏', + '𐐸' => '𐐐', + '𐐹' => '𐐑', + '𐐺' => '𐐒', + '𐐻' => '𐐓', + '𐐼' => '𐐔', + '𐐽' => '𐐕', + '𐐾' => '𐐖', + '𐐿' => '𐐗', + '𐑀' => '𐐘', + '𐑁' => '𐐙', + '𐑂' => '𐐚', + '𐑃' => '𐐛', + '𐑄' => '𐐜', + '𐑅' => '𐐝', + '𐑆' => '𐐞', + '𐑇' => '𐐟', + '𐑈' => '𐐠', + '𐑉' => '𐐡', + '𐑊' => '𐐢', + '𐑋' => '𐐣', + '𐑌' => '𐐤', + '𐑍' => '𐐥', + '𐑎' => '𐐦', + '𐑏' => '𐐧', + '𑣀' => '𑢠', + '𑣁' => '𑢡', + '𑣂' => '𑢢', + '𑣃' => '𑢣', + '𑣄' => '𑢤', + '𑣅' => '𑢥', + '𑣆' => '𑢦', + '𑣇' => '𑢧', + '𑣈' => '𑢨', + '𑣉' => '𑢩', + '𑣊' => '𑢪', + '𑣋' => '𑢫', + '𑣌' => '𑢬', + '𑣍' => '𑢭', + '𑣎' => '𑢮', + '𑣏' => '𑢯', + '𑣐' => '𑢰', + '𑣑' => '𑢱', + '𑣒' => '𑢲', + '𑣓' => '𑢳', + '𑣔' => '𑢴', + '𑣕' => '𑢵', + '𑣖' => '𑢶', + '𑣗' => '𑢷', + '𑣘' => '𑢸', + '𑣙' => '𑢹', + '𑣚' => '𑢺', + '𑣛' => '𑢻', + '𑣜' => '𑢼', + '𑣝' => '𑢽', + '𑣞' => '𑢾', + '𑣟' => '𑢿', +); + +$result =& $data; +unset($data); + +return $result; diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php index 4b01b614a..337229106 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -47,5 +47,10 @@ if (!function_exists('mb_strlen')) { function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } - function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $v0, $a, $b, $c, $d, $e, $f); } + function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } +} +if (!function_exists('mb_chr')) { + function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); } + function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); } + function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); } } diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json index ef9f323cd..24eefbde1 100644 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } } } diff --git a/vendor/symfony/polyfill-php54/Php54.php b/vendor/symfony/polyfill-php54/Php54.php index 3a7eb3a98..f64b58bc4 100644 --- a/vendor/symfony/polyfill-php54/Php54.php +++ b/vendor/symfony/polyfill-php54/Php54.php @@ -31,12 +31,6 @@ final class Php54 return false; } - $data = pack('H*', $data); - - if (false !== strpos($data, "\0")) { - return false; - } - - return $data; + return pack('H*', $data); } } diff --git a/vendor/symfony/polyfill-php54/bootstrap.php b/vendor/symfony/polyfill-php54/bootstrap.php index bb0f6b4b8..e923a29d0 100644 --- a/vendor/symfony/polyfill-php54/bootstrap.php +++ b/vendor/symfony/polyfill-php54/bootstrap.php @@ -16,7 +16,14 @@ if (PHP_VERSION_ID < 50400) { function trait_exists($class, $autoload = true) { return $autoload && class_exists($class, $autoload) && false; } } if (!function_exists('class_uses')) { - function class_uses($class, $autoload = true) { return $autoload && class_exists($class, $autoload) && false; } + function class_uses($class, $autoload = true) + { + if (is_object($class) || class_exists($class, $autoload) || interface_exists($class, false)) { + return array(); + } + + return false; + } } if (!function_exists('hex2bin')) { function hex2bin($data) { return p\Php54::hex2bin($data); } diff --git a/vendor/symfony/polyfill-php54/composer.json b/vendor/symfony/polyfill-php54/composer.json index 642481f74..327f46c38 100644 --- a/vendor/symfony/polyfill-php54/composer.json +++ b/vendor/symfony/polyfill-php54/composer.json @@ -26,7 +26,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } } } diff --git a/vendor/symfony/polyfill-php55/composer.json b/vendor/symfony/polyfill-php55/composer.json index aa2f9c675..49deca9e9 100644 --- a/vendor/symfony/polyfill-php55/composer.json +++ b/vendor/symfony/polyfill-php55/composer.json @@ -26,7 +26,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } } } diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php index fa11cb6e4..d8e689622 100644 --- a/vendor/symfony/process/ExecutableFinder.php +++ b/vendor/symfony/process/ExecutableFinder.php @@ -60,7 +60,7 @@ class ExecutableFinder if (@is_dir($path)) { $dirs[] = $path; } else { - if (basename($path) == $name && is_executable($path)) { + if (basename($path) == $name && @is_executable($path)) { return $path; } } @@ -75,11 +75,11 @@ class ExecutableFinder $suffixes = array(''); if ('\\' === DIRECTORY_SEPARATOR) { $pathExt = getenv('PATHEXT'); - $suffixes = $pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes; + $suffixes = array_merge($suffixes, $pathExt ? explode(PATH_SEPARATOR, $pathExt) : $this->suffixes); } foreach ($suffixes as $suffix) { foreach ($dirs as $dir) { - if (is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) { + if (@is_file($file = $dir.DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === DIRECTORY_SEPARATOR || is_executable($file))) { return $file; } } diff --git a/vendor/symfony/process/LICENSE b/vendor/symfony/process/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/process/LICENSE +++ b/vendor/symfony/process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/process/Pipes/AbstractPipes.php b/vendor/symfony/process/Pipes/AbstractPipes.php index f2fd35eb4..1a94755bd 100644 --- a/vendor/symfony/process/Pipes/AbstractPipes.php +++ b/vendor/symfony/process/Pipes/AbstractPipes.php @@ -22,10 +22,9 @@ abstract class AbstractPipes implements PipesInterface public $pipes = array(); /** @var string */ - protected $inputBuffer = ''; + private $inputBuffer = ''; /** @var resource|null */ - protected $input; - + private $input; /** @var bool */ private $blocked = true; @@ -91,9 +90,8 @@ abstract class AbstractPipes implements PipesInterface if (!isset($this->pipes[0])) { return; } - - $e = array(); - $r = null !== $this->input ? array($this->input) : $e; + $input = $this->input; + $r = $e = array(); $w = array($this->pipes[0]); // let's have a look if something changed in streams @@ -110,7 +108,7 @@ abstract class AbstractPipes implements PipesInterface } } - foreach ($r as $input) { + if ($input) { for (;;) { $data = fread($input, self::CHUNK_SIZE); if (!isset($data[0])) { @@ -124,7 +122,7 @@ abstract class AbstractPipes implements PipesInterface return array($this->pipes[0]); } } - if (!isset($data[0]) && feof($input)) { + if (feof($input)) { // no more data to read on input resource // use an empty buffer in the next reads $this->input = null; @@ -136,9 +134,7 @@ abstract class AbstractPipes implements PipesInterface if (null === $this->input && !isset($this->inputBuffer[0])) { fclose($this->pipes[0]); unset($this->pipes[0]); - } - - if (!$w) { + } elseif (!$w) { return array($this->pipes[0]); } } diff --git a/vendor/symfony/process/Pipes/PipesInterface.php b/vendor/symfony/process/Pipes/PipesInterface.php index 09d3f61d6..b91c393d8 100644 --- a/vendor/symfony/process/Pipes/PipesInterface.php +++ b/vendor/symfony/process/Pipes/PipesInterface.php @@ -39,10 +39,10 @@ interface PipesInterface /** * Reads data in file handles and pipes. * - * @param bool $blocking Whether to use blocking calls or not. - * @param bool $close Whether to close pipes if they've reached EOF. + * @param bool $blocking Whether to use blocking calls or not + * @param bool $close Whether to close pipes if they've reached EOF * - * @return string[] An array of read data indexed by their fd. + * @return string[] An array of read data indexed by their fd */ public function readAndWrite($blocking, $close = false); diff --git a/vendor/symfony/process/Pipes/UnixPipes.php b/vendor/symfony/process/Pipes/UnixPipes.php index 2bf669733..c4babcdf5 100644 --- a/vendor/symfony/process/Pipes/UnixPipes.php +++ b/vendor/symfony/process/Pipes/UnixPipes.php @@ -120,7 +120,7 @@ class UnixPipes extends AbstractPipes do { $data = fread($pipe, self::CHUNK_SIZE); $read[$type] .= $data; - } while (isset($data[0])); + } while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1]))); if (!isset($read[$type][0])) { unset($read[$type]); @@ -149,7 +149,7 @@ class UnixPipes extends AbstractPipes * @param Process $process * @param string|resource $input * - * @return UnixPipes + * @return static */ public static function create(Process $process, $input) { diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php index 23e412ca3..87a781ea9 100644 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/vendor/symfony/process/Pipes/WindowsPipes.php @@ -47,15 +47,40 @@ class WindowsPipes extends AbstractPipes // Workaround for this problem is to use temporary files instead of pipes on Windows platform. // // @see https://bugs.php.net/bug.php?id=51800 - $this->files = array( - Process::STDOUT => tempnam(sys_get_temp_dir(), 'out_sf_proc'), - Process::STDERR => tempnam(sys_get_temp_dir(), 'err_sf_proc'), + $pipes = array( + Process::STDOUT => Process::OUT, + Process::STDERR => Process::ERR, ); - foreach ($this->files as $offset => $file) { - if (false === $file || false === $this->fileHandles[$offset] = @fopen($file, 'rb')) { - throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); + $tmpCheck = false; + $tmpDir = sys_get_temp_dir(); + $lastError = 'unknown reason'; + set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; }); + for ($i = 0;; ++$i) { + foreach ($pipes as $pipe => $name) { + $file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name); + if (file_exists($file) && !unlink($file)) { + continue 2; + } + $h = fopen($file, 'xb'); + if (!$h) { + $error = $lastError; + if ($tmpCheck || $tmpCheck = unlink(tempnam(false, 'sf_check_'))) { + continue; + } + restore_error_handler(); + throw new RuntimeException(sprintf('A temporary file could not be opened to write the process output: %s', $error)); + } + if (!$h || !$this->fileHandles[$pipe] = fopen($file, 'rb')) { + continue 2; + } + if (isset($this->files[$pipe])) { + unlink($this->files[$pipe]); + } + $this->files[$pipe] = $file; } + break; } + restore_error_handler(); } parent::__construct($input); @@ -158,7 +183,7 @@ class WindowsPipes extends AbstractPipes * @param Process $process The process * @param $input * - * @return WindowsPipes + * @return static */ public static function create(Process $process, $input) { diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php index 8047ef971..96a93343f 100644 --- a/vendor/symfony/process/Process.php +++ b/vendor/symfony/process/Process.php @@ -158,11 +158,10 @@ class Process $this->setEnv($env); } - $this->input = $input; + $this->setInput($input); $this->setTimeout($timeout); $this->useFileHandles = '\\' === DIRECTORY_SEPARATOR; $this->pty = false; - $this->enhanceWindowsCompatibility = true; $this->enhanceSigchildCompatibility = '\\' !== DIRECTORY_SEPARATOR && $this->isSigchildEnabled(); $this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options); } @@ -314,7 +313,7 @@ class Process * @param callable|null $callback A PHP callback to run whenever there is some * output available on STDOUT or STDERR * - * @return Process The new process + * @return $this * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process is already running @@ -389,7 +388,7 @@ class Process * * @param int $signal A valid POSIX signal (see http://www.php.net/manual/en/pcntl.constants.php) * - * @return Process + * @return $this * * @throws LogicException In case the process is not running * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed @@ -405,7 +404,7 @@ class Process /** * Disables fetching output and error output from the underlying process. * - * @return Process + * @return $this * * @throws RuntimeException In case the process is already running * @throws LogicException if an idle timeout is set @@ -427,7 +426,7 @@ class Process /** * Enables fetching output and error output from the underlying process. * - * @return Process + * @return $this * * @throws RuntimeException In case the process is already running */ @@ -477,10 +476,10 @@ class Process * In comparison with the getOutput method which always return the whole * output, this one returns the new output since the last call. * + * @return string The process output since the last call + * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started - * - * @return string The process output since the last call */ public function getIncrementalOutput() { @@ -499,7 +498,7 @@ class Process /** * Clears the process output. * - * @return Process + * @return $this */ public function clearOutput() { @@ -536,10 +535,10 @@ class Process * whole error output, this one returns the new error output since the last * call. * + * @return string The process error output since the last call + * * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started - * - * @return string The process error output since the last call */ public function getIncrementalErrorOutput() { @@ -558,7 +557,7 @@ class Process /** * Clears the process output. * - * @return Process + * @return $this */ public function clearErrorOutput() { @@ -593,7 +592,7 @@ class Process * This method relies on the Unix exit code status standardization * and might not be relevant for other operating systems. * - * @return null|string A string representation for the exit status code, null if the Process is not terminated. + * @return null|string A string representation for the exit status code, null if the Process is not terminated * * @see http://tldp.org/LDP/abs/html/exitcodes.html * @see http://en.wikipedia.org/wiki/Unix_signal @@ -881,7 +880,7 @@ class Process * * @param int|float|null $timeout The timeout in seconds * - * @return self The current Process instance. + * @return self The current Process instance * * @throws LogicException if the output is disabled * @throws InvalidArgumentException if the timeout is negative @@ -911,8 +910,16 @@ class Process if ('\\' === DIRECTORY_SEPARATOR && $tty) { throw new RuntimeException('TTY mode is not supported on Windows platform.'); } - if ($tty && (!file_exists('/dev/tty') || !is_readable('/dev/tty'))) { - throw new RuntimeException('TTY mode requires /dev/tty to be readable.'); + if ($tty) { + static $isTtySupported; + + if (null === $isTtySupported) { + $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', array(array('file', '/dev/tty', 'r'), array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w')), $pipes); + } + + if (!$isTtySupported) { + throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.'); + } } $this->tty = (bool) $tty; @@ -1087,7 +1094,7 @@ class Process throw new LogicException('Input can not be set while the process is running.'); } - $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); + $this->input = ProcessUtils::validateInput(__METHOD__, $input); return $this; } @@ -1214,7 +1221,7 @@ class Process return $result = false; } - return $result = (bool) @proc_open('echo 1', array(array('pty'), array('pty'), array('pty')), $pipes); + return $result = (bool) @proc_open('echo 1 >/dev/null', array(array('pty'), array('pty'), array('pty')), $pipes); } /** @@ -1265,7 +1272,7 @@ class Process /** * Updates the status of the process, reads pipes. * - * @param bool $blocking Whether to use a blocking read call. + * @param bool $blocking Whether to use a blocking read call */ protected function updateStatus($blocking) { @@ -1351,8 +1358,8 @@ class Process /** * Reads pipes, executes callback. * - * @param bool $blocking Whether to use blocking calls or not. - * @param bool $close Whether to close file handles or not. + * @param bool $blocking Whether to use blocking calls or not + * @param bool $close Whether to close file handles or not */ private function readPipes($blocking, $close) { @@ -1478,7 +1485,7 @@ class Process /** * Ensures the process is running or terminated, throws a LogicException if the process has a not started. * - * @param string $functionName The function name that was called. + * @param string $functionName The function name that was called * * @throws LogicException If the process has not run. */ @@ -1492,7 +1499,7 @@ class Process /** * Ensures the process is terminated, throws a LogicException if the process has a status different than `terminated`. * - * @param string $functionName The function name that was called. + * @param string $functionName The function name that was called * * @throws LogicException If the process is not yet terminated. */ diff --git a/vendor/symfony/process/ProcessBuilder.php b/vendor/symfony/process/ProcessBuilder.php index a782fd69e..54877a828 100644 --- a/vendor/symfony/process/ProcessBuilder.php +++ b/vendor/symfony/process/ProcessBuilder.php @@ -46,7 +46,7 @@ class ProcessBuilder * * @param string[] $arguments An array of arguments * - * @return ProcessBuilder + * @return static */ public static function create(array $arguments = array()) { @@ -58,7 +58,7 @@ class ProcessBuilder * * @param string $argument A command argument * - * @return ProcessBuilder + * @return $this */ public function add($argument) { @@ -74,7 +74,7 @@ class ProcessBuilder * * @param string|array $prefix A command prefix or an array of command prefixes * - * @return ProcessBuilder + * @return $this */ public function setPrefix($prefix) { @@ -91,7 +91,7 @@ class ProcessBuilder * * @param string[] $arguments * - * @return ProcessBuilder + * @return $this */ public function setArguments(array $arguments) { @@ -105,7 +105,7 @@ class ProcessBuilder * * @param null|string $cwd The working directory * - * @return ProcessBuilder + * @return $this */ public function setWorkingDirectory($cwd) { @@ -119,7 +119,7 @@ class ProcessBuilder * * @param bool $inheritEnv * - * @return ProcessBuilder + * @return $this */ public function inheritEnvironmentVariables($inheritEnv = true) { @@ -137,7 +137,7 @@ class ProcessBuilder * @param string $name The variable name * @param null|string $value The variable value * - * @return ProcessBuilder + * @return $this */ public function setEnv($name, $value) { @@ -155,7 +155,7 @@ class ProcessBuilder * * @param array $variables The variables * - * @return ProcessBuilder + * @return $this */ public function addEnvironmentVariables(array $variables) { @@ -169,7 +169,7 @@ class ProcessBuilder * * @param mixed $input The input as a string * - * @return ProcessBuilder + * @return $this * * @throws InvalidArgumentException In case the argument is invalid * @@ -177,7 +177,7 @@ class ProcessBuilder */ public function setInput($input) { - $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); + $this->input = ProcessUtils::validateInput(__METHOD__, $input); return $this; } @@ -189,7 +189,7 @@ class ProcessBuilder * * @param float|null $timeout * - * @return ProcessBuilder + * @return $this * * @throws InvalidArgumentException */ @@ -218,7 +218,7 @@ class ProcessBuilder * @param string $name The option name * @param string $value The option value * - * @return ProcessBuilder + * @return $this */ public function setOption($name, $value) { @@ -230,7 +230,7 @@ class ProcessBuilder /** * Disables fetching output and error output from the underlying process. * - * @return ProcessBuilder + * @return $this */ public function disableOutput() { @@ -242,7 +242,7 @@ class ProcessBuilder /** * Enables fetching output and error output from the underlying process. * - * @return ProcessBuilder + * @return $this */ public function enableOutput() { diff --git a/vendor/symfony/process/ProcessUtils.php b/vendor/symfony/process/ProcessUtils.php index 4f30b630d..c0fd9c12d 100644 --- a/vendor/symfony/process/ProcessUtils.php +++ b/vendor/symfony/process/ProcessUtils.php @@ -71,7 +71,7 @@ class ProcessUtils return $escapedArgument; } - return escapeshellarg($argument); + return "'".str_replace("'", "'\\''", $argument)."'"; } /** @@ -80,7 +80,7 @@ class ProcessUtils * @param string $caller The name of method call that validates the input * @param mixed $input The input to validate * - * @return string The validated input + * @return mixed The validated input * * @throws InvalidArgumentException In case the input is not valid * @@ -92,6 +92,9 @@ class ProcessUtils if (is_resource($input)) { return $input; } + if (is_string($input)) { + return $input; + } if (is_scalar($input)) { return (string) $input; } diff --git a/vendor/symfony/psr-http-message-bridge/.travis.yml b/vendor/symfony/psr-http-message-bridge/.travis.yml index 39e7eb618..300847127 100644 --- a/vendor/symfony/psr-http-message-bridge/.travis.yml +++ b/vendor/symfony/psr-http-message-bridge/.travis.yml @@ -2,6 +2,10 @@ language: php sudo: false +cache: + directories: + - $HOME/.composer/cache/files + matrix: include: - php: 5.3 @@ -12,10 +16,9 @@ matrix: env: deps=low - php: 5.6 env: deps=high - - php: nightly + - php: 7.0 - php: hhvm allow_failures: - - php: nightly - php: hhvm fast_finish: true @@ -25,15 +28,15 @@ env: - SYMFONY_DEPRECATIONS_HELPER=weak before_install: - - composer self-update - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi; + - composer self-update - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]] && [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi; - if [[ "$TRAVIS_PHP_VERSION" != "nightly" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; fi; # Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built - if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi; install: - - if [[ "$TRAVIS_PHP_VERSION" != "5.3" ]] && [[ "$TRAVIS_PHP_VERSION" != "5.4" ]]; then composer require --no-update zendframework/zend-diactoros; fi; + - if [ "$TRAVIS_PHP_VERSION" != "5.3" ]; then composer require --no-update zendframework/zend-diactoros; fi; - if [ "$deps" = "no" ]; then export SYMFONY_DEPRECATIONS_HELPER=strict; fi; - if [ "$deps" = "no" ]; then composer --prefer-source install; fi; - if [ "$deps" = "high" ]; then composer --prefer-source update; fi; diff --git a/vendor/symfony/psr-http-message-bridge/CHANGELOG b/vendor/symfony/psr-http-message-bridge/CHANGELOG new file mode 100644 index 000000000..cc3e9834e --- /dev/null +++ b/vendor/symfony/psr-http-message-bridge/CHANGELOG @@ -0,0 +1,3 @@ +* 1.0.0 (2016-09-14) + + * Initial release diff --git a/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php b/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php index 31726f15a..9174f051f 100644 --- a/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php +++ b/vendor/symfony/psr-http-message-bridge/Factory/DiactorosFactory.php @@ -45,11 +45,11 @@ class DiactorosFactory implements HttpMessageFactoryInterface $server = DiactorosRequestFactory::normalizeServer($symfonyRequest->server->all()); $headers = $symfonyRequest->headers->all(); - try { - $body = new DiactorosStream($symfonyRequest->getContent(true)); - } catch (\LogicException $e) { + if (PHP_VERSION_ID < 50600) { $body = new DiactorosStream('php://temp', 'wb+'); $body->write($symfonyRequest->getContent()); + } else { + $body = new DiactorosStream($symfonyRequest->getContent(true)); } $request = new ServerRequest( @@ -86,6 +86,10 @@ class DiactorosFactory implements HttpMessageFactoryInterface $files = array(); foreach ($uploadedFiles as $key => $value) { + if (null === $value) { + $files[$key] = new DiactorosUploadedFile(null, 0, UPLOAD_ERR_NO_FILE, null, null); + continue; + } if ($value instanceof UploadedFile) { $files[$key] = $this->createUploadedFile($value); } else { @@ -107,7 +111,7 @@ class DiactorosFactory implements HttpMessageFactoryInterface { return new DiactorosUploadedFile( $symfonyUploadedFile->getRealPath(), - $symfonyUploadedFile->getSize(), + $symfonyUploadedFile->getClientSize(), $symfonyUploadedFile->getError(), $symfonyUploadedFile->getClientOriginalName(), $symfonyUploadedFile->getClientMimeType() diff --git a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php b/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php index 2c356fd15..76d196bbb 100644 --- a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php +++ b/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php @@ -14,6 +14,7 @@ namespace Symfony\Bridge\PsrHttpMessage\Factory; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\UploadedFileInterface; +use Psr\Http\Message\UriInterface; use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface; use Symfony\Component\HttpFoundation\Cookie; use Symfony\Component\HttpFoundation\File\UploadedFile; @@ -32,6 +33,20 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface */ public function createRequest(ServerRequestInterface $psrRequest) { + $server = array(); + $uri = $psrRequest->getUri(); + + if ($uri instanceof UriInterface) { + $server['SERVER_NAME'] = $uri->getHost(); + $server['SERVER_PORT'] = $uri->getPort(); + $server['REQUEST_URI'] = $uri->getPath(); + $server['QUERY_STRING'] = $uri->getQuery(); + } + + $server['REQUEST_METHOD'] = $psrRequest->getMethod(); + + $server = array_replace($server, $psrRequest->getServerParams()); + $parsedBody = $psrRequest->getParsedBody(); $parsedBody = is_array($parsedBody) ? $parsedBody : array(); @@ -41,7 +56,7 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface $psrRequest->getAttributes(), $psrRequest->getCookieParams(), $this->getFiles($psrRequest->getUploadedFiles()), - $psrRequest->getServerParams(), + $server, $psrRequest->getBody()->__toString() ); $request->headers->replace($psrRequest->getHeaders()); @@ -80,10 +95,14 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface */ private function createUploadedFile(UploadedFileInterface $psrUploadedFile) { - $temporaryPath = $this->getTemporaryPath(); - $psrUploadedFile->moveTo($temporaryPath); + $temporaryPath = ''; + $clientFileName = ''; + if (UPLOAD_ERR_NO_FILE !== $psrUploadedFile->getError()) { + $temporaryPath = $this->getTemporaryPath(); + $psrUploadedFile->moveTo($temporaryPath); - $clientFileName = $psrUploadedFile->getClientFilename(); + $clientFileName = $psrUploadedFile->getClientFilename(); + } return new UploadedFile( $temporaryPath, diff --git a/vendor/symfony/psr-http-message-bridge/LICENSE b/vendor/symfony/psr-http-message-bridge/LICENSE index 43028bc60..12a74531e 100644 --- a/vendor/symfony/psr-http-message-bridge/LICENSE +++ b/vendor/symfony/psr-http-message-bridge/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/psr-http-message-bridge/composer.json b/vendor/symfony/psr-http-message-bridge/composer.json index 9dc9ce701..ad2508095 100644 --- a/vendor/symfony/psr-http-message-bridge/composer.json +++ b/vendor/symfony/psr-http-message-bridge/composer.json @@ -24,10 +24,16 @@ "symfony/phpunit-bridge": "~2.7|~3.0" }, "suggest": { + "psr/http-message-implementation": "To use the HttpFoundation factory", "zendframework/zend-diactoros": "To use the Zend Diactoros factory" }, "autoload": { "psr-4": { "Symfony\\Bridge\\PsrHttpMessage\\": "" } }, - "minimum-stability": "dev" + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + } } diff --git a/vendor/symfony/routing/Annotation/Route.php b/vendor/symfony/routing/Annotation/Route.php index 7e7e056bd..191aa68a5 100644 --- a/vendor/symfony/routing/Annotation/Route.php +++ b/vendor/symfony/routing/Annotation/Route.php @@ -34,7 +34,7 @@ class Route /** * Constructor. * - * @param array $data An array of key/value parameters. + * @param array $data An array of key/value parameters * * @throws \BadMethodCallException */ diff --git a/vendor/symfony/routing/CHANGELOG.md b/vendor/symfony/routing/CHANGELOG.md index 7f5d9f0ec..04ac1d319 100644 --- a/vendor/symfony/routing/CHANGELOG.md +++ b/vendor/symfony/routing/CHANGELOG.md @@ -7,6 +7,22 @@ CHANGELOG * allowed specifying a directory to recursively load all routing configuration files it contains * Added ObjectRouteLoader and ServiceRouteLoader that allow routes to be loaded by calling a method on an object/service. + * [DEPRECATION] Deprecated the hardcoded value for the `$referenceType` argument of the `UrlGeneratorInterface::generate` method. + Use the constants defined in the `UrlGeneratorInterface` instead. + + Before: + + ```php + $router->generate('blog_show', array('slug' => 'my-blog-post'), true); + ``` + + After: + + ```php + use Symfony\Component\Routing\Generator\UrlGeneratorInterface; + + $router->generate('blog_show', array('slug' => 'my-blog-post'), UrlGeneratorInterface::ABSOLUTE_URL); + ``` 2.5.0 ----- diff --git a/vendor/symfony/routing/Generator/UrlGenerator.php b/vendor/symfony/routing/Generator/UrlGenerator.php index 8d2d7dd61..4a6b742ea 100644 --- a/vendor/symfony/routing/Generator/UrlGenerator.php +++ b/vendor/symfony/routing/Generator/UrlGenerator.php @@ -278,7 +278,10 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt } // add a query string if needed - $extra = array_diff_key($parameters, $variables, $defaults); + $extra = array_udiff_assoc(array_diff_key($parameters, $variables), $defaults, function ($a, $b) { + return $a == $b ? 0 : 1; + }); + if ($extra && $query = http_build_query($extra, '', '&')) { // "/" and "?" can be left decoded for better user experience, see // http://tools.ietf.org/html/rfc3986#section-3.4 diff --git a/vendor/symfony/routing/LICENSE b/vendor/symfony/routing/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/routing/LICENSE +++ b/vendor/symfony/routing/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/routing/Loader/AnnotationClassLoader.php b/vendor/symfony/routing/Loader/AnnotationClassLoader.php index f175d341e..62ad9c3f9 100644 --- a/vendor/symfony/routing/Loader/AnnotationClassLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationClassLoader.php @@ -139,7 +139,7 @@ abstract class AnnotationClassLoader implements LoaderInterface $defaults = array_replace($globals['defaults'], $annot->getDefaults()); foreach ($method->getParameters() as $param) { - if (!isset($defaults[$param->getName()]) && $param->isDefaultValueAvailable()) { + if (false !== strpos($globals['path'].$annot->getPath(), sprintf('{%s}', $param->getName())) && !isset($defaults[$param->getName()]) && $param->isDefaultValueAvailable()) { $defaults[$param->getName()] = $param->getDefaultValue(); } } diff --git a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php b/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php index f6b99a16a..7b8467a81 100644 --- a/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationDirectoryLoader.php @@ -38,7 +38,15 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader $collection = new RouteCollection(); $collection->addResource(new DirectoryResource($dir, '/\.php$/')); - $files = iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY)); + $files = iterator_to_array(new \RecursiveIteratorIterator( + new RecursiveCallbackFilterIterator( + new \RecursiveDirectoryIterator($dir), + function (\SplFileInfo $current) { + return '.' !== substr($current->getBasename(), 0, 1); + } + ), + \RecursiveIteratorIterator::LEAVES_ONLY + )); usort($files, function (\SplFileInfo $a, \SplFileInfo $b) { return (string) $a > (string) $b ? 1 : -1; }); @@ -69,7 +77,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader if (!is_string($resource)) { return false; } - + try { $path = $this->locator->locate($resource); } catch (\Exception $e) { @@ -79,3 +87,34 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader return is_dir($path) && (!$type || 'annotation' === $type); } } + +/** + * @internal To be removed as RecursiveCallbackFilterIterator is available since PHP 5.4 + */ +class RecursiveCallbackFilterIterator extends \FilterIterator implements \RecursiveIterator +{ + private $iterator; + private $callback; + + public function __construct(\RecursiveIterator $iterator, $callback) + { + $this->iterator = $iterator; + $this->callback = $callback; + parent::__construct($iterator); + } + + public function accept() + { + return call_user_func($this->callback, $this->current(), $this->key(), $this->iterator); + } + + public function hasChildren() + { + return $this->iterator->hasChildren(); + } + + public function getChildren() + { + return new static($this->iterator->getChildren(), $this->callback); + } +} diff --git a/vendor/symfony/routing/Loader/AnnotationFileLoader.php b/vendor/symfony/routing/Loader/AnnotationFileLoader.php index a3a7e0e5a..b8fc03615 100644 --- a/vendor/symfony/routing/Loader/AnnotationFileLoader.php +++ b/vendor/symfony/routing/Loader/AnnotationFileLoader.php @@ -112,7 +112,24 @@ class AnnotationFileLoader extends FileLoader } if (T_CLASS === $token[0]) { - $class = true; + // Skip usage of ::class constant + $isClassConstant = false; + for ($j = $i - 1; $j > 0; --$j) { + if (!isset($tokens[$j][1])) { + break; + } + + if (T_DOUBLE_COLON === $tokens[$j][0]) { + $isClassConstant = true; + break; + } elseif (!in_array($tokens[$j][0], array(T_WHITESPACE, T_DOC_COMMENT, T_COMMENT))) { + break; + } + } + + if (!$isClassConstant) { + $class = true; + } } if (T_NAMESPACE === $token[0]) { diff --git a/vendor/symfony/routing/Loader/XmlFileLoader.php b/vendor/symfony/routing/Loader/XmlFileLoader.php index b5c24f987..537a81e9a 100644 --- a/vendor/symfony/routing/Loader/XmlFileLoader.php +++ b/vendor/symfony/routing/Loader/XmlFileLoader.php @@ -219,7 +219,7 @@ class XmlFileLoader extends FileLoader * @param \DOMElement $node Element to parse that contains the configs * @param string $path Full path of the XML file being processed * - * @return array An array with the defaults as first item, requirements as second and options as third. + * @return array An array with the defaults as first item, requirements as second and options as third * * @throws \InvalidArgumentException When the XML is invalid */ diff --git a/vendor/symfony/routing/Matcher/Dumper/DumperCollection.php b/vendor/symfony/routing/Matcher/Dumper/DumperCollection.php index e7dea88ed..b24c8512c 100644 --- a/vendor/symfony/routing/Matcher/Dumper/DumperCollection.php +++ b/vendor/symfony/routing/Matcher/Dumper/DumperCollection.php @@ -26,7 +26,7 @@ class DumperCollection implements \IteratorAggregate private $parent; /** - * @var (DumperCollection|DumperRoute)[] + * @var DumperCollection[]|DumperRoute[] */ private $children = array(); @@ -38,7 +38,7 @@ class DumperCollection implements \IteratorAggregate /** * Returns the children routes and collections. * - * @return (DumperCollection|DumperRoute)[] Array of DumperCollection|DumperRoute + * @return self[]|DumperRoute[] */ public function all() { @@ -76,7 +76,7 @@ class DumperCollection implements \IteratorAggregate /** * Returns an iterator over the children. * - * @return \Iterator The iterator + * @return \Iterator|DumperCollection[]|DumperRoute[] The iterator */ public function getIterator() { @@ -86,7 +86,7 @@ class DumperCollection implements \IteratorAggregate /** * Returns the root of the collection. * - * @return DumperCollection The root collection + * @return self The root collection */ public function getRoot() { @@ -96,7 +96,7 @@ class DumperCollection implements \IteratorAggregate /** * Returns the parent collection. * - * @return DumperCollection|null The parent collection or null if the collection has no parent + * @return self|null The parent collection or null if the collection has no parent */ protected function getParent() { diff --git a/vendor/symfony/routing/Matcher/Dumper/DumperPrefixCollection.php b/vendor/symfony/routing/Matcher/Dumper/DumperPrefixCollection.php index dd1a0d90e..5ea622c7d 100644 --- a/vendor/symfony/routing/Matcher/Dumper/DumperPrefixCollection.php +++ b/vendor/symfony/routing/Matcher/Dumper/DumperPrefixCollection.php @@ -50,7 +50,7 @@ class DumperPrefixCollection extends DumperCollection * * @param DumperRoute $route The route * - * @return DumperPrefixCollection The node the route was added to + * @return self * * @throws \LogicException */ diff --git a/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php b/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php index 4dd89699a..7c27bc879 100644 --- a/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php +++ b/vendor/symfony/routing/Matcher/RedirectableUrlMatcherInterface.php @@ -21,7 +21,7 @@ interface RedirectableUrlMatcherInterface /** * Redirects the user to another URL. * - * @param string $path The path info to redirect to. + * @param string $path The path info to redirect to * @param string $route The route name that matched * @param string|null $scheme The URL scheme (null to keep the current one) * diff --git a/vendor/symfony/routing/RequestContext.php b/vendor/symfony/routing/RequestContext.php index 862b824d4..9b15cd07d 100644 --- a/vendor/symfony/routing/RequestContext.php +++ b/vendor/symfony/routing/RequestContext.php @@ -66,7 +66,7 @@ class RequestContext * * @param Request $request A Request instance * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function fromRequest(Request $request) { @@ -97,7 +97,7 @@ class RequestContext * * @param string $baseUrl The base URL * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setBaseUrl($baseUrl) { @@ -121,7 +121,7 @@ class RequestContext * * @param string $pathInfo The path info * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setPathInfo($pathInfo) { @@ -147,7 +147,7 @@ class RequestContext * * @param string $method The HTTP method * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setMethod($method) { @@ -173,7 +173,7 @@ class RequestContext * * @param string $host The HTTP host * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setHost($host) { @@ -197,7 +197,7 @@ class RequestContext * * @param string $scheme The HTTP scheme * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setScheme($scheme) { @@ -221,7 +221,7 @@ class RequestContext * * @param int $httpPort The HTTP port * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setHttpPort($httpPort) { @@ -245,7 +245,7 @@ class RequestContext * * @param int $httpsPort The HTTPS port * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setHttpsPort($httpsPort) { @@ -269,7 +269,7 @@ class RequestContext * * @param string $queryString The query string (after "?") * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setQueryString($queryString) { @@ -294,7 +294,7 @@ class RequestContext * * @param array $parameters The parameters * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setParameters(array $parameters) { @@ -333,7 +333,7 @@ class RequestContext * @param string $name A parameter name * @param mixed $parameter The parameter value * - * @return RequestContext The current instance, implementing a fluent interface + * @return $this */ public function setParameter($name, $parameter) { diff --git a/vendor/symfony/routing/Route.php b/vendor/symfony/routing/Route.php index b485bded5..fee2002c9 100644 --- a/vendor/symfony/routing/Route.php +++ b/vendor/symfony/routing/Route.php @@ -159,7 +159,7 @@ class Route implements \Serializable * * @param string $pattern The path pattern * - * @return Route The current Route instance + * @return $this * * @deprecated since version 2.2, to be removed in 3.0. Use setPath instead. */ @@ -187,7 +187,7 @@ class Route implements \Serializable * * @param string $pattern The path pattern * - * @return Route The current Route instance + * @return $this */ public function setPath($pattern) { @@ -216,7 +216,7 @@ class Route implements \Serializable * * @param string $pattern The host pattern * - * @return Route The current Route instance + * @return $this */ public function setHost($pattern) { @@ -245,7 +245,7 @@ class Route implements \Serializable * * @param string|array $schemes The scheme or an array of schemes * - * @return Route The current Route instance + * @return $this */ public function setSchemes($schemes) { @@ -294,7 +294,7 @@ class Route implements \Serializable * * @param string|array $methods The method or an array of methods * - * @return Route The current Route instance + * @return $this */ public function setMethods($methods) { @@ -329,7 +329,7 @@ class Route implements \Serializable * * @param array $options The options * - * @return Route The current Route instance + * @return $this */ public function setOptions(array $options) { @@ -347,7 +347,7 @@ class Route implements \Serializable * * @param array $options The options * - * @return Route The current Route instance + * @return $this */ public function addOptions(array $options) { @@ -367,7 +367,7 @@ class Route implements \Serializable * @param string $name An option name * @param mixed $value The option value * - * @return Route The current Route instance + * @return $this */ public function setOption($name, $value) { @@ -418,7 +418,7 @@ class Route implements \Serializable * * @param array $defaults The defaults * - * @return Route The current Route instance + * @return $this */ public function setDefaults(array $defaults) { @@ -434,7 +434,7 @@ class Route implements \Serializable * * @param array $defaults The defaults * - * @return Route The current Route instance + * @return $this */ public function addDefaults(array $defaults) { @@ -476,7 +476,7 @@ class Route implements \Serializable * @param string $name A variable name * @param mixed $default The default value * - * @return Route The current Route instance + * @return $this */ public function setDefault($name, $default) { @@ -503,7 +503,7 @@ class Route implements \Serializable * * @param array $requirements The requirements * - * @return Route The current Route instance + * @return $this */ public function setRequirements(array $requirements) { @@ -519,7 +519,7 @@ class Route implements \Serializable * * @param array $requirements The requirements * - * @return Route The current Route instance + * @return $this */ public function addRequirements(array $requirements) { @@ -567,7 +567,7 @@ class Route implements \Serializable * @param string $key The key * @param string $regex The regex * - * @return Route The current Route instance + * @return $this */ public function setRequirement($key, $regex) { @@ -594,7 +594,7 @@ class Route implements \Serializable * * @param string $condition The condition * - * @return Route The current Route instance + * @return $this */ public function setCondition($condition) { diff --git a/vendor/symfony/routing/RouteCollection.php b/vendor/symfony/routing/RouteCollection.php index d6ac840ca..2ccb90f3b 100644 --- a/vendor/symfony/routing/RouteCollection.php +++ b/vendor/symfony/routing/RouteCollection.php @@ -49,7 +49,7 @@ class RouteCollection implements \IteratorAggregate, \Countable * * @see all() * - * @return \ArrayIterator An \ArrayIterator object for iterating over routes + * @return \ArrayIterator|Route[] An \ArrayIterator object for iterating over routes */ public function getIterator() { diff --git a/vendor/symfony/routing/RouteCollectionBuilder.php b/vendor/symfony/routing/RouteCollectionBuilder.php index 89814b2e0..2c9e03172 100644 --- a/vendor/symfony/routing/RouteCollectionBuilder.php +++ b/vendor/symfony/routing/RouteCollectionBuilder.php @@ -55,7 +55,7 @@ class RouteCollectionBuilder * @param string|null $prefix * @param string $type * - * @return RouteCollectionBuilder + * @return self * * @throws FileLoaderLoadException */ @@ -101,7 +101,7 @@ class RouteCollectionBuilder /** * Returns a RouteCollectionBuilder that can be configured and then added with mount(). * - * @return RouteCollectionBuilder + * @return self */ public function createBuilder() { @@ -170,7 +170,7 @@ class RouteCollectionBuilder /** * Sets a default value that will be added to all embedded routes (unless that - * default value is already set. + * default value is already set). * * @param string $key * @param mixed $value @@ -186,7 +186,7 @@ class RouteCollectionBuilder /** * Sets a requirement that will be added to all embedded routes (unless that - * requirement is already set. + * requirement is already set). * * @param string $key * @param mixed $regex @@ -202,7 +202,7 @@ class RouteCollectionBuilder /** * Sets an opiton that will be added to all embedded routes (unless that - * option is already set. + * option is already set). * * @param string $key * @param mixed $value diff --git a/vendor/symfony/routing/RouteCompiler.php b/vendor/symfony/routing/RouteCompiler.php index f6637da66..ba608e7dd 100644 --- a/vendor/symfony/routing/RouteCompiler.php +++ b/vendor/symfony/routing/RouteCompiler.php @@ -28,12 +28,20 @@ class RouteCompiler implements RouteCompilerInterface */ const SEPARATORS = '/,;.:-_~+*=@|'; + /** + * The maximum supported length of a PCRE subpattern name + * http://pcre.org/current/doc/html/pcre2pattern.html#SEC16. + * + * @internal + */ + const VARIABLE_MAXIMUM_LENGTH = 32; + /** * {@inheritdoc} * * @throws \LogicException If a variable is referenced more than once - * @throws \DomainException If a variable name is numeric because PHP raises an error for such - * subpatterns in PCRE and thus would break matching, e.g. "(?P<123>.+)". + * @throws \DomainException If a variable name starts with a digit or if it is too long to be successfully used as + * a PCRE subpattern. */ public static function compile(Route $route) { @@ -95,13 +103,19 @@ class RouteCompiler implements RouteCompilerInterface $precedingChar = strlen($precedingText) > 0 ? substr($precedingText, -1) : ''; $isSeparator = '' !== $precedingChar && false !== strpos(static::SEPARATORS, $precedingChar); - if (is_numeric($varName)) { - throw new \DomainException(sprintf('Variable name "%s" cannot be numeric in route pattern "%s". Please use a different name.', $varName, $pattern)); + // A PCRE subpattern name must start with a non-digit. Also a PHP variable cannot start with a digit so the + // variable would not be usable as a Controller action argument. + if (preg_match('/^\d/', $varName)) { + throw new \DomainException(sprintf('Variable name "%s" cannot start with a digit in route pattern "%s". Please use a different name.', $varName, $pattern)); } if (in_array($varName, $variables)) { throw new \LogicException(sprintf('Route pattern "%s" cannot reference variable name "%s" more than once.', $pattern, $varName)); } + if (strlen($varName) > self::VARIABLE_MAXIMUM_LENGTH) { + throw new \DomainException(sprintf('Variable name "%s" cannot be longer than %s characters in route pattern "%s". Please use a shorter name.', $varName, self::VARIABLE_MAXIMUM_LENGTH, $pattern)); + } + if ($isSeparator && strlen($precedingText) > 1) { $tokens[] = array('text', substr($precedingText, 0, -1)); } elseif (!$isSeparator && strlen($precedingText) > 0) { diff --git a/vendor/symfony/routing/Router.php b/vendor/symfony/routing/Router.php index 2cbbb2bda..a04385ead 100644 --- a/vendor/symfony/routing/Router.php +++ b/vendor/symfony/routing/Router.php @@ -106,9 +106,19 @@ class Router implements RouterInterface, RequestMatcherInterface * * Available options: * - * * cache_dir: The cache directory (or null to disable caching) - * * debug: Whether to enable debugging or not (false by default) - * * resource_type: Type hint for the main resource (optional) + * * cache_dir: The cache directory (or null to disable caching) + * * debug: Whether to enable debugging or not (false by default) + * * generator_class: The name of a UrlGeneratorInterface implementation + * * generator_base_class: The base class for the dumped generator class + * * generator_cache_class: The class name for the dumped generator class + * * generator_dumper_class: The name of a GeneratorDumperInterface implementation + * * matcher_class: The name of a UrlMatcherInterface implementation + * * matcher_base_class: The base class for the dumped matcher class + * * matcher_dumper_class: The class name for the dumped matcher class + * * matcher_cache_class: The name of a MatcherDumperInterface implementation + * * resource_type: Type hint for the main resource (optional) + * * strict_requirements: Configure strict requirement checking for generators + * implementing ConfigurableRequirementsInterface (default is true) * * @param array $options An array of options * @@ -219,7 +229,7 @@ class Router implements RouterInterface, RequestMatcherInterface /** * Sets the ConfigCache factory to use. * - * @param ConfigCacheFactoryInterface $configCacheFactory The factory to use. + * @param ConfigCacheFactoryInterface $configCacheFactory The factory to use */ public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) { diff --git a/vendor/symfony/routing/composer.json b/vendor/symfony/routing/composer.json index d00ae6d5d..7fb49738e 100644 --- a/vendor/symfony/routing/composer.json +++ b/vendor/symfony/routing/composer.json @@ -21,7 +21,7 @@ "require-dev": { "symfony/config": "~2.7|~3.0.0", "symfony/http-foundation": "~2.3|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0", + "symfony/yaml": "^2.0.5|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", "doctrine/annotations": "~1.0", "doctrine/common": "~2.2", diff --git a/vendor/symfony/serializer/Encoder/ChainDecoder.php b/vendor/symfony/serializer/Encoder/ChainDecoder.php index f8f17b4f7..352ba584a 100644 --- a/vendor/symfony/serializer/Encoder/ChainDecoder.php +++ b/vendor/symfony/serializer/Encoder/ChainDecoder.php @@ -59,7 +59,7 @@ class ChainDecoder implements DecoderInterface * * @return DecoderInterface * - * @throws RuntimeException if no decoder is found + * @throws RuntimeException If no decoder is found. */ private function getDecoder($format) { diff --git a/vendor/symfony/serializer/Encoder/DecoderInterface.php b/vendor/symfony/serializer/Encoder/DecoderInterface.php index 910f4ceb1..dd89e0faa 100644 --- a/vendor/symfony/serializer/Encoder/DecoderInterface.php +++ b/vendor/symfony/serializer/Encoder/DecoderInterface.php @@ -25,7 +25,7 @@ interface DecoderInterface * * @param string $data Data to decode * @param string $format Format name - * @param array $context options that decoders have access to. + * @param array $context options that decoders have access to * * The format parameter specifies which format the data is in; valid values * depend on the specific implementation. Authors implementing this interface diff --git a/vendor/symfony/serializer/Encoder/EncoderInterface.php b/vendor/symfony/serializer/Encoder/EncoderInterface.php index fe7e777da..05e9b2789 100644 --- a/vendor/symfony/serializer/Encoder/EncoderInterface.php +++ b/vendor/symfony/serializer/Encoder/EncoderInterface.php @@ -25,7 +25,7 @@ interface EncoderInterface * * @param mixed $data Data to encode * @param string $format Format name - * @param array $context options that normalizers/encoders have access to. + * @param array $context options that normalizers/encoders have access to * * @return scalar * diff --git a/vendor/symfony/serializer/Encoder/XmlEncoder.php b/vendor/symfony/serializer/Encoder/XmlEncoder.php index d1f09f6ea..0bd85b024 100644 --- a/vendor/symfony/serializer/Encoder/XmlEncoder.php +++ b/vendor/symfony/serializer/Encoder/XmlEncoder.php @@ -369,7 +369,10 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec if (is_array($data) || ($data instanceof \Traversable && !$this->serializer->supportsNormalization($data, $this->format))) { foreach ($data as $key => $data) { //Ah this is the magic @ attribute types. - if (0 === strpos($key, '@') && is_scalar($data) && $this->isElementNameValid($attributeName = substr($key, 1))) { + if (0 === strpos($key, '@') && $this->isElementNameValid($attributeName = substr($key, 1))) { + if (!is_scalar($data)) { + $data = $this->serializer->normalize($data, $this->format, $this->context); + } $parentNode->setAttribute($attributeName, $data); } elseif ($key === '#') { $append = $this->selectNodeType($parentNode, $data); @@ -461,6 +464,8 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec * @param mixed $val * * @return bool + * + * @throws UnexpectedValueException */ private function selectNodeType(\DOMNode $node, $val) { @@ -472,7 +477,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec } elseif ($val instanceof \Traversable) { $this->buildXml($node, $val); } elseif (is_object($val)) { - return $this->buildXml($node, $this->serializer->normalize($val, $this->format, $this->context)); + return $this->selectNodeType($node, $this->serializer->normalize($val, $this->format, $this->context)); } elseif (is_numeric($val)) { return $this->appendText($node, (string) $val); } elseif (is_string($val) && $this->needsCdataWrapping($val)) { @@ -506,7 +511,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec /** * Create a DOM document, taking serializer options into account. * - * @param array $context options that the encoder has access to. + * @param array $context options that the encoder has access to * * @return \DOMDocument */ diff --git a/vendor/symfony/serializer/LICENSE b/vendor/symfony/serializer/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/serializer/LICENSE +++ b/vendor/symfony/serializer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/serializer/Mapping/ClassMetadataInterface.php b/vendor/symfony/serializer/Mapping/ClassMetadataInterface.php index 5889f0da1..c00981b64 100644 --- a/vendor/symfony/serializer/Mapping/ClassMetadataInterface.php +++ b/vendor/symfony/serializer/Mapping/ClassMetadataInterface.php @@ -27,7 +27,7 @@ interface ClassMetadataInterface /** * Returns the name of the backing PHP class. * - * @return string The name of the backing class. + * @return string The name of the backing class */ public function getName(); diff --git a/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php b/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php index ebe2a6e4b..be2de7b6f 100644 --- a/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php +++ b/vendor/symfony/serializer/Mapping/Loader/YamlFileLoader.php @@ -60,39 +60,39 @@ class YamlFileLoader extends FileLoader $this->classes = $classes; } - if (isset($this->classes[$classMetadata->getName()])) { - $yaml = $this->classes[$classMetadata->getName()]; + if (!isset($this->classes[$classMetadata->getName()])) { + return false; + } - if (isset($yaml['attributes']) && is_array($yaml['attributes'])) { - $attributesMetadata = $classMetadata->getAttributesMetadata(); + $yaml = $this->classes[$classMetadata->getName()]; - foreach ($yaml['attributes'] as $attribute => $data) { - if (isset($attributesMetadata[$attribute])) { - $attributeMetadata = $attributesMetadata[$attribute]; - } else { - $attributeMetadata = new AttributeMetadata($attribute); - $classMetadata->addAttributeMetadata($attributeMetadata); + if (isset($yaml['attributes']) && is_array($yaml['attributes'])) { + $attributesMetadata = $classMetadata->getAttributesMetadata(); + + foreach ($yaml['attributes'] as $attribute => $data) { + if (isset($attributesMetadata[$attribute])) { + $attributeMetadata = $attributesMetadata[$attribute]; + } else { + $attributeMetadata = new AttributeMetadata($attribute); + $classMetadata->addAttributeMetadata($attributeMetadata); + } + + if (isset($data['groups'])) { + if (!is_array($data['groups'])) { + throw new MappingException(sprintf('The "groups" key must be an array of strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); } - if (isset($data['groups'])) { - if (!is_array($data['groups'])) { - throw new MappingException('The "groups" key must be an array of strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()); + foreach ($data['groups'] as $group) { + if (!is_string($group)) { + throw new MappingException(sprintf('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName())); } - foreach ($data['groups'] as $group) { - if (!is_string($group)) { - throw new MappingException('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()); - } - - $attributeMetadata->addGroup($group); - } + $attributeMetadata->addGroup($group); } } } - - return true; } - return false; + return true; } } diff --git a/vendor/symfony/serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php b/vendor/symfony/serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php index 80720fa6b..508881e84 100644 --- a/vendor/symfony/serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php +++ b/vendor/symfony/serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php @@ -29,8 +29,8 @@ class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface private $lowerCamelCase; /** - * @param null|array $attributes The list of attributes to rename or null for all attributes. - * @param bool $lowerCamelCase Use lowerCamelCase style. + * @param null|array $attributes The list of attributes to rename or null for all attributes + * @param bool $lowerCamelCase Use lowerCamelCase style */ public function __construct(array $attributes = null, $lowerCamelCase = true) { @@ -44,14 +44,15 @@ class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface public function normalize($propertyName) { if (null === $this->attributes || in_array($propertyName, $this->attributes)) { + $lcPropertyName = lcfirst($propertyName); $snakeCasedName = ''; - $len = strlen($propertyName); + $len = strlen($lcPropertyName); for ($i = 0; $i < $len; ++$i) { - if (ctype_upper($propertyName[$i])) { - $snakeCasedName .= '_'.strtolower($propertyName[$i]); + if (ctype_upper($lcPropertyName[$i])) { + $snakeCasedName .= '_'.strtolower($lcPropertyName[$i]); } else { - $snakeCasedName .= strtolower($propertyName[$i]); + $snakeCasedName .= strtolower($lcPropertyName[$i]); } } @@ -75,7 +76,7 @@ class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface } if (null === $this->attributes || in_array($camelCasedName, $this->attributes)) { - return $this->lowerCamelCase ? lcfirst($camelCasedName) : $camelCasedName; + return $camelCasedName; } return $propertyName; diff --git a/vendor/symfony/serializer/Normalizer/CustomNormalizer.php b/vendor/symfony/serializer/Normalizer/CustomNormalizer.php index be8b7d5fd..b676b833c 100644 --- a/vendor/symfony/serializer/Normalizer/CustomNormalizer.php +++ b/vendor/symfony/serializer/Normalizer/CustomNormalizer.php @@ -38,8 +38,8 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn /** * Checks if the given class implements the NormalizableInterface. * - * @param mixed $data Data to normalize. - * @param string $format The format being (de-)serialized from or into. + * @param mixed $data Data to normalize + * @param string $format The format being (de-)serialized from or into * * @return bool */ @@ -51,9 +51,9 @@ class CustomNormalizer extends SerializerAwareNormalizer implements NormalizerIn /** * Checks if the given class implements the NormalizableInterface. * - * @param mixed $data Data to denormalize from. - * @param string $type The class to which the data should be denormalized. - * @param string $format The format being deserialized from. + * @param mixed $data Data to denormalize from + * @param string $type The class to which the data should be denormalized + * @param string $format The format being deserialized from * * @return bool */ diff --git a/vendor/symfony/serializer/Normalizer/DenormalizableInterface.php b/vendor/symfony/serializer/Normalizer/DenormalizableInterface.php index 86c270299..4fe7a313a 100644 --- a/vendor/symfony/serializer/Normalizer/DenormalizableInterface.php +++ b/vendor/symfony/serializer/Normalizer/DenormalizableInterface.php @@ -29,10 +29,12 @@ interface DenormalizableInterface * * @param DenormalizerInterface $denormalizer The denormalizer is given so that you * can use it to denormalize objects contained within this object - * @param array|scalar $data The data from which to re-create the object. + * @param array|scalar $data The data from which to re-create the object * @param string|null $format The format is optionally given to be able to denormalize differently * based on different input formats * @param array $context options for denormalizing + * + * @return object */ public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = array()); } diff --git a/vendor/symfony/serializer/Normalizer/DenormalizerInterface.php b/vendor/symfony/serializer/Normalizer/DenormalizerInterface.php index 8b6c23339..23df4829a 100644 --- a/vendor/symfony/serializer/Normalizer/DenormalizerInterface.php +++ b/vendor/symfony/serializer/Normalizer/DenormalizerInterface.php @@ -33,9 +33,9 @@ interface DenormalizerInterface /** * Checks whether the given class is supported for denormalization by this normalizer. * - * @param mixed $data Data to denormalize from. - * @param string $type The class to which the data should be denormalized. - * @param string $format The format being deserialized from. + * @param mixed $data Data to denormalize from + * @param string $type The class to which the data should be denormalized + * @param string $format The format being deserialized from * * @return bool */ diff --git a/vendor/symfony/serializer/Normalizer/GetSetMethodNormalizer.php b/vendor/symfony/serializer/Normalizer/GetSetMethodNormalizer.php index fc7ac9f46..003c3a688 100644 --- a/vendor/symfony/serializer/Normalizer/GetSetMethodNormalizer.php +++ b/vendor/symfony/serializer/Normalizer/GetSetMethodNormalizer.php @@ -164,7 +164,7 @@ class GetSetMethodNormalizer extends AbstractNormalizer * * @param \ReflectionMethod $method the method to check * - * @return bool whether the method is a getter or boolean getter. + * @return bool whether the method is a getter or boolean getter */ private function isGetMethod(\ReflectionMethod $method) { diff --git a/vendor/symfony/serializer/Normalizer/NormalizableInterface.php b/vendor/symfony/serializer/Normalizer/NormalizableInterface.php index b9fefe887..e19fe5ce5 100644 --- a/vendor/symfony/serializer/Normalizer/NormalizableInterface.php +++ b/vendor/symfony/serializer/Normalizer/NormalizableInterface.php @@ -33,7 +33,7 @@ interface NormalizableInterface * based on different output formats. * @param array $context Options for normalizing this object * - * @return array|string|bool|int|float|null + * @return array|scalar */ public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array()); } diff --git a/vendor/symfony/serializer/Normalizer/NormalizerInterface.php b/vendor/symfony/serializer/Normalizer/NormalizerInterface.php index 2a51d631b..f7007840d 100644 --- a/vendor/symfony/serializer/Normalizer/NormalizerInterface.php +++ b/vendor/symfony/serializer/Normalizer/NormalizerInterface.php @@ -25,15 +25,15 @@ interface NormalizerInterface * @param string $format format the normalization result will be encoded as * @param array $context Context options for the normalizer * - * @return array|string|bool|int|float|null + * @return array|scalar */ public function normalize($object, $format = null, array $context = array()); /** * Checks whether the given class is supported for normalization by this normalizer. * - * @param mixed $data Data to normalize. - * @param string $format The format being (de-)serialized from or into. + * @param mixed $data Data to normalize + * @param string $format The format being (de-)serialized from or into * * @return bool */ diff --git a/vendor/symfony/serializer/Serializer.php b/vendor/symfony/serializer/Serializer.php index 59943550a..0259bfeda 100644 --- a/vendor/symfony/serializer/Serializer.php +++ b/vendor/symfony/serializer/Serializer.php @@ -250,15 +250,6 @@ class Serializer implements SerializerInterface, NormalizerInterface, Denormaliz return $normalizer->denormalize($data, $class, $format, $context); } - foreach ($this->normalizers as $normalizer) { - if ( - $normalizer instanceof DenormalizerInterface && - $normalizer->supportsDenormalization($data, $class, $format) - ) { - return $normalizer->denormalize($data, $class, $format, $context); - } - } - throw new UnexpectedValueException(sprintf('Could not denormalize object of type %s, no supporting normalizer found.', $class)); } diff --git a/vendor/symfony/serializer/composer.json b/vendor/symfony/serializer/composer.json index 88b7832bf..70bc5438d 100644 --- a/vendor/symfony/serializer/composer.json +++ b/vendor/symfony/serializer/composer.json @@ -20,7 +20,7 @@ "symfony/polyfill-php55": "~1.0" }, "require-dev": { - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0", + "symfony/yaml": "^2.0.5|~3.0.0", "symfony/config": "~2.2|~3.0.0", "symfony/property-access": "~2.3|~3.0.0", "doctrine/annotations": "~1.0", diff --git a/vendor/symfony/translation/Catalogue/AbstractOperation.php b/vendor/symfony/translation/Catalogue/AbstractOperation.php index 9598e1767..c230b78b8 100644 --- a/vendor/symfony/translation/Catalogue/AbstractOperation.php +++ b/vendor/symfony/translation/Catalogue/AbstractOperation.php @@ -83,7 +83,6 @@ abstract class AbstractOperation implements OperationInterface $this->source = $source; $this->target = $target; $this->result = new MessageCatalogue($source->getLocale()); - $this->domains = null; $this->messages = array(); } diff --git a/vendor/symfony/translation/Catalogue/TargetOperation.php b/vendor/symfony/translation/Catalogue/TargetOperation.php index e081e139a..f3b0a29df 100644 --- a/vendor/symfony/translation/Catalogue/TargetOperation.php +++ b/vendor/symfony/translation/Catalogue/TargetOperation.php @@ -17,7 +17,7 @@ namespace Symfony\Component\Translation\Catalogue; * all = intersection ∪ (target ∖ intersection) = target * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} * obsolete = source ∖ all = source ∖ target = {x: x ∈ source ∧ x ∉ target} - * Basically, the result contains messages from the target catalogue. + * Basically, the result contains messages from the target catalogue. * * @author Michael Lee */ @@ -34,12 +34,12 @@ class TargetOperation extends AbstractOperation 'obsolete' => array(), ); - // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``, + // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``, // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} // // For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback} - // + // // For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} diff --git a/vendor/symfony/translation/DataCollectorTranslator.php b/vendor/symfony/translation/DataCollectorTranslator.php index d507cdea6..50e4a2ff9 100644 --- a/vendor/symfony/translation/DataCollectorTranslator.php +++ b/vendor/symfony/translation/DataCollectorTranslator.php @@ -88,6 +88,20 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter return $this->translator->getCatalogue($locale); } + /** + * Gets the fallback locales. + * + * @return array $locales The fallback locales + */ + public function getFallbackLocales() + { + if ($this->translator instanceof Translator) { + return $this->translator->getFallbackLocales(); + } + + return array(); + } + /** * Passes through all unknown calls onto the translator object. */ @@ -126,14 +140,14 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter } elseif ($catalogue->has($id, $domain)) { $state = self::MESSAGE_EQUALS_FALLBACK; - $fallbackCatalogue = $catalogue->getFallBackCatalogue(); + $fallbackCatalogue = $catalogue->getFallbackCatalogue(); while ($fallbackCatalogue) { if ($fallbackCatalogue->defines($id, $domain)) { $locale = $fallbackCatalogue->getLocale(); break; } - $fallbackCatalogue = $fallbackCatalogue->getFallBackCatalogue(); + $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); } } else { $state = self::MESSAGE_MISSING; diff --git a/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Dumper/IcuResFileDumper.php index c52f50767..049b98c7a 100644 --- a/vendor/symfony/translation/Dumper/IcuResFileDumper.php +++ b/vendor/symfony/translation/Dumper/IcuResFileDumper.php @@ -44,7 +44,7 @@ class IcuResFileDumper extends FileDumper foreach ($messages->all($domain) as $source => $target) { $indexes .= pack('v', strlen($data) + 28); - $data .= $source."\0"; + $data .= $source."\0"; } $data .= $this->writePadding($data); diff --git a/vendor/symfony/translation/Dumper/MoFileDumper.php b/vendor/symfony/translation/Dumper/MoFileDumper.php index a8e123a98..c25279580 100644 --- a/vendor/symfony/translation/Dumper/MoFileDumper.php +++ b/vendor/symfony/translation/Dumper/MoFileDumper.php @@ -36,7 +36,7 @@ class MoFileDumper extends FileDumper */ public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array()) { - $output = $sources = $targets = $sourceOffsets = $targetOffsets = ''; + $sources = $targets = $sourceOffsets = $targetOffsets = ''; $offsets = array(); $size = 0; diff --git a/vendor/symfony/translation/Extractor/AbstractFileExtractor.php b/vendor/symfony/translation/Extractor/AbstractFileExtractor.php index 196bc3341..57fd4938d 100644 --- a/vendor/symfony/translation/Extractor/AbstractFileExtractor.php +++ b/vendor/symfony/translation/Extractor/AbstractFileExtractor.php @@ -54,9 +54,9 @@ abstract class AbstractFileExtractor /** * @param string $file * - * @throws \InvalidArgumentException - * * @return bool + * + * @throws \InvalidArgumentException */ protected function isFile($file) { diff --git a/vendor/symfony/translation/LICENSE b/vendor/symfony/translation/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/translation/LICENSE +++ b/vendor/symfony/translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/translation/Loader/MoFileLoader.php b/vendor/symfony/translation/Loader/MoFileLoader.php index c27a88e3d..928cc9dfd 100644 --- a/vendor/symfony/translation/Loader/MoFileLoader.php +++ b/vendor/symfony/translation/Loader/MoFileLoader.php @@ -37,7 +37,7 @@ class MoFileLoader extends FileLoader /** * The size of the header of a MO file in bytes. * - * @var int Number of bytes. + * @var int Number of bytes */ const MO_HEADER_SIZE = 28; @@ -80,7 +80,7 @@ class MoFileLoader extends FileLoader $messages = array(); for ($i = 0; $i < $count; ++$i) { - $singularId = $pluralId = null; + $pluralId = null; $translated = null; fseek($stream, $offsetId + $i * 8); @@ -137,7 +137,7 @@ class MoFileLoader extends FileLoader } /** - * Reads an unsigned long from stream respecting endianess. + * Reads an unsigned long from stream respecting endianness. * * @param resource $stream * @param bool $isBigEndian diff --git a/vendor/symfony/translation/Loader/XliffFileLoader.php b/vendor/symfony/translation/Loader/XliffFileLoader.php index bdca11099..4e2b7c182 100644 --- a/vendor/symfony/translation/Loader/XliffFileLoader.php +++ b/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -160,20 +160,29 @@ class XliffFileLoader implements LoaderInterface } /** + * Validates and parses the given file into a DOMDocument. + * * @param string $file * @param \DOMDocument $dom * @param string $schema source of the schema * + * @throws \RuntimeException * @throws InvalidResourceException */ private function validateSchema($file, \DOMDocument $dom, $schema) { $internalErrors = libxml_use_internal_errors(true); + $disableEntities = libxml_disable_entity_loader(false); + if (!@$dom->schemaValidateSource($schema)) { + libxml_disable_entity_loader($disableEntities); + throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s', $file, implode("\n", $this->getXmlErrors($internalErrors)))); } + libxml_disable_entity_loader($disableEntities); + $dom->normalizeDocument(); libxml_clear_errors(); diff --git a/vendor/symfony/translation/LoggingTranslator.php b/vendor/symfony/translation/LoggingTranslator.php index fa5c5cc5b..b259df5e0 100644 --- a/vendor/symfony/translation/LoggingTranslator.php +++ b/vendor/symfony/translation/LoggingTranslator.php @@ -88,6 +88,20 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface return $this->translator->getCatalogue($locale); } + /** + * Gets the fallback locales. + * + * @return array $locales The fallback locales + */ + public function getFallbackLocales() + { + if ($this->translator instanceof Translator) { + return $this->translator->getFallbackLocales(); + } + + return array(); + } + /** * Passes through all unknown calls onto the translator object. */ diff --git a/vendor/symfony/translation/MessageCatalogue.php b/vendor/symfony/translation/MessageCatalogue.php index dd354a85a..73649fb6d 100644 --- a/vendor/symfony/translation/MessageCatalogue.php +++ b/vendor/symfony/translation/MessageCatalogue.php @@ -178,6 +178,10 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf if ($c->getLocale() === $catalogue->getLocale()) { throw new \LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); } + + foreach ($catalogue->getResources() as $resource) { + $c->addResource($resource); + } } while ($c = $c->parent); $catalogue->parent = $this; diff --git a/vendor/symfony/translation/MessageCatalogueInterface.php b/vendor/symfony/translation/MessageCatalogueInterface.php index b1b516dc2..40054f05c 100644 --- a/vendor/symfony/translation/MessageCatalogueInterface.php +++ b/vendor/symfony/translation/MessageCatalogueInterface.php @@ -105,7 +105,7 @@ interface MessageCatalogueInterface * * The two catalogues must have the same locale. * - * @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance + * @param self $catalogue */ public function addCatalogue(MessageCatalogueInterface $catalogue); @@ -115,14 +115,14 @@ interface MessageCatalogueInterface * * This is used to provide default translations when they do not exist for the current locale. * - * @param MessageCatalogueInterface $catalogue A MessageCatalogueInterface instance + * @param self $catalogue */ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue); /** * Gets the fallback catalogue. * - * @return MessageCatalogueInterface|null A MessageCatalogueInterface instance or null when no fallback has been set + * @return self|null A MessageCatalogueInterface instance or null when no fallback has been set */ public function getFallbackCatalogue(); diff --git a/vendor/symfony/translation/Translator.php b/vendor/symfony/translation/Translator.php index 216526e2f..ac0d757a9 100644 --- a/vendor/symfony/translation/Translator.php +++ b/vendor/symfony/translation/Translator.php @@ -159,7 +159,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface * * @throws \InvalidArgumentException If a locale contains invalid characters * - * @deprecated since version 2.3, to be removed in 3.0. Use setFallbackLocales() instead. + * @deprecated since version 2.3, to be removed in 3.0. Use setFallbackLocales() instead */ public function setFallbackLocale($locales) { @@ -380,9 +380,9 @@ EOF $fallbackSuffix = ucfirst(preg_replace($replacementPattern, '_', $fallback)); $currentSuffix = ucfirst(preg_replace($replacementPattern, '_', $current)); - $fallbackContent .= sprintf(<<addFallbackCatalogue(\$catalogue%s); + $fallbackContent .= sprintf(<<<'EOF' +$catalogue%s = new MessageCatalogue('%s', %s); +$catalogue%s->addFallbackCatalogue($catalogue%s); EOF , @@ -424,7 +424,7 @@ EOF foreach ($this->computeFallbackLocales($locale) as $fallback) { if (!isset($this->catalogues[$fallback])) { - $this->doLoadCatalogue($fallback); + $this->loadCatalogue($fallback); } $fallbackCatalogue = new MessageCatalogue($fallback, $this->catalogues[$fallback]->all()); diff --git a/vendor/symfony/translation/TranslatorBagInterface.php b/vendor/symfony/translation/TranslatorBagInterface.php index 6f650b5ee..14fbb17f5 100644 --- a/vendor/symfony/translation/TranslatorBagInterface.php +++ b/vendor/symfony/translation/TranslatorBagInterface.php @@ -23,9 +23,9 @@ interface TranslatorBagInterface * * @param string|null $locale The locale or null to use the default * - * @throws \InvalidArgumentException If the locale contains invalid characters - * * @return MessageCatalogueInterface + * + * @throws \InvalidArgumentException If the locale contains invalid characters */ public function getCatalogue($locale = null); } diff --git a/vendor/symfony/translation/TranslatorInterface.php b/vendor/symfony/translation/TranslatorInterface.php index 869e0b900..6916c335b 100644 --- a/vendor/symfony/translation/TranslatorInterface.php +++ b/vendor/symfony/translation/TranslatorInterface.php @@ -26,9 +26,9 @@ interface TranslatorInterface * @param string|null $domain The domain for the message or null to use the default * @param string|null $locale The locale or null to use the default * - * @throws \InvalidArgumentException If the locale contains invalid characters - * * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters */ public function trans($id, array $parameters = array(), $domain = null, $locale = null); @@ -41,9 +41,9 @@ interface TranslatorInterface * @param string|null $domain The domain for the message or null to use the default * @param string|null $locale The locale or null to use the default * - * @throws \InvalidArgumentException If the locale contains invalid characters - * * @return string The translated string + * + * @throws \InvalidArgumentException If the locale contains invalid characters */ public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null); diff --git a/vendor/symfony/translation/Util/ArrayConverter.php b/vendor/symfony/translation/Util/ArrayConverter.php index 60a55e9d3..9c0a420a8 100644 --- a/vendor/symfony/translation/Util/ArrayConverter.php +++ b/vendor/symfony/translation/Util/ArrayConverter.php @@ -62,7 +62,7 @@ class ArrayConverter * $tree['foo'] was string before we found array {bar: test2}. * Treat new element as string too, e.g. add $tree['foo.bar'] = 'test2'; */ - $elem = &$elem[ implode('.', array_slice($parts, $i)) ]; + $elem = &$elem[implode('.', array_slice($parts, $i))]; break; } $parentOfElem = &$elem; diff --git a/vendor/symfony/translation/composer.json b/vendor/symfony/translation/composer.json index 79ff646c2..64d81bba0 100644 --- a/vendor/symfony/translation/composer.json +++ b/vendor/symfony/translation/composer.json @@ -21,7 +21,7 @@ }, "require-dev": { "symfony/config": "~2.8", - "symfony/intl": "~2.4|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", "symfony/yaml": "~2.2|~3.0.0", "psr/log": "~1.0" }, diff --git a/vendor/symfony/validator/ClassBasedInterface.php b/vendor/symfony/validator/ClassBasedInterface.php index 7c2eb8f0f..c57da274b 100644 --- a/vendor/symfony/validator/ClassBasedInterface.php +++ b/vendor/symfony/validator/ClassBasedInterface.php @@ -24,7 +24,7 @@ interface ClassBasedInterface /** * Returns the name of the backing PHP class. * - * @return string The name of the backing class. + * @return string The name of the backing class */ public function getClassName(); } diff --git a/vendor/symfony/validator/Constraint.php b/vendor/symfony/validator/Constraint.php index 61def982a..fc5288d13 100644 --- a/vendor/symfony/validator/Constraint.php +++ b/vendor/symfony/validator/Constraint.php @@ -129,6 +129,9 @@ abstract class Constraint unset($options['value']); } + if (is_array($options)) { + reset($options); + } if (is_array($options) && count($options) > 0 && is_string(key($options))) { foreach ($options as $option => $value) { if (array_key_exists($option, $knownOptions)) { @@ -207,8 +210,6 @@ abstract class Constraint * @throws InvalidOptionsException If an invalid option name is given * * @internal This method should not be used or overwritten in userland code. - * - * @since 2.6 */ public function __get($option) { @@ -296,8 +297,6 @@ abstract class Constraint * @internal This method may be replaced by an implementation of * {@link \Serializable} in the future. Please don't use or * overwrite it. - * - * @since 2.6 */ public function __sleep() { diff --git a/vendor/symfony/validator/ConstraintValidator.php b/vendor/symfony/validator/ConstraintValidator.php index c0db7e29e..804a9b2a1 100644 --- a/vendor/symfony/validator/ConstraintValidator.php +++ b/vendor/symfony/validator/ConstraintValidator.php @@ -38,7 +38,7 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface const OBJECT_TO_STRING = 2; /** - * @var ExecutionContextInterface + * @var ExecutionContextInterface2Dot5 */ protected $context; @@ -119,7 +119,7 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface * (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped * in double quotes ("). Objects, arrays and resources are formatted as * "object", "array" and "resource". If the $format bitmask contains - * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted + * the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted * as RFC-3339 dates ("Y-m-d H:i:s"). * * Be careful when passing message parameters to a constraint violation diff --git a/vendor/symfony/validator/ConstraintViolation.php b/vendor/symfony/validator/ConstraintViolation.php index 31b44d23c..516004a7c 100644 --- a/vendor/symfony/validator/ConstraintViolation.php +++ b/vendor/symfony/validator/ConstraintViolation.php @@ -105,7 +105,7 @@ class ConstraintViolation implements ConstraintViolationInterface /** * Converts the violation into a string for debugging purposes. * - * @return string The violation as string. + * @return string The violation as string */ public function __toString() { diff --git a/vendor/symfony/validator/ConstraintViolationInterface.php b/vendor/symfony/validator/ConstraintViolationInterface.php index 896fabc27..11028fe0a 100644 --- a/vendor/symfony/validator/ConstraintViolationInterface.php +++ b/vendor/symfony/validator/ConstraintViolationInterface.php @@ -38,7 +38,7 @@ interface ConstraintViolationInterface /** * Returns the violation message. * - * @return string The violation message. + * @return string The violation message */ public function getMessage(); @@ -49,7 +49,7 @@ interface ConstraintViolationInterface * returned by {@link getMessageParameters}. Typically you'll pass the * message template and parameters to a translation engine. * - * @return string The raw violation message. + * @return string The raw violation message */ public function getMessageTemplate(); @@ -78,7 +78,7 @@ interface ConstraintViolationInterface * This method returns the value of the parameter for choosing the right * pluralization form (in this case "choices"). * - * @return int|null The number to use to pluralize of the message. + * @return int|null The number to use to pluralize of the message * * @deprecated since version 2.7, to be replaced by getPlural() in 3.0. */ @@ -119,7 +119,7 @@ interface ConstraintViolationInterface /** * Returns a machine-digestible error code for the violation. * - * @return string|null The error code. + * @return string|null The error code */ public function getCode(); } diff --git a/vendor/symfony/validator/ConstraintViolationList.php b/vendor/symfony/validator/ConstraintViolationList.php index cccfa86ae..3490237bc 100644 --- a/vendor/symfony/validator/ConstraintViolationList.php +++ b/vendor/symfony/validator/ConstraintViolationList.php @@ -38,7 +38,7 @@ class ConstraintViolationList implements \IteratorAggregate, ConstraintViolation /** * Converts the violation into a string for debugging purposes. * - * @return string The violation as string. + * @return string The violation as string */ public function __toString() { @@ -107,6 +107,8 @@ class ConstraintViolationList implements \IteratorAggregate, ConstraintViolation /** * {@inheritdoc} + * + * @return \ArrayIterator|ConstraintViolationInterface[] */ public function getIterator() { diff --git a/vendor/symfony/validator/ConstraintViolationListInterface.php b/vendor/symfony/validator/ConstraintViolationListInterface.php index 8d15bd72b..d96755c9a 100644 --- a/vendor/symfony/validator/ConstraintViolationListInterface.php +++ b/vendor/symfony/validator/ConstraintViolationListInterface.php @@ -21,23 +21,23 @@ interface ConstraintViolationListInterface extends \Traversable, \Countable, \Ar /** * Adds a constraint violation to this list. * - * @param ConstraintViolationInterface $violation The violation to add. + * @param ConstraintViolationInterface $violation The violation to add */ public function add(ConstraintViolationInterface $violation); /** * Merges an existing violation list into this list. * - * @param ConstraintViolationListInterface $otherList The list to merge. + * @param ConstraintViolationListInterface $otherList The list to merge */ public function addAll(ConstraintViolationListInterface $otherList); /** * Returns the violation at a given offset. * - * @param int $offset The offset of the violation. + * @param int $offset The offset of the violation * - * @return ConstraintViolationInterface The violation. + * @return ConstraintViolationInterface The violation * * @throws \OutOfBoundsException If the offset does not exist. */ @@ -46,24 +46,24 @@ interface ConstraintViolationListInterface extends \Traversable, \Countable, \Ar /** * Returns whether the given offset exists. * - * @param int $offset The violation offset. + * @param int $offset The violation offset * - * @return bool Whether the offset exists. + * @return bool Whether the offset exists */ public function has($offset); /** * Sets a violation at a given offset. * - * @param int $offset The violation offset. - * @param ConstraintViolationInterface $violation The violation. + * @param int $offset The violation offset + * @param ConstraintViolationInterface $violation The violation */ public function set($offset, ConstraintViolationInterface $violation); /** * Removes a violation at a given offset. * - * @param int $offset The offset to remove. + * @param int $offset The offset to remove */ public function remove($offset); } diff --git a/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php b/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php index ce0487403..ca0c3aa71 100644 --- a/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php +++ b/vendor/symfony/validator/Constraints/AbstractComparisonValidator.php @@ -44,7 +44,7 @@ abstract class AbstractComparisonValidator extends ConstraintValidator // the DateTime constructor: // http://php.net/manual/en/datetime.formats.php if (is_string($comparedValue)) { - if ($value instanceof \DatetimeImmutable) { + if ($value instanceof \DateTimeImmutable) { // If $value is immutable, convert the compared value to a // DateTimeImmutable too $comparedValue = new \DatetimeImmutable($comparedValue); diff --git a/vendor/symfony/validator/Constraints/BicValidator.php b/vendor/symfony/validator/Constraints/BicValidator.php index f476713c7..d2188071f 100644 --- a/vendor/symfony/validator/Constraints/BicValidator.php +++ b/vendor/symfony/validator/Constraints/BicValidator.php @@ -17,7 +17,7 @@ use Symfony\Component\Validator\ConstraintValidator; /** * @author Michael Hirschler * - * @link https://en.wikipedia.org/wiki/ISO_9362#Structure + * @see https://en.wikipedia.org/wiki/ISO_9362#Structure */ class BicValidator extends ConstraintValidator { diff --git a/vendor/symfony/validator/Constraints/Callback.php b/vendor/symfony/validator/Constraints/Callback.php index 7e4ccd47b..36e6087e1 100644 --- a/vendor/symfony/validator/Constraints/Callback.php +++ b/vendor/symfony/validator/Constraints/Callback.php @@ -23,8 +23,6 @@ class Callback extends Constraint { /** * @var string|callable - * - * @since 2.4 */ public $callback; diff --git a/vendor/symfony/validator/Constraints/CardSchemeValidator.php b/vendor/symfony/validator/Constraints/CardSchemeValidator.php index 229e0d2c1..be54a0cf4 100644 --- a/vendor/symfony/validator/Constraints/CardSchemeValidator.php +++ b/vendor/symfony/validator/Constraints/CardSchemeValidator.php @@ -74,8 +74,10 @@ class CardSchemeValidator extends ConstraintValidator '/^6[0-9]{11,18}$/', ), // All MasterCard numbers start with the numbers 51 through 55. All have 16 digits. + // October 2016 MasterCard numbers can also start with 222100 through 272099. 'MASTERCARD' => array( '/^5[1-5][0-9]{14}$/', + '/^2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12})$/', ), // All Visa card numbers start with a 4. New cards have 16 digits. Old cards have 13. 'VISA' => array( diff --git a/vendor/symfony/validator/Constraints/Composite.php b/vendor/symfony/validator/Constraints/Composite.php index 90c98620f..ab8466bcf 100644 --- a/vendor/symfony/validator/Constraints/Composite.php +++ b/vendor/symfony/validator/Constraints/Composite.php @@ -24,8 +24,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; * let {@link getCompositeOption()} return the name of the property which * contains the nested constraints. * - * @since 2.6 - * * @author Bernhard Schussek */ abstract class Composite extends Constraint diff --git a/vendor/symfony/validator/Constraints/EmailValidator.php b/vendor/symfony/validator/Constraints/EmailValidator.php index 42fe82ef9..6ae25e016 100644 --- a/vendor/symfony/validator/Constraints/EmailValidator.php +++ b/vendor/symfony/validator/Constraints/EmailValidator.php @@ -56,8 +56,8 @@ class EmailValidator extends ConstraintValidator } if ($constraint->strict) { - if (!class_exists('\Egulias\EmailValidator\EmailValidator')) { - throw new RuntimeException('Strict email validation requires egulias/email-validator'); + if (!class_exists('\Egulias\EmailValidator\EmailValidator') || interface_exists('\Egulias\EmailValidator\Validation\EmailValidation')) { + throw new RuntimeException('Strict email validation requires egulias/email-validator:~1.2'); } $strictValidator = new \Egulias\EmailValidator\EmailValidator(); diff --git a/vendor/symfony/validator/Constraints/File.php b/vendor/symfony/validator/Constraints/File.php index 24c7495fa..341fbaf44 100644 --- a/vendor/symfony/validator/Constraints/File.php +++ b/vendor/symfony/validator/Constraints/File.php @@ -88,20 +88,22 @@ class File extends Constraint private function normalizeBinaryFormat($maxSize) { + $sizeInt = (int) $maxSize; + if (ctype_digit((string) $maxSize)) { - $this->maxSize = (int) $maxSize; + $this->maxSize = $sizeInt; $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; } elseif (preg_match('/^\d++k$/i', $maxSize)) { - $this->maxSize = $maxSize * 1000; + $this->maxSize = $sizeInt * 1000; $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; } elseif (preg_match('/^\d++M$/i', $maxSize)) { - $this->maxSize = $maxSize * 1000000; + $this->maxSize = $sizeInt * 1000000; $this->binaryFormat = null === $this->binaryFormat ? false : $this->binaryFormat; } elseif (preg_match('/^\d++Ki$/i', $maxSize)) { - $this->maxSize = $maxSize << 10; + $this->maxSize = $sizeInt << 10; $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; } elseif (preg_match('/^\d++Mi$/i', $maxSize)) { - $this->maxSize = $maxSize << 20; + $this->maxSize = $sizeInt << 20; $this->binaryFormat = null === $this->binaryFormat ? true : $this->binaryFormat; } else { throw new ConstraintDefinitionException(sprintf('"%s" is not a valid maximum size', $this->maxSize)); diff --git a/vendor/symfony/validator/Constraints/GroupSequence.php b/vendor/symfony/validator/Constraints/GroupSequence.php index aea055831..319eff0ed 100644 --- a/vendor/symfony/validator/Constraints/GroupSequence.php +++ b/vendor/symfony/validator/Constraints/GroupSequence.php @@ -19,7 +19,7 @@ use Symfony\Component\Validator\Exception\OutOfBoundsException; * When validating a group sequence, each group will only be validated if all * of the previous groups in the sequence succeeded. For example: * - * $validator->validate($address, null, new GroupSequence('Basic', 'Strict')); + * $validator->validate($address, null, new GroupSequence(array('Basic', 'Strict'))); * * In the first step, all constraints that belong to the group "Basic" will be * validated. If none of the constraints fail, the validator will then validate diff --git a/vendor/symfony/validator/Constraints/IbanValidator.php b/vendor/symfony/validator/Constraints/IbanValidator.php index 72ae00267..ae4eb112b 100644 --- a/vendor/symfony/validator/Constraints/IbanValidator.php +++ b/vendor/symfony/validator/Constraints/IbanValidator.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException; * @author Michael Schummel * @author Bernhard Schussek * - * @link http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/ + * @see http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/ */ class IbanValidator extends ConstraintValidator { @@ -34,7 +34,7 @@ class IbanValidator extends ConstraintValidator * a BBAN (Basic Bank Account Number) which has a fixed length per country and, * included within it, a bank identifier with a fixed position and a fixed length per country * - * @link http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf + * @see http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf * * @var array */ diff --git a/vendor/symfony/validator/Constraints/IsbnValidator.php b/vendor/symfony/validator/Constraints/IsbnValidator.php index aaf52dc56..6ca8488a5 100644 --- a/vendor/symfony/validator/Constraints/IsbnValidator.php +++ b/vendor/symfony/validator/Constraints/IsbnValidator.php @@ -144,14 +144,14 @@ class IsbnValidator extends ConstraintValidator // If we test the length before the loop, we get an ERROR_TOO_SHORT // when actually an ERROR_INVALID_CHARACTERS is wanted, e.g. for // "0-45122_5244" (typo) - if (!isset($isbn{$i})) { + if (!isset($isbn[$i])) { return Isbn::TOO_SHORT_ERROR; } - if ('X' === $isbn{$i}) { + if ('X' === $isbn[$i]) { $digit = 10; - } elseif (ctype_digit($isbn{$i})) { - $digit = $isbn{$i}; + } elseif (ctype_digit($isbn[$i])) { + $digit = $isbn[$i]; } else { return Isbn::INVALID_CHARACTERS_ERROR; } @@ -159,7 +159,7 @@ class IsbnValidator extends ConstraintValidator $checkSum += $digit * (10 - $i); } - if (isset($isbn{$i})) { + if (isset($isbn[$i])) { return Isbn::TOO_LONG_ERROR; } @@ -190,11 +190,11 @@ class IsbnValidator extends ConstraintValidator $checkSum = 0; for ($i = 0; $i < 13; $i += 2) { - $checkSum += $isbn{$i}; + $checkSum += $isbn[$i]; } for ($i = 1; $i < 12; $i += 2) { - $checkSum += $isbn{$i} + $checkSum += $isbn[$i] * 3; } diff --git a/vendor/symfony/validator/Constraints/IssnValidator.php b/vendor/symfony/validator/Constraints/IssnValidator.php index 000af74f2..1405acfc7 100644 --- a/vendor/symfony/validator/Constraints/IssnValidator.php +++ b/vendor/symfony/validator/Constraints/IssnValidator.php @@ -48,7 +48,7 @@ class IssnValidator extends ConstraintValidator // 1234-567X // ^ - if (isset($canonical{4}) && '-' === $canonical{4}) { + if (isset($canonical[4]) && '-' === $canonical[4]) { // remove hyphen $canonical = substr($canonical, 0, 4).substr($canonical, 5); } elseif ($constraint->requireHyphen) { @@ -121,7 +121,7 @@ class IssnValidator extends ConstraintValidator // 1234567X // ^ digit, x or X - if (!ctype_digit($canonical{7}) && 'x' !== $canonical{7} && 'X' !== $canonical{7}) { + if (!ctype_digit($canonical[7]) && 'x' !== $canonical[7] && 'X' !== $canonical[7]) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -139,7 +139,7 @@ class IssnValidator extends ConstraintValidator // 1234567X // ^ case-sensitive? - if ($constraint->caseSensitive && 'x' === $canonical{7}) { + if ($constraint->caseSensitive && 'x' === $canonical[7]) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -156,14 +156,14 @@ class IssnValidator extends ConstraintValidator } // Calculate a checksum. "X" equals 10. - $checkSum = 'X' === $canonical{7} - || 'x' === $canonical{7} + $checkSum = 'X' === $canonical[7] + || 'x' === $canonical[7] ? 10 - : $canonical{7}; + : $canonical[7]; for ($i = 0; $i < 7; ++$i) { // Multiply the first digit by 8, the second by 7, etc. - $checkSum += (8 - $i) * $canonical{$i}; + $checkSum += (8 - $i) * $canonical[$i]; } if (0 !== $checkSum % 11) { diff --git a/vendor/symfony/validator/Constraints/LengthValidator.php b/vendor/symfony/validator/Constraints/LengthValidator.php index 9ecfb8c0c..1518ecf0c 100644 --- a/vendor/symfony/validator/Constraints/LengthValidator.php +++ b/vendor/symfony/validator/Constraints/LengthValidator.php @@ -40,13 +40,10 @@ class LengthValidator extends ConstraintValidator $stringValue = (string) $value; - if ('UTF8' === $charset = strtoupper($constraint->charset)) { - $charset = 'UTF-8'; // iconv on Windows requires "UTF-8" instead of "UTF8" + if (!$invalidCharset = !@mb_check_encoding($stringValue, $constraint->charset)) { + $length = mb_strlen($stringValue, $constraint->charset); } - $length = @iconv_strlen($stringValue, $charset); - $invalidCharset = false === $length; - if ($invalidCharset) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->charsetMessage) diff --git a/vendor/symfony/validator/Constraints/LuhnValidator.php b/vendor/symfony/validator/Constraints/LuhnValidator.php index 31d4497d6..e971ab153 100644 --- a/vendor/symfony/validator/Constraints/LuhnValidator.php +++ b/vendor/symfony/validator/Constraints/LuhnValidator.php @@ -81,7 +81,7 @@ class LuhnValidator extends ConstraintValidator // ^ ^ ^ ^ ^ ^ // = 7 + 9 + 7 + 9 + 7 + 3 for ($i = $length - 1; $i >= 0; $i -= 2) { - $checkSum += $value{$i}; + $checkSum += $value[$i]; } // Starting with the second last digit and walking left, double every @@ -91,7 +91,7 @@ class LuhnValidator extends ConstraintValidator // ^ ^ ^ ^ ^ // = 1+8 + 4 + 6 + 1+6 + 2 for ($i = $length - 2; $i >= 0; $i -= 2) { - $checkSum += array_sum(str_split($value{$i} * 2)); + $checkSum += array_sum(str_split($value[$i] * 2)); } if (0 === $checkSum || 0 !== $checkSum % 10) { diff --git a/vendor/symfony/validator/Constraints/Regex.php b/vendor/symfony/validator/Constraints/Regex.php index ec2fd7de6..7a43667fe 100644 --- a/vendor/symfony/validator/Constraints/Regex.php +++ b/vendor/symfony/validator/Constraints/Regex.php @@ -56,7 +56,7 @@ class Regex extends Constraint * Pattern is also ignored if match=false since the pattern should * then be reversed before application. * - * @link http://dev.w3.org/html5/spec/single-page.html#the-pattern-attribute + * @see http://dev.w3.org/html5/spec/single-page.html#the-pattern-attribute * * @return string|null */ diff --git a/vendor/symfony/validator/Constraints/Traverse.php b/vendor/symfony/validator/Constraints/Traverse.php index 5811ad770..9d8bc126d 100644 --- a/vendor/symfony/validator/Constraints/Traverse.php +++ b/vendor/symfony/validator/Constraints/Traverse.php @@ -17,8 +17,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** * @Annotation * - * @since 2.5 - * * @author Bernhard Schussek */ class Traverse extends Constraint diff --git a/vendor/symfony/validator/Constraints/UrlValidator.php b/vendor/symfony/validator/Constraints/UrlValidator.php index 7497becef..ed0a2579b 100644 --- a/vendor/symfony/validator/Constraints/UrlValidator.php +++ b/vendor/symfony/validator/Constraints/UrlValidator.php @@ -25,13 +25,13 @@ class UrlValidator extends ConstraintValidator (%s):// # protocol (([\pL\pN-]+:)?([\pL\pN-]+)@)? # basic auth ( - ([\pL\pN\pS-\.])+(\.?([\pL]|xn\-\-[\pL\pN-]+)+\.?) # a domain name - | # or - \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # a IP address - | # or + ([\pL\pN\pS-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name + | # or + \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address + | # or \[ (?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::)))) - \] # a IPv6 address + \] # an IPv6 address ) (:[0-9]+)? # a port (optional) (/?|/\S+|\?\S*|\#\S*) # a /, nothing, a / with something, a query or a fragment diff --git a/vendor/symfony/validator/Constraints/UuidValidator.php b/vendor/symfony/validator/Constraints/UuidValidator.php index 08f9e27b7..d025a560d 100644 --- a/vendor/symfony/validator/Constraints/UuidValidator.php +++ b/vendor/symfony/validator/Constraints/UuidValidator.php @@ -81,6 +81,10 @@ class UuidValidator extends ConstraintValidator return; } + if (!$constraint instanceof Uuid) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Uuid'); + } + if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) { throw new UnexpectedTypeException($value, 'string'); } @@ -114,7 +118,7 @@ class UuidValidator extends ConstraintValidator for ($i = 0; $i < $l; ++$i) { // Check length - if (!isset($trimmed{$i})) { + if (!isset($trimmed[$i])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -133,7 +137,7 @@ class UuidValidator extends ConstraintValidator // Hyphens must occur every fifth position // xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx // ^ ^ ^ ^ ^ ^ ^ - if ('-' === $trimmed{$i}) { + if ('-' === $trimmed[$i]) { if ($i !== $h) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) @@ -162,7 +166,7 @@ class UuidValidator extends ConstraintValidator } // Check characters - if (!ctype_xdigit($trimmed{$i})) { + if (!ctype_xdigit($trimmed[$i])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -180,7 +184,7 @@ class UuidValidator extends ConstraintValidator } // Check length again - if (isset($trimmed{$i})) { + if (isset($trimmed[$i])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -209,7 +213,7 @@ class UuidValidator extends ConstraintValidator for ($i = 0; $i < self::STRICT_LENGTH; ++$i) { // Check length - if (!isset($value{$i})) { + if (!isset($value[$i])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -228,24 +232,18 @@ class UuidValidator extends ConstraintValidator // Check hyphen placement // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // ^ ^ ^ ^ - if ('-' === $value{$i}) { + if ('-' === $value[$i]) { if ($i !== $h) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) - ->setParameter( - '{{ value }}', - $this->formatValue($value) - ) - ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) - ->addViolation(); + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); } else { $this->buildViolation($constraint->message) - ->setParameter( - '{{ value }}', - $this->formatValue($value) - ) - ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) - ->addViolation(); + ->setParameter('{{ value }}', $this->formatValue($value)) + ->setCode(Uuid::INVALID_HYPHEN_PLACEMENT_ERROR) + ->addViolation(); } return; @@ -261,7 +259,7 @@ class UuidValidator extends ConstraintValidator } // Check characters - if (!ctype_xdigit($value{$i})) { + if (!ctype_xdigit($value[$i])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -296,7 +294,7 @@ class UuidValidator extends ConstraintValidator } // Check length again - if (isset($value{$i})) { + if (isset($value[$i])) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -311,7 +309,7 @@ class UuidValidator extends ConstraintValidator } // Check version - if (!in_array($value{self::STRICT_VERSION_POSITION}, $constraint->versions)) { + if (!in_array($value[self::STRICT_VERSION_POSITION], $constraint->versions)) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) @@ -329,7 +327,7 @@ class UuidValidator extends ConstraintValidator // 0b10xx // & 0b1100 (12) // = 0b1000 (8) - if ((hexdec($value{self::STRICT_VARIANT_POSITION}) & 12) !== 8) { + if ((hexdec($value[self::STRICT_VARIANT_POSITION]) & 12) !== 8) { if ($this->context instanceof ExecutionContextInterface) { $this->context->buildViolation($constraint->message) ->setParameter('{{ value }}', $this->formatValue($value)) diff --git a/vendor/symfony/validator/Context/ExecutionContext.php b/vendor/symfony/validator/Context/ExecutionContext.php index 722bcc947..721766a25 100644 --- a/vendor/symfony/validator/Context/ExecutionContext.php +++ b/vendor/symfony/validator/Context/ExecutionContext.php @@ -27,8 +27,6 @@ use Symfony\Component\Validator\Violation\ConstraintViolationBuilder; /** * The context used and created by {@link ExecutionContextFactory}. * - * @since 2.5 - * * @author Bernhard Schussek * * @see ExecutionContextInterface @@ -289,6 +287,11 @@ class ExecutionContext implements ExecutionContextInterface return $this->group; } + public function getConstraint() + { + return $this->constraint; + } + /** * {@inheritdoc} */ diff --git a/vendor/symfony/validator/Context/ExecutionContextFactory.php b/vendor/symfony/validator/Context/ExecutionContextFactory.php index f4f01d926..8182c41f8 100644 --- a/vendor/symfony/validator/Context/ExecutionContextFactory.php +++ b/vendor/symfony/validator/Context/ExecutionContextFactory.php @@ -17,8 +17,6 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; /** * Creates new {@link ExecutionContext} instances. * - * @since 2.5 - * * @author Bernhard Schussek * * @internal You should not instantiate or use this class. Code against diff --git a/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php b/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php index e4af667d2..f3ab3dd68 100644 --- a/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php +++ b/vendor/symfony/validator/Context/ExecutionContextFactoryInterface.php @@ -19,8 +19,6 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * You can use a custom factory if you want to customize the execution context * that is passed through the validation run. * - * @since 2.5 - * * @author Bernhard Schussek */ interface ExecutionContextFactoryInterface diff --git a/vendor/symfony/validator/Context/ExecutionContextInterface.php b/vendor/symfony/validator/Context/ExecutionContextInterface.php index 2ef80b66f..d38d33747 100644 --- a/vendor/symfony/validator/Context/ExecutionContextInterface.php +++ b/vendor/symfony/validator/Context/ExecutionContextInterface.php @@ -56,8 +56,6 @@ use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; * cannot store a context and expect that the methods still return the same * results later on. * - * @since 2.5 - * * @author Bernhard Schussek */ interface ExecutionContextInterface extends LegacyExecutionContextInterface @@ -111,7 +109,7 @@ interface ExecutionContextInterface extends LegacyExecutionContextInterface * * In other cases, null is returned. * - * @return object|null The currently validated object or null. + * @return object|null The currently validated object or null */ public function getObject(); diff --git a/vendor/symfony/validator/Context/LegacyExecutionContext.php b/vendor/symfony/validator/Context/LegacyExecutionContext.php index f52b359fb..37ca2a1d1 100644 --- a/vendor/symfony/validator/Context/LegacyExecutionContext.php +++ b/vendor/symfony/validator/Context/LegacyExecutionContext.php @@ -20,8 +20,6 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; /** * An execution context that is compatible with the legacy API (< 2.5). * - * @since 2.5 - * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. diff --git a/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php b/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php index c110644e9..757eb72a5 100644 --- a/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php +++ b/vendor/symfony/validator/Context/LegacyExecutionContextFactory.php @@ -22,8 +22,6 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * * Implemented for backward compatibility with Symfony < 2.5. * - * @since 2.5 - * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. diff --git a/vendor/symfony/validator/Exception/UnsupportedMetadataException.php b/vendor/symfony/validator/Exception/UnsupportedMetadataException.php index 97cc5ffe5..aff569b95 100644 --- a/vendor/symfony/validator/Exception/UnsupportedMetadataException.php +++ b/vendor/symfony/validator/Exception/UnsupportedMetadataException.php @@ -12,8 +12,6 @@ namespace Symfony\Component\Validator\Exception; /** - * @since 2.5 - * * @author Bernhard Schussek */ class UnsupportedMetadataException extends InvalidArgumentException diff --git a/vendor/symfony/validator/ExecutionContext.php b/vendor/symfony/validator/ExecutionContext.php index 5875e94ef..52cccb2f6 100644 --- a/vendor/symfony/validator/ExecutionContext.php +++ b/vendor/symfony/validator/ExecutionContext.php @@ -66,13 +66,13 @@ class ExecutionContext implements ExecutionContextInterface /** * Creates a new execution context. * - * @param GlobalExecutionContextInterface $globalContext The global context storing node-independent state. - * @param TranslatorInterface $translator The translator for translating violation messages. - * @param null|string $translationDomain The domain of the validation messages. - * @param MetadataInterface $metadata The metadata of the validated node. - * @param mixed $value The value of the validated node. - * @param string $group The current validation group. - * @param string $propertyPath The property path to the current node. + * @param GlobalExecutionContextInterface $globalContext The global context storing node-independent state + * @param TranslatorInterface $translator The translator for translating violation messages + * @param null|string $translationDomain The domain of the validation messages + * @param MetadataInterface $metadata The metadata of the validated node + * @param mixed $value The value of the validated node + * @param string $group The current validation group + * @param string $propertyPath The property path to the current node */ public function __construct(GlobalExecutionContextInterface $globalContext, TranslatorInterface $translator, $translationDomain = null, MetadataInterface $metadata = null, $value = null, $group = null, $propertyPath = '') { @@ -266,8 +266,8 @@ class ExecutionContext implements ExecutionContextInterface /** * Executes the validators of the given constraints for the given value. * - * @param mixed $value The value to validate. - * @param Constraint[] $constraints The constraints to match against. + * @param mixed $value The value to validate + * @param Constraint[] $constraints The constraints to match against */ private function executeConstraintValidators($value, array $constraints) { @@ -286,7 +286,7 @@ class ExecutionContext implements ExecutionContextInterface * is passed, an array containing the current * group of the context is returned. * - * @return array An array of validation groups. + * @return array An array of validation groups */ private function resolveGroups($groups) { diff --git a/vendor/symfony/validator/ExecutionContextInterface.php b/vendor/symfony/validator/ExecutionContextInterface.php index b07e928e2..075fecb0c 100644 --- a/vendor/symfony/validator/ExecutionContextInterface.php +++ b/vendor/symfony/validator/ExecutionContextInterface.php @@ -145,8 +145,8 @@ interface ExecutionContextInterface * Any violations generated during the validation will be added to the * violation list that you can access with {@link getViolations}. * - * @param mixed $value The value to validate. - * @param string $subPath The path to append to the context's property path. + * @param mixed $value The value to validate + * @param string $subPath The path to append to the context's property path * @param null|string|string[] $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. @@ -181,9 +181,9 @@ interface ExecutionContextInterface * $context->validate($address->street, new NotNull(), 'street'); * * - * @param mixed $value The value to validate. - * @param Constraint|Constraint[] $constraints The constraint(s) to validate against. - * @param string $subPath The path to append to the context's property path. + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param string $subPath The path to append to the context's property path * @param null|string|string[] $groups The groups to validate in. If you don't pass any * groups here, the current group of the context * will be used. @@ -197,7 +197,7 @@ interface ExecutionContextInterface /** * Returns the violations generated by the validator so far. * - * @return ConstraintViolationListInterface The constraint violation list. + * @return ConstraintViolationListInterface The constraint violation list */ public function getViolations(); @@ -210,7 +210,7 @@ interface ExecutionContextInterface * * The current value is returned by {@link getValue}. * - * @return mixed The root value of the validation. + * @return mixed The root value of the validation */ public function getRoot(); @@ -220,7 +220,7 @@ interface ExecutionContextInterface * If you want to retrieve the object that was originally passed to the * validator, use {@link getRoot}. * - * @return mixed The currently validated value. + * @return mixed The currently validated value */ public function getValue(); @@ -245,7 +245,7 @@ interface ExecutionContextInterface /** * Returns the used metadata factory. * - * @return MetadataFactoryInterface The metadata factory. + * @return MetadataFactoryInterface The metadata factory * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::getValidator()} @@ -258,7 +258,7 @@ interface ExecutionContextInterface /** * Returns the validation group that is currently being validated. * - * @return string The current validation group. + * @return string The current validation group */ public function getGroup(); @@ -269,7 +269,7 @@ interface ExecutionContextInterface * {@link ClassBasedInterface} or if no metadata is available for the * current node, this method returns null. * - * @return string|null The class name or null, if no class name could be found. + * @return string|null The class name or null, if no class name could be found */ public function getClassName(); @@ -280,7 +280,7 @@ interface ExecutionContextInterface * {@link PropertyMetadataInterface} or if no metadata is available for the * current node, this method returns null. * - * @return string|null The property name or null, if no property name could be found. + * @return string|null The property name or null, if no property name could be found */ public function getPropertyName(); diff --git a/vendor/symfony/validator/GlobalExecutionContextInterface.php b/vendor/symfony/validator/GlobalExecutionContextInterface.php index 5c646f294..d9bd315af 100644 --- a/vendor/symfony/validator/GlobalExecutionContextInterface.php +++ b/vendor/symfony/validator/GlobalExecutionContextInterface.php @@ -35,14 +35,14 @@ interface GlobalExecutionContextInterface /** * Returns the violations generated by the validator so far. * - * @return ConstraintViolationListInterface A list of constraint violations. + * @return ConstraintViolationListInterface A list of constraint violations */ public function getViolations(); /** * Returns the value at which validation was started in the object graph. * - * @return mixed The root value. + * @return mixed The root value * * @see ExecutionContextInterface::getRoot() */ @@ -51,21 +51,21 @@ interface GlobalExecutionContextInterface /** * Returns the visitor instance used to validate the object graph nodes. * - * @return ValidationVisitorInterface The validation visitor. + * @return ValidationVisitorInterface The validation visitor */ public function getVisitor(); /** * Returns the factory for constraint validators. * - * @return ConstraintValidatorFactoryInterface The constraint validator factory. + * @return ConstraintValidatorFactoryInterface The constraint validator factory */ public function getValidatorFactory(); /** * Returns the factory for validation metadata objects. * - * @return MetadataFactoryInterface The metadata factory. + * @return MetadataFactoryInterface The metadata factory */ public function getMetadataFactory(); } diff --git a/vendor/symfony/validator/LICENSE b/vendor/symfony/validator/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/validator/LICENSE +++ b/vendor/symfony/validator/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/validator/Mapping/CascadingStrategy.php b/vendor/symfony/validator/Mapping/CascadingStrategy.php index 2b97bdd4c..c78fb42ad 100644 --- a/vendor/symfony/validator/Mapping/CascadingStrategy.php +++ b/vendor/symfony/validator/Mapping/CascadingStrategy.php @@ -27,8 +27,6 @@ namespace Symfony\Component\Validator\Mapping; * Although the constants currently represent a boolean switch, they are * implemented as bit mask in order to allow future extensions. * - * @since 2.5 - * * @author Bernhard Schussek * * @see TraversalStrategy diff --git a/vendor/symfony/validator/Mapping/ClassMetadata.php b/vendor/symfony/validator/Mapping/ClassMetadata.php index 3f4f51b83..fe5e6e51e 100644 --- a/vendor/symfony/validator/Mapping/ClassMetadata.php +++ b/vendor/symfony/validator/Mapping/ClassMetadata.php @@ -261,7 +261,7 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * @param string $property The name of the property * @param Constraint $constraint The constraint * - * @return ClassMetadata This object + * @return $this */ public function addPropertyConstraint($property, Constraint $constraint) { @@ -282,7 +282,7 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * @param string $property * @param Constraint[] $constraints * - * @return ClassMetadata + * @return $this */ public function addPropertyConstraints($property, array $constraints) { @@ -299,10 +299,11 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * The name of the getter is assumed to be the name of the property with an * uppercased first letter and either the prefix "get" or "is". * - * @param string $property The name of the property - * @param Constraint $constraint The constraint + * @param string $property The name of the property + * @param Constraint $constraint The constraint + * @param string|null $method The method that is called to retrieve the value being validated (null for auto-detection) * - * @return ClassMetadata This object + * @return $this */ public function addGetterConstraint($property, Constraint $constraint) { @@ -319,11 +320,35 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface return $this; } + /** + * Adds a constraint to the getter of the given property. + * + * @param string $property The name of the property + * @param string $method The name of the getter method + * @param Constraint $constraint The constraint + * + * @return $this + */ + public function addGetterMethodConstraint($property, $method, Constraint $constraint) + { + if (!isset($this->getters[$property])) { + $this->getters[$property] = new GetterMetadata($this->getClassName(), $property, $method); + + $this->addPropertyMetadata($this->getters[$property]); + } + + $constraint->addImplicitGroupName($this->getDefaultGroup()); + + $this->getters[$property]->addConstraint($constraint); + + return $this; + } + /** * @param string $property * @param Constraint[] $constraints * - * @return ClassMetadata + * @return $this */ public function addGetterConstraints($property, array $constraints) { @@ -334,6 +359,22 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface return $this; } + /** + * @param string $property + * @param string $method + * @param Constraint[] $constraints + * + * @return $this + */ + public function addGetterMethodConstraints($property, $method, array $constraints) + { + foreach ($constraints as $constraint) { + $this->addGetterMethodConstraint($property, $method, $constraint); + } + + return $this; + } + /** * Merges the constraints of the given metadata into this object. * @@ -350,6 +391,10 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface $member = clone $member; foreach ($member->getConstraints() as $constraint) { + if (in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) { + $member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint; + } + $constraint->addImplicitGroupName($this->getDefaultGroup()); } @@ -447,7 +492,7 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * * @param array $groupSequence An array of group names * - * @return ClassMetadata + * @return $this * * @throws GroupDefinitionException */ diff --git a/vendor/symfony/validator/Mapping/ClassMetadataInterface.php b/vendor/symfony/validator/Mapping/ClassMetadataInterface.php index 577440d61..d8c3d843b 100644 --- a/vendor/symfony/validator/Mapping/ClassMetadataInterface.php +++ b/vendor/symfony/validator/Mapping/ClassMetadataInterface.php @@ -24,8 +24,6 @@ use Symfony\Component\Validator\PropertyMetadataContainerInterface as LegacyProp * by a group sequence for that class and whether instances of that class * should be traversed or not. * - * @since 2.5 - * * @author Bernhard Schussek * * @see MetadataInterface diff --git a/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php index 6c5c277ed..82e1cf6bf 100644 --- a/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php +++ b/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -101,8 +101,11 @@ class LazyLoadingMetadataFactory implements MetadataFactoryInterface return $this->loadedClasses[$class]; } - if (null !== $this->cache && false !== ($this->loadedClasses[$class] = $this->cache->read($class))) { - return $this->loadedClasses[$class]; + if (null !== $this->cache && false !== ($metadata = $this->cache->read($class))) { + // Include constraints from the parent class + $this->mergeConstraints($metadata); + + return $this->loadedClasses[$class] = $metadata; } if (!class_exists($class) && !interface_exists($class)) { @@ -111,19 +114,6 @@ class LazyLoadingMetadataFactory implements MetadataFactoryInterface $metadata = new ClassMetadata($class); - // Include constraints from the parent class - if ($parent = $metadata->getReflectionClass()->getParentClass()) { - $metadata->mergeConstraints($this->getMetadataFor($parent->name)); - } - - // Include constraints from all implemented interfaces - foreach ($metadata->getReflectionClass()->getInterfaces() as $interface) { - if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) { - continue; - } - $metadata->mergeConstraints($this->getMetadataFor($interface->name)); - } - if (null !== $this->loader) { $this->loader->loadClassMetadata($metadata); } @@ -132,9 +122,46 @@ class LazyLoadingMetadataFactory implements MetadataFactoryInterface $this->cache->write($metadata); } + // Include constraints from the parent class + $this->mergeConstraints($metadata); + return $this->loadedClasses[$class] = $metadata; } + private function mergeConstraints(ClassMetadata $metadata) + { + // Include constraints from the parent class + if ($parent = $metadata->getReflectionClass()->getParentClass()) { + $metadata->mergeConstraints($this->getMetadataFor($parent->name)); + } + + $interfaces = $metadata->getReflectionClass()->getInterfaces(); + + $interfaces = array_filter($interfaces, function ($interface) use ($parent, $interfaces) { + $interfaceName = $interface->getName(); + + if ($parent && $parent->implementsInterface($interfaceName)) { + return false; + } + + foreach ($interfaces as $i) { + if ($i !== $interface && $i->implementsInterface($interfaceName)) { + return false; + } + } + + return true; + }); + + // Include constraints from all directly implemented interfaces + foreach ($interfaces as $interface) { + if ('Symfony\Component\Validator\GroupSequenceProviderInterface' === $interface->name) { + continue; + } + $metadata->mergeConstraints($this->getMetadataFor($interface->name)); + } + } + /** * {@inheritdoc} */ diff --git a/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php b/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php index 6e55e771d..438ef9871 100644 --- a/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php +++ b/vendor/symfony/validator/Mapping/Factory/MetadataFactoryInterface.php @@ -16,8 +16,6 @@ use Symfony\Component\Validator\MetadataFactoryInterface as LegacyMetadataFactor /** * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. * - * @since 2.5 - * * @author Bernhard Schussek */ interface MetadataFactoryInterface extends LegacyMetadataFactoryInterface diff --git a/vendor/symfony/validator/Mapping/GenericMetadata.php b/vendor/symfony/validator/Mapping/GenericMetadata.php index 3459074fc..97915ac71 100644 --- a/vendor/symfony/validator/Mapping/GenericMetadata.php +++ b/vendor/symfony/validator/Mapping/GenericMetadata.php @@ -23,8 +23,6 @@ use Symfony\Component\Validator\ValidationVisitorInterface; * * This class supports serialization and cloning. * - * @since 2.5 - * * @author Bernhard Schussek */ class GenericMetadata implements MetadataInterface @@ -123,7 +121,7 @@ class GenericMetadata implements MetadataInterface * * @param Constraint $constraint The constraint to add * - * @return GenericMetadata This object + * @return $this * * @throws ConstraintDefinitionException When trying to add the * {@link Traverse} constraint @@ -169,7 +167,7 @@ class GenericMetadata implements MetadataInterface * * @param Constraint[] $constraints The constraints to add * - * @return GenericMetadata This object + * @return $this */ public function addConstraints(array $constraints) { diff --git a/vendor/symfony/validator/Mapping/GetterMetadata.php b/vendor/symfony/validator/Mapping/GetterMetadata.php index 0cf999276..cd42c4338 100644 --- a/vendor/symfony/validator/Mapping/GetterMetadata.php +++ b/vendor/symfony/validator/Mapping/GetterMetadata.php @@ -35,25 +35,30 @@ class GetterMetadata extends MemberMetadata /** * Constructor. * - * @param string $class The class the getter is defined on - * @param string $property The property which the getter returns + * @param string $class The class the getter is defined on + * @param string $property The property which the getter returns + * @param string|null $method The method that is called to retrieve the value being validated (null for auto-detection) * * @throws ValidatorException */ - public function __construct($class, $property) + public function __construct($class, $property, $method = null) { - $getMethod = 'get'.ucfirst($property); - $isMethod = 'is'.ucfirst($property); - $hasMethod = 'has'.ucfirst($property); + if (null === $method) { + $getMethod = 'get'.ucfirst($property); + $isMethod = 'is'.ucfirst($property); + $hasMethod = 'has'.ucfirst($property); - if (method_exists($class, $getMethod)) { - $method = $getMethod; - } elseif (method_exists($class, $isMethod)) { - $method = $isMethod; - } elseif (method_exists($class, $hasMethod)) { - $method = $hasMethod; - } else { - throw new ValidatorException(sprintf('Neither of these methods exist in class %s: %s, %s, %s', $class, $getMethod, $isMethod, $hasMethod)); + if (method_exists($class, $getMethod)) { + $method = $getMethod; + } elseif (method_exists($class, $isMethod)) { + $method = $isMethod; + } elseif (method_exists($class, $hasMethod)) { + $method = $hasMethod; + } else { + throw new ValidatorException(sprintf('Neither of these methods exist in class %s: %s, %s, %s', $class, $getMethod, $isMethod, $hasMethod)); + } + } elseif (!method_exists($class, $method)) { + throw new ValidatorException(sprintf('The %s() method does not exist in class %s.', $method, $class)); } parent::__construct($class, $method, $property); diff --git a/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php b/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php index d1b8c35b3..a3b5f7ee8 100644 --- a/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php +++ b/vendor/symfony/validator/Mapping/Loader/AnnotationLoader.php @@ -79,7 +79,7 @@ class AnnotationLoader implements LoaderInterface $metadata->addConstraint($constraint); } elseif ($constraint instanceof Constraint) { if (preg_match('/^(get|is|has)(.+)$/i', $method->name, $matches)) { - $metadata->addGetterConstraint(lcfirst($matches[2]), $constraint); + $metadata->addGetterMethodConstraint(lcfirst($matches[2]), $matches[0], $constraint); } else { throw new MappingException(sprintf('The constraint on "%s::%s" cannot be added. Constraints can only be added on methods beginning with "get", "is" or "has".', $className, $method->name)); } diff --git a/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php b/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php index 3458c7146..8bcdf9f97 100644 --- a/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php +++ b/vendor/symfony/validator/Mapping/Loader/XmlFileLoader.php @@ -84,7 +84,7 @@ class XmlFileLoader extends FileLoader $options = array(); } } elseif (strlen((string) $node) > 0) { - $options = trim($node); + $options = XmlUtils::phpize(trim($node)); } else { $options = null; } @@ -182,13 +182,7 @@ class XmlFileLoader extends FileLoader return simplexml_import_dom($dom); } - /** - * Loads the validation metadata from the given XML class description. - * - * @param ClassMetadata $metadata The metadata to load - * @param array $classDescription The XML class description - */ - private function loadClassMetadataFromXml(ClassMetadata $metadata, $classDescription) + private function loadClassMetadataFromXml(ClassMetadata $metadata, \SimpleXMLElement $classDescription) { if (count($classDescription->{'group-sequence-provider'}) > 0) { $metadata->setGroupSequenceProvider(true); diff --git a/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php b/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php index cf6dd92dc..16212833d 100644 --- a/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php +++ b/vendor/symfony/validator/Mapping/Loader/YamlFileLoader.php @@ -46,13 +46,7 @@ class YamlFileLoader extends FileLoader $this->yamlParser = new YamlParser(); } - // This method may throw an exception. Do not modify the class' - // state before it completes - if (false === ($classes = $this->parseFile($this->file))) { - return false; - } - - $this->classes = $classes; + $this->classes = $this->parseFile($this->file); if (isset($this->classes['namespaces'])) { foreach ($this->classes['namespaces'] as $alias => $namespace) { @@ -111,7 +105,7 @@ class YamlFileLoader extends FileLoader * * @param string $path The path of the YAML file * - * @return array|null The class descriptions or null, if the file was empty + * @return array The class descriptions * * @throws \InvalidArgumentException If the file could not be loaded or did * not contain a YAML array @@ -126,7 +120,7 @@ class YamlFileLoader extends FileLoader // empty file if (null === $classes) { - return; + return array(); } // not an array diff --git a/vendor/symfony/validator/Mapping/MetadataInterface.php b/vendor/symfony/validator/Mapping/MetadataInterface.php index e5f09e17e..1e9d3c892 100644 --- a/vendor/symfony/validator/Mapping/MetadataInterface.php +++ b/vendor/symfony/validator/Mapping/MetadataInterface.php @@ -24,8 +24,6 @@ use Symfony\Component\Validator\MetadataInterface as LegacyMetadataInterface; * against their class' metadata and whether traversable objects should be * traversed or not. * - * @since 2.5 - * * @author Bernhard Schussek * * @see CascadingStrategy diff --git a/vendor/symfony/validator/Mapping/PropertyMetadata.php b/vendor/symfony/validator/Mapping/PropertyMetadata.php index 9a2a4aac1..d12701cb4 100644 --- a/vendor/symfony/validator/Mapping/PropertyMetadata.php +++ b/vendor/symfony/validator/Mapping/PropertyMetadata.php @@ -39,7 +39,7 @@ class PropertyMetadata extends MemberMetadata public function __construct($class, $name) { if (!property_exists($class, $name)) { - throw new ValidatorException(sprintf('Property %s does not exist in class %s', $name, $class)); + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s"', $name, $class)); } parent::__construct($class, $name, $name); @@ -58,8 +58,14 @@ class PropertyMetadata extends MemberMetadata */ protected function newReflectionMember($objectOrClassName) { + $originalClass = is_string($objectOrClassName) ? $objectOrClassName : get_class($objectOrClassName); + while (!property_exists($objectOrClassName, $this->getName())) { $objectOrClassName = get_parent_class($objectOrClassName); + + if (false === $objectOrClassName) { + throw new ValidatorException(sprintf('Property "%s" does not exist in class "%s".', $this->getName(), $originalClass)); + } } $member = new \ReflectionProperty($objectOrClassName, $this->getName()); diff --git a/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php b/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php index 8a77aa83f..d7a4114d4 100644 --- a/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php +++ b/vendor/symfony/validator/Mapping/PropertyMetadataInterface.php @@ -24,8 +24,6 @@ use Symfony\Component\Validator\PropertyMetadataInterface as LegacyPropertyMetad * should be validated against their class' metadata and whether traversable * objects should be traversed or not. * - * @since 2.5 - * * @author Bernhard Schussek * * @see MetadataInterface diff --git a/vendor/symfony/validator/Mapping/TraversalStrategy.php b/vendor/symfony/validator/Mapping/TraversalStrategy.php index ae76857aa..164992b2e 100644 --- a/vendor/symfony/validator/Mapping/TraversalStrategy.php +++ b/vendor/symfony/validator/Mapping/TraversalStrategy.php @@ -23,8 +23,6 @@ namespace Symfony\Component\Validator\Mapping; * * The traversal strategy is ignored for arrays. Arrays are always iterated. * - * @since 2.1 - * * @author Bernhard Schussek * * @see CascadingStrategy diff --git a/vendor/symfony/validator/PropertyMetadataContainerInterface.php b/vendor/symfony/validator/PropertyMetadataContainerInterface.php index 5441be1c3..b5c9cf4da 100644 --- a/vendor/symfony/validator/PropertyMetadataContainerInterface.php +++ b/vendor/symfony/validator/PropertyMetadataContainerInterface.php @@ -24,7 +24,7 @@ interface PropertyMetadataContainerInterface /** * Check if there's any metadata attached to the given named property. * - * @param string $property The property name. + * @param string $property The property name * * @return bool */ @@ -36,7 +36,7 @@ interface PropertyMetadataContainerInterface * If your implementation does not support properties, simply throw an * exception in this method (for example a BadMethodCallException). * - * @param string $property The property name. + * @param string $property The property name * * @return PropertyMetadataInterface[] A list of metadata instances. Empty if * no metadata exists for the property. diff --git a/vendor/symfony/validator/PropertyMetadataInterface.php b/vendor/symfony/validator/PropertyMetadataInterface.php index 46e7c692c..64ae881e3 100644 --- a/vendor/symfony/validator/PropertyMetadataInterface.php +++ b/vendor/symfony/validator/PropertyMetadataInterface.php @@ -31,16 +31,16 @@ interface PropertyMetadataInterface extends MetadataInterface /** * Returns the name of the property. * - * @return string The property name. + * @return string The property name */ public function getPropertyName(); /** * Extracts the value of the property from the given container. * - * @param mixed $containingValue The container to extract the property value from. + * @param mixed $containingValue The container to extract the property value from * - * @return mixed The value of the property. + * @return mixed The value of the property */ public function getPropertyValue($containingValue); } diff --git a/vendor/symfony/validator/README.md b/vendor/symfony/validator/README.md index 9dfbffb3f..3ccb2901a 100644 --- a/vendor/symfony/validator/README.md +++ b/vendor/symfony/validator/README.md @@ -7,7 +7,7 @@ The Validator component provides tools to validate values following the Resources --------- - * [Documentation](https://symfony.com/doc/current/book/validation.html) + * [Documentation](https://symfony.com/doc/current/components/validator.html) * [Contributing](https://symfony.com/doc/current/contributing/index.html) * [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls) diff --git a/vendor/symfony/validator/Util/PropertyPath.php b/vendor/symfony/validator/Util/PropertyPath.php index 3ef8a8b1d..4108a02c2 100644 --- a/vendor/symfony/validator/Util/PropertyPath.php +++ b/vendor/symfony/validator/Util/PropertyPath.php @@ -16,8 +16,6 @@ namespace Symfony\Component\Validator\Util; * * For more extensive functionality, use Symfony's PropertyAccess component. * - * @since 2.5 - * * @author Bernhard Schussek */ class PropertyPath @@ -39,7 +37,7 @@ class PropertyPath public static function append($basePath, $subPath) { if ('' !== (string) $subPath) { - if ('[' === $subPath{0}) { + if ('[' === $subPath[0]) { return $basePath.$subPath; } diff --git a/vendor/symfony/validator/Validation.php b/vendor/symfony/validator/Validation.php index 1693f7311..94ed62c52 100644 --- a/vendor/symfony/validator/Validation.php +++ b/vendor/symfony/validator/Validation.php @@ -42,7 +42,7 @@ final class Validation * If you want to configure the validator, use * {@link createValidatorBuilder()} instead. * - * @return ValidatorInterface The new validator. + * @return ValidatorInterface The new validator */ public static function createValidator() { @@ -52,7 +52,7 @@ final class Validation /** * Creates a configurable builder for validator objects. * - * @return ValidatorBuilderInterface The new builder. + * @return ValidatorBuilderInterface The new builder */ public static function createValidatorBuilder() { diff --git a/vendor/symfony/validator/ValidationVisitor.php b/vendor/symfony/validator/ValidationVisitor.php index 838646260..82af6a9e7 100644 --- a/vendor/symfony/validator/ValidationVisitor.php +++ b/vendor/symfony/validator/ValidationVisitor.php @@ -70,12 +70,12 @@ class ValidationVisitor implements ValidationVisitorInterface, GlobalExecutionCo /** * Creates a new validation visitor. * - * @param mixed $root The value passed to the validator. - * @param MetadataFactoryInterface $metadataFactory The factory for obtaining metadata instances. - * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating constraint validators. - * @param TranslatorInterface $translator The translator for translating violation messages. - * @param string|null $translationDomain The domain of the translation messages. - * @param ObjectInitializerInterface[] $objectInitializers The initializers for preparing objects before validation. + * @param mixed $root The value passed to the validator + * @param MetadataFactoryInterface $metadataFactory The factory for obtaining metadata instances + * @param ConstraintValidatorFactoryInterface $validatorFactory The factory for creating constraint validators + * @param TranslatorInterface $translator The translator for translating violation messages + * @param string|null $translationDomain The domain of the translation messages + * @param ObjectInitializerInterface[] $objectInitializers The initializers for preparing objects before validation * * @throws UnexpectedTypeException If any of the object initializers is not an instance of ObjectInitializerInterface */ diff --git a/vendor/symfony/validator/ValidationVisitorInterface.php b/vendor/symfony/validator/ValidationVisitorInterface.php index 0ab7b7366..b6c6e9f1c 100644 --- a/vendor/symfony/validator/ValidationVisitorInterface.php +++ b/vendor/symfony/validator/ValidationVisitorInterface.php @@ -56,11 +56,11 @@ interface ValidationVisitorInterface * does not find metadata for the given value, it will fail with an * exception. * - * @param mixed $value The value to validate. - * @param string $group The validation group to validate. - * @param string $propertyPath The current property path in the validation graph. - * @param bool $traverse Whether to traverse the value if it is traversable. - * @param bool $deep Whether to traverse nested traversable values recursively. + * @param mixed $value The value to validate + * @param string $group The validation group to validate + * @param string $propertyPath The current property path in the validation graph + * @param bool $traverse Whether to traverse the value if it is traversable + * @param bool $deep Whether to traverse nested traversable values recursively * * @throws Exception\NoSuchMetadataException If no metadata can be found for * the given value. @@ -73,10 +73,10 @@ interface ValidationVisitorInterface * This method implements the Visitor design pattern. See also * {@link ValidationVisitorInterface}. * - * @param MetadataInterface $metadata The metadata holding the constraints. - * @param mixed $value The value to validate. - * @param string $group The validation group to validate. - * @param string $propertyPath The current property path in the validation graph. + * @param MetadataInterface $metadata The metadata holding the constraints + * @param mixed $value The value to validate + * @param string $group The validation group to validate + * @param string $propertyPath The current property path in the validation graph */ public function visit(MetadataInterface $metadata, $value, $group, $propertyPath); } diff --git a/vendor/symfony/validator/Validator/ContextualValidatorInterface.php b/vendor/symfony/validator/Validator/ContextualValidatorInterface.php index 048d6c754..1cc96c834 100644 --- a/vendor/symfony/validator/Validator/ContextualValidatorInterface.php +++ b/vendor/symfony/validator/Validator/ContextualValidatorInterface.php @@ -17,8 +17,6 @@ use Symfony\Component\Validator\ConstraintViolationListInterface; /** * A validator in a specific execution context. * - * @since 2.5 - * * @author Bernhard Schussek */ interface ContextualValidatorInterface @@ -31,7 +29,7 @@ interface ContextualValidatorInterface * * @param string $path The path to append * - * @return ContextualValidatorInterface This validator + * @return $this */ public function atPath($path); @@ -48,7 +46,7 @@ interface ContextualValidatorInterface * validate. If none is given, * "Default" is assumed * - * @return ContextualValidatorInterface This validator + * @return $this */ public function validate($value, $constraints = null, $groups = null); @@ -61,7 +59,7 @@ interface ContextualValidatorInterface * @param array|null $groups The validation groups to validate. If * none is given, "Default" is assumed * - * @return ContextualValidatorInterface This validator + * @return $this */ public function validateProperty($object, $propertyName, $groups = null); @@ -76,7 +74,7 @@ interface ContextualValidatorInterface * @param array|null $groups The validation groups to validate. If * none is given, "Default" is assumed * - * @return ContextualValidatorInterface This validator + * @return $this */ public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null); diff --git a/vendor/symfony/validator/Validator/LegacyValidator.php b/vendor/symfony/validator/Validator/LegacyValidator.php index e35f4c914..588baa901 100644 --- a/vendor/symfony/validator/Validator/LegacyValidator.php +++ b/vendor/symfony/validator/Validator/LegacyValidator.php @@ -16,8 +16,6 @@ namespace Symfony\Component\Validator\Validator; /** * A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+. * - * @since 2.5 - * * @author Bernhard Schussek * * @see \Symfony\Component\Validator\ValidatorInterface diff --git a/vendor/symfony/validator/Validator/RecursiveContextualValidator.php b/vendor/symfony/validator/Validator/RecursiveContextualValidator.php index e27f6f637..a9e9f7f0e 100644 --- a/vendor/symfony/validator/Validator/RecursiveContextualValidator.php +++ b/vendor/symfony/validator/Validator/RecursiveContextualValidator.php @@ -14,6 +14,7 @@ namespace Symfony\Component\Validator\Validator; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; +use Symfony\Component\Validator\Context\ExecutionContext; use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Exception\ConstraintDefinitionException; use Symfony\Component\Validator\Exception\NoSuchMetadataException; @@ -33,8 +34,6 @@ use Symfony\Component\Validator\Util\PropertyPath; /** * Recursive implementation of {@link ContextualValidatorInterface}. * - * @since 2.5 - * * @author Bernhard Schussek */ class RecursiveContextualValidator implements ContextualValidatorInterface @@ -112,6 +111,11 @@ class RecursiveContextualValidator implements ContextualValidatorInterface $previousMetadata = $this->context->getMetadata(); $previousPath = $this->context->getPropertyPath(); $previousGroup = $this->context->getGroup(); + $previousConstraint = null; + + if ($this->context instanceof ExecutionContext || method_exists($this->context, 'getConstraint')) { + $previousConstraint = $this->context->getConstraint(); + } // If explicit constraints are passed, validate the value against // those constraints @@ -140,6 +144,10 @@ class RecursiveContextualValidator implements ContextualValidatorInterface $this->context->setNode($previousValue, $previousObject, $previousMetadata, $previousPath); $this->context->setGroup($previousGroup); + if (null !== $previousConstraint) { + $this->context->setConstraint($previousConstraint); + } + return $this; } @@ -316,6 +324,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface return array($groups); } + /** * Validates an object against the constraints defined for its class. * @@ -737,9 +746,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface // The $cascadedGroups property is set, if the "Default" group is // overridden by a group sequence // See validateClassNode() - $cascadedGroups = count($cascadedGroups) > 0 - ? $cascadedGroups - : $groups; + $cascadedGroups = null !== $cascadedGroups && count($cascadedGroups) > 0 ? $cascadedGroups : $groups; if (is_array($value)) { // Arrays are always traversed, independent of the specified @@ -792,7 +799,7 @@ class RecursiveContextualValidator implements ContextualValidatorInterface * @param int $traversalStrategy The strategy used for * traversing the value * @param GroupSequence $groupSequence The group sequence - * @param string[]|null $cascadedGroup The group that should + * @param string|null $cascadedGroup The group that should * be passed to cascaded * objects instead of * the group sequence diff --git a/vendor/symfony/validator/Validator/RecursiveValidator.php b/vendor/symfony/validator/Validator/RecursiveValidator.php index e4dc0fb05..abd29087b 100644 --- a/vendor/symfony/validator/Validator/RecursiveValidator.php +++ b/vendor/symfony/validator/Validator/RecursiveValidator.php @@ -24,8 +24,6 @@ use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; /** * Recursive implementation of {@link ValidatorInterface}. * - * @since 2.5 - * * @author Bernhard Schussek */ class RecursiveValidator implements ValidatorInterface, LegacyValidatorInterface diff --git a/vendor/symfony/validator/Validator/ValidatorInterface.php b/vendor/symfony/validator/Validator/ValidatorInterface.php index 3aafa34ea..e9576f5ec 100644 --- a/vendor/symfony/validator/Validator/ValidatorInterface.php +++ b/vendor/symfony/validator/Validator/ValidatorInterface.php @@ -19,8 +19,6 @@ use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; /** * Validates PHP values against constraints. * - * @since 2.5 - * * @author Bernhard Schussek */ interface ValidatorInterface extends MetadataFactoryInterface @@ -38,7 +36,7 @@ interface ValidatorInterface extends MetadataFactoryInterface * validate. If none is given, * "Default" is assumed * - * @return ConstraintViolationListInterface A list of constraint violations. + * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation * succeeded */ @@ -53,7 +51,7 @@ interface ValidatorInterface extends MetadataFactoryInterface * @param array|null $groups The validation groups to validate. If * none is given, "Default" is assumed * - * @return ConstraintViolationListInterface A list of constraint violations. + * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation * succeeded */ @@ -70,7 +68,7 @@ interface ValidatorInterface extends MetadataFactoryInterface * @param array|null $groups The validation groups to validate. If * none is given, "Default" is assumed * - * @return ConstraintViolationListInterface A list of constraint violations. + * @return ConstraintViolationListInterface A list of constraint violations * If the list is empty, validation * succeeded */ diff --git a/vendor/symfony/validator/ValidatorBuilderInterface.php b/vendor/symfony/validator/ValidatorBuilderInterface.php index e15fb7aa1..b9b33e4fb 100644 --- a/vendor/symfony/validator/ValidatorBuilderInterface.php +++ b/vendor/symfony/validator/ValidatorBuilderInterface.php @@ -28,7 +28,7 @@ interface ValidatorBuilderInterface * * @param ObjectInitializerInterface $initializer The initializer * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addObjectInitializer(ObjectInitializerInterface $initializer); @@ -37,7 +37,7 @@ interface ValidatorBuilderInterface * * @param array $initializers The initializer * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addObjectInitializers(array $initializers); @@ -46,7 +46,7 @@ interface ValidatorBuilderInterface * * @param string $path The path to the mapping file * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addXmlMapping($path); @@ -55,7 +55,7 @@ interface ValidatorBuilderInterface * * @param array $paths The paths to the mapping files * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addXmlMappings(array $paths); @@ -64,7 +64,7 @@ interface ValidatorBuilderInterface * * @param string $path The path to the mapping file * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addYamlMapping($path); @@ -73,7 +73,7 @@ interface ValidatorBuilderInterface * * @param array $paths The paths to the mapping files * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addYamlMappings(array $paths); @@ -82,7 +82,7 @@ interface ValidatorBuilderInterface * * @param string $methodName The name of the method * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addMethodMapping($methodName); @@ -91,7 +91,7 @@ interface ValidatorBuilderInterface * * @param array $methodNames The names of the methods * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function addMethodMappings(array $methodNames); @@ -100,14 +100,14 @@ interface ValidatorBuilderInterface * * @param Reader $annotationReader The annotation reader to be used * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function enableAnnotationMapping(Reader $annotationReader = null); /** * Disables annotation based constraint mapping. * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function disableAnnotationMapping(); @@ -116,7 +116,7 @@ interface ValidatorBuilderInterface * * @param MetadataFactoryInterface $metadataFactory The metadata factory * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function setMetadataFactory(MetadataFactoryInterface $metadataFactory); @@ -125,7 +125,7 @@ interface ValidatorBuilderInterface * * @param CacheInterface $cache The cache instance * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function setMetadataCache(CacheInterface $cache); @@ -134,7 +134,7 @@ interface ValidatorBuilderInterface * * @param ConstraintValidatorFactoryInterface $validatorFactory The validator factory * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory); @@ -143,7 +143,7 @@ interface ValidatorBuilderInterface * * @param TranslatorInterface $translator The translator instance * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function setTranslator(TranslatorInterface $translator); @@ -156,7 +156,7 @@ interface ValidatorBuilderInterface * * @param string $translationDomain The translation domain of the violation messages * - * @return ValidatorBuilderInterface The builder object + * @return $this */ public function setTranslationDomain($translationDomain); @@ -165,7 +165,7 @@ interface ValidatorBuilderInterface * * @param PropertyAccessorInterface $propertyAccessor The property accessor * - * @return ValidatorBuilderInterface The builder object + * @return $this * * @deprecated since version 2.5, to be removed in 3.0. */ @@ -176,7 +176,7 @@ interface ValidatorBuilderInterface * * @param int $apiVersion The required API version * - * @return ValidatorBuilderInterface The builder object + * @return $this * * @see Validation::API_VERSION_2_5 * @see Validation::API_VERSION_2_5_BC @@ -187,7 +187,7 @@ interface ValidatorBuilderInterface /** * Builds and returns a new validator object. * - * @return ValidatorInterface The built validator. + * @return ValidatorInterface The built validator */ public function getValidator(); } diff --git a/vendor/symfony/validator/ValidatorInterface.php b/vendor/symfony/validator/ValidatorInterface.php index cffc1388d..58b8cd6e4 100644 --- a/vendor/symfony/validator/ValidatorInterface.php +++ b/vendor/symfony/validator/ValidatorInterface.php @@ -32,9 +32,9 @@ interface ValidatorInterface * disabled in Symfony 3.0. * * @param mixed $value The value to validate - * @param array|null $groups The validation groups to validate. - * @param bool $traverse Whether to traverse the value if it is traversable. - * @param bool $deep Whether to traverse nested traversable values recursively. + * @param array|null $groups The validation groups to validate + * @param bool $traverse Whether to traverse the value if it is traversable + * @param bool $deep Whether to traverse nested traversable values recursively * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. @@ -47,9 +47,9 @@ interface ValidatorInterface * The accepted values depend on the {@link MetadataFactoryInterface} * implementation. * - * @param mixed $containingValue The value containing the property. - * @param string $property The name of the property to validate. - * @param array|null $groups The validation groups to validate. + * @param mixed $containingValue The value containing the property + * @param string $property The name of the property to validate + * @param array|null $groups The validation groups to validate * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. @@ -62,11 +62,11 @@ interface ValidatorInterface * The accepted values depend on the {@link MetadataFactoryInterface} * implementation. * - * @param mixed $containingValue The value containing the property. + * @param mixed $containingValue The value containing the property * @param string $property The name of the property to validate * @param string $value The value to validate against the * constraints of the property. - * @param array|null $groups The validation groups to validate. + * @param array|null $groups The validation groups to validate * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. @@ -76,9 +76,9 @@ interface ValidatorInterface /** * Validates a value against a constraint or a list of constraints. * - * @param mixed $value The value to validate. - * @param Constraint|Constraint[] $constraints The constraint(s) to validate against. - * @param array|null $groups The validation groups to validate. + * @param mixed $value The value to validate + * @param Constraint|Constraint[] $constraints The constraint(s) to validate against + * @param array|null $groups The validation groups to validate * * @return ConstraintViolationListInterface A list of constraint violations. If the * list is empty, validation succeeded. @@ -92,7 +92,7 @@ interface ValidatorInterface /** * Returns the factory for metadata instances. * - * @return MetadataFactoryInterface The metadata factory. + * @return MetadataFactoryInterface The metadata factory * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Validator\ValidatorInterface::getMetadataFor()} or diff --git a/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php b/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php index d7d3877ae..bf887a08e 100644 --- a/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php +++ b/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php @@ -20,8 +20,6 @@ use Symfony\Component\Validator\Util\PropertyPath; /** * Default implementation of {@link ConstraintViolationBuilderInterface}. * - * @since 2.5 - * * @author Bernhard Schussek * * @internal You should not instantiate or use this class. Code against @@ -199,7 +197,7 @@ class ConstraintViolationBuilder implements ConstraintViolationBuilderInterface $this->message, $this->plural, $this->parameters, - $this->translationDomain# + $this->translationDomain ); } catch (\InvalidArgumentException $e) { $translatedMessage = $this->translator->trans( diff --git a/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php b/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php index e02d61b43..811b4842e 100644 --- a/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php +++ b/vendor/symfony/validator/Violation/ConstraintViolationBuilderInterface.php @@ -19,8 +19,6 @@ namespace Symfony\Component\Validator\Violation; * Finally, call {@link addViolation()} to add the violation to the current * execution context. * - * @since 2.5 - * * @author Bernhard Schussek */ interface ConstraintViolationBuilderInterface @@ -33,7 +31,7 @@ interface ConstraintViolationBuilderInterface * * @param string $path The property path * - * @return ConstraintViolationBuilderInterface This builder + * @return $this */ public function atPath($path); @@ -43,7 +41,7 @@ interface ConstraintViolationBuilderInterface * @param string $key The name of the parameter * @param string $value The value to be inserted in the parameter's place * - * @return ConstraintViolationBuilderInterface This builder + * @return $this */ public function setParameter($key, $value); @@ -54,7 +52,7 @@ interface ConstraintViolationBuilderInterface * the values to be inserted in their place as * values * - * @return ConstraintViolationBuilderInterface This builder + * @return $this */ public function setParameters(array $parameters); @@ -64,7 +62,7 @@ interface ConstraintViolationBuilderInterface * * @param string $translationDomain The translation domain * - * @return ConstraintViolationBuilderInterface This builder + * @return $this * * @see \Symfony\Component\Translation\TranslatorInterface */ @@ -75,7 +73,7 @@ interface ConstraintViolationBuilderInterface * * @param mixed $invalidValue The invalid value * - * @return ConstraintViolationBuilderInterface This builder + * @return $this */ public function setInvalidValue($invalidValue); @@ -85,7 +83,7 @@ interface ConstraintViolationBuilderInterface * * @param int $number The number for determining the plural form * - * @return ConstraintViolationBuilderInterface This builder + * @return $this * * @see \Symfony\Component\Translation\TranslatorInterface::transChoice() */ @@ -96,7 +94,7 @@ interface ConstraintViolationBuilderInterface * * @param string|null $code The violation code * - * @return ConstraintViolationBuilderInterface This builder + * @return $this */ public function setCode($code); @@ -105,7 +103,7 @@ interface ConstraintViolationBuilderInterface * * @param mixed $cause The cause of the violation * - * @return ConstraintViolationBuilderInterface This builder + * @return $this */ public function setCause($cause); diff --git a/vendor/symfony/validator/composer.json b/vendor/symfony/validator/composer.json index f7515d1b0..c4261f173 100644 --- a/vendor/symfony/validator/composer.json +++ b/vendor/symfony/validator/composer.json @@ -17,18 +17,19 @@ ], "require": { "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0", "symfony/translation": "~2.4|~3.0.0" }, "require-dev": { - "symfony/http-foundation": "~2.1|~3.0.0", - "symfony/intl": "~2.7.4|~2.8|~3.0.0", - "symfony/yaml": "~2.0,>=2.0.5|~3.0.0", + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/intl": "~2.7.25|^2.8.18|~3.2.5", + "symfony/yaml": "^2.0.5|~3.0.0", "symfony/config": "~2.2|~3.0.0", "symfony/property-access": "~2.3|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", "doctrine/annotations": "~1.0", "doctrine/cache": "~1.0", - "egulias/email-validator": "~1.2,>=1.2.1" + "egulias/email-validator": "^1.2.1" }, "suggest": { "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", diff --git a/vendor/symfony/yaml/Dumper.php b/vendor/symfony/yaml/Dumper.php index 21351a5c3..05817f5d7 100644 --- a/vendor/symfony/yaml/Dumper.php +++ b/vendor/symfony/yaml/Dumper.php @@ -28,7 +28,7 @@ class Dumper /** * Sets the indentation. * - * @param int $num The amount of spaces to use for indentation of nested nodes. + * @param int $num The amount of spaces to use for indentation of nested nodes */ public function setIndentation($num) { @@ -58,7 +58,7 @@ class Dumper if ($inline <= 0 || !is_array($input) || empty($input)) { $output .= $prefix.Inline::dump($input, $exceptionOnInvalidType, $objectSupport); } else { - $isAHash = array_keys($input) !== range(0, count($input) - 1); + $isAHash = Inline::isHash($input); foreach ($input as $key => $value) { $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value); diff --git a/vendor/symfony/yaml/Escaper.php b/vendor/symfony/yaml/Escaper.php index 7bac8dde4..a74f14dd9 100644 --- a/vendor/symfony/yaml/Escaper.php +++ b/vendor/symfony/yaml/Escaper.php @@ -46,7 +46,7 @@ class Escaper * * @param string $value A PHP value * - * @return bool True if the value would require double quotes. + * @return bool True if the value would require double quotes */ public static function requiresDoubleQuoting($value) { @@ -70,7 +70,7 @@ class Escaper * * @param string $value A PHP value * - * @return bool True if the value would require single quotes. + * @return bool True if the value would require single quotes */ public static function requiresSingleQuoting($value) { diff --git a/vendor/symfony/yaml/Inline.php b/vendor/symfony/yaml/Inline.php index bb2db360f..e08d901c2 100644 --- a/vendor/symfony/yaml/Inline.php +++ b/vendor/symfony/yaml/Inline.php @@ -21,14 +21,14 @@ use Symfony\Component\Yaml\Exception\DumpException; */ class Inline { - const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')'; + const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; private static $exceptionOnInvalidType = false; private static $objectSupport = false; private static $objectForMap = false; /** - * Converts a YAML string to a PHP array. + * Converts a YAML string to a PHP value. * * @param string $value A YAML string * @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise @@ -36,7 +36,7 @@ class Inline * @param bool $objectForMap true if maps should return a stdClass instead of array() * @param array $references Mapping of variable names to values * - * @return array A PHP array representing the YAML string + * @return mixed A PHP value * * @throws ParseException */ @@ -90,7 +90,7 @@ class Inline * @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * - * @return string The YAML string representing the PHP array + * @return string The YAML string representing the PHP value * * @throws DumpException When trying to dump PHP resource */ @@ -157,6 +157,28 @@ class Inline } } + /** + * Check if given array is hash or just normal indexed array. + * + * @internal + * + * @param array $value The PHP array to check + * + * @return bool true if value is hash array, false otherwise + */ + public static function isHash(array $value) + { + $expectedKey = 0; + + foreach ($value as $key => $val) { + if ($key !== $expectedKey++) { + return true; + } + } + + return false; + } + /** * Dumps a PHP array to a YAML string. * @@ -169,11 +191,7 @@ class Inline private static function dumpArray($value, $exceptionOnInvalidType, $objectSupport) { // array - $keys = array_keys($value); - $keysCount = count($keys); - if ((1 === $keysCount && '0' == $keys[0]) - || ($keysCount > 1 && array_reduce($keys, function ($v, $w) { return (int) $v + $w; }, 0) === $keysCount * ($keysCount - 1) / 2) - ) { + if ($value && !self::isHash($value)) { $output = array(); foreach ($value as $val) { $output[] = self::dump($val, $exceptionOnInvalidType, $objectSupport); @@ -182,7 +200,7 @@ class Inline return sprintf('[%s]', implode(', ', $output)); } - // mapping + // hash $output = array(); foreach ($value as $key => $val) { $output[] = sprintf('%s: %s', self::dump($key, $exceptionOnInvalidType, $objectSupport), self::dump($val, $exceptionOnInvalidType, $objectSupport)); @@ -192,7 +210,7 @@ class Inline } /** - * Parses a scalar to a YAML string. + * Parses a YAML scalar. * * @param string $scalar * @param string $delimiters @@ -201,7 +219,7 @@ class Inline * @param bool $evaluate * @param array $references * - * @return string A YAML string + * @return string * * @throws ParseException When malformed inline YAML string is parsed * @@ -233,7 +251,7 @@ class Inline $output = $match[1]; $i += strlen($output); } else { - throw new ParseException(sprintf('Malformed inline YAML string (%s).', $scalar)); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $scalar)); } // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) @@ -253,19 +271,19 @@ class Inline } /** - * Parses a quoted scalar to YAML. + * Parses a YAML quoted scalar. * * @param string $scalar * @param int &$i * - * @return string A YAML string + * @return string * * @throws ParseException When malformed inline YAML string is parsed */ private static function parseQuotedScalar($scalar, &$i) { if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { - throw new ParseException(sprintf('Malformed inline YAML string (%s).', substr($scalar, $i))); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', substr($scalar, $i))); } $output = substr($match[0], 1, strlen($match[0]) - 2); @@ -283,13 +301,13 @@ class Inline } /** - * Parses a sequence to a YAML string. + * Parses a YAML sequence. * * @param string $sequence * @param int &$i * @param array $references * - * @return string A YAML string + * @return array * * @throws ParseException When malformed inline YAML string is parsed */ @@ -338,17 +356,17 @@ class Inline ++$i; } - throw new ParseException(sprintf('Malformed inline YAML string %s', $sequence)); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $sequence)); } /** - * Parses a mapping to a YAML string. + * Parses a YAML mapping. * * @param string $mapping * @param int &$i * @param array $references * - * @return string A YAML string + * @return array|\stdClass * * @throws ParseException When malformed inline YAML string is parsed */ @@ -426,7 +444,7 @@ class Inline } } - throw new ParseException(sprintf('Malformed inline YAML string %s', $mapping)); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $mapping)); } /** diff --git a/vendor/symfony/yaml/LICENSE b/vendor/symfony/yaml/LICENSE index 12a74531e..17d16a133 100644 --- a/vendor/symfony/yaml/LICENSE +++ b/vendor/symfony/yaml/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2016 Fabien Potencier +Copyright (c) 2004-2017 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/yaml/Parser.php b/vendor/symfony/yaml/Parser.php index 41134e6b6..bfa3300a4 100644 --- a/vendor/symfony/yaml/Parser.php +++ b/vendor/symfony/yaml/Parser.php @@ -25,19 +25,26 @@ class Parser const FOLDED_SCALAR_PATTERN = self::BLOCK_SCALAR_HEADER_PATTERN; private $offset = 0; + private $totalNumberOfLines; private $lines = array(); private $currentLineNb = -1; private $currentLine = ''; private $refs = array(); + private $skippedLineNumbers = array(); + private $locallySkippedLineNumbers = array(); /** * Constructor. * - * @param int $offset The offset of YAML document (used for line numbers in error messages) + * @param int $offset The offset of YAML document (used for line numbers in error messages) + * @param int|null $totalNumberOfLines The overall number of lines being parsed + * @param int[] $skippedLineNumbers Number of comment lines that have been skipped by the parser */ - public function __construct($offset = 0) + public function __construct($offset = 0, $totalNumberOfLines = null, array $skippedLineNumbers = array()) { $this->offset = $offset; + $this->totalNumberOfLines = $totalNumberOfLines; + $this->skippedLineNumbers = $skippedLineNumbers; } /** @@ -62,6 +69,10 @@ class Parser $value = $this->cleanup($value); $this->lines = explode("\n", $value); + if (null === $this->totalNumberOfLines) { + $this->totalNumberOfLines = count($this->lines); + } + if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { $mbEncoding = mb_internal_encoding(); mb_internal_encoding('UTF-8'); @@ -83,7 +94,7 @@ class Parser $isRef = $mergeNode = false; if (preg_match('#^\-((?P\s+)(?P.+?))?\s*$#u', $this->currentLine, $values)) { if ($context && 'mapping' == $context) { - throw new ParseException('You cannot define a sequence item when in a mapping'); + throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine); } $context = 'sequence'; @@ -94,25 +105,18 @@ class Parser // array if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { - $c = $this->getRealCurrentLineNb() + 1; - $parser = new self($c); - $parser->refs = &$this->refs; - $data[] = $parser->parse($this->getNextEmbedBlock(null, true), $exceptionOnInvalidType, $objectSupport, $objectForMap); + $data[] = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(null, true), $exceptionOnInvalidType, $objectSupport, $objectForMap); } else { if (isset($values['leadspaces']) && preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{\[].*?) *\:(\s+(?P.+?))?\s*$#u', $values['value'], $matches) ) { // this is a compact notation element, add to next block and parse - $c = $this->getRealCurrentLineNb(); - $parser = new self($c); - $parser->refs = &$this->refs; - $block = $values['value']; if ($this->isNextLineIndented()) { $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + strlen($values['leadspaces']) + 1); } - $data[] = $parser->parse($block, $exceptionOnInvalidType, $objectSupport, $objectForMap); + $data[] = $this->parseBlock($this->getRealCurrentLineNb(), $block, $exceptionOnInvalidType, $objectSupport, $objectForMap); } else { $data[] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context); } @@ -122,7 +126,7 @@ class Parser } } elseif (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+?))?\s*$#u', $this->currentLine, $values) && (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('"', "'")))) { if ($context && 'sequence' == $context) { - throw new ParseException('You cannot define a mapping item when in a sequence'); + throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine); } $context = 'mapping'; @@ -157,21 +161,14 @@ class Parser throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); } - foreach ($refValue as $key => $value) { - if (!isset($data[$key])) { - $data[$key] = $value; - } - } + $data += $refValue; // array union } else { if (isset($values['value']) && $values['value'] !== '') { $value = $values['value']; } else { $value = $this->getNextEmbedBlock(); } - $c = $this->getRealCurrentLineNb() + 1; - $parser = new self($c); - $parser->refs = &$this->refs; - $parsed = $parser->parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap); + $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $exceptionOnInvalidType, $objectSupport, $objectForMap); if (!is_array($parsed)) { throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); @@ -186,20 +183,12 @@ class Parser throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem); } - foreach ($parsedItem as $key => $value) { - if (!isset($data[$key])) { - $data[$key] = $value; - } - } + $data += $parsedItem; // array union } } else { // If the value associated with the key is a single mapping node, each of its key/value pairs is inserted into the // current mapping, unless the key already exists in it. - foreach ($parsed as $key => $value) { - if (!isset($data[$key])) { - $data[$key] = $value; - } - } + $data += $parsed; // array union } } } elseif (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#u', $values['value'], $matches)) { @@ -219,10 +208,7 @@ class Parser $data[$key] = null; } } else { - $c = $this->getRealCurrentLineNb() + 1; - $parser = new self($c); - $parser->refs = &$this->refs; - $value = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap); + $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap); // Spec: Keys MUST be unique; first one wins. // But overwriting is allowed when a merge node is used in current block. if ($allowOverwrite || !isset($data[$key])) { @@ -243,7 +229,7 @@ class Parser } else { // multiple documents are not supported if ('---' === $this->currentLine) { - throw new ParseException('Multiple documents are not supported.'); + throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine); } // 1-liner optionally followed by newline(s) @@ -257,17 +243,6 @@ class Parser throw $e; } - if (is_array($value)) { - $first = reset($value); - if (is_string($first) && 0 === strpos($first, '*')) { - $data = array(); - foreach ($value as $alias) { - $data[] = $this->refs[substr($alias, 1)]; - } - $value = $data; - } - } - if (isset($mbEncoding)) { mb_internal_encoding($mbEncoding); } @@ -316,6 +291,24 @@ class Parser return empty($data) ? null : $data; } + private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap) + { + $skippedLineNumbers = $this->skippedLineNumbers; + + foreach ($this->locallySkippedLineNumbers as $lineNumber) { + if ($lineNumber < $offset) { + continue; + } + + $skippedLineNumbers[] = $lineNumber; + } + + $parser = new self($offset, $this->totalNumberOfLines, $skippedLineNumbers); + $parser->refs = &$this->refs; + + return $parser->parse($yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap); + } + /** * Returns the current line number (takes the offset into account). * @@ -323,7 +316,17 @@ class Parser */ private function getRealCurrentLineNb() { - return $this->currentLineNb + $this->offset; + $realCurrentLineNumber = $this->currentLineNb + $this->offset; + + foreach ($this->skippedLineNumbers as $skippedLineNumber) { + if ($skippedLineNumber > $realCurrentLineNumber) { + break; + } + + ++$realCurrentLineNumber; + } + + return $realCurrentLineNumber; } /** @@ -414,7 +417,7 @@ class Parser $previousLineIndentation = $indent; - if ($isItUnindentedCollection && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { + if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { $this->moveToPreviousLine(); break; } @@ -426,6 +429,14 @@ class Parser // we ignore "comment" lines only when we are not inside a scalar block if (empty($blockScalarIndentations) && $this->isCurrentLineComment()) { + // remember ignored comment lines (they are used later in nested + // parser calls to determine real line numbers) + // + // CAUTION: beware to not populate the global property here as it + // will otherwise influence the getRealCurrentLineNb() call here + // for consecutive comment lines and subsequent embedded blocks + $this->locallySkippedLineNumbers[] = $this->getRealCurrentLineNb(); + continue; } @@ -461,10 +472,18 @@ class Parser /** * Moves the parser to the previous line. + * + * @return bool */ private function moveToPreviousLine() { + if ($this->currentLineNb < 1) { + return false; + } + $this->currentLine = $this->lines[--$this->currentLineNb]; + + return true; } /** @@ -490,7 +509,7 @@ class Parser } if (!array_key_exists($value, $this->refs)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLine); + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine); } return $this->refs[$value]; @@ -585,6 +604,8 @@ class Parser if ($notEOF) { $blockLines[] = ''; $this->moveToPreviousLine(); + } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { + $blockLines[] = ''; } // folded style @@ -593,7 +614,7 @@ class Parser $previousLineIndented = false; $previousLineBlank = false; - for ($i = 0; $i < count($blockLines); ++$i) { + for ($i = 0, $blockLinesCount = count($blockLines); $i < $blockLinesCount; ++$i) { if ('' === $blockLines[$i]) { $text .= "\n"; $previousLineIndented = false; @@ -691,6 +712,11 @@ class Parser return '' !== $ltrimmedLine && $ltrimmedLine[0] === '#'; } + private function isCurrentLineLastLineInDocument() + { + return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); + } + /** * Cleanups a YAML string to be parsed. * @@ -768,7 +794,7 @@ class Parser */ private function isStringUnIndentedCollectionItem() { - return 0 === strpos($this->currentLine, '- '); + return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); } /** diff --git a/vendor/symfony/yaml/Unescaper.php b/vendor/symfony/yaml/Unescaper.php index bb3301615..1e02cc9fd 100644 --- a/vendor/symfony/yaml/Unescaper.php +++ b/vendor/symfony/yaml/Unescaper.php @@ -39,9 +39,9 @@ class Unescaper /** * Unescapes a single quoted string. * - * @param string $value A single quoted string. + * @param string $value A single quoted string * - * @return string The unescaped string. + * @return string The unescaped string */ public function unescapeSingleQuotedString($value) { @@ -51,9 +51,9 @@ class Unescaper /** * Unescapes a double quoted string. * - * @param string $value A double quoted string. + * @param string $value A double quoted string * - * @return string The unescaped string. + * @return string The unescaped string */ public function unescapeDoubleQuotedString($value) { diff --git a/vendor/symfony/yaml/Yaml.php b/vendor/symfony/yaml/Yaml.php index 374365492..6fc4e9273 100644 --- a/vendor/symfony/yaml/Yaml.php +++ b/vendor/symfony/yaml/Yaml.php @@ -73,20 +73,20 @@ class Yaml } /** - * Dumps a PHP array to a YAML string. + * Dumps a PHP value to a YAML string. * * The dump method, when supplied with an array, will do its best * to convert the array into friendly YAML. * - * @param array $array PHP array + * @param mixed $input The PHP value * @param int $inline The level where you switch to inline YAML - * @param int $indent The amount of spaces to use for indentation of nested nodes. + * @param int $indent The amount of spaces to use for indentation of nested nodes * @param bool $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise * @param bool $objectSupport true if object support is enabled, false otherwise * - * @return string A YAML string representing the original PHP array + * @return string A YAML string representing the original PHP value */ - public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false) + public static function dump($input, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false) { if ($indent < 1) { throw new \InvalidArgumentException('The indentation must be greater than zero.'); @@ -95,6 +95,6 @@ class Yaml $yaml = new Dumper(); $yaml->setIndentation($indent); - return $yaml->dump($array, $inline, 0, $exceptionOnInvalidType, $objectSupport); + return $yaml->dump($input, $inline, 0, $exceptionOnInvalidType, $objectSupport); } } diff --git a/vendor/twig/twig/CHANGELOG b/vendor/twig/twig/CHANGELOG index e8f9da018..4838fbdd8 100644 --- a/vendor/twig/twig/CHANGELOG +++ b/vendor/twig/twig/CHANGELOG @@ -1,4 +1,46 @@ -* 1.23.1 (2015-XX-XX) +* 1.25.0 (2016-09-21) + + * changed the way we store template source in template classes + * removed usage of realpath in cache keys + * fixed Twig cache sharing when used with different versions of PHP + * removed embed parent workaround for simple use cases + * deprecated the ability to store non Node instances in Node::$nodes + * deprecated Twig_Environment::getLexer(), Twig_Environment::getParser(), Twig_Environment::getCompiler() + * deprecated Twig_Compiler::getFilename() + +* 1.24.2 (2016-09-01) + + * fixed static callables + * fixed a potential PHP warning when loading the cache + * fixed a case where the autoescaping does not work as expected + +* 1.24.1 (2016-05-30) + + * fixed reserved keywords (forbids true, false, null and none keywords for variables names) + * fixed support for PHP7 (Throwable support) + * marked the following methods as being internals on Twig_Environment: + getFunctions(), getFilters(), getTests(), getFunction(), getFilter(), getTest(), + getTokenParsers(), getTags(), getNodeVisitors(), getUnaryOperators(), getBinaryOperators(), + getFunctions(), getFilters(), getGlobals(), initGlobals(), initExtensions(), and initExtension() + +* 1.24.0 (2016-01-25) + + * adding support for the ?? operator + * fixed the defined test when used on a constant, a map, or a sequence + * undeprecated _self (should only be used to get the template name, not the template instance) + * fixed parsing on PHP7 + +* 1.23.3 (2016-01-11) + + * fixed typo + +* 1.23.2 (2015-01-11) + + * added versions in deprecated messages + * made file cache tolerant for trailing (back)slashes on directory configuration + * deprecated unused Twig_Node_Expression_ExtensionReference class + +* 1.23.1 (2015-11-05) * fixed some exception messages which triggered PHP warnings * fixed BC on Twig_Test_NodeTestCase diff --git a/vendor/twig/twig/LICENSE b/vendor/twig/twig/LICENSE index a470002bf..cc74f810e 100644 --- a/vendor/twig/twig/LICENSE +++ b/vendor/twig/twig/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009-2014 by the Twig Team. +Copyright (c) 2009-2016 by the Twig Team. Some rights reserved. diff --git a/vendor/twig/twig/composer.json b/vendor/twig/twig/composer.json index 339a5d4df..6a81329b3 100644 --- a/vendor/twig/twig/composer.json +++ b/vendor/twig/twig/composer.json @@ -40,7 +40,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.23-dev" + "dev-master": "1.25-dev" } } } diff --git a/vendor/twig/twig/lib/Twig/Autoloader.php b/vendor/twig/twig/lib/Twig/Autoloader.php index d47583fbf..14016b296 100644 --- a/vendor/twig/twig/lib/Twig/Autoloader.php +++ b/vendor/twig/twig/lib/Twig/Autoloader.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -@trigger_error('The Twig_Autoloader class is deprecated and will be removed in 2.0. Use Composer instead.', E_USER_DEPRECATED); +@trigger_error('The Twig_Autoloader class is deprecated since version 1.21 and will be removed in 2.0. Use Composer instead.', E_USER_DEPRECATED); /** * Autoloads Twig classes. * * @author Fabien Potencier * - * @deprecated Use Composer instead. Will be removed in Twig 2.0. + * @deprecated since 1.21 and will be removed in 2.0. Use Composer instead. 2.0. */ class Twig_Autoloader { @@ -27,7 +27,7 @@ class Twig_Autoloader */ public static function register($prepend = false) { - @trigger_error('Using Twig_Autoloader is deprecated. Use Composer instead.', E_USER_DEPRECATED); + @trigger_error('Using Twig_Autoloader is deprecated since version 1.21. Use Composer instead.', E_USER_DEPRECATED); if (PHP_VERSION_ID < 50300) { spl_autoload_register(array(__CLASS__, 'autoload')); diff --git a/vendor/twig/twig/lib/Twig/Cache/Filesystem.php b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php index 2c2182a82..9e70ca9e5 100644 --- a/vendor/twig/twig/lib/Twig/Cache/Filesystem.php +++ b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php @@ -27,7 +27,7 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface */ public function __construct($directory, $options = 0) { - $this->directory = $directory; + $this->directory = rtrim($directory, '\/').'/'; $this->options = $options; } @@ -38,7 +38,7 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface { $hash = hash('sha256', $className); - return $this->directory.'/'.$hash[0].$hash[1].'/'.$hash.'.php'; + return $this->directory.$hash[0].$hash[1].'/'.$hash.'.php'; } /** @@ -46,7 +46,9 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface */ public function load($key) { - @include_once $key; + if (file_exists($key)) { + @include_once $key; + } } /** diff --git a/vendor/twig/twig/lib/Twig/Compiler.php b/vendor/twig/twig/lib/Twig/Compiler.php index abea3aafe..b79de126f 100644 --- a/vendor/twig/twig/lib/Twig/Compiler.php +++ b/vendor/twig/twig/lib/Twig/Compiler.php @@ -36,8 +36,13 @@ class Twig_Compiler implements Twig_CompilerInterface $this->env = $env; } + /** + * @deprecated since 1.25 (to be removed in 2.0) + */ public function getFilename() { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + return $this->filename; } @@ -80,6 +85,9 @@ class Twig_Compiler implements Twig_CompilerInterface $this->indentation = $indentation; if ($node instanceof Twig_Node_Module) { + $node->setFilename($node->getAttribute('filename')); + + // to be removed in 2.0 $this->filename = $node->getAttribute('filename'); } diff --git a/vendor/twig/twig/lib/Twig/Environment.php b/vendor/twig/twig/lib/Twig/Environment.php index 99a6b012e..24f42d624 100644 --- a/vendor/twig/twig/lib/Twig/Environment.php +++ b/vendor/twig/twig/lib/Twig/Environment.php @@ -16,7 +16,7 @@ */ class Twig_Environment { - const VERSION = '1.23.1'; + const VERSION = '1.25.0'; protected $charset; protected $loader; @@ -93,7 +93,7 @@ class Twig_Environment if (null !== $loader) { $this->setLoader($loader); } else { - @trigger_error('Not passing a Twig_LoaderInterface as the first constructor argument of Twig_Environment is deprecated.', E_USER_DEPRECATED); + @trigger_error('Not passing a Twig_LoaderInterface as the first constructor argument of Twig_Environment is deprecated since version 1.21.', E_USER_DEPRECATED); } $options = array_merge(array( @@ -123,14 +123,14 @@ class Twig_Environment if (is_string($this->originalCache)) { $r = new ReflectionMethod($this, 'writeCacheFile'); if ($r->getDeclaringClass()->getName() !== __CLASS__) { - @trigger_error('The Twig_Environment::writeCacheFile method is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED); + @trigger_error('The Twig_Environment::writeCacheFile method is deprecated since version 1.22 and will be removed in Twig 2.0.', E_USER_DEPRECATED); $this->bcWriteCacheFile = true; } $r = new ReflectionMethod($this, 'getCacheFilename'); if ($r->getDeclaringClass()->getName() !== __CLASS__) { - @trigger_error('The Twig_Environment::getCacheFilename method is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED); + @trigger_error('The Twig_Environment::getCacheFilename method is deprecated since version 1.22 and will be removed in Twig 2.0.', E_USER_DEPRECATED); $this->bcGetCacheFilename = true; } @@ -265,7 +265,7 @@ class Twig_Environment $this->originalCache = $cache; $this->cache = new Twig_Cache_Null(); } elseif (null === $cache) { - @trigger_error('Using "null" as the cache strategy is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED); + @trigger_error('Using "null" as the cache strategy is deprecated since version 1.23 and will be removed in Twig 2.0.', E_USER_DEPRECATED); $this->originalCache = false; $this->cache = new Twig_Cache_Null(); } elseif ($cache instanceof Twig_CacheInterface) { @@ -286,7 +286,7 @@ class Twig_Environment */ public function getCacheFilename($name) { - @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); $key = $this->cache->generateKey($name, $this->getTemplateClass($name)); @@ -312,6 +312,7 @@ class Twig_Environment $key = $this->getLoader()->getCacheKey($name); $key .= json_encode(array_keys($this->extensions)); $key .= function_exists('twig_template_get_attributes'); + $key .= ':'.PHP_MAJOR_VERSION.':'.PHP_MINOR_VERSION; return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index); } @@ -325,7 +326,7 @@ class Twig_Environment */ public function getTemplateClassPrefix() { - @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); return $this->templateClassPrefix; } @@ -438,6 +439,10 @@ class Twig_Environment } catch (Exception $e) { $this->setLoader($current); + throw $e; + } catch (Throwable $e) { + $this->setLoader($current); + throw $e; } $this->setLoader($current); @@ -515,7 +520,7 @@ class Twig_Environment */ public function clearTemplateCache() { - @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s method is deprecated since version 1.18.3 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); $this->loadedTemplates = array(); } @@ -527,7 +532,7 @@ class Twig_Environment */ public function clearCacheFiles() { - @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); if (is_string($this->originalCache)) { foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->originalCache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { @@ -542,9 +547,13 @@ class Twig_Environment * Gets the Lexer instance. * * @return Twig_LexerInterface A Twig_LexerInterface instance + * + * @deprecated since 1.25 (to be removed in 2.0) */ public function getLexer() { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + if (null === $this->lexer) { $this->lexer = new Twig_Lexer($this); } @@ -574,16 +583,24 @@ class Twig_Environment */ public function tokenize($source, $name = null) { - return $this->getLexer()->tokenize($source, $name); + if (null === $this->lexer) { + $this->lexer = new Twig_Lexer($this); + } + + return $this->lexer->tokenize($source, $name); } /** * Gets the Parser instance. * * @return Twig_ParserInterface A Twig_ParserInterface instance + * + * @deprecated since 1.25 (to be removed in 2.0) */ public function getParser() { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + if (null === $this->parser) { $this->parser = new Twig_Parser($this); } @@ -612,16 +629,24 @@ class Twig_Environment */ public function parse(Twig_TokenStream $stream) { - return $this->getParser()->parse($stream); + if (null === $this->parser) { + $this->parser = new Twig_Parser($this); + } + + return $this->parser->parse($stream); } /** * Gets the Compiler instance. * * @return Twig_CompilerInterface A Twig_CompilerInterface instance + * + * @deprecated since 1.25 (to be removed in 2.0) */ public function getCompiler() { + @trigger_error(sprintf('The %s() method is deprecated since version 1.25 and will be removed in 2.0.', __FUNCTION__), E_USER_DEPRECATED); + if (null === $this->compiler) { $this->compiler = new Twig_Compiler($this); } @@ -648,7 +673,11 @@ class Twig_Environment */ public function compile(Twig_NodeInterface $node) { - return $this->getCompiler()->compile($node)->getSource(); + if (null === $this->compiler) { + $this->compiler = new Twig_Compiler($this); + } + + return $this->compiler->compile($node)->getSource(); } /** @@ -664,13 +693,7 @@ class Twig_Environment public function compileSource($source, $name = null) { try { - $compiled = $this->compile($this->parse($this->tokenize($source, $name)), $source); - - if (isset($source[0])) { - $compiled .= '/* '.str_replace(array('*/', "\r\n", "\r", "\n"), array('*//* ', "\n", "\n", "*/\n/* "), $source)."*/\n"; - } - - return $compiled; + return $this->compile($this->parse($this->tokenize($source, $name))); } catch (Twig_Error $e) { $e->setTemplateFile($name); throw $e; @@ -737,7 +760,7 @@ class Twig_Environment $m = new ReflectionMethod($extension, 'initRuntime'); if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) { - @trigger_error(sprintf('Defining the initRuntime() method in the "%s" extension is deprecated. Use the `needs_environment` option to get the Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig_Extension_InitRuntimeInterface if needed (not recommended).', $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Defining the initRuntime() method in the "%s" extension is deprecated since version 1.23. Use the `needs_environment` option to get the Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig_Extension_InitRuntimeInterface if needed (not recommended).', $name), E_USER_DEPRECATED); } } @@ -787,7 +810,7 @@ class Twig_Environment } if (isset($this->extensions[$name])) { - @trigger_error(sprintf('The possibility to register the same extension twice ("%s") is deprecated and will be removed in Twig 2.0. Use proper PHP inheritance instead.', $name), E_USER_DEPRECATED); + @trigger_error(sprintf('The possibility to register the same extension twice ("%s") is deprecated since version 1.23 and will be removed in Twig 2.0. Use proper PHP inheritance instead.', $name), E_USER_DEPRECATED); } $this->lastModifiedExtension = 0; @@ -806,7 +829,7 @@ class Twig_Environment */ public function removeExtension($name) { - @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s method is deprecated since version 1.12 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); if ($this->extensionInitialized) { throw new LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name)); @@ -855,6 +878,8 @@ class Twig_Environment * Gets the registered Token Parsers. * * @return Twig_TokenParserBrokerInterface A broker containing token parsers + * + * @internal */ public function getTokenParsers() { @@ -871,6 +896,8 @@ class Twig_Environment * Be warned that this method cannot return tags defined by Twig_TokenParserBrokerInterface classes. * * @return Twig_TokenParserInterface[] An array of Twig_TokenParserInterface instances + * + * @internal */ public function getTags() { @@ -902,6 +929,8 @@ class Twig_Environment * Gets the registered Node Visitors. * * @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances + * + * @internal */ public function getNodeVisitors() { @@ -928,7 +957,7 @@ class Twig_Environment $filter = $name; $name = $filter->getName(); } else { - @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), E_USER_DEPRECATED); } if ($this->extensionInitialized) { @@ -947,6 +976,8 @@ class Twig_Environment * @param string $name The filter name * * @return Twig_Filter|false A Twig_Filter instance or false if the filter does not exist + * + * @internal */ public function getFilter($name) { @@ -988,11 +1019,13 @@ class Twig_Environment /** * Gets the registered Filters. * - * Be warned that this method cannot return filters defined with registerUndefinedFunctionCallback. + * Be warned that this method cannot return filters defined with registerUndefinedFilterCallback. * * @return Twig_FilterInterface[] An array of Twig_FilterInterface instances * * @see registerUndefinedFilterCallback + * + * @internal */ public function getFilters() { @@ -1019,7 +1052,7 @@ class Twig_Environment $test = $name; $name = $test->getName(); } else { - @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), E_USER_DEPRECATED); } if ($this->extensionInitialized) { @@ -1033,6 +1066,8 @@ class Twig_Environment * Gets the registered Tests. * * @return Twig_TestInterface[] An array of Twig_TestInterface instances + * + * @internal */ public function getTests() { @@ -1049,6 +1084,8 @@ class Twig_Environment * @param string $name The test name * * @return Twig_Test|false A Twig_Test instance or false if the test does not exist + * + * @internal */ public function getTest($name) { @@ -1079,7 +1116,7 @@ class Twig_Environment $function = $name; $name = $function->getName(); } else { - @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated since version 1.21. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), E_USER_DEPRECATED); } if ($this->extensionInitialized) { @@ -1098,6 +1135,8 @@ class Twig_Environment * @param string $name function name * * @return Twig_Function|false A Twig_Function instance or false if the function does not exist + * + * @internal */ public function getFunction($name) { @@ -1144,6 +1183,8 @@ class Twig_Environment * @return Twig_FunctionInterface[] An array of Twig_FunctionInterface instances * * @see registerUndefinedFunctionCallback + * + * @internal */ public function getFunctions() { @@ -1172,7 +1213,7 @@ class Twig_Environment if (!array_key_exists($name, $this->globals)) { // The deprecation notice must be turned into the following exception in Twig 2.0 - @trigger_error(sprintf('Registering global variable "%s" at runtime or when the extensions have already been initialized is deprecated.', $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Registering global variable "%s" at runtime or when the extensions have already been initialized is deprecated since version 1.21.', $name), E_USER_DEPRECATED); //throw new LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name)); } } @@ -1189,6 +1230,8 @@ class Twig_Environment * Gets the registered Globals. * * @return array An array of globals + * + * @internal */ public function getGlobals() { @@ -1227,6 +1270,8 @@ class Twig_Environment * Gets the registered unary Operators. * * @return array An array of unary operators + * + * @internal */ public function getUnaryOperators() { @@ -1241,6 +1286,8 @@ class Twig_Environment * Gets the registered binary Operators. * * @return array An array of binary operators + * + * @internal */ public function getBinaryOperators() { @@ -1256,11 +1303,14 @@ class Twig_Environment */ public function computeAlternatives($name, $items) { - @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s method is deprecated since version 1.23 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); return Twig_Error_Syntax::computeAlternatives($name, $items); } + /** + * @internal + */ protected function initGlobals() { $globals = array(); @@ -1269,7 +1319,7 @@ class Twig_Environment $m = new ReflectionMethod($extension, 'getGlobals'); if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) { - @trigger_error(sprintf('Defining the getGlobals() method in the "%s" extension is deprecated without explicitly implementing Twig_Extension_GlobalsInterface.', $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Defining the getGlobals() method in the "%s" extension without explicitly implementing Twig_Extension_GlobalsInterface is deprecated since version 1.23.', $name), E_USER_DEPRECATED); } } @@ -1286,6 +1336,9 @@ class Twig_Environment return call_user_func_array('array_merge', $globals); } + /** + * @internal + */ protected function initExtensions() { if ($this->extensionInitialized) { @@ -1307,6 +1360,9 @@ class Twig_Environment $this->initExtension($this->staging); } + /** + * @internal + */ protected function initExtension(Twig_ExtensionInterface $extension) { // filters @@ -1314,7 +1370,7 @@ class Twig_Environment if ($filter instanceof Twig_SimpleFilter) { $name = $filter->getName(); } else { - @trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated. Use Twig_SimpleFilter instead.', get_class($filter), $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated since version 1.21. Use Twig_SimpleFilter instead.', get_class($filter), $name), E_USER_DEPRECATED); } $this->filters[$name] = $filter; @@ -1325,7 +1381,7 @@ class Twig_Environment if ($function instanceof Twig_SimpleFunction) { $name = $function->getName(); } else { - @trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated. Use Twig_SimpleFunction instead.', get_class($function), $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated since version 1.21. Use Twig_SimpleFunction instead.', get_class($function), $name), E_USER_DEPRECATED); } $this->functions[$name] = $function; @@ -1336,7 +1392,7 @@ class Twig_Environment if ($test instanceof Twig_SimpleTest) { $name = $test->getName(); } else { - @trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated. Use Twig_SimpleTest instead.', get_class($test), $name), E_USER_DEPRECATED); + @trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated since version 1.21. Use Twig_SimpleTest instead.', get_class($test), $name), E_USER_DEPRECATED); } $this->tests[$name] = $test; @@ -1347,7 +1403,7 @@ class Twig_Environment if ($parser instanceof Twig_TokenParserInterface) { $this->parsers->addTokenParser($parser); } elseif ($parser instanceof Twig_TokenParserBrokerInterface) { - @trigger_error('Registering a Twig_TokenParserBrokerInterface instance is deprecated.', E_USER_DEPRECATED); + @trigger_error('Registering a Twig_TokenParserBrokerInterface instance is deprecated since version 1.21.', E_USER_DEPRECATED); $this->parsers->addTokenParserBroker($parser); } else { diff --git a/vendor/twig/twig/lib/Twig/ExpressionParser.php b/vendor/twig/twig/lib/Twig/ExpressionParser.php index cad11af5e..ec85a4dbc 100644 --- a/vendor/twig/twig/lib/Twig/ExpressionParser.php +++ b/vendor/twig/twig/lib/Twig/ExpressionParser.php @@ -373,7 +373,7 @@ class Twig_ExpressionParser $arg = new Twig_Node_Expression_Constant($token->getValue(), $lineno); if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) { - $type = Twig_TemplateInterface::METHOD_CALL; + $type = Twig_Template::METHOD_CALL; foreach ($this->parseArguments() as $n) { $arguments->addElement($n); } @@ -539,10 +539,11 @@ class Twig_ExpressionParser $targets = array(); while (true) { $token = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, null, 'Only variables can be assigned to'); - if (in_array($token->getValue(), array('true', 'false', 'none'))) { - throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s".', $token->getValue()), $token->getLine(), $this->parser->getFilename()); + $value = $token->getValue(); + if (in_array(strtolower($value), array('true', 'false', 'none', 'null'))) { + throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s"', $value), $token->getLine(), $this->parser->getFilename()); } - $targets[] = new Twig_Node_Expression_AssignName($token->getValue(), $token->getLine()); + $targets[] = new Twig_Node_Expression_AssignName($value, $token->getLine()); if (!$this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, ',')) { break; @@ -578,6 +579,9 @@ class Twig_ExpressionParser if ($function instanceof Twig_SimpleFunction && $function->isDeprecated()) { $message = sprintf('Twig Function "%s" is deprecated', $function->getName()); + if (!is_bool($function->getDeprecatedVersion())) { + $message .= sprintf(' since version %s', $function->getDeprecatedVersion()); + } if ($function->getAlternative()) { $message .= sprintf('. Use "%s" instead', $function->getAlternative()); } @@ -606,6 +610,9 @@ class Twig_ExpressionParser if ($filter instanceof Twig_SimpleFilter && $filter->isDeprecated()) { $message = sprintf('Twig Filter "%s" is deprecated', $filter->getName()); + if (!is_bool($filter->getDeprecatedVersion())) { + $message .= sprintf(' since version %s', $filter->getDeprecatedVersion()); + } if ($filter->getAlternative()) { $message .= sprintf('. Use "%s" instead', $filter->getAlternative()); } diff --git a/vendor/twig/twig/lib/Twig/Extension/Core.php b/vendor/twig/twig/lib/Twig/Extension/Core.php index 0aed990fc..02810ab22 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Core.php +++ b/vendor/twig/twig/lib/Twig/Extension/Core.php @@ -213,11 +213,11 @@ class Twig_Extension_Core extends Twig_Extension new Twig_SimpleTest('even', null, array('node_class' => 'Twig_Node_Expression_Test_Even')), new Twig_SimpleTest('odd', null, array('node_class' => 'Twig_Node_Expression_Test_Odd')), new Twig_SimpleTest('defined', null, array('node_class' => 'Twig_Node_Expression_Test_Defined')), - new Twig_SimpleTest('sameas', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas', 'deprecated' => true, 'alternative' => 'same as')), + new Twig_SimpleTest('sameas', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas', 'deprecated' => '1.21', 'alternative' => 'same as')), new Twig_SimpleTest('same as', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')), new Twig_SimpleTest('none', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), new Twig_SimpleTest('null', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), - new Twig_SimpleTest('divisibleby', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby', 'deprecated' => true, 'alternative' => 'divisible by')), + new Twig_SimpleTest('divisibleby', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby', 'deprecated' => '1.21', 'alternative' => 'divisible by')), new Twig_SimpleTest('divisible by', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')), new Twig_SimpleTest('constant', null, array('node_class' => 'Twig_Node_Expression_Test_Constant')), new Twig_SimpleTest('empty', 'twig_test_empty'), @@ -261,6 +261,7 @@ class Twig_Extension_Core extends Twig_Extension 'is' => array('precedence' => 100, 'callable' => array($this, 'parseTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), 'is not' => array('precedence' => 100, 'callable' => array($this, 'parseNotTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), + '??' => array('precedence' => 300, 'class' => 'Twig_Node_Expression_NullCoalesce', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), ), ); } @@ -277,6 +278,9 @@ class Twig_Extension_Core extends Twig_Extension if ($test instanceof Twig_SimpleTest && $test->isDeprecated()) { $message = sprintf('Twig Test "%s" is deprecated', $name); + if (!is_bool($test->getDeprecatedVersion())) { + $message .= sprintf(' since version %s', $test->getDeprecatedVersion()); + } if ($test->getAlternative()) { $message .= sprintf('. Use "%s" instead', $test->getAlternative()); } @@ -383,7 +387,7 @@ function twig_random(Twig_Environment $env, $values = null) return ''; } if (null !== $charset = $env->getCharset()) { - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $values = twig_convert_encoding($values, 'UTF-8', $charset); } @@ -391,7 +395,7 @@ function twig_random(Twig_Environment $env, $values = null) // split at all positions, but not after the start and not before the end $values = preg_split('/(? $value) { $values[$i] = twig_convert_encoding($value, $charset, 'UTF-8'); } @@ -536,7 +540,7 @@ function twig_replace_filter($str, $from, $to = null) if ($from instanceof Traversable) { $from = iterator_to_array($from); } elseif (is_string($from) && is_string($to)) { - @trigger_error('Using "replace" with character by character replacement is deprecated and will be removed in Twig 2.0', E_USER_DEPRECATED); + @trigger_error('Using "replace" with character by character replacement is deprecated since version 1.22 and will be removed in Twig 2.0', E_USER_DEPRECATED); return strtr($str, $from, $to); } elseif (!is_array($from)) { @@ -916,7 +920,7 @@ function twig_reverse_filter(Twig_Environment $env, $item, $preserveKeys = false if (null !== $charset = $env->getCharset()) { $string = (string) $item; - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $item = twig_convert_encoding($string, 'UTF-8', $charset); } @@ -924,7 +928,7 @@ function twig_reverse_filter(Twig_Environment $env, $item, $preserveKeys = false $string = implode('', array_reverse($matches[0])); - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $string = twig_convert_encoding($string, $charset, 'UTF-8'); } @@ -974,7 +978,7 @@ function twig_in_filter($value, $compare) * Escapes a string. * * @param Twig_Environment $env A Twig_Environment instance - * @param string $string The value to be escaped + * @param mixed $string The value to be escaped * @param string $strategy The escaping strategy * @param string $charset The charset * @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false) @@ -1050,7 +1054,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', case 'js': // escape all non-alphanumeric characters // into their \xHH or \uHHHH representations - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $string = twig_convert_encoding($string, 'UTF-8', $charset); } @@ -1060,14 +1064,14 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', '_twig_escape_js_callback', $string); - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $string = twig_convert_encoding($string, $charset, 'UTF-8'); } return $string; case 'css': - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $string = twig_convert_encoding($string, 'UTF-8', $charset); } @@ -1077,14 +1081,14 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', '_twig_escape_css_callback', $string); - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $string = twig_convert_encoding($string, $charset, 'UTF-8'); } return $string; case 'html_attr': - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $string = twig_convert_encoding($string, 'UTF-8', $charset); } @@ -1094,7 +1098,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = preg_replace_callback('#[^a-zA-Z0-9,\.\-_]#Su', '_twig_escape_html_attr_callback', $string); - if ('UTF-8' != $charset) { + if ('UTF-8' !== $charset) { $string = twig_convert_encoding($string, $charset, 'UTF-8'); } @@ -1272,7 +1276,7 @@ if (function_exists('mb_get_info')) { */ function twig_upper_filter(Twig_Environment $env, $string) { - if (null !== ($charset = $env->getCharset())) { + if (null !== $charset = $env->getCharset()) { return mb_strtoupper($string, $charset); } @@ -1289,7 +1293,7 @@ if (function_exists('mb_get_info')) { */ function twig_lower_filter(Twig_Environment $env, $string) { - if (null !== ($charset = $env->getCharset())) { + if (null !== $charset = $env->getCharset()) { return mb_strtolower($string, $charset); } @@ -1306,7 +1310,7 @@ if (function_exists('mb_get_info')) { */ function twig_title_string_filter(Twig_Environment $env, $string) { - if (null !== ($charset = $env->getCharset())) { + if (null !== $charset = $env->getCharset()) { return mb_convert_case($string, MB_CASE_TITLE, $charset); } diff --git a/vendor/twig/twig/lib/Twig/Extension/Escaper.php b/vendor/twig/twig/lib/Twig/Extension/Escaper.php index 0e066934a..0be721d5b 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Escaper.php +++ b/vendor/twig/twig/lib/Twig/Extension/Escaper.php @@ -53,7 +53,7 @@ class Twig_Extension_Escaper extends Twig_Extension { // for BC if (true === $defaultStrategy) { - @trigger_error('Using "true" as the default strategy is deprecated. Use "html" instead.', E_USER_DEPRECATED); + @trigger_error('Using "true" as the default strategy is deprecated since version 1.21. Use "html" instead.', E_USER_DEPRECATED); $defaultStrategy = 'html'; } diff --git a/vendor/twig/twig/lib/Twig/ExtensionInterface.php b/vendor/twig/twig/lib/Twig/ExtensionInterface.php index 5cf3f46a6..776ffeba8 100644 --- a/vendor/twig/twig/lib/Twig/ExtensionInterface.php +++ b/vendor/twig/twig/lib/Twig/ExtensionInterface.php @@ -23,7 +23,7 @@ interface Twig_ExtensionInterface * * @param Twig_Environment $environment The current Twig_Environment instance * - * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterace instead + * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterface instead */ public function initRuntime(Twig_Environment $environment); diff --git a/vendor/twig/twig/lib/Twig/Lexer.php b/vendor/twig/twig/lib/Twig/Lexer.php index 575b4f3e4..20d1138aa 100644 --- a/vendor/twig/twig/lib/Twig/Lexer.php +++ b/vendor/twig/twig/lib/Twig/Lexer.php @@ -136,7 +136,7 @@ class Twig_Lexer implements Twig_LexerInterface mb_internal_encoding($mbEncoding); } - return new Twig_TokenStream($this->tokens, $this->filename); + return new Twig_TokenStream($this->tokens, $this->filename, $code); } protected function lexData() @@ -288,7 +288,7 @@ class Twig_Lexer implements Twig_LexerInterface protected function lexRawData($tag) { if ('raw' === $tag) { - @trigger_error(sprintf('Twig Tag "raw" is deprecated. Use "verbatim" instead in %s at line %d.', $this->filename, $this->lineno), E_USER_DEPRECATED); + @trigger_error(sprintf('Twig Tag "raw" is deprecated since version 1.21. Use "verbatim" instead in %s at line %d.', $this->filename, $this->lineno), E_USER_DEPRECATED); } if (!preg_match(str_replace('%s', $tag, $this->regexes['lex_raw_data']), $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) { diff --git a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php index 1bc75a104..0f5c4b8ab 100644 --- a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php +++ b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php @@ -198,11 +198,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI foreach ($this->paths[$namespace] as $path) { if (is_file($path.'/'.$shortname)) { - if (false !== $realpath = realpath($path.'/'.$shortname)) { - return $this->cache[$name] = $realpath; - } - - return $this->cache[$name] = $path.'/'.$shortname; + return $this->cache[$name] = $this->normalizePath($path.'/'.$shortname); } } @@ -257,4 +253,19 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI } } } + + private function normalizePath($path) + { + $parts = explode('/', str_replace('\\', '/', $path)); + $new = array(); + foreach ($parts as $i => $part) { + if ('..' === $part) { + array_pop($new); + } elseif ('.' !== $part && ('' !== $part || 0 === $i)) { + $new[] = $part; + } + } + + return implode('/', $new); + } } diff --git a/vendor/twig/twig/lib/Twig/Node.php b/vendor/twig/twig/lib/Twig/Node.php index 45a897681..d48a179a0 100644 --- a/vendor/twig/twig/lib/Twig/Node.php +++ b/vendor/twig/twig/lib/Twig/Node.php @@ -22,6 +22,8 @@ class Twig_Node implements Twig_NodeInterface protected $lineno; protected $tag; + private $filename; + /** * Constructor. * @@ -35,6 +37,11 @@ class Twig_Node implements Twig_NodeInterface */ public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null) { + foreach ($nodes as $name => $node) { + if (!$node instanceof Twig_NodeInterface) { + @trigger_error(sprintf('Using "%s" for the value of node "%s" of "%s" is deprecated since version 1.25 and will be removed in 2.0.', is_object($node) ? get_class($node) : null === $node ? 'null' : gettype($node), $name, get_class($this)), E_USER_DEPRECATED); + } + } $this->nodes = $nodes; $this->attributes = $attributes; $this->lineno = $lineno; @@ -74,7 +81,7 @@ class Twig_Node implements Twig_NodeInterface */ public function toXml($asDom = false) { - @trigger_error(sprintf('%s is deprecated.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('%s is deprecated since version 1.16.1 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED); $dom = new DOMDocument('1.0', 'UTF-8'); $dom->formatOutput = true; @@ -228,4 +235,19 @@ class Twig_Node implements Twig_NodeInterface { return new ArrayIterator($this->nodes); } + + public function setFilename($filename) + { + $this->filename = $filename; + foreach ($this->nodes as $node) { + if (null !== $node) { + $node->setFilename($filename); + } + } + } + + public function getFilename() + { + return $this->filename; + } } diff --git a/vendor/twig/twig/lib/Twig/Node/Embed.php b/vendor/twig/twig/lib/Twig/Node/Embed.php index a21304030..7ed12fb88 100644 --- a/vendor/twig/twig/lib/Twig/Node/Embed.php +++ b/vendor/twig/twig/lib/Twig/Node/Embed.php @@ -31,7 +31,7 @@ class Twig_Node_Embed extends Twig_Node_Include ->write('$this->loadTemplate(') ->string($this->getAttribute('filename')) ->raw(', ') - ->repr($compiler->getFilename()) + ->repr($this->getFilename()) ->raw(', ') ->repr($this->getLine()) ->raw(', ') diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php index b606f6d1e..6bbba62e8 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php @@ -12,9 +12,9 @@ class Twig_Node_Expression_Binary_FloorDiv extends Twig_Node_Expression_Binary { public function compile(Twig_Compiler $compiler) { - $compiler->raw('intval(floor('); + $compiler->raw('(int) floor('); parent::compile($compiler); - $compiler->raw('))'); + $compiler->raw(')'); } public function operator(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php index 51e2cac5b..c1aeba9bd 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php @@ -71,7 +71,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $first = false; } - if ($this->hasNode('arguments') && null !== $this->getNode('arguments')) { + if ($this->hasNode('arguments')) { $callable = $this->hasAttribute('callable') ? $this->getAttribute('callable') : null; $arguments = $this->getArguments($callable, $this->getNode('arguments')); @@ -122,53 +122,14 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } // manage named arguments - if (is_array($callable)) { - $r = new ReflectionMethod($callable[0], $callable[1]); - } elseif (is_object($callable) && !$callable instanceof Closure) { - $r = new ReflectionObject($callable); - $r = $r->getMethod('__invoke'); - } elseif (is_string($callable) && false !== strpos($callable, '::')) { - $r = new ReflectionMethod($callable); - } else { - $r = new ReflectionFunction($callable); - } - - $definition = $r->getParameters(); - if ($this->hasNode('node')) { - array_shift($definition); - } - if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { - array_shift($definition); - } - if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { - array_shift($definition); - } - if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) { - foreach ($this->getAttribute('arguments') as $argument) { - array_shift($definition); - } - } - if ($isVariadic) { - $argument = end($definition); - if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && array() === $argument->getDefaultValue()) { - array_pop($definition); - } else { - $callableName = $r->name; - if ($r->getDeclaringClass()) { - $callableName = $r->getDeclaringClass()->name.'::'.$callableName; - } - - throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = array()".', $callableName, $callType, $callName)); - } - } - + $callableParameters = $this->getCallableParameters($callable, $isVariadic); $arguments = array(); $names = array(); $missingArguments = array(); $optionalArguments = array(); $pos = 0; - foreach ($definition as $param) { - $names[] = $name = $this->normalizeName($param->name); + foreach ($callableParameters as $callableParameter) { + $names[] = $name = $this->normalizeName($callableParameter->name); if (array_key_exists($name, $parameters)) { if (array_key_exists($pos, $parameters)) { @@ -192,9 +153,9 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression unset($parameters[$pos]); $optionalArguments = array(); ++$pos; - } elseif ($param->isDefaultValueAvailable()) { - $optionalArguments[] = new Twig_Node_Expression_Constant($param->getDefaultValue(), -1); - } elseif ($param->isOptional()) { + } elseif ($callableParameter->isDefaultValueAvailable()) { + $optionalArguments[] = new Twig_Node_Expression_Constant($callableParameter->getDefaultValue(), -1); + } elseif ($callableParameter->isOptional()) { if (empty($parameters)) { break; } else { @@ -244,4 +205,49 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression { return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), $name)); } + + private function getCallableParameters($callable, $isVariadic) + { + if (is_array($callable)) { + $r = new ReflectionMethod($callable[0], $callable[1]); + } elseif (is_object($callable) && !$callable instanceof Closure) { + $r = new ReflectionObject($callable); + $r = $r->getMethod('__invoke'); + } elseif (is_string($callable) && false !== strpos($callable, '::')) { + $r = new ReflectionMethod($callable); + } else { + $r = new ReflectionFunction($callable); + } + + $parameters = $r->getParameters(); + if ($this->hasNode('node')) { + array_shift($parameters); + } + if ($this->hasAttribute('needs_environment') && $this->getAttribute('needs_environment')) { + array_shift($parameters); + } + if ($this->hasAttribute('needs_context') && $this->getAttribute('needs_context')) { + array_shift($parameters); + } + if ($this->hasAttribute('arguments') && null !== $this->getAttribute('arguments')) { + foreach ($this->getAttribute('arguments') as $argument) { + array_shift($parameters); + } + } + if ($isVariadic) { + $argument = end($parameters); + if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && array() === $argument->getDefaultValue()) { + array_pop($parameters); + } else { + $callableName = $r->name; + if ($r instanceof ReflectionMethod) { + $callableName = $r->getDeclaringClass()->name.'::'.$callableName; + } + + throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = array()".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); + } + } + + return $parameters; + } } diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php b/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php index 6140c5771..b4882e360 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php @@ -9,10 +9,14 @@ * file that was distributed with this source code. */ +@trigger_error('The Twig_Node_Expression_ExtensionReference class is deprecated since version 1.23 and will be removed in 2.0.', E_USER_DEPRECATED); + /** * Represents an extension call node. * * @author Fabien Potencier + * + * @deprecated since 1.23 and will be removed in 2.0. */ class Twig_Node_Expression_ExtensionReference extends Twig_Node_Expression { diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php b/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php index 6ce61111c..9a8d38160 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php @@ -13,7 +13,12 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression { public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression $arguments = null, $type, $lineno) { - parent::__construct(array('node' => $node, 'attribute' => $attribute, 'arguments' => $arguments), array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno); + $nodes = array('node' => $node, 'attribute' => $attribute); + if (null !== $arguments) { + $nodes['arguments'] = $arguments; + } + + parent::__construct($nodes, array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno); } public function compile(Twig_Compiler $compiler) @@ -36,10 +41,10 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression $needFourth = $this->getAttribute('ignore_strict_check'); $needThird = $needFourth || $this->getAttribute('is_defined_test'); $needSecond = $needThird || Twig_Template::ANY_CALL !== $this->getAttribute('type'); - $needFirst = $needSecond || null !== $this->getNode('arguments'); + $needFirst = $needSecond || $this->hasNode('arguments'); if ($needFirst) { - if (null !== $this->getNode('arguments')) { + if ($this->hasNode('arguments')) { $compiler->raw(', ')->subcompile($this->getNode('arguments')); } else { $compiler->raw(', array()'); diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php index c062a213f..a6e0ff420 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php @@ -30,19 +30,11 @@ class Twig_Node_Expression_Name extends Twig_Node_Expression if ($this->getAttribute('is_defined_test')) { if ($this->isSpecial()) { - if ('_self' === $name) { - @trigger_error(sprintf('Global variable "_self" is deprecated in %s at line %d', '?', $this->getLine()), E_USER_DEPRECATED); - } - $compiler->repr(true); } else { $compiler->raw('array_key_exists(')->repr($name)->raw(', $context)'); } } elseif ($this->isSpecial()) { - if ('_self' === $name) { - @trigger_error(sprintf('Global variable "_self" is deprecated in %s at line %d', '?', $this->getLine()), E_USER_DEPRECATED); - } - $compiler->raw($this->specialVars[$name]); } elseif ($this->getAttribute('always_defined')) { $compiler diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php b/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php new file mode 100644 index 000000000..10039130c --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Expression/NullCoalesce.php @@ -0,0 +1,23 @@ +getLine()), + new Twig_Node_Expression_Unary_Not(new Twig_Node_Expression_Test_Null($left, 'null', new Twig_Node(), $left->getLine()), $left->getLine()), + $left->getLine() + ); + + parent::__construct($test, $left, $right, $lineno); + } +} diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php index c0358c8bf..125d381d8 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php @@ -12,7 +12,12 @@ class Twig_Node_Expression_Test extends Twig_Node_Expression_Call { public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno) { - parent::__construct(array('node' => $node, 'arguments' => $arguments), array('name' => $name), $lineno); + $nodes = array('node' => $node); + if (null !== $arguments) { + $nodes['arguments'] = $arguments; + } + + parent::__construct($nodes, array('name' => $name), $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php index 4b4a48a2b..3dc6ff592 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test/Defined.php @@ -25,17 +25,19 @@ class Twig_Node_Expression_Test_Defined extends Twig_Node_Expression_Test { public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno) { - parent::__construct($node, $name, $arguments, $lineno); - if ($node instanceof Twig_Node_Expression_Name) { $node->setAttribute('is_defined_test', true); } elseif ($node instanceof Twig_Node_Expression_GetAttr) { $node->setAttribute('is_defined_test', true); $this->changeIgnoreStrictCheck($node); + } elseif ($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array) { + $node = new Twig_Node_Expression_Constant(true, $node->getLine()); } else { throw new Twig_Error_Syntax('The "defined" test only works with simple variables.', $this->getLine()); } + + parent::__construct($node, $name, $arguments, $lineno); } protected function changeIgnoreStrictCheck(Twig_Node_Expression_GetAttr $node) diff --git a/vendor/twig/twig/lib/Twig/Node/For.php b/vendor/twig/twig/lib/Twig/Node/For.php index 2d450932c..5498a88d2 100644 --- a/vendor/twig/twig/lib/Twig/Node/For.php +++ b/vendor/twig/twig/lib/Twig/Node/For.php @@ -27,7 +27,12 @@ class Twig_Node_For extends Twig_Node $body = new Twig_Node_If(new Twig_Node(array($ifexpr, $body)), null, $lineno, $tag); } - parent::__construct(array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body, 'else' => $else), array('with_loop' => true, 'ifexpr' => null !== $ifexpr), $lineno, $tag); + $nodes = array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body); + if (null !== $else) { + $nodes['else'] = $else; + } + + parent::__construct($nodes, array('with_loop' => true, 'ifexpr' => null !== $ifexpr), $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -40,7 +45,7 @@ class Twig_Node_For extends Twig_Node ->raw(");\n") ; - if (null !== $this->getNode('else')) { + if ($this->hasNode('else')) { $compiler->write("\$context['_iterated'] = false;\n"); } @@ -69,7 +74,7 @@ class Twig_Node_For extends Twig_Node } } - $this->loop->setAttribute('else', null !== $this->getNode('else')); + $this->loop->setAttribute('else', $this->hasNode('else')); $this->loop->setAttribute('with_loop', $this->getAttribute('with_loop')); $this->loop->setAttribute('ifexpr', $this->getAttribute('ifexpr')); @@ -85,7 +90,7 @@ class Twig_Node_For extends Twig_Node ->write("}\n") ; - if (null !== $this->getNode('else')) { + if ($this->hasNode('else')) { $compiler ->write("if (!\$context['_iterated']) {\n") ->indent() diff --git a/vendor/twig/twig/lib/Twig/Node/If.php b/vendor/twig/twig/lib/Twig/Node/If.php index caff93682..0aa9e7074 100644 --- a/vendor/twig/twig/lib/Twig/Node/If.php +++ b/vendor/twig/twig/lib/Twig/Node/If.php @@ -19,7 +19,12 @@ class Twig_Node_If extends Twig_Node { public function __construct(Twig_NodeInterface $tests, Twig_NodeInterface $else = null, $lineno, $tag = null) { - parent::__construct(array('tests' => $tests, 'else' => $else), array(), $lineno, $tag); + $nodes = array('tests' => $tests); + if (null !== $else) { + $nodes['else'] = $else; + } + + parent::__construct($nodes, array(), $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -45,7 +50,7 @@ class Twig_Node_If extends Twig_Node ; } - if ($this->hasNode('else') && null !== $this->getNode('else')) { + if ($this->hasNode('else')) { $compiler ->outdent() ->write("} else {\n") diff --git a/vendor/twig/twig/lib/Twig/Node/Import.php b/vendor/twig/twig/lib/Twig/Node/Import.php index df37af371..f69a7471e 100644 --- a/vendor/twig/twig/lib/Twig/Node/Import.php +++ b/vendor/twig/twig/lib/Twig/Node/Import.php @@ -37,7 +37,7 @@ class Twig_Node_Import extends Twig_Node ->raw('$this->loadTemplate(') ->subcompile($this->getNode('expr')) ->raw(', ') - ->repr($compiler->getFilename()) + ->repr($this->getFilename()) ->raw(', ') ->repr($this->getLine()) ->raw(')') diff --git a/vendor/twig/twig/lib/Twig/Node/Include.php b/vendor/twig/twig/lib/Twig/Node/Include.php index 9952f7316..bc80dc4f1 100644 --- a/vendor/twig/twig/lib/Twig/Node/Include.php +++ b/vendor/twig/twig/lib/Twig/Node/Include.php @@ -19,7 +19,12 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface { public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null) { - parent::__construct(array('expr' => $expr, 'variables' => $variables), array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag); + $nodes = array('expr' => $expr); + if (null !== $variables) { + $nodes['variables'] = $variables; + } + + parent::__construct($nodes, array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -59,7 +64,7 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface ->write('$this->loadTemplate(') ->subcompile($this->getNode('expr')) ->raw(', ') - ->repr($compiler->getFilename()) + ->repr($this->getFilename()) ->raw(', ') ->repr($this->getLine()) ->raw(')') @@ -68,7 +73,7 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface protected function addTemplateArguments(Twig_Compiler $compiler) { - if (null === $this->getNode('variables')) { + if (!$this->hasNode('variables')) { $compiler->raw(false === $this->getAttribute('only') ? '$context' : 'array()'); } elseif (false === $this->getAttribute('only')) { $compiler diff --git a/vendor/twig/twig/lib/Twig/Node/Macro.php b/vendor/twig/twig/lib/Twig/Node/Macro.php index 932e795f0..c186cd0b9 100644 --- a/vendor/twig/twig/lib/Twig/Node/Macro.php +++ b/vendor/twig/twig/lib/Twig/Node/Macro.php @@ -109,6 +109,11 @@ class Twig_Node_Macro extends Twig_Node ->write("ob_end_clean();\n\n") ->write("throw \$e;\n") ->outdent() + ->write("} catch (Throwable \$e) {\n") + ->indent() + ->write("ob_end_clean();\n\n") + ->write("throw \$e;\n") + ->outdent() ->write("}\n\n") ->write("return ('' === \$tmp = ob_get_clean()) ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset());\n") ->outdent() diff --git a/vendor/twig/twig/lib/Twig/Node/Module.php b/vendor/twig/twig/lib/Twig/Node/Module.php index 01161d3e8..a80ab353c 100644 --- a/vendor/twig/twig/lib/Twig/Node/Module.php +++ b/vendor/twig/twig/lib/Twig/Node/Module.php @@ -21,11 +21,9 @@ */ class Twig_Node_Module extends Twig_Node { - public function __construct(Twig_NodeInterface $body, Twig_Node_Expression $parent = null, Twig_NodeInterface $blocks, Twig_NodeInterface $macros, Twig_NodeInterface $traits, $embeddedTemplates, $filename) + public function __construct(Twig_NodeInterface $body, Twig_Node_Expression $parent = null, Twig_NodeInterface $blocks, Twig_NodeInterface $macros, Twig_NodeInterface $traits, $embeddedTemplates, $filename, $source = '') { - // embedded templates are set as attributes so that they are only visited once by the visitors - parent::__construct(array( - 'parent' => $parent, + $nodes = array( 'body' => $body, 'blocks' => $blocks, 'macros' => $macros, @@ -35,7 +33,14 @@ class Twig_Node_Module extends Twig_Node 'constructor_start' => new Twig_Node(), 'constructor_end' => new Twig_Node(), 'class_end' => new Twig_Node(), - ), array( + ); + if (null !== $parent) { + $nodes['parent'] = $parent; + } + + // embedded templates are set as attributes so that they are only visited once by the visitors + parent::__construct($nodes, array( + 'source' => $source, 'filename' => $filename, 'index' => null, 'embedded_templates' => $embeddedTemplates, @@ -67,7 +72,7 @@ class Twig_Node_Module extends Twig_Node if ( count($this->getNode('blocks')) || count($this->getNode('traits')) - || null === $this->getNode('parent') + || !$this->hasNode('parent') || $this->getNode('parent') instanceof Twig_Node_Expression_Constant || count($this->getNode('constructor_start')) || count($this->getNode('constructor_end')) @@ -89,14 +94,17 @@ class Twig_Node_Module extends Twig_Node $this->compileDebugInfo($compiler); + $this->compileGetSource($compiler); + $this->compileClassFooter($compiler); } protected function compileGetParent(Twig_Compiler $compiler) { - if (null === $parent = $this->getNode('parent')) { + if (!$this->hasNode('parent')) { return; } + $parent = $this->getNode('parent'); $compiler ->write("protected function doGetParent(array \$context)\n", "{\n") @@ -112,9 +120,9 @@ class Twig_Node_Module extends Twig_Node ->raw('$this->loadTemplate(') ->subcompile($parent) ->raw(', ') - ->repr($compiler->getFilename()) + ->repr($this->getAttribute('filename')) ->raw(', ') - ->repr($this->getNode('parent')->getLine()) + ->repr($parent->getLine()) ->raw(')') ; } @@ -149,17 +157,17 @@ class Twig_Node_Module extends Twig_Node ; // parent - if (null === $parent = $this->getNode('parent')) { + if (!$this->hasNode('parent')) { $compiler->write("\$this->parent = false;\n\n"); - } elseif ($parent instanceof Twig_Node_Expression_Constant) { + } elseif (($parent = $this->getNode('parent')) && $parent instanceof Twig_Node_Expression_Constant) { $compiler ->addDebugInfo($parent) ->write('$this->parent = $this->loadTemplate(') ->subcompile($parent) ->raw(', ') - ->repr($compiler->getFilename()) + ->repr($this->getAttribute('filename')) ->raw(', ') - ->repr($this->getNode('parent')->getLine()) + ->repr($parent->getLine()) ->raw(");\n") ; } @@ -277,7 +285,8 @@ class Twig_Node_Module extends Twig_Node ->subcompile($this->getNode('body')) ; - if (null !== $parent = $this->getNode('parent')) { + if ($this->hasNode('parent')) { + $parent = $this->getNode('parent'); $compiler->addDebugInfo($parent); if ($parent instanceof Twig_Node_Expression_Constant) { $compiler->write('$this->parent'); @@ -330,7 +339,7 @@ class Twig_Node_Module extends Twig_Node // // Put another way, a template can be used as a trait if it // only contains blocks and use statements. - $traitable = null === $this->getNode('parent') && 0 === count($this->getNode('macros')); + $traitable = !$this->hasNode('parent') && 0 === count($this->getNode('macros')); if ($traitable) { if ($this->getNode('body') instanceof Twig_Node_Body) { $nodes = $this->getNode('body')->getNode(0); @@ -380,6 +389,19 @@ class Twig_Node_Module extends Twig_Node ->indent() ->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true)))) ->outdent() + ->write("}\n\n") + ; + } + + protected function compileGetSource(Twig_Compiler $compiler) + { + $compiler + ->write("public function getSource()\n", "{\n") + ->indent() + ->write('return ') + ->string($this->getAttribute('source')) + ->raw(";\n") + ->outdent() ->write("}\n") ; } @@ -391,7 +413,7 @@ class Twig_Node_Module extends Twig_Node ->write(sprintf('%s = $this->loadTemplate(', $var)) ->subcompile($node) ->raw(', ') - ->repr($compiler->getFilename()) + ->repr($this->getAttribute('filename')) ->raw(', ') ->repr($node->getLine()) ->raw(");\n") diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php index 5c9497774..f7d01b3b0 100644 --- a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php @@ -38,6 +38,7 @@ class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor $this->defaultStrategy = $defaultStrategy; } $this->safeVars = array(); + $this->blocks = array(); } elseif ($node instanceof Twig_Node_AutoEscape) { $this->statusStack[] = $node->getAttribute('value'); } elseif ($node instanceof Twig_Node_Block) { @@ -57,6 +58,7 @@ class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor if ($node instanceof Twig_Node_Module) { $this->defaultStrategy = false; $this->safeVars = array(); + $this->blocks = array(); } elseif ($node instanceof Twig_Node_Expression_Filter) { return $this->preEscapeFilterNode($node, $env); } elseif ($node instanceof Twig_Node_Print) { diff --git a/vendor/twig/twig/lib/Twig/Parser.php b/vendor/twig/twig/lib/Twig/Parser.php index ed28a0e6a..86bd494f0 100644 --- a/vendor/twig/twig/lib/Twig/Parser.php +++ b/vendor/twig/twig/lib/Twig/Parser.php @@ -63,7 +63,12 @@ class Twig_Parser implements Twig_ParserInterface public function parse(Twig_TokenStream $stream, $test = null, $dropNeedle = false) { // push all variables into the stack to keep the current state of the parser - $vars = get_object_vars($this); + // using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336 + $vars = array(); + foreach ($this as $k => $v) { + $vars[$k] = $v; + } + unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']); $this->stack[] = $vars; @@ -109,7 +114,7 @@ class Twig_Parser implements Twig_ParserInterface throw $e; } - $node = new Twig_Node_Module(new Twig_Node_Body(array($body)), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $this->getFilename()); + $node = new Twig_Node_Module(new Twig_Node_Body(array($body)), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $this->getFilename(), $stream->getSource()); $traverser = new Twig_NodeTraverser($this->env, $this->visitors); diff --git a/vendor/twig/twig/lib/Twig/SimpleFilter.php b/vendor/twig/twig/lib/Twig/SimpleFilter.php index cefc4f587..0c1e092a7 100644 --- a/vendor/twig/twig/lib/Twig/SimpleFilter.php +++ b/vendor/twig/twig/lib/Twig/SimpleFilter.php @@ -101,6 +101,11 @@ class Twig_SimpleFilter } public function isDeprecated() + { + return (bool) $this->options['deprecated']; + } + + public function getDeprecatedVersion() { return $this->options['deprecated']; } diff --git a/vendor/twig/twig/lib/Twig/SimpleFunction.php b/vendor/twig/twig/lib/Twig/SimpleFunction.php index 79735405c..63003d6a0 100644 --- a/vendor/twig/twig/lib/Twig/SimpleFunction.php +++ b/vendor/twig/twig/lib/Twig/SimpleFunction.php @@ -91,6 +91,11 @@ class Twig_SimpleFunction } public function isDeprecated() + { + return (bool) $this->options['deprecated']; + } + + public function getDeprecatedVersion() { return $this->options['deprecated']; } diff --git a/vendor/twig/twig/lib/Twig/SimpleTest.php b/vendor/twig/twig/lib/Twig/SimpleTest.php index 8ba2192b2..cff3ae7c9 100644 --- a/vendor/twig/twig/lib/Twig/SimpleTest.php +++ b/vendor/twig/twig/lib/Twig/SimpleTest.php @@ -53,6 +53,11 @@ class Twig_SimpleTest } public function isDeprecated() + { + return (bool) $this->options['deprecated']; + } + + public function getDeprecatedVersion() { return $this->options['deprecated']; } diff --git a/vendor/twig/twig/lib/Twig/Template.php b/vendor/twig/twig/lib/Twig/Template.php index a8160227e..f88ea8dda 100644 --- a/vendor/twig/twig/lib/Twig/Template.php +++ b/vendor/twig/twig/lib/Twig/Template.php @@ -42,6 +42,25 @@ abstract class Twig_Template implements Twig_TemplateInterface */ abstract public function getTemplateName(); + /** + * Returns debug information about the template. + * + * @return array Debug information + * + * @internal + */ + abstract public function getDebugInfo(); + + /** + * Returns the template source code. + * + * @return string The template source code + */ + public function getSource() + { + return ''; + } + /** * @deprecated since 1.20 (to be removed in 2.0) */ @@ -320,33 +339,6 @@ abstract class Twig_Template implements Twig_TemplateInterface return $this->blocks; } - /** - * Returns the template source code. - * - * @return string|null The template source code or null if it is not available - */ - public function getSource() - { - $reflector = new ReflectionClass($this); - $file = $reflector->getFileName(); - - if (!file_exists($file)) { - return; - } - - $source = file($file, FILE_IGNORE_NEW_LINES); - array_splice($source, 0, $reflector->getEndLine()); - - $i = 0; - while (isset($source[$i]) && '/* */' === substr_replace($source[$i], '', 3, -2)) { - $source[$i] = str_replace('*//* ', '*/', substr($source[$i], 3, -2)); - ++$i; - } - array_splice($source, $i); - - return implode("\n", $source); - } - /** * {@inheritdoc} */ @@ -369,6 +361,12 @@ abstract class Twig_Template implements Twig_TemplateInterface ob_end_clean(); } + throw $e; + } catch (Throwable $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + throw $e; } @@ -581,7 +579,7 @@ abstract class Twig_Template implements Twig_TemplateInterface return; } - throw new Twig_Error_Runtime(sprintf('Method "%s" for object "%s" does not exist', $item, get_class($object)), -1, $this->getTemplateName()); + throw new Twig_Error_Runtime(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s"', $item, get_class($object)), -1, $this->getTemplateName()); } if ($isDefinedTest) { diff --git a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php index c753e62a2..fd34cafe2 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php @@ -50,7 +50,7 @@ class Twig_TokenParser_AutoEscape extends Twig_TokenParser } if ($compat && $stream->test(Twig_Token::NAME_TYPE)) { - @trigger_error('Using the autoescape tag with "true" or "false" before the strategy name is deprecated.', E_USER_DEPRECATED); + @trigger_error('Using the autoescape tag with "true" or "false" before the strategy name is deprecated since version 1.21.', E_USER_DEPRECATED); if (false === $value) { throw new Twig_Error_Syntax('Unexpected escaping strategy as you set autoescaping to false.', $stream->getCurrent()->getLine(), $stream->getFilename()); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Embed.php b/vendor/twig/twig/lib/Twig/TokenParser/Embed.php index e685b955d..150f433be 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Embed.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Embed.php @@ -22,18 +22,27 @@ class Twig_TokenParser_Embed extends Twig_TokenParser_Include list($variables, $only, $ignoreMissing) = $this->parseArguments(); + $parentToken = $fakeParentToken = new Twig_Token(Twig_Token::STRING_TYPE, '__parent__', $token->getLine()); + if ($parent instanceof Twig_Node_Expression_Constant) { + $parentToken = new Twig_Token(Twig_Token::STRING_TYPE, $parent->getAttribute('value'), $token->getLine()); + } elseif ($parent instanceof Twig_Node_Expression_Name) { + $parentToken = new Twig_Token(Twig_Token::NAME_TYPE, $parent->getAttribute('name'), $token->getLine()); + } + // inject a fake parent to make the parent() function work $stream->injectTokens(array( new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', $token->getLine()), new Twig_Token(Twig_Token::NAME_TYPE, 'extends', $token->getLine()), - new Twig_Token(Twig_Token::STRING_TYPE, '__parent__', $token->getLine()), + $parentToken, new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', $token->getLine()), )); $module = $this->parser->parse($stream, array($this, 'decideBlockEnd'), true); // override the parent with the correct one - $module->setNode('parent', $parent); + if ($fakeParentToken === $parentToken) { + $module->setNode('parent', $parent); + } $this->parser->embedTemplate($module); diff --git a/vendor/twig/twig/lib/Twig/TokenStream.php b/vendor/twig/twig/lib/Twig/TokenStream.php index 016f8122a..cc6bc8050 100644 --- a/vendor/twig/twig/lib/Twig/TokenStream.php +++ b/vendor/twig/twig/lib/Twig/TokenStream.php @@ -21,16 +21,20 @@ class Twig_TokenStream protected $current = 0; protected $filename; + private $source; + /** * Constructor. * - * @param array $tokens An array of tokens - * @param string $filename The name of the filename which tokens are associated with + * @param array $tokens An array of tokens + * @param string $filename|null The name of the filename which tokens are associated with + * @param string $source|null The source code associated with the tokens */ - public function __construct(array $tokens, $filename = null) + public function __construct(array $tokens, $filename = null, $source = null) { $this->tokens = $tokens; $this->filename = $filename; + $this->source = $source ? $source : ''; } /** @@ -144,12 +148,22 @@ class Twig_TokenStream } /** - * Gets the filename associated with this stream. + * Gets the filename associated with this stream (null if not defined). * - * @return string + * @return string|null */ public function getFilename() { return $this->filename; } + + /** + * Gets the source code associated with this stream. + * + * @return string + */ + public function getSource() + { + return $this->source; + } } diff --git a/vendor/wikimedia/composer-merge-plugin/README.md b/vendor/wikimedia/composer-merge-plugin/README.md index f020d40ae..8afed0140 100644 --- a/vendor/wikimedia/composer-merge-plugin/README.md +++ b/vendor/wikimedia/composer-merge-plugin/README.md @@ -24,6 +24,8 @@ extensions which may be managed via Composer. Installation ------------ +Composer Merge Plugin requires [Composer 1.0.0](https://getcomposer.org/) or newer. + ``` $ composer require wikimedia/composer-merge-plugin ``` @@ -32,7 +34,7 @@ $ composer require wikimedia/composer-merge-plugin Usage ----- -``` +```json { "require": { "wikimedia/composer-merge-plugin": "dev-master" @@ -49,7 +51,9 @@ Usage "recurse": true, "replace": false, "merge-dev": true, - "merge-extra": false + "merge-extra": false, + "merge-extra-deep": false, + "merge-scripts": false } } } @@ -88,11 +92,13 @@ in the top-level composer.json file: * [suggest](https://getcomposer.org/doc/04-schema.md#suggest) * [extra](https://getcomposer.org/doc/04-schema.md#extra) (optional, see [merge-extra](#merge-extra) below) +* [scripts](https://getcomposer.org/doc/04-schema.md#scripts) + (optional, see [merge-scripts](#merge-scripts) below) ### require -The `require` setting is identical to `[include](#include)` except when +The `require` setting is identical to [`include`](#include) except when a pattern fails to match at least one file then it will cause an error. ### recurse @@ -127,13 +133,30 @@ section is to accept the first version of any key found (e.g. a key in the master config wins over the version found in any imported config). If `replace` mode is active ([see above](#replace)) then this behavior changes and the last key found will win (e.g. the key in the master config is replaced -by the key in the imported config). The usefulness of merging the extra -section will vary depending on the Composer plugins being used and the order -in which they are processed by Composer. +by the key in the imported config). If `"merge-extra-deep": true` is specified +then, the sections are merged similar to array_merge_recursive() - however +duplicate string array keys are replaced instead of merged, while numeric +array keys are merged as usual. The usefulness of merging the extra section +will vary depending on the Composer plugins being used and the order in which +they are processed by Composer. Note that `merge-plugin` sections are excluded from the merge process, but are always processed by the plugin unless [recursion](#recurse) is disabled. +### merge-scripts + +A `"merge-scripts": true` setting enables merging the contents of the +`scripts` section of included files as well. The normal merge mode for the +scripts section is to accept the first version of any key found (e.g. a key in +the master config wins over the version found in any imported config). If +`replace` mode is active ([see above](#replace)) then this behavior changes +and the last key found will win (e.g. the key in the master config is replaced +by the key in the imported config). + +Note: [custom commands][] added by merged configuration will work when invoked +as `composer run-script my-cool-command` but will not be available using the +normal `composer my-cool-command` shortcut. + Running tests ------------- @@ -167,7 +190,7 @@ GitHub as well. License ------- -Composer Merge plugin is licensed under the MIT license. See the `LICENSE` +Composer Merge plugin is licensed under the MIT license. See the [`LICENSE`](LICENSE) file for more details. @@ -181,3 +204,4 @@ file for more details. [License]: https://img.shields.io/packagist/l/wikimedia/composer-merge-plugin.svg?style=flat [Build Status]: https://img.shields.io/travis/wikimedia/composer-merge-plugin.svg?style=flat [Code Coverage]: https://img.shields.io/scrutinizer/coverage/g/wikimedia/composer-merge-plugin/master.svg?style=flat +[custom commands]: https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands diff --git a/vendor/wikimedia/composer-merge-plugin/composer.json b/vendor/wikimedia/composer-merge-plugin/composer.json index dce70e7d2..e504c91ec 100644 --- a/vendor/wikimedia/composer-merge-plugin/composer.json +++ b/vendor/wikimedia/composer-merge-plugin/composer.json @@ -16,7 +16,7 @@ "php": ">=5.3.2" }, "require-dev": { - "composer/composer": "1.0.*@dev", + "composer/composer": "~1.0.0", "jakub-onderka/php-parallel-lint": "~0.8", "phpunit/phpunit": "~4.8|~5.0", "squizlabs/php_codesniffer": "~2.1.0" diff --git a/vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php b/vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php index b32131ffd..c90b4b794 100644 --- a/vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php +++ b/vendor/wikimedia/composer-merge-plugin/src/Merge/ExtraPackage.php @@ -58,6 +58,11 @@ class ExtraPackage */ protected $package; + /** + * @var VersionParser $versionParser + */ + protected $versionParser; + /** * @param string $path Path to composer.json file * @param Composer $composer @@ -70,6 +75,7 @@ class ExtraPackage $this->logger = $logger; $this->json = $this->readPackageJson($path); $this->package = $this->loadPackage($this->json); + $this->versionParser = new VersionParser(); } /** @@ -120,10 +126,10 @@ class ExtraPackage } /** - * @param string $json + * @param array $json * @return CompletePackage */ - protected function loadPackage($json) + protected function loadPackage(array $json) { $loader = new ArrayLoader(); $package = $loader->load($json); @@ -146,12 +152,9 @@ class ExtraPackage */ public function mergeInto(RootPackageInterface $root, PluginState $state) { - $this->addRepositories($root); + $this->prependRepositories($root); $this->mergeRequires('require', $root, $state); - if ($state->isDevMode()) { - $this->mergeRequires('require-dev', $root, $state); - } $this->mergePackageLinks('conflict', $root); $this->mergePackageLinks('replace', $root); @@ -160,11 +163,29 @@ class ExtraPackage $this->mergeSuggests($root); $this->mergeAutoload('autoload', $root); - if ($state->isDevMode()) { - $this->mergeAutoload('devAutoload', $root); - } $this->mergeExtra($root, $state); + + $this->mergeScripts($root, $state); + + if ($state->isDevMode()) { + $this->mergeDevInto($root, $state); + } else { + $this->mergeReferences($root); + } + } + + /** + * Merge just the dev portion into a RootPackageInterface + * + * @param RootPackageInterface $root + * @param PluginState $state + */ + public function mergeDevInto(RootPackageInterface $root, PluginState $state) + { + $this->mergeRequires('require-dev', $root, $state); + $this->mergeAutoload('devAutoload', $root); + $this->mergeReferences($root); } /** @@ -173,7 +194,7 @@ class ExtraPackage * * @param RootPackageInterface $root */ - protected function addRepositories(RootPackageInterface $root) + protected function prependRepositories(RootPackageInterface $root) { if (!isset($this->json['repositories'])) { return; @@ -185,12 +206,12 @@ class ExtraPackage if (!isset($repoJson['type'])) { continue; } - $this->logger->info("Adding {$repoJson['type']} repository"); + $this->logger->info("Prepending {$repoJson['type']} repository"); $repo = $repoManager->createRepository( $repoJson['type'], $repoJson ); - $repoManager->addRepository($repo); + $repoManager->prependRepository($repo); $newRepos[] = $repo; } @@ -402,25 +423,70 @@ class ExtraPackage if ($state->replaceDuplicateLinks()) { $unwrapped->setExtra( - array_merge($rootExtra, $extra) + self::mergeExtraArray($state->shouldMergeExtraDeep(), $rootExtra, $extra) ); - } else { - foreach (array_intersect( - array_keys($extra), - array_keys($rootExtra) - ) as $key) { - $this->logger->info( - "Ignoring duplicate {$key} in ". - "{$this->path} extra config." - ); + if (!$state->shouldMergeExtraDeep()) { + foreach (array_intersect( + array_keys($extra), + array_keys($rootExtra) + ) as $key) { + $this->logger->info( + "Ignoring duplicate {$key} in ". + "{$this->path} extra config." + ); + } } $unwrapped->setExtra( - array_merge($extra, $rootExtra) + self::mergeExtraArray($state->shouldMergeExtraDeep(), $extra, $rootExtra) ); } } + /** + * Merge scripts config into a RootPackageInterface + * + * @param RootPackageInterface $root + * @param PluginState $state + */ + public function mergeScripts(RootPackageInterface $root, PluginState $state) + { + $scripts = $this->package->getScripts(); + if (!$state->shouldMergeScripts() || empty($scripts)) { + return; + } + + $rootScripts = $root->getScripts(); + $unwrapped = self::unwrapIfNeeded($root, 'setScripts'); + + if ($state->replaceDuplicateLinks()) { + $unwrapped->setScripts( + array_merge($rootScripts, $scripts) + ); + } else { + $unwrapped->setScripts( + array_merge($scripts, $rootScripts) + ); + } + } + + /** + * Merges two arrays either via arrayMergeDeep or via array_merge. + * + * @param bool $mergeDeep + * @param array $array1 + * @param array $array2 + * @return array + */ + public static function mergeExtraArray($mergeDeep, $array1, $array2) + { + if ($mergeDeep) { + return NestedArray::mergeDeep($array1, $array2); + } + + return array_merge($array1, $array2); + } + /** * Update Links with a 'self.version' constraint with the root package's * version. @@ -438,7 +504,7 @@ class ExtraPackage $linkType = BasePackage::$supportedLinkTypes[$type]; $version = $root->getVersion(); $prettyVersion = $root->getPrettyVersion(); - $vp = new VersionParser(); + $vp = $this->versionParser; $method = 'get' . ucfirst($linkType['method']); $packages = $root->$method(); @@ -503,5 +569,53 @@ class ExtraPackage // @codeCoverageIgnoreEnd return $root; } + + /** + * Update the root packages reference information. + * + * @param RootPackageInterface $root + */ + protected function mergeReferences(RootPackageInterface $root) + { + // Merge source reference information for merged packages. + // @see RootPackageLoader::load + $references = array(); + $unwrapped = $this->unwrapIfNeeded($root, 'setReferences'); + foreach (array('require', 'require-dev') as $linkType) { + $linkInfo = BasePackage::$supportedLinkTypes[$linkType]; + $method = 'get'.ucfirst($linkInfo['method']); + $links = array(); + foreach ($unwrapped->$method() as $link) { + $links[$link->getTarget()] = $link->getConstraint()->getPrettyString(); + } + $references = $this->extractReferences($links, $references); + } + $unwrapped->setReferences($references); + } + + /** + * Extract vcs revision from version constraint (dev-master#abc123. + * + * @param array $requires + * @param array $references + * @return array + * @see RootPackageLoader::extractReferences() + */ + protected function extractReferences(array $requires, array $references) + { + foreach ($requires as $reqName => $reqVersion) { + $reqVersion = preg_replace('{^([^,\s@]+) as .+$}', '$1', $reqVersion); + $stabilityName = VersionParser::parseStability($reqVersion); + if ( + preg_match('{^[^,\s@]+?#([a-f0-9]+)$}', $reqVersion, $match) && + $stabilityName === 'dev' + ) { + $name = strtolower($reqName); + $references[$name] = $match[1]; + } + } + + return $references; + } } // vim:sw=4:ts=4:sts=4:et: diff --git a/vendor/wikimedia/composer-merge-plugin/src/Merge/NestedArray.php b/vendor/wikimedia/composer-merge-plugin/src/Merge/NestedArray.php new file mode 100644 index 000000000..91bd295f3 --- /dev/null +++ b/vendor/wikimedia/composer-merge-plugin/src/Merge/NestedArray.php @@ -0,0 +1,116 @@ + 'x', 'attributes' => array('title' => t('X'), 'class' => array('a', 'b'))); + * $link_options_2 = array('fragment' => 'y', 'attributes' => array('title' => t('Y'), 'class' => array('c', 'd'))); + * + * // This results in array('fragment' => array('x', 'y'), 'attributes' => + * // array('title' => array(t('X'), t('Y')), 'class' => array('a', 'b', + * // 'c', 'd'))). + * $incorrect = array_merge_recursive($link_options_1, $link_options_2); + * + * // This results in array('fragment' => 'y', 'attributes' => + * // array('title' => t('Y'), 'class' => array('a', 'b', 'c', 'd'))). + * $correct = NestedArray::mergeDeep($link_options_1, $link_options_2); + * @endcode + * + * @param array ... + * Arrays to merge. + * + * @return array + * The merged array. + * + * @see NestedArray::mergeDeepArray() + */ + public static function mergeDeep() + { + return self::mergeDeepArray(func_get_args()); + } + + /** + * Merges multiple arrays, recursively, and returns the merged array. + * + * This function is equivalent to NestedArray::mergeDeep(), except the + * input arrays are passed as a single array parameter rather than + * a variable parameter list. + * + * The following are equivalent: + * - NestedArray::mergeDeep($a, $b); + * - NestedArray::mergeDeepArray(array($a, $b)); + * + * The following are also equivalent: + * - call_user_func_array('NestedArray::mergeDeep', $arrays_to_merge); + * - NestedArray::mergeDeepArray($arrays_to_merge); + * + * @param array $arrays + * An arrays of arrays to merge. + * @param bool $preserveIntegerKeys + * (optional) If given, integer keys will be preserved and merged + * instead of appended. Defaults to false. + * + * @return array + * The merged array. + * + * @see NestedArray::mergeDeep() + */ + public static function mergeDeepArray( + array $arrays, + $preserveIntegerKeys = false + ) { + $result = array(); + foreach ($arrays as $array) { + foreach ($array as $key => $value) { + // Renumber integer keys as array_merge_recursive() does + // unless $preserveIntegerKeys is set to TRUE. Note that PHP + // automatically converts array keys that are integer strings + // (e.g., '1') to integers. + if (is_integer($key) && !$preserveIntegerKeys) { + $result[] = $value; + } elseif (isset($result[$key]) && + is_array($result[$key]) && + is_array($value) + ) { + // Recurse when both values are arrays. + $result[$key] = self::mergeDeepArray( + array($result[$key], $value), + $preserveIntegerKeys + ); + } else { + // Otherwise, use the latter value, overriding any + // previous value. + $result[$key] = $value; + } + } + } + return $result; + } +} +// vim:sw=4:ts=4:sts=4:et: diff --git a/vendor/wikimedia/composer-merge-plugin/src/Merge/PluginState.php b/vendor/wikimedia/composer-merge-plugin/src/Merge/PluginState.php index a191c1e84..670c3284c 100644 --- a/vendor/wikimedia/composer-merge-plugin/src/Merge/PluginState.php +++ b/vendor/wikimedia/composer-merge-plugin/src/Merge/PluginState.php @@ -74,6 +74,31 @@ class PluginState */ protected $mergeExtra = false; + /** + * Whether to merge the extra section in a deep / recursive way. + * + * By default the extra section is merged with array_merge() and duplicate + * keys are ignored. When enabled this allows to merge the arrays recursively + * using the following rule: Integer keys are merged, while array values are + * replaced where the later values overwrite the former. + * + * This is useful especially for the extra section when plugins use larger + * structures like a 'patches' key with the packages as sub-keys and the + * patches as values. + * + * When 'replace' mode is activated the order of array merges is exchanged. + * + * @var bool $mergeExtraDeep + */ + protected $mergeExtraDeep = false; + + /** + * Whether to merge the scripts section. + * + * @var bool $mergeScripts + */ + protected $mergeScripts = false; + /** * @var bool $firstInstall */ @@ -116,6 +141,8 @@ class PluginState 'replace' => false, 'merge-dev' => true, 'merge-extra' => false, + 'merge-extra-deep' => false, + 'merge-scripts' => false, ), isset($extra['merge-plugin']) ? $extra['merge-plugin'] : array() ); @@ -128,6 +155,8 @@ class PluginState $this->replace = (bool)$config['replace']; $this->mergeDev = (bool)$config['merge-dev']; $this->mergeExtra = (bool)$config['merge-extra']; + $this->mergeExtraDeep = (bool)$config['merge-extra-deep']; + $this->mergeScripts = (bool)$config['merge-scripts']; } /** @@ -217,7 +246,17 @@ class PluginState */ public function isDevMode() { - return $this->mergeDev && $this->devMode; + return $this->shouldMergeDev() && $this->devMode; + } + + /** + * Should devMode settings be merged? + * + * @return bool + */ + public function shouldMergeDev() + { + return $this->mergeDev; } /** @@ -323,5 +362,39 @@ class PluginState { return $this->mergeExtra; } + + /** + * Should the extra section be merged deep / recursively? + * + * By default the extra section is merged with array_merge() and duplicate + * keys are ignored. When enabled this allows to merge the arrays recursively + * using the following rule: Integer keys are merged, while array values are + * replaced where the later values overwrite the former. + * + * This is useful especially for the extra section when plugins use larger + * structures like a 'patches' key with the packages as sub-keys and the + * patches as values. + * + * When 'replace' mode is activated the order of array merges is exchanged. + * + * @return bool + */ + public function shouldMergeExtraDeep() + { + return $this->mergeExtraDeep; + } + + + /** + * Should the scripts section be merged? + * + * By default, the scripts section is not merged. + * + * @return bool + */ + public function shouldMergeScripts() + { + return $this->mergeScripts; + } } // vim:sw=4:ts=4:sts=4:et: diff --git a/vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php b/vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php index ea41d41a5..7eab0460e 100644 --- a/vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php +++ b/vendor/wikimedia/composer-merge-plugin/src/MergePlugin.php @@ -16,6 +16,7 @@ use Wikimedia\Composer\Merge\PluginState; use Composer\Composer; use Composer\DependencyResolver\Operation\InstallOperation; +use Composer\EventDispatcher\Event as BaseEvent; use Composer\EventDispatcher\EventSubscriberInterface; use Composer\Factory; use Composer\Installer; @@ -26,7 +27,7 @@ use Composer\Installer\PackageEvents; use Composer\IO\IOInterface; use Composer\Package\RootPackageInterface; use Composer\Plugin\PluginInterface; -use Composer\Script\Event; +use Composer\Script\Event as ScriptEvent; use Composer\Script\ScriptEvents; /** @@ -86,6 +87,16 @@ class MergePlugin implements PluginInterface, EventSubscriberInterface */ const PACKAGE_NAME = 'wikimedia/composer-merge-plugin'; + /** + * Name of the composer 1.1 init event. + */ + const COMPAT_PLUGINEVENTS_INIT = 'init'; + + /** + * Priority that plugin uses to register callbacks. + */ + const CALLBACK_PRIORITY = 50000; + /** * @var Composer $composer */ @@ -102,11 +113,18 @@ class MergePlugin implements PluginInterface, EventSubscriberInterface protected $logger; /** - * Files that have already been processed + * Files that have already been fully processed * - * @var string[] $loadedFiles + * @var string[] $loaded */ - protected $loadedFiles = array(); + protected $loaded = array(); + + /** + * Files that have already been partially processed + * + * @var string[] $loadedNoDev + */ + protected $loadedNoDev = array(); /** * {@inheritdoc} @@ -124,24 +142,52 @@ class MergePlugin implements PluginInterface, EventSubscriberInterface public static function getSubscribedEvents() { return array( - InstallerEvents::PRE_DEPENDENCIES_SOLVING => 'onDependencySolve', - PackageEvents::POST_PACKAGE_INSTALL => 'onPostPackageInstall', - ScriptEvents::POST_INSTALL_CMD => 'onPostInstallOrUpdate', - ScriptEvents::POST_UPDATE_CMD => 'onPostInstallOrUpdate', - ScriptEvents::PRE_AUTOLOAD_DUMP => 'onInstallUpdateOrDump', - ScriptEvents::PRE_INSTALL_CMD => 'onInstallUpdateOrDump', - ScriptEvents::PRE_UPDATE_CMD => 'onInstallUpdateOrDump', + // Use our own constant to make this event optional. Once + // composer-1.1 is required, this can use PluginEvents::INIT + // instead. + self::COMPAT_PLUGINEVENTS_INIT => + array('onInit', self::CALLBACK_PRIORITY), + InstallerEvents::PRE_DEPENDENCIES_SOLVING => + array('onDependencySolve', self::CALLBACK_PRIORITY), + PackageEvents::POST_PACKAGE_INSTALL => + array('onPostPackageInstall', self::CALLBACK_PRIORITY), + ScriptEvents::POST_INSTALL_CMD => + array('onPostInstallOrUpdate', self::CALLBACK_PRIORITY), + ScriptEvents::POST_UPDATE_CMD => + array('onPostInstallOrUpdate', self::CALLBACK_PRIORITY), + ScriptEvents::PRE_AUTOLOAD_DUMP => + array('onInstallUpdateOrDump', self::CALLBACK_PRIORITY), + ScriptEvents::PRE_INSTALL_CMD => + array('onInstallUpdateOrDump', self::CALLBACK_PRIORITY), + ScriptEvents::PRE_UPDATE_CMD => + array('onInstallUpdateOrDump', self::CALLBACK_PRIORITY), ); } + /** + * Handle an event callback for initialization. + * + * @param \Composer\EventDispatcher\Event $event + */ + public function onInit(BaseEvent $event) + { + $this->state->loadSettings(); + // It is not possible to know if the user specified --dev or --no-dev + // so assume it is false. The dev section will be merged later when + // the other events fire. + $this->state->setDevMode(false); + $this->mergeFiles($this->state->getIncludes(), false); + $this->mergeFiles($this->state->getRequires(), true); + } + /** * Handle an event callback for an install, update or dump command by * checking for "merge-plugin" in the "extra" data and merging package * contents if found. * - * @param Event $event + * @param ScriptEvent $event */ - public function onInstallUpdateOrDump(Event $event) + public function onInstallUpdateOrDump(ScriptEvent $event) { $this->state->loadSettings(); $this->state->setDevMode($event->isDevMode()); @@ -196,16 +242,32 @@ class MergePlugin implements PluginInterface, EventSubscriberInterface */ protected function mergeFile(RootPackageInterface $root, $path) { - if (isset($this->loadedFiles[$path])) { - $this->logger->debug("Already merged $path"); + if (isset($this->loaded[$path]) || + (isset($this->loadedNoDev[$path]) && !$this->state->isDevMode()) + ) { + $this->logger->debug( + "Already merged $path completely" + ); return; - } else { - $this->loadedFiles[$path] = true; } - $this->logger->info("Loading {$path}..."); $package = new ExtraPackage($path, $this->composer, $this->logger); - $package->mergeInto($root, $this->state); + + if (isset($this->loadedNoDev[$path])) { + $this->logger->info( + "Loading -dev sections of {$path}..." + ); + $package->mergeDevInto($root, $this->state); + } else { + $this->logger->info("Loading {$path}..."); + $package->mergeInto($root, $this->state); + } + + if ($this->state->isDevMode()) { + $this->loaded[$path] = true; + } else { + $this->loadedNoDev[$path] = true; + } if ($this->state->recurseIncludes()) { $this->mergeFiles($package->getIncludes(), false); @@ -230,7 +292,12 @@ class MergePlugin implements PluginInterface, EventSubscriberInterface ); $request->install($link->getTarget(), $link->getConstraint()); } - if ($this->state->isDevMode()) { + + // Issue #113: Check devMode of event rather than our global state. + // Composer fires the PRE_DEPENDENCIES_SOLVING event twice for + // `--no-dev` operations to decide which packages are dev only + // requirements. + if ($this->state->shouldMergeDev() && $event->isDevMode()) { foreach ($this->state->getDuplicateLinks('require-dev') as $link) { $this->logger->info( "Adding dev dependency {$link}" @@ -266,9 +333,9 @@ class MergePlugin implements PluginInterface, EventSubscriberInterface * plugin was installed during the run then trigger an update command to * process any merge-patterns in the current config. * - * @param Event $event + * @param ScriptEvent $event */ - public function onPostInstallOrUpdate(Event $event) + public function onPostInstallOrUpdate(ScriptEvent $event) { // @codeCoverageIgnoreStart if ($this->state->isFirstInstall()) { diff --git a/vendor/zendframework/zend-diactoros/.coveralls.yml b/vendor/zendframework/zend-diactoros/.coveralls.yml index 53bda829c..bc71b62f8 100644 --- a/vendor/zendframework/zend-diactoros/.coveralls.yml +++ b/vendor/zendframework/zend-diactoros/.coveralls.yml @@ -1,3 +1,2 @@ coverage_clover: clover.xml json_path: coveralls-upload.json -src_dir: src diff --git a/vendor/zendframework/zend-diactoros/CHANGELOG.md b/vendor/zendframework/zend-diactoros/CHANGELOG.md index 57b0a8717..cc62a757c 100644 --- a/vendor/zendframework/zend-diactoros/CHANGELOG.md +++ b/vendor/zendframework/zend-diactoros/CHANGELOG.md @@ -2,11 +2,408 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 1.3.11 - TBD + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + +## 1.3.10 - 2017-01-23 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#226](https://github.com/zendframework/zend-diactoros/pull/226) fixed an + issue with the `SapiStreamEmitter` causing the response body to be cast + to `(string)` and also be read as a readable stream, potentially producing + double output. + +## 1.3.9 - 2017-01-17 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#223](https://github.com/zendframework/zend-diactoros/issues/223) + [#224](https://github.com/zendframework/zend-diactoros/pull/224) fixed an issue + with the `SapiStreamEmitter` consuming too much memory when producing output + for readable bodies. + +## 1.3.8 - 2017-01-05 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#222](https://github.com/zendframework/zend-diactoros/pull/222) fixes the + `SapiStreamEmitter`'s handling of the `Content-Range` header to properly only + emit a range of bytes if the header value is in the form `bytes {first-last}/length`. + This allows using other range units, such as `items`, without incorrectly + emitting truncated content. + +## 1.3.7 - 2016-10-11 + +### Added + +- [#208](https://github.com/zendframework/zend-diactoros/pull/208) adds several + missing response codes to `Zend\Diactoros\Response`, including: + - 226 ('IM used') + - 308 ('Permanent Redirect') + - 444 ('Connection Closed Without Response') + - 499 ('Client Closed Request') + - 510 ('Not Extended') + - 599 ('Network Connect Timeout Error') +- [#211](https://github.com/zendframework/zend-diactoros/pull/211) adds support + for UTF-8 characters in query strings handled by `Zend\Diactoros\Uri`. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + +## 1.3.6 - 2016-09-07 + +### Added + +- [#170](https://github.com/zendframework/zend-diactoros/pull/170) prepared + documentation for publication at https://zendframework.github.io/zend-diactoros/ +- [#165](https://github.com/zendframework/zend-diactoros/pull/165) adds support + for Apache `REDIRECT_HTTP_*` header detection in the `ServerRequestFactory`. +- [#166](https://github.com/zendframework/zend-diactoros/pull/166) adds support + for UTF-8 characters in URI paths. +- [#204](https://github.com/zendframework/zend-diactoros/pull/204) adds testing + against PHP 7.1 release-candidate builds. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#186](https://github.com/zendframework/zend-diactoros/pull/186) fixes a typo + in a variable name within the `SapiStreamEmitter`. +- [#200](https://github.com/zendframework/zend-diactoros/pull/200) updates the + `SapiStreamEmitter` to implement a check for `isSeekable()` prior to attempts + to rewind; this allows it to work with non-seekable streams such as the + `CallbackStream`. +- [#169](https://github.com/zendframework/zend-diactoros/pull/169) ensures that + response serialization always provides a `\r\n\r\n` sequence following the + headers, even when no message body is present, to ensure it conforms with RFC + 7230. +- [#175](https://github.com/zendframework/zend-diactoros/pull/175) updates the + `Request` class to set the `Host` header from the URI host if no header is + already present. (Ensures conformity with PSR-7 specification.) +- [#197](https://github.com/zendframework/zend-diactoros/pull/197) updates the + `Uri` class to ensure that string serialization does not include a colon after + the host name if no port is present in the instance. + +## 1.3.5 - 2016-03-17 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#160](https://github.com/zendframework/zend-diactoros/pull/160) fixes HTTP + protocol detection in the `ServerRequestFactory` to work correctly with HTTP/2. + +## 1.3.4 - 2016-03-17 + +### Added + +- [#119](https://github.com/zendframework/zend-diactoros/pull/119) adds the 451 + (Unavailable for Legal Reasons) status code to the `Response` class. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#117](https://github.com/zendframework/zend-diactoros/pull/117) provides + validation of the HTTP protocol version. +- [#127](https://github.com/zendframework/zend-diactoros/pull/127) now properly + removes attributes with `null` values when calling `withoutAttribute()`. +- [#132](https://github.com/zendframework/zend-diactoros/pull/132) updates the + `ServerRequestFactory` to marshal the request path fragment, if present. +- [#142](https://github.com/zendframework/zend-diactoros/pull/142) updates the + exceptions thrown by `HeaderSecurity` to include the header name and/or + value. +- [#148](https://github.com/zendframework/zend-diactoros/pull/148) fixes several + stream operations to ensure they raise exceptions when the internal pointer + is at an invalid position. +- [#151](https://github.com/zendframework/zend-diactoros/pull/151) ensures + URI fragments are properly encoded. + +## 1.3.3 - 2016-01-04 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#135](https://github.com/zendframework/zend-diactoros/pull/135) fixes the + behavior of `ServerRequestFactory::marshalHeaders()` to no longer omit + `Cookie` headers from the aggregated headers. While the values are parsed and + injected into the cookie params, it's useful to have access to the raw headers + as well. + +## 1.3.2 - 2015-12-22 + +### Added + +- [#124](https://github.com/zendframework/zend-diactoros/pull/124) adds four + more optional arguments to the `ServerRequest` constructor: + - `array $cookies` + - `array $queryParams` + - `null|array|object $parsedBody` + - `string $protocolVersion` + `ServerRequestFactory` was updated to pass values for each of these parameters + when creating an instance, instead of using the related `with*()` methods on + an instance. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#122](https://github.com/zendframework/zend-diactoros/pull/122) updates the + `ServerRequestFactory` to retrieve the HTTP protocol version and inject it in + the generated `ServerRequest`, which previously was not performed. + +## 1.3.1 - 2015-12-16 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#113](https://github.com/zendframework/zend-diactoros/pull/113) fixes an + issue in the response serializer, ensuring that the status code in the + deserialized response is an integer. +- [#115](https://github.com/zendframework/zend-diactoros/pull/115) fixes an + issue in the various text-basd response types (`TextResponse`, `HtmlResponse`, + and `JsonResponse`); due to the fact that the constructor was not + rewinding the message body stream, `getContents()` was thus returning `null`, + as the pointer was at the end of the stream. The constructor now rewinds the + stream after populating it in the constructor. + +## 1.3.0 - 2015-12-15 + +### Added + +- [#110](https://github.com/zendframework/zend-diactoros/pull/110) adds + `Zend\Diactoros\Response\SapiEmitterTrait`, which provides the following + private method definitions: + - `injectContentLength()` + - `emitStatusLine()` + - `emitHeaders()` + - `flush()` + - `filterHeader()` + The `SapiEmitter` implementation has been updated to remove those methods and + instead compose the trait. +- [#111](https://github.com/zendframework/zend-diactoros/pull/111) adds + a new emitter implementation, `SapiStreamEmitter`; this emitter type will + loop through the stream instead of emitting it in one go, and supports content + ranges. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + +## 1.2.1 - 2015-12-15 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#101](https://github.com/zendframework/zend-diactoros/pull/101) fixes the + `withHeader()` implementation to ensure that if the header existed previously + but using a different casing strategy, the previous version will be removed + in the cloned instance. +- [#103](https://github.com/zendframework/zend-diactoros/pull/103) fixes the + constructor of `Response` to ensure that null status codes are not possible. +- [#99](https://github.com/zendframework/zend-diactoros/pull/99) fixes + validation of header values submitted via request and response constructors as + follows: + - numeric (integer and float) values are now properly allowed (this solves + some reported issues with setting Content-Length headers) + - invalid header names (non-string values or empty strings) now raise an + exception. + - invalid individual header values (non-string, non-numeric) now raise an + exception. + +## 1.2.0 - 2015-11-24 + +### Added + +- [#88](https://github.com/zendframework/zend-diactoros/pull/88) updates the + `SapiEmitter` to emit a `Content-Length` header with the content length as + reported by the response body stream, assuming that + `StreamInterface::getSize()` returns an integer. +- [#77](https://github.com/zendframework/zend-diactoros/pull/77) adds a new + response type, `Zend\Diactoros\Response\TextResponse`, for returning plain + text responses. By default, it sets the content type to `text/plain; + charset=utf-8`; per the other response types, the signature is `new + TextResponse($text, $status = 200, array $headers = [])`. +- [#90](https://github.com/zendframework/zend-diactoros/pull/90) adds a new + `Zend\Diactoros\CallbackStream`, allowing you to back a stream with a PHP + callable (such as a generator) to generate the message content. Its + constructor accepts the callable: `$stream = new CallbackStream($callable);` + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#77](https://github.com/zendframework/zend-diactoros/pull/77) updates the + `HtmlResponse` to set the charset to utf-8 by default (if no content type + header is provided at instantiation). + +## 1.1.4 - 2015-10-16 + +### Added + +- [#98](https://github.com/zendframework/zend-diactoros/pull/98) adds + `JSON_UNESCAPED_SLASHES` to the default `json_encode` flags used by + `Zend\Diactoros\Response\JsonResponse`. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#96](https://github.com/zendframework/zend-diactoros/pull/96) updates + `withPort()` to allow `null` port values (indicating usage of default for + the given scheme). +- [#91](https://github.com/zendframework/zend-diactoros/pull/91) fixes the + logic of `withUri()` to do a case-insensitive check for an existing `Host` + header, replacing it with the new one. + ## 1.1.3 - 2015-08-10 ### Added -- Nothing. +- [#73](https://github.com/zendframework/zend-diactoros/pull/73) adds caching of + the vendor directory to the Travis-CI configuration, to speed up builds. ### Deprecated @@ -181,7 +578,7 @@ immediately. - [#57](https://github.com/zendframework/zend-diactoros/pull/57) fixes the behavior of how the `ServerRequestFactory` marshals upload files when they are represented as a nested associative array. -- [#49](https://github.com/zendframework/zend-diactoros/pull/49) provides several +- [#49](https://github.com/zendframework/zend-diactoros/pull/49) provides several fixes that ensure that Diactoros complies with the PSR-7 specification: - `MessageInterface::getHeaderLine()` MUST return a string (that string CAN be empty). Previously, Diactoros would return `null`. diff --git a/vendor/zendframework/zend-diactoros/CONDUCT.md b/vendor/zendframework/zend-diactoros/CONDUCT.md new file mode 100644 index 000000000..c663d2be9 --- /dev/null +++ b/vendor/zendframework/zend-diactoros/CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) +as its guidelines for contributor interactions. + +## The Code Manifesto + +We want to work in an ecosystem that empowers developers to reach their +potential — one that encourages growth and effective collaboration. A space that +is safe for all. + +A space such as this benefits everyone that participates in it. It encourages +new developers to enter our field. It is through discussion and collaboration +that we grow, and through growth that we improve. + +In the effort to create such a place, we hold to these values: + +1. **Discrimination limits us.** This includes discrimination on the basis of + race, gender, sexual orientation, gender identity, age, nationality, technology + and any other arbitrary exclusion of a group of people. +2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort + levels. Remember that, and if brought to your attention, heed it. +3. **We are our biggest assets.** None of us were born masters of our trade. + Each of us has been helped along the way. Return that favor, when and where + you can. +4. **We are resources for the future.** As an extension of #3, share what you + know. Make yourself a resource to help those that come after you. +5. **Respect defines us.** Treat others as you wish to be treated. Make your + discussions, criticisms and debates from a position of respectfulness. Ask + yourself, is it true? Is it necessary? Is it constructive? Anything less is + unacceptable. +6. **Reactions require grace.** Angry responses are valid, but abusive language + and vindictive actions are toxic. When something happens that offends you, + handle it assertively, but be respectful. Escalate reasonably, and try to + allow the offender an opportunity to explain themselves, and possibly correct + the issue. +7. **Opinions are just that: opinions.** Each and every one of us, due to our + background and upbringing, have varying opinions. The fact of the matter, is + that is perfectly acceptable. Remember this: if you respect your own + opinions, you should respect the opinions of others. +8. **To err is human.** You might not intend it, but mistakes do happen and + contribute to build experience. Tolerate honest mistakes, and don't hesitate + to apologize if you make one yourself. diff --git a/vendor/zendframework/zend-diactoros/CONTRIBUTING.md b/vendor/zendframework/zend-diactoros/CONTRIBUTING.md index d99a16cb0..817ba7bff 100644 --- a/vendor/zendframework/zend-diactoros/CONTRIBUTING.md +++ b/vendor/zendframework/zend-diactoros/CONTRIBUTING.md @@ -78,14 +78,14 @@ standards checks, and provides configuration for our selected checks. To run checks only: ```console -$ ./vendor/bin/phpcs --standard=PSR2 src test +$ composer cs-check ``` `phpcs` also installs a tool named `phpcbf` which can attempt to fix problems for you: ```console -$ ./vendor/bin/phpcbf --standard=PSR2 src test +$ composer cs-fix ``` If you allow phpcbf to fix CS issues, please re-run the tests to ensure @@ -102,7 +102,7 @@ pull your work into the master repository. We recommend using 3. Clone the canonical repository locally and enter it. ```console - $ git clone git://github.com:zendframework/zend-diactoros.git + $ git clone git://github.com/zendframework/zend-diactoros.git $ cd zend-diactoros ``` @@ -221,3 +221,8 @@ repository, we suggest doing some cleanup of these branches. ```console $ git push {username} : ``` + + +## Conduct + +Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/vendor/zendframework/zend-diactoros/LICENSE.md b/vendor/zendframework/zend-diactoros/LICENSE.md index b401e72de..c7e9a85d7 100644 --- a/vendor/zendframework/zend-diactoros/LICENSE.md +++ b/vendor/zendframework/zend-diactoros/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2015, Zend Technologies USA, Inc. +Copyright (c) 2015-2016, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/vendor/zendframework/zend-diactoros/README.md b/vendor/zendframework/zend-diactoros/README.md index b25dc9b30..fadb18c24 100644 --- a/vendor/zendframework/zend-diactoros/README.md +++ b/vendor/zendframework/zend-diactoros/README.md @@ -18,17 +18,11 @@ This package supercedes and replaces [phly/http](https://github.com/phly/http). ## Documentation -Documentation is [in the doc tree](doc/), and can be compiled using [bookdown](http://bookdown.io): +Documentation is available at: -```console -$ bookdown doc/bookdown.json -$ php -S 0.0.0.0:8080 -t doc/html/ # then browse to http://localhost:8080/ -``` +- https://zendframework.github.io/zend-diactoros/ -> ### Bookdown -> -> You can install bookdown globally using `composer global require bookdown/bookdown`. If you do -> this, make sure that `$HOME/.composer/vendor/bin` is on your `$PATH`. +Source files for documentation are [in the doc/ tree](doc/). [Master]: https://travis-ci.org/zendframework/zend-diactoros [Master image]: https://secure.travis-ci.org/zendframework/zend-diactoros.svg?branch=master diff --git a/vendor/zendframework/zend-diactoros/composer.json b/vendor/zendframework/zend-diactoros/composer.json index fee75d9a0..2c1ff232e 100644 --- a/vendor/zendframework/zend-diactoros/composer.json +++ b/vendor/zendframework/zend-diactoros/composer.json @@ -15,17 +15,17 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0-dev", - "dev-develop": "1.1-dev" + "dev-master": "1.3-dev", + "dev-develop": "1.4-dev" } }, "require": { - "php": ">=5.4", + "php": "^5.4 || ^7.0", "psr/http-message": "~1.0" }, "require-dev": { - "phpunit/PHPUnit": "~4.6", - "squizlabs/php_codesniffer": "^2.3.1" + "phpunit/phpunit": "^4.6 || ^5.5", + "zendframework/zend-coding-standard": "~1.0.0" }, "provide": { "psr/http-message-implementation": "~1.0.0" @@ -43,5 +43,16 @@ "test/TestAsset/Functions.php", "test/TestAsset/SapiResponse.php" ] + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "upload-coverage": "coveralls -v", + "cs-check": "phpcs", + "cs-fix": "phpcbf", + "test": "phpunit --colors=always", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" } } diff --git a/vendor/zendframework/zend-diactoros/composer.lock b/vendor/zendframework/zend-diactoros/composer.lock new file mode 100644 index 000000000..80cbd589e --- /dev/null +++ b/vendor/zendframework/zend-diactoros/composer.lock @@ -0,0 +1,1136 @@ +{ + "_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", + "This file is @generated automatically" + ], + "hash": "77ed7a996f66132276ba759203317dcb", + "content-hash": "139a8c89b45a5dd6d78ec93ee92cee90", + "packages": [ + { + "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-06 14:39:51" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "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" + }, + "require-dev": { + "phpspec/phpspec": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-06-07 08:13:47" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "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" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06 15:47:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12 18:03:57" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.27", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90", + "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90", + "shasum": "" + }, + "require": { + "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" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2016-07-21 06:48:14" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02 06:51:40" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "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" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-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" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-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": "2016-08-18 05:49:44" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "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" + }, + { + "name": "Adam Harvey", + "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" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.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": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "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": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "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" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "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" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", + "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "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": "2016-09-01 23:53:02" + }, + { + "name": "symfony/yaml", + "version": "v2.8.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-09-02 01:57:56" + }, + { + "name": "zendframework/zend-coding-standard", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-coding-standard.git", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-coding-standard/zipball/893316d2904e93f1c74c1384b6d7d57778299cb6", + "reference": "893316d2904e93f1c74c1384b6d7d57778299cb6", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Zend Framework coding standard", + "keywords": [ + "Coding Standard", + "zf" + ], + "time": "2016-11-09 21:30:43" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^5.4 || ^7.0" + }, + "platform-dev": [] +} diff --git a/vendor/zendframework/zend-diactoros/mkdocs.yml b/vendor/zendframework/zend-diactoros/mkdocs.yml new file mode 100644 index 000000000..a08660646 --- /dev/null +++ b/vendor/zendframework/zend-diactoros/mkdocs.yml @@ -0,0 +1,16 @@ +docs_dir: doc/book +site_dir: doc/html +pages: + - index.md + - Overview: overview.md + - Installation: install.md + - Usage: usage.md + - Reference: + - "Custom Responses": custom-responses.md + - "Emitting Responses": emitting-responses.md + - Serialization: serialization.md + - API: api.md +site_name: zend-diactoros +site_description: 'zend-diactoros: PSR-7 HTTP message implementation' +repo_url: 'https://github.com/zendframework/zend-diactoros' +copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' diff --git a/vendor/zendframework/zend-diactoros/src/AbstractSerializer.php b/vendor/zendframework/zend-diactoros/src/AbstractSerializer.php index a55ca5a3f..9ee9afd0c 100644 --- a/vendor/zendframework/zend-diactoros/src/AbstractSerializer.php +++ b/vendor/zendframework/zend-diactoros/src/AbstractSerializer.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/CallbackStream.php b/vendor/zendframework/zend-diactoros/src/CallbackStream.php new file mode 100644 index 000000000..c8e6bc6fc --- /dev/null +++ b/vendor/zendframework/zend-diactoros/src/CallbackStream.php @@ -0,0 +1,181 @@ +attach($callback); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return $this->getContents(); + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->callback = null; + } + + /** + * {@inheritdoc} + */ + public function detach() + { + $callback = $this->callback; + $this->callback = null; + return $callback; + } + + /** + * Attach a new callback to the instance. + * + * @param callable $callback + * @throws InvalidArgumentException for callable callback + */ + public function attach(callable $callback) + { + $this->callback = $callback; + } + + /** + * {@inheritdoc} + */ + public function getSize() + { + } + + /** + * {@inheritdoc} + */ + public function tell() + { + throw new RuntimeException('Callback streams cannot tell position'); + } + + /** + * {@inheritdoc} + */ + public function eof() + { + return empty($this->callback); + } + + /** + * {@inheritdoc} + */ + public function isSeekable() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + throw new RuntimeException('Callback streams cannot seek position'); + } + + /** + * {@inheritdoc} + */ + public function rewind() + { + throw new RuntimeException('Callback streams cannot rewind position'); + } + + /** + * {@inheritdoc} + */ + public function isWritable() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function write($string) + { + throw new RuntimeException('Callback streams cannot write'); + } + + /** + * {@inheritdoc} + */ + public function isReadable() + { + return false; + } + + /** + * {@inheritdoc} + */ + public function read($length) + { + throw new RuntimeException('Callback streams cannot read'); + } + + /** + * {@inheritdoc} + */ + public function getContents() + { + $callback = $this->detach(); + return $callback ? $callback() : ''; + } + + /** + * {@inheritdoc} + */ + public function getMetadata($key = null) + { + $metadata = [ + 'eof' => $this->eof(), + 'stream_type' => 'callback', + 'seekable' => false + ]; + + if (null === $key) { + return $metadata; + } + + if (! array_key_exists($key, $metadata)) { + return null; + } + + return $metadata[$key]; + } +} diff --git a/vendor/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php b/vendor/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php index bdef44a1c..59a2e4194 100644 --- a/vendor/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php +++ b/vendor/zendframework/zend-diactoros/src/Exception/DeprecatedMethodException.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/Exception/ExceptionInterface.php b/vendor/zendframework/zend-diactoros/src/Exception/ExceptionInterface.php index a2b22fbfd..4bb54df80 100644 --- a/vendor/zendframework/zend-diactoros/src/Exception/ExceptionInterface.php +++ b/vendor/zendframework/zend-diactoros/src/Exception/ExceptionInterface.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/HeaderSecurity.php b/vendor/zendframework/zend-diactoros/src/HeaderSecurity.php index 231beac06..68dc6a19b 100644 --- a/vendor/zendframework/zend-diactoros/src/HeaderSecurity.php +++ b/vendor/zendframework/zend-diactoros/src/HeaderSecurity.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -24,6 +24,7 @@ final class HeaderSecurity { /** * Private constructor; non-instantiable. + * @codeCoverageIgnore */ private function __construct() { @@ -129,7 +130,10 @@ final class HeaderSecurity public static function assertValid($value) { if (! self::isValid($value)) { - throw new InvalidArgumentException('Invalid header value'); + throw new InvalidArgumentException(sprintf( + '"%s" is not valid header value', + $value + )); } } @@ -143,7 +147,10 @@ final class HeaderSecurity public static function assertValidName($name) { if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $name)) { - throw new InvalidArgumentException('Invalid header name'); + throw new InvalidArgumentException(sprintf( + '"%s" is not valid header name', + $name + )); } } } diff --git a/vendor/zendframework/zend-diactoros/src/MessageTrait.php b/vendor/zendframework/zend-diactoros/src/MessageTrait.php index 1b3fc6f51..f81a5e9f7 100644 --- a/vendor/zendframework/zend-diactoros/src/MessageTrait.php +++ b/vendor/zendframework/zend-diactoros/src/MessageTrait.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -70,6 +70,7 @@ trait MessageTrait */ public function withProtocolVersion($version) { + $this->validateProtocolVersion($version); $new = clone $this; $new->protocol = $version; return $new; @@ -204,6 +205,9 @@ trait MessageTrait $normalized = strtolower($header); $new = clone $this; + if ($new->hasHeader($header)) { + unset($new->headers[$new->headerNames[$normalized]]); + } $new->headerNames[$normalized] = $header; $new->headers[$header] = $value; @@ -310,6 +314,23 @@ trait MessageTrait return $new; } + private function getStream($stream, $modeIfNotInstance) + { + if ($stream instanceof StreamInterface) { + return $stream; + } + + if (! is_string($stream) && ! is_resource($stream)) { + throw new InvalidArgumentException( + 'Stream must be a string stream resource identifier, ' + . 'an actual stream resource, ' + . 'or a Psr\Http\Message\StreamInterface implementation' + ); + } + + return new Stream($stream, $modeIfNotInstance); + } + /** * Test that an array contains only strings * @@ -334,11 +355,28 @@ trait MessageTrait $headerNames = $headers = []; foreach ($originalHeaders as $header => $value) { if (! is_string($header)) { - continue; + throw new InvalidArgumentException(sprintf( + 'Invalid header name; expected non-empty string, received %s', + gettype($header) + )); } - if (! is_array($value) && ! is_string($value)) { - continue; + if (! is_array($value) && ! is_string($value) && ! is_numeric($value)) { + throw new InvalidArgumentException(sprintf( + 'Invalid header value type; expected number, string, or array; received %s', + (is_object($value) ? get_class($value) : gettype($value)) + )); + } + + if (is_array($value)) { + array_walk($value, function ($item) { + if (! is_string($item) && ! is_numeric($item)) { + throw new InvalidArgumentException(sprintf( + 'Invalid header value type; expected number, string, or array; received %s', + (is_object($item) ? get_class($item) : gettype($item)) + )); + } + }); } if (! is_array($value)) { @@ -380,4 +418,34 @@ trait MessageTrait { array_walk($values, __NAMESPACE__ . '\HeaderSecurity::assertValid'); } + + /** + * Validate the HTTP protocol version + * + * @param string $version + * @throws InvalidArgumentException on invalid HTTP protocol version + */ + private function validateProtocolVersion($version) + { + if (empty($version)) { + throw new InvalidArgumentException(sprintf( + 'HTTP protocol version can not be empty' + )); + } + if (! is_string($version)) { + throw new InvalidArgumentException(sprintf( + 'Unsupported HTTP protocol version; must be a string, received %s', + (is_object($version) ? get_class($version) : gettype($version)) + )); + } + + // HTTP/1 uses a "." numbering scheme to indicate + // versions of the protocol, while HTTP/2 does not. + if (! preg_match('#^(1\.[01]|2)$#', $version)) { + throw new InvalidArgumentException(sprintf( + 'Unsupported HTTP protocol version "%s" provided', + $version + )); + } + } } diff --git a/vendor/zendframework/zend-diactoros/src/PhpInputStream.php b/vendor/zendframework/zend-diactoros/src/PhpInputStream.php index a035234e0..58bd1e472 100644 --- a/vendor/zendframework/zend-diactoros/src/PhpInputStream.php +++ b/vendor/zendframework/zend-diactoros/src/PhpInputStream.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -26,12 +26,10 @@ class PhpInputStream extends Stream /** * @param string|resource $stream - * @param string $mode */ - public function __construct($stream = 'php://input', $mode = 'r') + public function __construct($stream = 'php://input') { - $mode = 'r'; - parent::__construct($stream, $mode); + parent::__construct($stream, 'r'); } /** diff --git a/vendor/zendframework/zend-diactoros/src/RelativeStream.php b/vendor/zendframework/zend-diactoros/src/RelativeStream.php index f293d519e..631c41e0f 100644 --- a/vendor/zendframework/zend-diactoros/src/RelativeStream.php +++ b/vendor/zendframework/zend-diactoros/src/RelativeStream.php @@ -3,13 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ namespace Zend\Diactoros; use Psr\Http\Message\StreamInterface; +use RuntimeException; /** * Class RelativeStream @@ -131,6 +132,9 @@ final class RelativeStream implements StreamInterface */ public function write($string) { + if ($this->tell() < 0) { + throw new RuntimeException('Invalid pointer position'); + } return $this->decoratedStream->write($string); } @@ -147,6 +151,9 @@ final class RelativeStream implements StreamInterface */ public function read($length) { + if ($this->tell() < 0) { + throw new RuntimeException('Invalid pointer position'); + } return $this->decoratedStream->read($length); } @@ -155,6 +162,9 @@ final class RelativeStream implements StreamInterface */ public function getContents() { + if ($this->tell() < 0) { + throw new RuntimeException('Invalid pointer position'); + } return $this->decoratedStream->getContents(); } diff --git a/vendor/zendframework/zend-diactoros/src/Request.php b/vendor/zendframework/zend-diactoros/src/Request.php index 6e00c2529..b33422ef3 100644 --- a/vendor/zendframework/zend-diactoros/src/Request.php +++ b/vendor/zendframework/zend-diactoros/src/Request.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -11,6 +11,7 @@ namespace Zend\Diactoros; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\StreamInterface; +use Psr\Http\Message\UriInterface; /** * HTTP Request encapsulation @@ -24,7 +25,7 @@ class Request implements RequestInterface use MessageTrait, RequestTrait; /** - * @param null|string $uri URI for the request, if any. + * @param null|string|UriInterface $uri URI for the request, if any. * @param null|string $method HTTP method for the request, if any. * @param string|resource|StreamInterface $body Message body, if any. * @param array $headers Headers for the message, if any. @@ -42,7 +43,7 @@ class Request implements RequestInterface { $headers = $this->headers; if (! $this->hasHeader('host') - && ($this->uri && $this->uri->getHost()) + && $this->uri->getHost() ) { $headers['Host'] = [$this->getHostFromUri()]; } @@ -57,7 +58,7 @@ class Request implements RequestInterface { if (! $this->hasHeader($header)) { if (strtolower($header) === 'host' - && ($this->uri && $this->uri->getHost()) + && $this->uri->getHost() ) { return [$this->getHostFromUri()]; } diff --git a/vendor/zendframework/zend-diactoros/src/Request/Serializer.php b/vendor/zendframework/zend-diactoros/src/Request/Serializer.php index d7c8d131b..8f45e5edf 100644 --- a/vendor/zendframework/zend-diactoros/src/Request/Serializer.php +++ b/vendor/zendframework/zend-diactoros/src/Request/Serializer.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -76,6 +76,10 @@ final class Serializer extends AbstractSerializer */ public static function toString(RequestInterface $request) { + $httpMethod = $request->getMethod(); + if (empty($httpMethod)) { + throw new UnexpectedValueException('Object can not be serialized because HTTP method is empty'); + } $headers = self::serializeHeaders($request->getHeaders()); $body = (string) $request->getBody(); $format = '%s %s HTTP/%s%s%s'; @@ -89,7 +93,7 @@ final class Serializer extends AbstractSerializer return sprintf( $format, - $request->getMethod(), + $httpMethod, $request->getRequestTarget(), $request->getProtocolVersion(), $headers, diff --git a/vendor/zendframework/zend-diactoros/src/RequestTrait.php b/vendor/zendframework/zend-diactoros/src/RequestTrait.php index 2ef15a949..69d0d703c 100644 --- a/vendor/zendframework/zend-diactoros/src/RequestTrait.php +++ b/vendor/zendframework/zend-diactoros/src/RequestTrait.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -43,7 +43,7 @@ trait RequestTrait private $requestTarget; /** - * @var null|UriInterface + * @var UriInterface */ private $uri; @@ -52,7 +52,7 @@ trait RequestTrait * * Used by constructors. * - * @param null|string $uri URI for the request, if any. + * @param null|string|UriInterface $uri URI for the request, if any. * @param null|string $method HTTP method for the request, if any. * @param string|resource|StreamInterface $body Message body, if any. * @param array $headers Headers for the message, if any. @@ -60,33 +60,54 @@ trait RequestTrait */ private function initialize($uri = null, $method = null, $body = 'php://memory', array $headers = []) { - if (! $uri instanceof UriInterface && ! is_string($uri) && null !== $uri) { - throw new InvalidArgumentException( - 'Invalid URI provided; must be null, a string, or a Psr\Http\Message\UriInterface instance' - ); - } - $this->validateMethod($method); - if (! is_string($body) && ! is_resource($body) && ! $body instanceof StreamInterface) { - throw new InvalidArgumentException( - 'Body must be a string stream resource identifier, ' - . 'an actual stream resource, ' - . 'or a Psr\Http\Message\StreamInterface implementation' - ); - } - - if (is_string($uri)) { - $uri = new Uri($uri); - } - $this->method = $method ?: ''; - $this->uri = $uri ?: new Uri(); - $this->stream = ($body instanceof StreamInterface) ? $body : new Stream($body, 'wb+'); + $this->uri = $this->createUri($uri); + $this->stream = $this->getStream($body, 'wb+'); list($this->headerNames, $headers) = $this->filterHeaders($headers); $this->assertHeaders($headers); $this->headers = $headers; + + // per PSR-7: attempt to set the Host header from a provided URI if no + // Host header is provided + if (! $this->hasHeader('Host') && $this->uri->getHost()) { + $this->headerNames['host'] = 'Host'; + $this->headers['Host'] = [$this->getHostFromUri()]; + } + } + + /** + * Create and return a URI instance. + * + * If `$uri` is a already a `UriInterface` instance, returns it. + * + * If `$uri` is a string, passes it to the `Uri` constructor to return an + * instance. + * + * If `$uri is null, creates and returns an empty `Uri` instance. + * + * Otherwise, it raises an exception. + * + * @param null|string|UriInterface $uri + * @return UriInterface + * @throws InvalidArgumentException + */ + private function createUri($uri) + { + if ($uri instanceof UriInterface) { + return $uri; + } + if (is_string($uri)) { + return new Uri($uri); + } + if ($uri === null) { + return new Uri(); + } + throw new InvalidArgumentException( + 'Invalid URI provided; must be null, a string, or a Psr\Http\Message\UriInterface instance' + ); } /** @@ -111,10 +132,6 @@ trait RequestTrait return $this->requestTarget; } - if (! $this->uri) { - return '/'; - } - $target = $this->uri->getPath(); if ($this->uri->getQuery()) { $target .= '?' . $this->uri->getQuery(); @@ -249,6 +266,16 @@ trait RequestTrait } $new->headerNames['host'] = 'Host'; + + // Remove an existing host header if present, regardless of current + // de-normalization of the header name. + // @see https://github.com/zendframework/zend-diactoros/issues/91 + foreach (array_keys($new->headers) as $header) { + if (strtolower($header) === 'host') { + unset($new->headers[$header]); + } + } + $new->headers['Host'] = [$host]; return $new; diff --git a/vendor/zendframework/zend-diactoros/src/Response.php b/vendor/zendframework/zend-diactoros/src/Response.php index ef250e6a0..3ce5b8762 100644 --- a/vendor/zendframework/zend-diactoros/src/Response.php +++ b/vendor/zendframework/zend-diactoros/src/Response.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -44,6 +44,7 @@ class Response implements ResponseInterface 206 => 'Partial Content', 207 => 'Multi-status', 208 => 'Already Reported', + 226 => 'IM used', // REDIRECTION CODES 300 => 'Multiple Choices', 301 => 'Moved Permanently', @@ -51,8 +52,9 @@ class Response implements ResponseInterface 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', - 306 => 'Switch Proxy', // Deprecated + 306 => 'Switch Proxy', // Deprecated to 306 => '(Unused)' 307 => 'Temporary Redirect', + 308 => 'Permanent Redirect', // CLIENT ERROR 400 => 'Bad Request', 401 => 'Unauthorized', @@ -73,6 +75,7 @@ class Response implements ResponseInterface 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', + 421 => 'Misdirected Request', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', @@ -81,7 +84,10 @@ class Response implements ResponseInterface 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', + 444 => 'Connection Closed Without Response', + 451 => 'Unavailable For Legal Reasons', // SERVER ERROR + 499 => 'Client Closed Request', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', @@ -91,7 +97,9 @@ class Response implements ResponseInterface 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected', + 510 => 'Not Extended', 511 => 'Network Authentication Required', + 599 => 'Network Connect Timeout Error', ]; /** @@ -102,31 +110,18 @@ class Response implements ResponseInterface /** * @var int */ - private $statusCode = 200; + private $statusCode; /** - * @param string|resource|StreamInterface $stream Stream identifier and/or actual stream resource + * @param string|resource|StreamInterface $body Stream identifier and/or actual stream resource * @param int $status Status code for the response, if any. * @param array $headers Headers for the response, if any. * @throws InvalidArgumentException on any invalid element. */ public function __construct($body = 'php://memory', $status = 200, array $headers = []) { - if (! is_string($body) && ! is_resource($body) && ! $body instanceof StreamInterface) { - throw new InvalidArgumentException( - 'Stream must be a string stream resource identifier, ' - . 'an actual stream resource, ' - . 'or a Psr\Http\Message\StreamInterface implementation' - ); - } - - if (null !== $status) { - $this->validateStatus($status); - } - - $this->stream = ($body instanceof StreamInterface) ? $body : new Stream($body, 'wb+'); - $this->statusCode = $status ? (int) $status : 200; - + $this->setStatusCode($status); + $this->stream = $this->getStream($body, 'wb+'); list($this->headerNames, $headers) = $this->filterHeaders($headers); $this->assertHeaders($headers); $this->headers = $headers; @@ -159,9 +154,8 @@ class Response implements ResponseInterface */ public function withStatus($code, $reasonPhrase = '') { - $this->validateStatus($code); $new = clone $this; - $new->statusCode = (int) $code; + $new->setStatusCode($code); $new->reasonPhrase = $reasonPhrase; return $new; } @@ -172,7 +166,7 @@ class Response implements ResponseInterface * @param int|string $code * @throws InvalidArgumentException on an invalid status code. */ - private function validateStatus($code) + private function setStatusCode($code) { if (! is_numeric($code) || is_float($code) @@ -184,6 +178,7 @@ class Response implements ResponseInterface (is_scalar($code) ? $code : gettype($code)) )); } + $this->statusCode = $code; } /** diff --git a/vendor/zendframework/zend-diactoros/src/Response/EmitterInterface.php b/vendor/zendframework/zend-diactoros/src/Response/EmitterInterface.php index 25ea7f397..f27b4a9ce 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/EmitterInterface.php +++ b/vendor/zendframework/zend-diactoros/src/Response/EmitterInterface.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/Response/EmptyResponse.php b/vendor/zendframework/zend-diactoros/src/Response/EmptyResponse.php index 911030694..010cb9d33 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/EmptyResponse.php +++ b/vendor/zendframework/zend-diactoros/src/Response/EmptyResponse.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/Response/HtmlResponse.php b/vendor/zendframework/zend-diactoros/src/Response/HtmlResponse.php index d298ee01e..1e1f032a9 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/HtmlResponse.php +++ b/vendor/zendframework/zend-diactoros/src/Response/HtmlResponse.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -41,7 +41,7 @@ class HtmlResponse extends Response parent::__construct( $this->createBody($html), $status, - $this->injectContentType('text/html', $headers) + $this->injectContentType('text/html; charset=utf-8', $headers) ); } @@ -68,6 +68,7 @@ class HtmlResponse extends Response $body = new Stream('php://temp', 'wb+'); $body->write($html); + $body->rewind(); return $body; } } diff --git a/vendor/zendframework/zend-diactoros/src/Response/InjectContentTypeTrait.php b/vendor/zendframework/zend-diactoros/src/Response/InjectContentTypeTrait.php index 00fd21716..4f2caf842 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/InjectContentTypeTrait.php +++ b/vendor/zendframework/zend-diactoros/src/Response/InjectContentTypeTrait.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/Response/JsonResponse.php b/vendor/zendframework/zend-diactoros/src/Response/JsonResponse.php index 766c8665c..c8af7c4c2 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/JsonResponse.php +++ b/vendor/zendframework/zend-diactoros/src/Response/JsonResponse.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -24,6 +24,17 @@ class JsonResponse extends Response { use InjectContentTypeTrait; + /** + * Default flags for json_encode; value of: + * + * + * JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES + * + * + * @const int + */ + const DEFAULT_JSON_FLAGS = 79; + /** * Create a JSON response with the given data. * @@ -34,6 +45,7 @@ class JsonResponse extends Response * - JSON_HEX_APOS * - JSON_HEX_AMP * - JSON_HEX_QUOT + * - JSON_UNESCAPED_SLASHES * * @param mixed $data Data to convert to JSON. * @param int $status Integer status code for the response; 200 by default. @@ -41,10 +53,15 @@ class JsonResponse extends Response * @param int $encodingOptions JSON encoding options to use. * @throws InvalidArgumentException if unable to encode the $data to JSON. */ - public function __construct($data, $status = 200, array $headers = [], $encodingOptions = 15) - { + public function __construct( + $data, + $status = 200, + array $headers = [], + $encodingOptions = self::DEFAULT_JSON_FLAGS + ) { $body = new Stream('php://temp', 'wb+'); $body->write($this->jsonEncode($data, $encodingOptions)); + $body->rewind(); $headers = $this->injectContentType('application/json', $headers); diff --git a/vendor/zendframework/zend-diactoros/src/Response/RedirectResponse.php b/vendor/zendframework/zend-diactoros/src/Response/RedirectResponse.php index 26911f0ae..bce824992 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/RedirectResponse.php +++ b/vendor/zendframework/zend-diactoros/src/Response/RedirectResponse.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -12,7 +12,6 @@ namespace Zend\Diactoros\Response; use InvalidArgumentException; use Psr\Http\Message\UriInterface; use Zend\Diactoros\Response; -use Zend\Diactoros\Stream; /** * Produce a redirect response. diff --git a/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php b/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php index bba291e30..a96134293 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php +++ b/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -14,6 +14,8 @@ use RuntimeException; class SapiEmitter implements EmitterInterface { + use SapiEmitterTrait; + /** * Emits a response for a PHP SAPI environment. * @@ -29,88 +31,21 @@ class SapiEmitter implements EmitterInterface throw new RuntimeException('Unable to emit response; headers already sent'); } + $response = $this->injectContentLength($response); + $this->emitStatusLine($response); $this->emitHeaders($response); - $this->emitBody($response, $maxBufferLevel); - } - - /** - * Emit the status line. - * - * Emits the status line using the protocol version and status code from - * the response; if a reason phrase is availble, it, too, is emitted. - * - * @param ResponseInterface $response - */ - private function emitStatusLine(ResponseInterface $response) - { - $reasonPhrase = $response->getReasonPhrase(); - header(sprintf( - 'HTTP/%s %d%s', - $response->getProtocolVersion(), - $response->getStatusCode(), - ($reasonPhrase ? ' ' . $reasonPhrase : '') - )); - } - - /** - * Emit response headers. - * - * Loops through each header, emitting each; if the header value - * is an array with multiple values, ensures that each is sent - * in such a way as to create aggregate headers (instead of replace - * the previous). - * - * @param ResponseInterface $response - */ - private function emitHeaders(ResponseInterface $response) - { - foreach ($response->getHeaders() as $header => $values) { - $name = $this->filterHeader($header); - $first = true; - foreach ($values as $value) { - header(sprintf( - '%s: %s', - $name, - $value - ), $first); - $first = false; - } - } + $this->flush($maxBufferLevel); + $this->emitBody($response); } /** * Emit the message body. * - * Loops through the output buffer, flushing each, before emitting - * the response body using `echo()`. - * * @param ResponseInterface $response - * @param int $maxBufferLevel Flush up to this buffer level. */ - private function emitBody(ResponseInterface $response, $maxBufferLevel) + private function emitBody(ResponseInterface $response) { - if (null === $maxBufferLevel) { - $maxBufferLevel = ob_get_level(); - } - - while (ob_get_level() > $maxBufferLevel) { - ob_end_flush(); - } - echo $response->getBody(); } - - /** - * Filter a header name to wordcase - * - * @param string $header - * @return string - */ - private function filterHeader($header) - { - $filtered = str_replace('-', ' ', $header); - $filtered = ucwords($filtered); - return str_replace(' ', '-', $filtered); - } } diff --git a/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php b/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php new file mode 100644 index 000000000..bbfecfce2 --- /dev/null +++ b/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php @@ -0,0 +1,109 @@ +hasHeader('Content-Length')) { + // PSR-7 indicates int OR null for the stream size; for null values, + // we will not auto-inject the Content-Length. + if (null !== $response->getBody()->getSize()) { + return $response->withHeader('Content-Length', (string) $response->getBody()->getSize()); + } + } + + return $response; + } + + /** + * Emit the status line. + * + * Emits the status line using the protocol version and status code from + * the response; if a reason phrase is available, it, too, is emitted. + * + * @param ResponseInterface $response + */ + private function emitStatusLine(ResponseInterface $response) + { + $reasonPhrase = $response->getReasonPhrase(); + header(sprintf( + 'HTTP/%s %d%s', + $response->getProtocolVersion(), + $response->getStatusCode(), + ($reasonPhrase ? ' ' . $reasonPhrase : '') + )); + } + + /** + * Emit response headers. + * + * Loops through each header, emitting each; if the header value + * is an array with multiple values, ensures that each is sent + * in such a way as to create aggregate headers (instead of replace + * the previous). + * + * @param ResponseInterface $response + */ + private function emitHeaders(ResponseInterface $response) + { + foreach ($response->getHeaders() as $header => $values) { + $name = $this->filterHeader($header); + $first = true; + foreach ($values as $value) { + header(sprintf( + '%s: %s', + $name, + $value + ), $first); + $first = false; + } + } + } + + /** + * Loops through the output buffer, flushing each, before emitting + * the response. + * + * @param int|null $maxBufferLevel Flush up to this buffer level. + */ + private function flush($maxBufferLevel = null) + { + if (null === $maxBufferLevel) { + $maxBufferLevel = ob_get_level(); + } + + while (ob_get_level() > $maxBufferLevel) { + ob_end_flush(); + } + } + + /** + * Filter a header name to wordcase + * + * @param string $header + * @return string + */ + private function filterHeader($header) + { + $filtered = str_replace('-', ' ', $header); + $filtered = ucwords($filtered); + return str_replace(' ', '-', $filtered); + } +} diff --git a/vendor/zendframework/zend-diactoros/src/Response/SapiStreamEmitter.php b/vendor/zendframework/zend-diactoros/src/Response/SapiStreamEmitter.php new file mode 100644 index 000000000..02095e50b --- /dev/null +++ b/vendor/zendframework/zend-diactoros/src/Response/SapiStreamEmitter.php @@ -0,0 +1,135 @@ +injectContentLength($response); + + $this->emitStatusLine($response); + $this->emitHeaders($response); + $this->flush(); + + $range = $this->parseContentRange($response->getHeaderLine('Content-Range')); + + if (is_array($range) && $range[0] === 'bytes') { + $this->emitBodyRange($range, $response, $maxBufferLength); + return; + } + + $this->emitBody($response, $maxBufferLength); + } + + /** + * Emit the message body. + * + * @param ResponseInterface $response + * @param int $maxBufferLength + */ + private function emitBody(ResponseInterface $response, $maxBufferLength) + { + $body = $response->getBody(); + + if ($body->isSeekable()) { + $body->rewind(); + } + + if (! $body->isReadable()) { + echo $body; + return; + } + + while (! $body->eof()) { + echo $body->read($maxBufferLength); + } + } + + /** + * Emit a range of the message body. + * + * @param array $range + * @param ResponseInterface $response + * @param int $maxBufferLength + */ + private function emitBodyRange(array $range, ResponseInterface $response, $maxBufferLength) + { + list($unit, $first, $last, $length) = $range; + + $body = $response->getBody(); + + $length = $last - $first + 1; + + if ($body->isSeekable()) { + $body->seek($first); + + $first = 0; + } + + if (! $body->isReadable()) { + echo substr($body->getContents(), $first, $length); + return; + } + + $remaining = $length; + + while ($remaining >= $maxBufferLength && ! $body->eof()) { + $contents = $body->read($maxBufferLength); + $remaining -= strlen($contents); + + echo $contents; + } + + if ($remaining > 0 && ! $body->eof()) { + echo $body->read($remaining); + } + } + + /** + * Parse content-range header + * http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16 + * + * @param string $header + * @return false|array [unit, first, last, length]; returns false if no + * content range or an invalid content range is provided + */ + private function parseContentRange($header) + { + if (preg_match('/(?P[\w]+)\s+(?P\d+)-(?P\d+)\/(?P\d+|\*)/', $header, $matches)) { + return [ + $matches['unit'], + (int) $matches['first'], + (int) $matches['last'], + $matches['length'] === '*' ? '*' : (int) $matches['length'], + ]; + } + return false; + } +} diff --git a/vendor/zendframework/zend-diactoros/src/Response/Serializer.php b/vendor/zendframework/zend-diactoros/src/Response/Serializer.php index 8da835da9..367a1021b 100644 --- a/vendor/zendframework/zend-diactoros/src/Response/Serializer.php +++ b/vendor/zendframework/zend-diactoros/src/Response/Serializer.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -54,7 +54,7 @@ final class Serializer extends AbstractSerializer return (new Response($body, $status, $headers)) ->withProtocolVersion($version) - ->withStatus($status, $reasonPhrase); + ->withStatus((int) $status, $reasonPhrase); } /** @@ -73,9 +73,8 @@ final class Serializer extends AbstractSerializer if (! empty($headers)) { $headers = "\r\n" . $headers; } - if (! empty($body)) { - $headers .= "\r\n\r\n"; - } + + $headers .= "\r\n\r\n"; return sprintf( $format, diff --git a/vendor/zendframework/zend-diactoros/src/Response/TextResponse.php b/vendor/zendframework/zend-diactoros/src/Response/TextResponse.php new file mode 100644 index 000000000..13df29d88 --- /dev/null +++ b/vendor/zendframework/zend-diactoros/src/Response/TextResponse.php @@ -0,0 +1,74 @@ +createBody($text), + $status, + $this->injectContentType('text/plain; charset=utf-8', $headers) + ); + } + + /** + * Create the message body. + * + * @param string|StreamInterface $text + * @return StreamInterface + * @throws InvalidArgumentException if $html is neither a string or stream. + */ + private function createBody($text) + { + if ($text instanceof StreamInterface) { + return $text; + } + + if (! is_string($text)) { + throw new InvalidArgumentException(sprintf( + 'Invalid content (%s) provided to %s', + (is_object($text) ? get_class($text) : gettype($text)), + __CLASS__ + )); + } + + $body = new Stream('php://temp', 'wb+'); + $body->write($text); + $body->rewind(); + return $body; + } +} diff --git a/vendor/zendframework/zend-diactoros/src/Server.php b/vendor/zendframework/zend-diactoros/src/Server.php index e3c9b3088..768d7f380 100644 --- a/vendor/zendframework/zend-diactoros/src/Server.php +++ b/vendor/zendframework/zend-diactoros/src/Server.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/ServerRequest.php b/vendor/zendframework/zend-diactoros/src/ServerRequest.php index 67a04b40b..80998790b 100644 --- a/vendor/zendframework/zend-diactoros/src/ServerRequest.php +++ b/vendor/zendframework/zend-diactoros/src/ServerRequest.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -13,6 +13,7 @@ use InvalidArgumentException; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UploadedFileInterface; +use Psr\Http\Message\UriInterface; /** * Server-side HTTP request @@ -65,10 +66,14 @@ class ServerRequest implements ServerRequestInterface /** * @param array $serverParams Server parameters, typically from $_SERVER * @param array $uploadedFiles Upload file information, a tree of UploadedFiles - * @param null|string $uri URI for the request, if any. + * @param null|string|UriInterface $uri URI for the request, if any. * @param null|string $method HTTP method for the request, if any. * @param string|resource|StreamInterface $body Message body, if any. * @param array $headers Headers for the message, if any. + * @param array $cookies Cookies for the message, if any. + * @param array $queryParams Query params for the message, if any. + * @param null|array|object $parsedBody The deserialized body parameters, if any. + * @param string $protocol HTTP protocol version. * @throws InvalidArgumentException for any invalid value. */ public function __construct( @@ -77,14 +82,25 @@ class ServerRequest implements ServerRequestInterface $uri = null, $method = null, $body = 'php://input', - array $headers = [] + array $headers = [], + array $cookies = [], + array $queryParams = [], + $parsedBody = null, + $protocol = '1.1' ) { $this->validateUploadedFiles($uploadedFiles); - $body = $this->getStream($body); + if ($body === 'php://input') { + $body = new PhpInputStream(); + } + $this->initialize($uri, $method, $body, $headers); $this->serverParams = $serverParams; $this->uploadedFiles = $uploadedFiles; + $this->cookieParams = $cookies; + $this->queryParams = $queryParams; + $this->parsedBody = $parsedBody; + $this->protocol = $protocol; } /** @@ -203,10 +219,6 @@ class ServerRequest implements ServerRequestInterface */ public function withoutAttribute($attribute) { - if (! isset($this->attributes[$attribute])) { - return clone $this; - } - $new = clone $this; unset($new->attributes[$attribute]); return $new; @@ -248,33 +260,6 @@ class ServerRequest implements ServerRequestInterface return $new; } - /** - * Set the body stream - * - * @param string|resource|StreamInterface $stream - * @return StreamInterface - */ - private function getStream($stream) - { - if ($stream === 'php://input') { - return new PhpInputStream(); - } - - if (! is_string($stream) && ! is_resource($stream) && ! $stream instanceof StreamInterface) { - throw new InvalidArgumentException( - 'Stream must be a string stream resource identifier, ' - . 'an actual stream resource, ' - . 'or a Psr\Http\Message\StreamInterface implementation' - ); - } - - if (! $stream instanceof StreamInterface) { - return new Stream($stream, 'r'); - } - - return $stream; - } - /** * Recursively validate the structure in an uploaded files array. * diff --git a/vendor/zendframework/zend-diactoros/src/ServerRequestFactory.php b/vendor/zendframework/zend-diactoros/src/ServerRequestFactory.php index e23dfe58b..78678dc56 100644 --- a/vendor/zendframework/zend-diactoros/src/ServerRequestFactory.php +++ b/vendor/zendframework/zend-diactoros/src/ServerRequestFactory.php @@ -3,17 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ namespace Zend\Diactoros; use InvalidArgumentException; -use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\MessageInterface; use Psr\Http\Message\UploadedFileInterface; use stdClass; +use UnexpectedValueException; /** * Class for marshaling a request object from the current PHP environment. @@ -60,19 +59,19 @@ abstract class ServerRequestFactory $server = static::normalizeServer($server ?: $_SERVER); $files = static::normalizeFiles($files ?: $_FILES); $headers = static::marshalHeaders($server); - $request = new ServerRequest( + + return new ServerRequest( $server, $files, static::marshalUriFromServer($server, $headers), static::get('REQUEST_METHOD', $server, 'GET'), 'php://input', - $headers + $headers, + $cookies ?: $_COOKIE, + $query ?: $_GET, + $body ?: $_POST, + static::marshalProtocolVersion($server) ); - - return $request - ->withCookieParams($cookies ?: $_COOKIE) - ->withQueryParams($query ?: $_GET) - ->withParsedBody($body ?: $_POST); } /** @@ -196,24 +195,26 @@ abstract class ServerRequestFactory { $headers = []; foreach ($server as $key => $value) { - if (strpos($key, 'HTTP_COOKIE') === 0) { - // Cookies are handled using the $_COOKIE superglobal - continue; + // Apache prefixes environment variables with REDIRECT_ + // if they are added by rewrite rules + if (strpos($key, 'REDIRECT_') === 0) { + $key = substr($key, 9); + + // We will not overwrite existing variables with the + // prefixed versions, though + if (array_key_exists($key, $server)) { + continue; + } } if ($value && strpos($key, 'HTTP_') === 0) { - $name = strtr(substr($key, 5), '_', ' '); - $name = strtr(ucwords(strtolower($name)), ' ', '-'); - $name = strtolower($name); - + $name = strtr(strtolower(substr($key, 5)), '_', '-'); $headers[$name] = $value; continue; } if ($value && strpos($key, 'CONTENT_') === 0) { - $name = substr($key, 8); // Content- - $name = 'Content-' . (($name == 'MD5') ? $name : ucfirst(strtolower($name))); - $name = strtolower($name); + $name = 'content-' . strtolower(substr($key, 8)); $headers[$name] = $value; continue; } @@ -267,8 +268,15 @@ abstract class ServerRequestFactory $query = ltrim($server['QUERY_STRING'], '?'); } + // URI fragment + $fragment = ''; + if (strpos($path, '#') !== false) { + list($path, $fragment) = explode('#', $path, 2); + } + return $uri ->withPath($path) + ->withFragment($fragment) ->withQuery($query); } @@ -455,4 +463,26 @@ abstract class ServerRequestFactory } return $normalizedFiles; } + + /** + * Return HTTP protocol version (X.Y) + * + * @param array $server + * @return string + */ + private static function marshalProtocolVersion(array $server) + { + if (! isset($server['SERVER_PROTOCOL'])) { + return '1.1'; + } + + if (! preg_match('#^(HTTP/)?(?P[1-9]\d*(?:\.\d)?)$#', $server['SERVER_PROTOCOL'], $matches)) { + throw new UnexpectedValueException(sprintf( + 'Unrecognized protocol version (%s)', + $server['SERVER_PROTOCOL'] + )); + } + + return $matches['version']; + } } diff --git a/vendor/zendframework/zend-diactoros/src/Stream.php b/vendor/zendframework/zend-diactoros/src/Stream.php index aca58d284..4abbf514d 100644 --- a/vendor/zendframework/zend-diactoros/src/Stream.php +++ b/vendor/zendframework/zend-diactoros/src/Stream.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ diff --git a/vendor/zendframework/zend-diactoros/src/UploadedFile.php b/vendor/zendframework/zend-diactoros/src/UploadedFile.php index 1aa083f01..767724b8a 100644 --- a/vendor/zendframework/zend-diactoros/src/UploadedFile.php +++ b/vendor/zendframework/zend-diactoros/src/UploadedFile.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -51,6 +51,14 @@ class UploadedFile implements UploadedFileInterface */ private $stream; + /** + * @param string|resource $streamOrFile + * @param int $size + * @param int $errorStatus + * @param string|null $clientFilename + * @param string|null $clientMediaType + * @throws InvalidArgumentException + */ public function __construct($streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null) { if ($errorStatus === UPLOAD_ERR_OK) { @@ -134,24 +142,26 @@ class UploadedFile implements UploadedFileInterface */ public function moveTo($targetPath) { + if ($this->moved) { + throw new RuntimeException('Cannot move file; already moved!'); + } + if ($this->error !== UPLOAD_ERR_OK) { throw new RuntimeException('Cannot retrieve stream due to upload error'); } - if (! is_string($targetPath)) { - throw new InvalidArgumentException( - 'Invalid path provided for move operation; must be a string' - ); - } - - if (empty($targetPath)) { + if (! is_string($targetPath) || empty($targetPath)) { throw new InvalidArgumentException( 'Invalid path provided for move operation; must be a non-empty string' ); } - if ($this->moved) { - throw new RuntimeException('Cannot move file; already moved!'); + $targetDirectory = dirname($targetPath); + if (! is_dir($targetDirectory) || ! is_writable($targetDirectory)) { + throw new RuntimeException(sprintf( + 'The target directory `%s` does not exists or is not writable', + $targetDirectory + )); } $sapi = PHP_SAPI; diff --git a/vendor/zendframework/zend-diactoros/src/Uri.php b/vendor/zendframework/zend-diactoros/src/Uri.php index be3077a17..82c3a268e 100644 --- a/vendor/zendframework/zend-diactoros/src/Uri.php +++ b/vendor/zendframework/zend-diactoros/src/Uri.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @see http://github.com/zendframework/zend-diactoros for the canonical source repository - * @copyright Copyright (c) 2015 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2015-2016 Zend Technologies USA Inc. (http://www.zend.com) * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */ @@ -36,7 +36,7 @@ class Uri implements UriInterface * * @const string */ - const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; + const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~\pL'; /** * @var int[] Array indexed by valid scheme names to their corresponding ports. @@ -306,21 +306,23 @@ class Uri implements UriInterface */ public function withPort($port) { - if (! is_numeric($port)) { + if (! is_numeric($port) && $port !== null) { throw new InvalidArgumentException(sprintf( - 'Invalid port "%s" specified; must be an integer or integer string', + 'Invalid port "%s" specified; must be an integer, an integer string, or null', (is_object($port) ? get_class($port) : gettype($port)) )); } - $port = (int) $port; + if ($port !== null) { + $port = (int) $port; + } if ($port === $this->port) { // Do nothing if no change was made. return clone $this; } - if ($port < 1 || $port > 65535) { + if ($port !== null && $port < 1 || $port > 65535) { throw new InvalidArgumentException(sprintf( 'Invalid port "%d" specified; must be a valid TCP/UDP port', $port @@ -440,12 +442,12 @@ class Uri implements UriInterface ); } - $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : ''; - $this->userInfo = isset($parts['user']) ? $parts['user'] : ''; - $this->host = isset($parts['host']) ? $parts['host'] : ''; - $this->port = isset($parts['port']) ? $parts['port'] : null; - $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : ''; - $this->query = isset($parts['query']) ? $this->filterQuery($parts['query']) : ''; + $this->scheme = isset($parts['scheme']) ? $this->filterScheme($parts['scheme']) : ''; + $this->userInfo = isset($parts['user']) ? $parts['user'] : ''; + $this->host = isset($parts['host']) ? $parts['host'] : ''; + $this->port = isset($parts['port']) ? $parts['port'] : null; + $this->path = isset($parts['path']) ? $this->filterPath($parts['path']) : ''; + $this->query = isset($parts['query']) ? $this->filterQuery($parts['query']) : ''; $this->fragment = isset($parts['fragment']) ? $this->filterFragment($parts['fragment']) : ''; if (isset($parts['pass'])) { @@ -505,6 +507,9 @@ class Uri implements UriInterface private function isNonStandardPort($scheme, $host, $port) { if (! $scheme) { + if ($host && ! $port) { + return false; + } return true; } @@ -551,7 +556,7 @@ class Uri implements UriInterface private function filterPath($path) { $path = preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . ':@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^' . self::CHAR_UNRESERVED . ':@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/u', [$this, 'urlEncodeChar'], $path ); @@ -625,7 +630,7 @@ class Uri implements UriInterface private function filterFragment($fragment) { if (! empty($fragment) && strpos($fragment, '#') === 0) { - $fragment = substr($fragment, 1); + $fragment = '%23' . substr($fragment, 1); } return $this->filterQueryOrFragment($fragment); @@ -640,7 +645,7 @@ class Uri implements UriInterface private function filterQueryOrFragment($value) { return preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/u', [$this, 'urlEncodeChar'], $value ); diff --git a/vendor/zendframework/zend-escaper/CHANGELOG.md b/vendor/zendframework/zend-escaper/CHANGELOG.md new file mode 100644 index 000000000..de6a08b3e --- /dev/null +++ b/vendor/zendframework/zend-escaper/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 2.5.2 - 2016-06-30 + +### Added + +- [#11](https://github.com/zendframework/zend-escaper/pull/11), + [#12](https://github.com/zendframework/zend-escaper/pull/12), and + [#13](https://github.com/zendframework/zend-escaper/pull/13) prepare and + publish documentation to https://zendframework.github.io/zend-escaper/ + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#3](https://github.com/zendframework/zend-escaper/pull/3) updates the + the escaping mechanism to add support for escaping characters outside the Basic + Multilingual Plane when escaping for JS, CSS, or HTML attributes. diff --git a/vendor/zendframework/zend-escaper/CONDUCT.md b/vendor/zendframework/zend-escaper/CONDUCT.md new file mode 100644 index 000000000..c663d2be9 --- /dev/null +++ b/vendor/zendframework/zend-escaper/CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) +as its guidelines for contributor interactions. + +## The Code Manifesto + +We want to work in an ecosystem that empowers developers to reach their +potential — one that encourages growth and effective collaboration. A space that +is safe for all. + +A space such as this benefits everyone that participates in it. It encourages +new developers to enter our field. It is through discussion and collaboration +that we grow, and through growth that we improve. + +In the effort to create such a place, we hold to these values: + +1. **Discrimination limits us.** This includes discrimination on the basis of + race, gender, sexual orientation, gender identity, age, nationality, technology + and any other arbitrary exclusion of a group of people. +2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort + levels. Remember that, and if brought to your attention, heed it. +3. **We are our biggest assets.** None of us were born masters of our trade. + Each of us has been helped along the way. Return that favor, when and where + you can. +4. **We are resources for the future.** As an extension of #3, share what you + know. Make yourself a resource to help those that come after you. +5. **Respect defines us.** Treat others as you wish to be treated. Make your + discussions, criticisms and debates from a position of respectfulness. Ask + yourself, is it true? Is it necessary? Is it constructive? Anything less is + unacceptable. +6. **Reactions require grace.** Angry responses are valid, but abusive language + and vindictive actions are toxic. When something happens that offends you, + handle it assertively, but be respectful. Escalate reasonably, and try to + allow the offender an opportunity to explain themselves, and possibly correct + the issue. +7. **Opinions are just that: opinions.** Each and every one of us, due to our + background and upbringing, have varying opinions. The fact of the matter, is + that is perfectly acceptable. Remember this: if you respect your own + opinions, you should respect the opinions of others. +8. **To err is human.** You might not intend it, but mistakes do happen and + contribute to build experience. Tolerate honest mistakes, and don't hesitate + to apologize if you make one yourself. diff --git a/vendor/zendframework/zend-escaper/CONTRIBUTING.md b/vendor/zendframework/zend-escaper/CONTRIBUTING.md index 2b58aca39..8eb4657f9 100644 --- a/vendor/zendframework/zend-escaper/CONTRIBUTING.md +++ b/vendor/zendframework/zend-escaper/CONTRIBUTING.md @@ -227,3 +227,8 @@ repository, we suggest doing some cleanup of these branches. ```console $ git push {username} : ``` + + +## Conduct + +Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/vendor/zendframework/zend-escaper/README.md b/vendor/zendframework/zend-escaper/README.md index 9ed284f0b..4124bdd02 100644 --- a/vendor/zendframework/zend-escaper/README.md +++ b/vendor/zendframework/zend-escaper/README.md @@ -5,10 +5,9 @@ The OWASP Top 10 web security risks study lists Cross-Site Scripting (XSS) in second place. PHP’s sole functionality against XSS is limited to two functions -of which one is commonly misapplied. Thus, the `Zend\Escaper` component was written. +of which one is commonly misapplied. Thus, the zend-escaper component was written. It offers developers a way to escape output and defend from XSS and related vulnerabilities by introducing contextual escaping based on peer-reviewed rules. - - File issues at https://github.com/zendframework/zend-escaper/issues -- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-escaper +- Documentation is at https://zendframework.github.io/zend-escaper/ diff --git a/vendor/zendframework/zend-escaper/composer.json b/vendor/zendframework/zend-escaper/composer.json index faa4375d2..2abc6288f 100644 --- a/vendor/zendframework/zend-escaper/composer.json +++ b/vendor/zendframework/zend-escaper/composer.json @@ -13,7 +13,7 @@ } }, "require": { - "php": ">=5.3.23" + "php": ">=5.5" }, "minimum-stability": "dev", "prefer-stable": true, @@ -32,4 +32,4 @@ "fabpot/php-cs-fixer": "1.7.*", "phpunit/PHPUnit": "~4.0" } -} \ No newline at end of file +} diff --git a/vendor/zendframework/zend-escaper/doc/book/configuration.md b/vendor/zendframework/zend-escaper/doc/book/configuration.md new file mode 100644 index 000000000..b1932667a --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/configuration.md @@ -0,0 +1,21 @@ +# Configuration + +`Zend\Escaper\Escaper` has only one configuration option available, and that is +the encoding to be used by the `Escaper` instance. + +The default encoding is **utf-8**. Other supported encodings are: + +- iso-8859-1 +- iso-8859-5 +- iso-8859-15 +- cp866, ibm866, 866 +- cp1251, windows-1251 +- cp1252, windows-1252 +- koi8-r, koi8-ru +- big5, big5-hkscs, 950, gb2312, 936 +- shift\_jis, sjis, sjis-win, cp932 +- eucjp, eucjp-win +- macroman + +If an unsupported encoding is passed to `Zend\Escaper\Escaper`, a +`Zend\Escaper\Exception\InvalidArgumentException` will be thrown. diff --git a/vendor/zendframework/zend-escaper/doc/book/escaping-css.md b/vendor/zendframework/zend-escaper/doc/book/escaping-css.md new file mode 100644 index 000000000..63b554bd4 --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/escaping-css.md @@ -0,0 +1,74 @@ +# Escaping Cascading Style Sheets + +CSS is similar to [escaping Javascript](escaping-javascript.md). CSS escaping +excludes only basic alphanumeric characters and escapes all other characters +into valid CSS hexadecimal escapes. + +## Example of Bad CSS Escaping + +In most cases developers forget to escape CSS completely: + +```php + + +'); +} +INPUT; +?> + + + Unescaped CSS + + + + +

    User controlled CSS needs to be properly escaped!

    + + +``` + +In the above example, by failing to escape the user provided CSS, an attacker +can execute an XSS attack fairly easily. + +## Example of Good CSS Escaping + +By using `escapeCss()` method in the CSS context, such attacks can be prevented: + +```php + + +'); +} +INPUT; + +$escaper = new Zend\Escaper\Escaper('utf-8'); +$output = $escaper->escapeCss($input); +?> + + + Escaped CSS + + + + +

    User controlled CSS needs to be properly escaped!

    + + +``` + +By properly escaping user controlled CSS, we can prevent XSS attacks in our web +applications. diff --git a/vendor/zendframework/zend-escaper/doc/book/escaping-html-attributes.md b/vendor/zendframework/zend-escaper/doc/book/escaping-html-attributes.md new file mode 100644 index 000000000..d4987794a --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/escaping-html-attributes.md @@ -0,0 +1,128 @@ +# Escaping HTML Attributes + +Escaping data in **HTML Attribute** contexts is most often done incorrectly, if +not overlooked completely by developers. Regular [HTML +escaping](escaping-html.md) can be used for escaping HTML attributes *only* if +the attribute value can be **guaranteed as being properly quoted**! To avoid +confusion, we recommend always using the HTML Attribute escaper method when +dealing with HTTP attributes specifically. + +To escape data for an HTML Attribute, use `Zend\Escaper\Escaper`'s +`escapeHtmlAttr()` method. Internally it will convert the data to UTF-8, check +for its validity, and use an extended set of characters to escape that are not +covered by `htmlspecialchars()` to cover the cases where an attribute might be +unquoted or quoted illegally. + +## Examples of Bad HTML Attribute Escaping + +An example of incorrect HTML attribute escaping: + +```php + + + + + + Single Quoted Attribute + + + +
    + + ?> + + What framework are you using? + +
    + + +``` + +In the above example, the default `ENT_COMPAT` flag is being used, which does +not escape single quotes, thus resulting in an alert box popping up when the +`onmouseover` event happens on the `span` element. + +Another example of incorrect HTML attribute escaping can happen when unquoted +attributes are used (which is, by the way, perfectly valid HTML5): + +```php + + + + + + Quoteless Attribute + + + +
    + + ?> + > + What framework are you using? + +
    + + +``` + +The above example shows how it is easy to break out from unquoted attributes in +HTML5. + +## Example of Good HTML Attribute Escaping + +Both of the previous examples can be avoided by simply using the +`escapeHtmlAttr()` method: + +```php + + +escapeHtmlAttr($input); +?> + + + Quoteless Attribute + + + +
    + + ?> + > + What framework are you using? + +
    + + +``` + +In the above example, the malicious input from the attacker becomes completely +harmless as we used proper HTML attribute escaping! diff --git a/vendor/zendframework/zend-escaper/doc/book/escaping-html.md b/vendor/zendframework/zend-escaper/doc/book/escaping-html.md new file mode 100644 index 000000000..7a88023f4 --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/escaping-html.md @@ -0,0 +1,74 @@ +# Escaping HTML + +Probably the most common escaping happens for **HTML body** contexts. There are +very few characters with special meaning in this context, yet it is quite common +to escape data incorrectly, namely by setting the wrong flags and character +encoding. + +For escaping data to use within an HTML body context, use +`Zend\Escaper\Escaper`'s `escapeHtml()` method. Internally it uses PHP's +`htmlspecialchars()`, correctly setting the flags and encoding for you. + +```php +// Outputting this without escaping would be a bad idea! +$input = ''; + +$escaper = new Zend\Escaper\Escaper('utf-8'); + +// somewhere in an HTML template +
    + escapeHtml($input) // all safe! ?> +
    +``` + +One thing a developer needs to pay special attention to is the encoding in which +the document is served to the client, as it **must be the same** as the encoding +used for escaping! + +## Example of Bad HTML Escaping + +An example of incorrect usage: + +```php +alert("zf2")'; +$escaper = new Zend\Escaper\Escaper('utf-8'); +?> + + + + + Encodings set incorrectly! + + + +escapeHtml($input); +?> + +``` + +## Example of Good HTML Escaping + +An example of correct usage: + +```php +alert("zf2")'; +$escaper = new Zend\Escaper\Escaper('utf-8'); +?> + + + + + Encodings set correctly! + + + +escapeHtml($input); +?> + +``` diff --git a/vendor/zendframework/zend-escaper/doc/book/escaping-javascript.md b/vendor/zendframework/zend-escaper/doc/book/escaping-javascript.md new file mode 100644 index 000000000..f40efa646 --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/escaping-javascript.md @@ -0,0 +1,93 @@ +# Escaping Javascript + +Javascript string literals in HTML are subject to significant restrictions due +to the potential for unquoted attributes and uncertainty as to whether +Javascript will be viewed as being `CDATA` or `PCDATA` by the browser. To +eliminate any possible XSS vulnerabilities, Javascript escaping for HTML extends +the escaping rules of both ECMAScript and JSON to include any potentially +dangerous character. Very similar to HTML attribute value escaping, this means +escaping everything except basic alphanumeric characters and the comma, period, +and underscore characters as hexadecimal or unicode escapes. + +Javascript escaping applies to all literal strings and digits. It is not +possible to safely escape other Javascript markup. + +To escape data in the **Javascript context**, use `Zend\Escaper\Escaper`'s +`escapeJs()` method. An extended set of characters are escaped beyond +ECMAScript's rules for Javascript literal string escaping in order to prevent +misinterpretation of Javascript as HTML leading to the injection of special +characters and entities. + +## Example of Bad Javascript Escaping + +An example of incorrect Javascript escaping: + +```php + + + + + + Unescaped Entities + + + + +

    json_encode() is not good for escaping javascript!

    + + +``` + +The above example will show an alert popup box as soon as the page is loaded, +because the data is not properly escaped for the Javascript context. + +## Example of Good Javascript Escaping + +By using the `escapeJs()` method in the Javascript context, such attacks can be +prevented: + +```php + + +escapeJs($input); +?> + + + Escaped Entities + + + + +

    Zend\Escaper\Escaper::escapeJs() is good for escaping javascript!

    + + +``` + +In the above example, the Javascript parser will most likely report a +`SyntaxError`, but at least the targeted application remains safe from such +attacks. diff --git a/vendor/zendframework/zend-escaper/doc/book/escaping-url.md b/vendor/zendframework/zend-escaper/doc/book/escaping-url.md new file mode 100644 index 000000000..4dc13e143 --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/escaping-url.md @@ -0,0 +1,57 @@ +# Escaping URLs + +This method is basically an alias for PHP's `rawurlencode()` which has applied +RFC 3986 since PHP 5.3. It is included primarily for consistency. + +URL escaping applies to data being inserted into a URL and not to the whole URL +itself. + +## Example of Bad URL Escaping + +XSS attacks are easy if data inserted into URLs is not escaped properly: + +```php + + + + + + Unescaped URL data + + + + Click here! + + +``` + +## Example of Good URL Escaping + +By properly escaping data in URLs by using `escapeUrl()`, we can prevent XSS +attacks: + +```php + + +escapeUrl($input); +?> + + + Unescaped URL data + + + + Click here! + + +``` diff --git a/vendor/zendframework/zend-escaper/doc/book/index.html b/vendor/zendframework/zend-escaper/doc/book/index.html new file mode 100644 index 000000000..7263c45ba --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/index.html @@ -0,0 +1,10 @@ +
    +
    +

    zend-escaper

    + +

    Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs.

    + +
    $ composer require zendframework/zend-escaper
    +
    +
    + diff --git a/vendor/zendframework/zend-escaper/doc/book/index.md b/vendor/zendframework/zend-escaper/doc/book/index.md new file mode 100644 index 000000000..4124bdd02 --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/index.md @@ -0,0 +1,13 @@ +# zend-escaper + +[![Build Status](https://secure.travis-ci.org/zendframework/zend-escaper.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-escaper) +[![Coverage Status](https://coveralls.io/repos/zendframework/zend-escaper/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-escaper?branch=master) + +The OWASP Top 10 web security risks study lists Cross-Site Scripting (XSS) in +second place. PHP’s sole functionality against XSS is limited to two functions +of which one is commonly misapplied. Thus, the zend-escaper component was written. +It offers developers a way to escape output and defend from XSS and related +vulnerabilities by introducing contextual escaping based on peer-reviewed rules. + +- File issues at https://github.com/zendframework/zend-escaper/issues +- Documentation is at https://zendframework.github.io/zend-escaper/ diff --git a/vendor/zendframework/zend-escaper/doc/book/intro.md b/vendor/zendframework/zend-escaper/doc/book/intro.md new file mode 100644 index 000000000..082045629 --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/intro.md @@ -0,0 +1,51 @@ +# Introduction + +The [OWASP Top 10 web security risks](https://www.owasp.org/index.php/Top_10_2010-Main) +study lists Cross-Site Scripting (XSS) in second place. PHP's sole functionality +against XSS is limited to two functions of which one is commonly misapplied. +Thus, the zend-escaper component was written. It offers developers a way to +escape output and defend from XSS and related vulnerabilities by introducing +**contextual escaping based on peer-reviewed rules**. + +zend-escaper was written with ease of use in mind, so it can be used completely stand-alone from +the rest of the framework, and as such can be installed with Composer: + +```bash +$ composer install zendframework/zend-escaper +``` + +Several Zend Framework components provide integrations for consuming +zend-escaper, including [zend-view](https://github.com/zendframework/zend-view), +which provides a set of helpers that consume it. + +> ### Security +> +> zend-escaper is a security related component. As such, if you believe you have +> found an issue, we ask that you follow our [Security Policy](http://framework.zend.com/security/) +> and report security issues accordingly. The Zend Framework team and the +> contributors thank you in advance. + +## Overview + +zend-escaper provides one class, `Zend\Escaper\Escaper`, which in turn provides +five methods for escaping output. Which method to use depends on the context in +which the output is used. It is up to the developer to use the right methods in +the right context. + +`Zend\Escaper\Escaper` has the following escaping methods available for each context: + +- `escapeHtml`: escape a string for an HTML body context. +- `escapeHtmlAttr`: escape a string for an HTML attribute context. +- `escapeJs`: escape a string for a Javascript context. +- `escapeCss`: escape a string for a CSS context. +- `escapeUrl`: escape a string for a URI or URI parameter context. + +Usage of each method will be discussed in detail in later chapters. + +## What zend-Escaper is not + +zend-escaper is meant to be used only for *escaping data for output*, and as +such should not be misused for *filtering input data*. For such tasks, use +[zend-filter](https://zendframework.github.io/zend-filter/), +[HTMLPurifier](http://htmlpurifier.org/) or PHP's +[Filter](http://php.net/filter) functionality should be used. diff --git a/vendor/zendframework/zend-escaper/doc/book/theory-of-operation.md b/vendor/zendframework/zend-escaper/doc/book/theory-of-operation.md new file mode 100644 index 000000000..9a769b079 --- /dev/null +++ b/vendor/zendframework/zend-escaper/doc/book/theory-of-operation.md @@ -0,0 +1,147 @@ +# Theory of Operation + +zend-escaper provides methods for escaping output data, dependent on the context +in which the data will be used. Each method is based on peer-reviewed rules and +is in compliance with the current OWASP recommendations. + +The escaping follows a well-known and fixed set of encoding rules defined by +OWASP for each key HTML context. These rules cannot be impacted or negated by +browser quirks or edge-case HTML parsing unless the browser suffers a +catastrophic bug in its HTML parser or Javascript interpreter — both of +these are unlikely. + +The contexts in which zend-escaper should be used are **HTML Body**, **HTML +Attribute**, **Javascript**, **CSS**, and **URL/URI** contexts. + +Every escaper method will take the data to be escaped, make sure it is utf-8 +encoded data (or try to convert it to utf-8), perform context-based escaping, +encode the escaped data back to its original encoding, and return the data to +the caller. + +The actual escaping of the data differs between each method; they all have their +own set of rules according to which escaping is performed. An example will allow +us to clearly demonstrate the difference, and how the same characters are being +escaped differently between contexts: + +```php +$escaper = new Zend\Escaper\Escaper('utf-8'); + +// <script>alert("zf2")</script> +echo $escaper->escapeHtml(''); + +// <script>alert("zf2")</script> +echo $escaper->escapeHtmlAttr(''); + +// \x3Cscript\x3Ealert\x28\x22zf2\x22\x29\x3C\x2Fscript\x3E +echo $escaper->escapeJs(''); + +// \3C script\3E alert\28 \22 zf2\22 \29 \3C \2F script\3E +echo $escaper->escapeCss(''); + +// %3Cscript%3Ealert%28%22zf2%22%29%3C%2Fscript%3E +echo $escaper->escapeUrl(''); +``` + +More detailed examples will be given in later chapters. + +## The Problem with Inconsistent Functionality + +At present, programmers orient towards the following PHP functions for each +common HTML context: + +- **HTML Body**: `htmlspecialchars()` or `htmlentities()` +- **HTML Attribute**: `htmlspecialchars()` or `htmlentities()` +- **Javascript**: `addslashes()` or `json_encode()` +- **CSS**: n/a +- **URL/URI**: `rawurlencode()` or `urlencode()` + +In practice, these decisions appear to depend more on what PHP offers, and if it +can be interpreted as offering sufficient escaping safety, than it does on what +is recommended in reality to defend against XSS. While these functions can +prevent some forms of XSS, they do not cover all use cases or risks and are +therefore insufficient defenses. + +Using `htmlspecialchars()` in a perfectly valid HTML5 unquoted attribute value, +for example, is completely useless since the value can be terminated by a space +(among other things), which is never escaped. Thus, in this instance, we have a +conflict between a widely used HTML escaper and a modern HTML specification, +with no specific function available to cover this use case. While it's tempting +to blame users, or the HTML specification authors, escaping just needs to deal +with whatever HTML and browsers allow. + +Using `addslashes()`, custom backslash escaping, or `json_encode()` will +typically ignore HTML special characters such as ampersands, which may be used +to inject entities into Javascript. Under the right circumstances, the browser +will convert these entities into their literal equivalents before interpreting +Javascript, thus allowing attackers to inject arbitrary code. + +Inconsistencies with valid HTML, insecure default parameters, lack of character +encoding awareness, and misrepresentations of what functions are capable of by +some programmers — these all make escaping in PHP an unnecessarily +convoluted quest. + +To circumvent the lack of escaping methods in PHP, zend-escaper addresses the +need to apply context-specific escaping in web applications. It implements +methods that specifically target XSS and offers programmers a tool to secure +their applications without misusing other inadequate methods, or using, most +likely incomplete, home-grown solutions. + +## Why Contextual Escaping? + +To understand why multiple standardised escaping methods are needed, what +follows are several quick points; they are by no means a complete set of +reasons, however! + +### HTML escaping of unquoted HTML attribute values still allows XSS + +This is probably the best known way to defeat `htmlspecialchars()` when used on +attribute values, since any space (or character interpreted as a space — +there are a lot) lets you inject new attributes whose content can't be +neutralised by HTML escaping. The solution (where this is possible) is +additional escaping as defined by the OWASP ESAPI codecs. The point here can be +extended further — escaping only works if a programmer or designer knows +what they're doing. In many contexts, there are additional practices and gotchas +that need to be carefully monitored since escaping sometimes needs a little +extra help to protect against XSS — even if that means ensuring all +attribute values are properly double quoted despite this not being required for +valid HTML. + +### HTML escaping of CSS, Javascript or URIs is often reversed when passed to non-HTML interpreters by the browser + +HTML escaping is just that &mdsash; it's designed to escape a string for HTML +(i.e. prevent tag or attribute insertion), but not alter the underlying meaning +of the content, whether it be text, Javascript, CSS, or URIs. For that purpose, +a fully HTML-escaped version of any other context may still have its unescaped +form extracted before it's interpreted or executed. For this reason we need +separate escapers for Javascript, CSS, and URIs, and developers or designers +writing templates **must** know which escaper to apply to which context. Of +course, this means you need to be able to identify the correct context before +selecting the right escaper! + +### DOM-based XSS requires a defence using at least two levels of different escaping in many cases + +DOM-based XSS has become increasingly common as Javascript has taken off in +popularity for large scale client-side coding. A simple example is Javascript +defined in a template which inserts a new piece of HTML text into the DOM. If +the string is only HTML escaped, it may still contain Javascript that will +execute in that context. If the string is only Javascript-escaped, it may +contain HTML markup (new tags and attributes) which will be injected into the +DOM and parsed once the inserting Javascript executes. Damned either way? The +solution is to escape twice — first escape the string for HTML (make it +safe for DOM insertion), and then for Javascript (make it safe for the current +Javascript context). Nested contexts are a common means of bypassing naive +escaping habits (e.g. you can inject Javascript into a CSS expression within an +HTML attribute). + +### PHP has no known anti-XSS escape functions (only those kidnapped from their original purposes) + +A simple example, widely used, is when you see `json_encode()` used to escape +Javascript, or worse, some kind of mutant `addslashes()` implementation. These +were never designed to eliminate XSS, yet PHP programmers use them as such. For +example, `json_encode()` does not escape the ampersand or semi-colon characters +by default. That means you can easily inject HTML entities which could then be +decoded before the Javascript is evaluated in a HTML document. This lets you +break out of strings, add new JS statements, close tags, etc. In other words, +using `json_encode()` is insufficient and naive. The same, arguably, could be +said for `htmlspecialchars()` which has its own well known limitations that make +a singular reliance on it a questionable practice. diff --git a/vendor/zendframework/zend-escaper/mkdocs.yml b/vendor/zendframework/zend-escaper/mkdocs.yml new file mode 100644 index 000000000..48e7b311f --- /dev/null +++ b/vendor/zendframework/zend-escaper/mkdocs.yml @@ -0,0 +1,17 @@ +docs_dir: doc/book +site_dir: doc/html +pages: + - index.md + - Intro: intro.md + - Reference: + - "Theory of Operation": theory-of-operation.md + - Configuration: configuration.md + - "Escaping HTML": escaping-html.md + - "Escaping HTML Attributes": escaping-html-attributes.md + - "Escaping Javascript": escaping-javascript.md + - "Escaping CSS": escaping-css.md + - "Escaping URLs": escaping-url.md +site_name: zend-escaper +site_description: zend-escaper +repo_url: 'https://github.com/zendframework/zend-escaper' +copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' diff --git a/vendor/zendframework/zend-escaper/src/Escaper.php b/vendor/zendframework/zend-escaper/src/Escaper.php index 072d543f7..e68e32b05 100644 --- a/vendor/zendframework/zend-escaper/src/Escaper.php +++ b/vendor/zendframework/zend-escaper/src/Escaper.php @@ -24,12 +24,12 @@ class Escaper * * @var array */ - protected static $htmlNamedEntityMap = array( + protected static $htmlNamedEntityMap = [ 34 => 'quot', // quotation mark 38 => 'amp', // ampersand 60 => 'lt', // less-than sign 62 => 'gt', // greater-than sign - ); + ]; /** * Current encoding for escaping. If not UTF-8, we convert strings from this encoding @@ -41,13 +41,11 @@ class Escaper /** * Holds the value of the special flags passed as second parameter to - * htmlspecialchars(). We modify these for PHP 5.4 to take advantage - * of the new ENT_SUBSTITUTE flag for correctly dealing with invalid - * UTF-8 sequences. + * htmlspecialchars(). * - * @var string + * @var int */ - protected $htmlSpecialCharsFlags = ENT_QUOTES; + protected $htmlSpecialCharsFlags; /** * Static Matcher which escapes characters for HTML Attribute contexts @@ -75,7 +73,7 @@ class Escaper * * @var array */ - protected $supportedEncodings = array( + protected $supportedEncodings = [ 'iso-8859-1', 'iso8859-1', 'iso-8859-5', 'iso8859-5', 'iso-8859-15', 'iso8859-15', 'utf-8', 'cp866', 'ibm866', '866', 'cp1251', 'windows-1251', @@ -85,12 +83,11 @@ class Escaper 'big5-hkscs', 'shift_jis', 'sjis', 'sjis-win', 'cp932', '932', 'euc-jp', 'eucjp', 'eucjp-win', 'macroman' - ); + ]; /** * Constructor: Single parameter allows setting of global encoding for use by - * the current object. If PHP 5.4 is detected, additional ENT_SUBSTITUTE flag - * is set for htmlspecialchars() calls. + * the current object. * * @param string $encoding * @throws Exception\InvalidArgumentException @@ -116,14 +113,13 @@ class Escaper $this->encoding = $encoding; } - if (defined('ENT_SUBSTITUTE')) { - $this->htmlSpecialCharsFlags|= ENT_SUBSTITUTE; - } + // We take advantage of ENT_SUBSTITUTE flag to correctly deal with invalid UTF-8 sequences. + $this->htmlSpecialCharsFlags = ENT_QUOTES | ENT_SUBSTITUTE; // set matcher callbacks - $this->htmlAttrMatcher = array($this, 'htmlAttrMatcher'); - $this->jsMatcher = array($this, 'jsMatcher'); - $this->cssMatcher = array($this, 'cssMatcher'); + $this->htmlAttrMatcher = [$this, 'htmlAttrMatcher']; + $this->jsMatcher = [$this, 'jsMatcher']; + $this->cssMatcher = [$this, 'cssMatcher']; } /** @@ -248,7 +244,7 @@ class Escaper * replace it with while grabbing the integer value of the character. */ if (strlen($chr) > 1) { - $chr = $this->convertEncoding($chr, 'UTF-16BE', 'UTF-8'); + $chr = $this->convertEncoding($chr, 'UTF-32BE', 'UTF-8'); } $hex = bin2hex($chr); @@ -281,7 +277,13 @@ class Escaper return sprintf('\\x%02X', ord($chr)); } $chr = $this->convertEncoding($chr, 'UTF-16BE', 'UTF-8'); - return sprintf('\\u%04s', strtoupper(bin2hex($chr))); + $hex = strtoupper(bin2hex($chr)); + if (strlen($hex) <= 4) { + return sprintf('\\u%04s', $hex); + } + $highSurrogate = substr($hex, 0, 4); + $lowSurrogate = substr($hex, 4, 4); + return sprintf('\\u%04s\\u%04s', $highSurrogate, $lowSurrogate); } /** @@ -297,7 +299,7 @@ class Escaper if (strlen($chr) == 1) { $ord = ord($chr); } else { - $chr = $this->convertEncoding($chr, 'UTF-16BE', 'UTF-8'); + $chr = $this->convertEncoding($chr, 'UTF-32BE', 'UTF-8'); $ord = hexdec(bin2hex($chr)); } return sprintf('\\%X ', $ord); diff --git a/vendor/zendframework/zend-feed/CHANGELOG.md b/vendor/zendframework/zend-feed/CHANGELOG.md index 426cab529..55fa7cd5e 100644 --- a/vendor/zendframework/zend-feed/CHANGELOG.md +++ b/vendor/zendframework/zend-feed/CHANGELOG.md @@ -2,12 +2,65 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. -## 2.5.2 - TBD +## 2.7.0 - 2016-02-11 ### Added +- [#21](https://github.com/zendframework/zend-feed/pull/21) edits, revises, and + prepares the documentation for publication at https://zendframework.github.io/zend-feed/ + +### Deprecated + - Nothing. +### Removed + +- Nothing. + +### Fixed + +- [#20](https://github.com/zendframework/zend-feed/pull/20) makes the two + zend-servicemanager extension manager implementations forwards compatible + with version 3, and the overall code base forwards compatible with zend-stdlib + v3. + +## 2.6.0 - 2015-11-24 + +### Added + +- [#13](https://github.com/zendframework/zend-feed/pull/13) introduces + `Zend\Feed\Writer\StandaloneExtensionManager`, an implementation of + `Zend\Feed\Writer\ExtensionManagerInterface` that has no dependencies. + `Zend\Feed\Writer\ExtensionManager` now composes this by default, instead of + `Zend\Feed\Writer\ExtensionPluginManager`, for managing the various feed and + entry extensions. If you relied on `ExtensionPluginManager` previously, you + will need to create an instance manually and inject it into the `Writer` + instance. +- [#14](https://github.com/zendframework/zend-feed/pull/14) introduces: + - `Zend\Feed\Reader\Http\HeaderAwareClientInterface`, which extends + `ClientInterface` and adds an optional argument to the `get()` method, + `array $headers = []`; this argument allows specifying request headers for + the client to send. `$headers` should have header names for keys, and the + values should be arrays of strings/numbers representing the header values + (if only a single value is necessary, it should be represented as an single + value array). + - `Zend\Feed\Reader\Http\HeaderAwareResponseInterface`, which extends + `ResponseInterface` and adds the method `getHeader($name, $default = null)`. + Clients may return either a `ResponseInterface` or + `HeaderAwareResponseInterface` instance. + - `Zend\Feed\Reader\Http\Response`, which is an implementation of + `HeaderAwareResponseInterface`. Its constructor accepts the status code, + body, and, optionally, headers. + - `Zend\Feed\Reader\Http\Psr7ResponseDecorator`, which is an implementation of + `HeaderAwareResponseInterface`. Its constructor accepts a PSR-7 response + instance, and the various methdos then proxy to those methods. This should + make creating wrappers for PSR-7 HTTP clients trivial. + - `Zend\Feed\Reader\Http\ZendHttpClientDecorator`, which decorates a + `Zend\Http\Client` instance, implements `HeaderAwareClientInterface`, and + returns a `Response` instance seeded from the zend-http response upon + calling `get()`. The class exposes a `getDecoratedClient()` method to allow + retrieval of the decorated zend-http client instance. + ### Deprecated - Nothing. @@ -23,3 +76,19 @@ All notable changes to this project will be documented in this file, in reverse - [#2](https://github.com/zendframework/zend-feed/pull/2) ensures that the routine for "absolutising" a link in `Reader\FeedSet` always generates a URI with a scheme. +- [#14](https://github.com/zendframework/zend-feed/pull/14) makes the following + changes to fix behavior around HTTP clients used within + `Zend\Feed\Reader\Reader`: + - `setHttpClient()` now ensures that the passed client is either a + `Zend\Feed\Reader\Http\ClientInterface` or `Zend\Http\Client`, raising an + `InvalidArgumentException` if neither. If a `Zend\Http\Client` is passed, it + is passed to the constructor of `Zend\Feed\Reader\Http\ZendHttpClientDecorator`, + and the decorator instance is used. + - `getHttpClient()` now *always* returns a `Zend\Feed\Reader\Http\ClientInterface` + instance. If no instance is currently registered, it lazy loads a + `ZendHttpClientDecorator` instance. + - `import()` was updated to consume a `ClientInterface` instance; when caches + are in play, it checks the client against `HeaderAwareClientInterface` to + determine if it can check for HTTP caching headers, and, if so, to retrieve + them. + - `findFeedLinks()` was updated to consume a `ClientInterface`. diff --git a/vendor/zendframework/zend-feed/README.md b/vendor/zendframework/zend-feed/README.md index ba8b8726c..3e2afd557 100644 --- a/vendor/zendframework/zend-feed/README.md +++ b/vendor/zendframework/zend-feed/README.md @@ -10,4 +10,4 @@ structure with the same natural syntax, and turning the result back into XML. - File issues at https://github.com/zendframework/zend-feed/issues -- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-feed +- Documentation is at https://zendframework.github.io/zend-feed/ diff --git a/vendor/zendframework/zend-feed/composer.json b/vendor/zendframework/zend-feed/composer.json index 2c29f0672..0183b5d72 100644 --- a/vendor/zendframework/zend-feed/composer.json +++ b/vendor/zendframework/zend-feed/composer.json @@ -13,32 +13,34 @@ } }, "require": { - "php": ">=5.5", - "zendframework/zend-escaper": "~2.5", - "zendframework/zend-stdlib": "~2.5" + "php": "^5.5 || ^7.0", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "zendframework/zend-db": "~2.5", - "zendframework/zend-cache": "~2.5", - "zendframework/zend-http": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-validator": "~2.5", + "zendframework/zend-db": "^2.5", + "zendframework/zend-cache": "^2.5", + "zendframework/zend-http": "^2.5", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-validator": "^2.5", "fabpot/php-cs-fixer": "1.7.*", - "phpunit/PHPUnit": "~4.0" + "phpunit/PHPUnit": "~4.0", + "psr/http-message": "^1.0" }, "suggest": { - "zendframework/zend-cache": "Zend\\Cache component", - "zendframework/zend-db": "Zend\\Db component", + "psr/http-message": "PSR-7 ^1.0, if you wish to use Zend\\Feed\\Reader\\Http\\Psr7ResponseDecorator", + "zendframework/zend-cache": "Zend\\Cache component, for optionally caching feeds between requests", + "zendframework/zend-db": "Zend\\Db component, for use with PubSubHubbub", "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations", - "zendframework/zend-validator": "Zend\\Validator component" + "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for easily extending ExtensionManager implementations", + "zendframework/zend-validator": "Zend\\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent" }, "minimum-stability": "dev", "prefer-stable": true, "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" } }, "autoload-dev": { @@ -46,4 +48,4 @@ "ZendTest\\Feed\\": "test/" } } -} \ No newline at end of file +} diff --git a/vendor/zendframework/zend-feed/doc/book/consuming-atom-entry.md b/vendor/zendframework/zend-feed/doc/book/consuming-atom-entry.md new file mode 100644 index 000000000..280e32bd7 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/consuming-atom-entry.md @@ -0,0 +1,23 @@ +# Consuming a Single Atom Entry + +Single Atom `` elements are also valid by themselves. Usually the URL for +an entry is the feed's URL followed by `/`, such as +`http://atom.example.com/feed/1`, using the example URL we used above. This +pattern may exist for some web services which use Atom as a container syntax. + +If you read a single entry, you will have a `Zend\Feed\Reader\Entry\Atom` object. + +## Reading a Single-Entry Atom Feed + +```php +$entry = Zend\Feed\Reader\Reader::import('http://atom.example.com/feed/1'); +echo 'Entry title: ' . $entry->getTitle(); +``` + +> ## Importing requires an HTTP client +> +> To import a feed, you will need to have an [HTTP client](zend.feed.http-clients) +> available. +> +> If you are not using zend-http, you will need to inject `Reader` with the HTTP +> client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader). diff --git a/vendor/zendframework/zend-feed/doc/book/consuming-atom.md b/vendor/zendframework/zend-feed/doc/book/consuming-atom.md new file mode 100644 index 000000000..fdee05ac1 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/consuming-atom.md @@ -0,0 +1,62 @@ +# Consuming Atom Feeds + +`Zend\Feed\Reader\Feed\Atom` is used in much the same way as +`Zend\Feed\Reader\Feed\Rss`. It provides the same access to feed-level +properties and iteration over entries in the feed. The main difference is in the +structure of the Atom protocol itself. Atom is a successor to RSS; it is a +more generalized protocol and it is designed to deal more easily with feeds that +provide their full content inside the feed, splitting RSS' `description` tag +into two elements, `summary` and `content`, for that purpose. + +## Basic Use of an Atom Feed + +Read an Atom feed and print the `title` and `summary` of each entry: + +```php +$feed = Zend\Feed\Reader\Reader::import('http://atom.example.com/feed/'); +echo 'The feed contains ' . $feed->count() . ' entries.' . "\n\n"; +foreach ($feed as $entry) { + echo 'Title: ' . $entry->getTitle() . "\n"; + echo 'Description: ' . $entry->getDescription() . "\n"; + echo 'URL: ' . $entry->getLink() . "\n\n"; +} +``` + +> ## Importing requires an HTTP client +> +> To import a feed, you will need to have an [HTTP client](zend.feed.http-clients) +> available. +> +> If you are not using zend-http, you will need to inject `Reader` with the HTTP +> client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader). + +In an Atom feed, you can expect to find the following feed properties: + +- `title`: The feed's title, same as RSS' channel title. +- `id`: Every feed and entry in Atom has a unique identifier. +- `link`: Feeds can have multiple links, which are distinguished by a `type` + attribute. The equivalent to RSS's channel link would be `type="text/html"`. + If the link is to an alternate version of the same content that's in the feed, + it would have a `rel="alternate"` attribute. +- `subtitle`: The feed's description, equivalent to RSS' channel description. +- `author`: The feed's author, with `name` and `email` sub-tags. + +Atom entries commonly have the following properties: + +- `id`: The entry's unique identifier. +- `title`: The entry's title, same as RSS item titles. +- `link`: A link to another format or an alternate view of this entry. + The link property of an atom entry typically has an `href` attribute. +- `summary`: A summary of this entry's content. +- `content`: The full content of the entry; can be skipped if the feed just + contains summaries. +- `author`: with `name` and `email` sub-tags like feeds have. +- `published`: the date the entry was published, in RFC 3339 format. +- `updated`: the date the entry was last updated, in RFC 3339 format. + +Where relevant, `Zend\Feed` supports a number of common RSS extensions including +Dublin Core; Content, Slash, Syndication, and Syndication/Thread; and several +others in common use on blogs. + +For more information on Atom and plenty of resources, see +[http://www.atomenabled.org/](http://www.atomenabled.org/). diff --git a/vendor/zendframework/zend-feed/doc/book/consuming-rss.md b/vendor/zendframework/zend-feed/doc/book/consuming-rss.md new file mode 100644 index 000000000..f965a0c4f --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/consuming-rss.md @@ -0,0 +1,99 @@ +# Consuming RSS Feeds + +## Reading a feed + +To read an RSS feed, pass its URL to `Zend\Feed\Reader\Reader::import()`: + +```php +$channel = Zend\Feed\Reader\Reader::import('http://rss.example.com/channelName'); +``` + +> ## Importing requires an HTTP client +> +> To import a feed, you will need to have an [HTTP client](zend.feed.http-clients) +> available. +> +> If you are not using zend-http, you will need to inject `Reader` with the HTTP +> client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader). + +If any errors occur fetching the feed, a +`Zend\Feed\Reader\Exception\RuntimeException` will be thrown. + +## Get properties + +Once you have a feed object, you can access any of the standard RSS channel +properties via the various instance getter methods: + +```php +echo $channel->getTitle(); +echo $channel->getAuthor(); +// etc. +``` + +If channel properties have attributes, the getter method will return a key/value +pair, where the key is the attribute name, and the value is the attribute value. + +```php +$author = $channel->getAuthor(); +echo $author['name']; +``` + +Most commonly, you'll want to loop through the feed and do something with its +entries. `Zend\Feed\Reader\Feed\Rss` internally converts all entries to a +`Zend\Feed\Reader\Entry\Rss` instance. Entry properties, similarly to channel +properties, can be accessed via getter methods, such as `getTitle`, +`getDescription`, etc. + +An example of printing all titles of articles in a channel is: + +```php +foreach ($channel as $item) { + echo $item->getTitle() . "\n"; +} +``` + +If you are not familiar with RSS, here are the standard elements you can expect +to be available in an RSS channel and in individual RSS items (entries). + +Required channel elements: + +- `title`: The name of the channel. +- `link`: The URL of the web site corresponding to the channel. +- `description`: A sentence (or more) describing the channel. + +Common optional channel elements: + +- `pubDate`: The publication date of this set of content, in RFC 822 date + format. +- `language`: The language the channel is written in. +- `category`: One or more (specified by multiple tags) categories the channel + belongs to. + +RSS `` elements do not have any strictly required elements. However, +either `title` or `description` must be present. + +Common item elements: + +- `title`: The title of the item. +- `link`: The URL of the item. +- `description`: A synopsis of the item. +- `author`: The author's email address. +- `category`: One more categories that the item belongs to. +- `comments`: URL of comments relating to this item. +- `pubDate`: The date the item was published, in RFC 822 date format. + +In your code you can always test to see if an element is non-empty by calling +the getter: + +```php +if ($item->getPropname()) { + // ... proceed. +} +``` + +Where relevant, `Zend\Feed` supports a number of common RSS extensions including +Dublin Core, Atom (inside RSS); the Content, Slash, Syndication, +Syndication/Thread extensions; as well as several others. + +Please see the official [RSS 2.0 specification](http://cyber.law.harvard.edu/rss/rss.html) +for further information. diff --git a/vendor/zendframework/zend-feed/doc/book/find-feeds.md b/vendor/zendframework/zend-feed/doc/book/find-feeds.md new file mode 100644 index 000000000..0f934072b --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/find-feeds.md @@ -0,0 +1,48 @@ +# Feed Discovery from Web Pages + +Web pages often contain `` tags that refer to feeds with content relevant +to the particular page. `Zend\Feed\Reader\Reader` enables you to retrieve all +feeds referenced by a web page with one method call: + +```php +$feedLinks = Zend\Feed\Reader\Reader::findFeedLinks('http://www.example.com/news.html'); +``` + +> ## Finding feed links requires an HTTP client +> +> To find feed links, you will need to have an [HTTP client](zend.feed.http-clients) +> available. +> +> If you are not using zend-http, you will need to inject `Reader` with the HTTP +> client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader). + +Here the `findFeedLinks()` method returns a `Zend\Feed\Reader\FeedSet` object, +which is in turn a collection of other `Zend\Feed\Reader\FeedSet` objects, each +referenced by `` tags on the `news.html` web page. +`Zend\Feed\Reader\Reader` will throw a +`Zend\Feed\Reader\Exception\RuntimeException` upon failure, such as an HTTP +404 response code or a malformed feed. + +You can examine all feed links located by iterating across the collection: + +```php +$rssFeed = null; +$feedLinks = Zend\Feed\Reader\Reader::findFeedLinks('http://www.example.com/news.html'); +foreach ($feedLinks as $link) { + if (stripos($link['type'], 'application/rss+xml') !== false) { + $rssFeed = $link['href']; + break; +} +``` + +Each `Zend\Feed\Reader\FeedSet` object will expose the `rel`, `href`, `type`, +and `title` properties of detected links for all RSS, Atom, or RDF feeds. You +can always select the first encountered link of each type by using a shortcut: +the first encountered link of a given type is assigned to a property named after +the feed type. + +```php +$rssFeed = null; +$feedLinks = Zend\Feed\Reader\Reader::findFeedLinks('http://www.example.com/news.html'); +$firstAtomFeed = $feedLinks->atom; +``` diff --git a/vendor/zendframework/zend-feed/doc/book/http-clients.md b/vendor/zendframework/zend-feed/doc/book/http-clients.md new file mode 100644 index 000000000..9b9363498 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/http-clients.md @@ -0,0 +1,236 @@ +# HTTP Clients and zend-feed + +Several operations in zend-feed's Reader subcomponent require an HTTP client: + +- importing a feed +- finding links in a feed + +In order to allow developers a choice in HTTP clients, the subcomponent defines +several interfaces and classes. Elsewhere in the documentation, we reference +where an HTTP client may be used; this document details what constitutes an HTTP +client and its behavior, and some of the concrete classes available within the +component for implementing this behavior. + +## ClientInterface and HeaderAwareClientInterface + +First, we define two interfaces for clients, +`Zend\Feed\Reader\Http\ClientInterface` and `HeaderAwareClientInterface`: + +```php +namespace Zend\Feed\Reader\Http; + +interface ClientInterface +{ + /** + * Make a GET request to a given URL. + * + * @param string $url + * @return ResponseInterface + */ + public function get($url); +} + +interface HeaderAwareClientInterface extends ClientInterface +{ + /** + * Make a GET request to a given URL. + * + * @param string $url + * @param array $headers + * @return ResponseInterface + */ + public function get($url, array $headers = []); +} +``` + +The first is header-agnostic, and assumes that the client will simply perform an +HTTP GET request. The second allows providing headers to the client; typically, +these are used for HTTP caching headers. `$headers` must be in the following +structure: + +```php +$headers = [ + 'X-Header-Name' => [ + 'header', + 'values', + ], +]; +``` + +i.e., each key is a header name, and each value is an array of values for that +header. If the header represents only a single value, it should be an array with +that value: + +```php +$headers = [ + 'Accept' => [ 'application/rss+xml' ], +]; +``` + +A call to `get()` should yield a *response*. + +## ResponseInterface and HeaderAwareResponseInterface + +Responses are modeled using `Zend\Feed\Reader\Http\ResponseInterface` and +`HeaderAwareResponseInterface`: + +```php +namespace Zend\Feed\Reader\Http; + +class ResponseInterface +{ + /** + * Retrieve the status code. + * + * @return int + */ + public function getStatusCode(); + + /** + * Retrieve the response body contents. + * + * @return string + */ + public function getBody(); +} + +class HeaderAwareResponseInterface extends ResponseInterface +{ + /** + * Retrieve a named header line. + * + * Retrieve a header by name; all values MUST be concatenated to a single + * line. If no matching header is found, return the $default value. + * + * @param string $name + * @param null|string $default + * @return string + public function getHeaderLine($name, $default = null); +} +``` + +Internally, `Reader` will typehint against `ClientInterface` for the bulk of +operations. In some cases, however, certain capabilities are only possible if +the response can provide headers (e.g., for caching); in such cases, it will +check the instance against `HeaderAwareResponseInterface`, and only call +`getHeaderLine()` if it matches. + +## Response + +zend-feed ships with a generic `ResponseInterface` implementation, +`Zend\Feed\Http\Response`. It implements `HeaderAwareResponseInterface`, and +defines the following constructor: + +```php +namespace Zend\Feed\Reader\Http; + +class Response implements HeaderAwareResponseInterface +{ + /** + * Constructor + * + * @param int $statusCode Response status code + * @param string $body Response body + * @param array $headers Response headers, if available + */ + public function __construct($statusCode, $body, array $headers = []); +} +``` + +## PSR-7 Response + +[PSR-7](http://www.php-fig.org/psr/psr-7/) defines a set of HTTP message +interfaces, but not a client interface. To facilitate wrapping an HTTP client +that uses PSR-7 messages, we provide `Zend\Feed\Reader\Psr7ResponseDecorator`: + +```php +namespace Zend\Feed\Reader\Http; + +use Psr\Http\Message\ResponseInterface as PsrResponseInterface; + +class Psr7ResponseDecorator implements HeaderAwareResponseInterface +{ + /** + * @param PsrResponseInterface $response + */ + public function __construct(PsrResponseInterface $response); + + /** + * @return PsrResponseInterface + */ + public function getDecoratedResponse(); +} +``` + +Clients can then take the PSR-7 response they receive, pass it to the decorator, +and return the decorator. + +To use the PSR-7 response, you will need to add the PSR-7 interfaces to your +application, if they are not already installed by the client of your choice: + +```bash +$ composer require psr/http-message +``` + +## zend-http + +We also provide a zend-http client decorator, +`Zend\Feed\Reader\Http\ZendHttpClientDecorator`: + +```php +namespace Zend\Feed\Reader\Http; + +use Zend\Http\Client as HttpClient; + +class ZendHttpClientDecorator implements HeaderAwareClientInterface +{ + /** + * @param HttpClient $client + */ + public function __construct(HttpClient $client); + + /** + * @return HttpClient + */ + public function getDecoratedClient(); +} +``` + +Its `get()` implementation returns a `Response` instance seeded from the +zend-http response returned, including status, body, and headers. + +zend-http is the default implementation assumed by `Zend\Feed\Reader\Reader`, +but *is not installed by default*. You may install it using composer: + +```bash +$ composer require zendframework/zend-http +``` + +## Providing a client to Reader + +By default, `Zend\Feed\Reader\Reader` will lazy load a zend-http client. If you +have not installed zend-http, however, PHP will raise an error indicating the +class is not found! + +As such, you have two options: + +1. Install zend-http: `composer require zendframework/zend-http`. +2. Inject the `Reader` with your own HTTP client. + +To accomplish the second, you will need an implementation of +`Zend\Feed\Reader\Http\ClientInterface` or `HeaderAwareClientInterface`, and an +instance of that implementation. Once you do, you can use the static method +`setHttpClient()` to inject it. + +As an example, let's say you've created a PSR-7-based implementation named +`My\Http\Psr7FeedClient`. You could then do the following: + +```php +use My\Http\Psr7FeedClient; +use Zend\Feed\Reader\Reader; + +Reader::setHttpClient(new Psr7FeedClient()); +``` + +Your client will then be used for all `import()` and `findFeedLinks()` +operations. diff --git a/vendor/zendframework/zend-feed/doc/book/importing.md b/vendor/zendframework/zend-feed/doc/book/importing.md new file mode 100644 index 000000000..52b58936d --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/importing.md @@ -0,0 +1,49 @@ +# Importing Feeds + +`Zend\Feed` enables developers to retrieve feeds via `Zend\Feader\Reader`. If +you know the URI of a feed, use the `Zend\Feed\Reader\Reader::import()` method +to consume it: + +```php +$feed = Zend\Feed\Reader\Reader::import('http://feeds.example.com/feedName'); +``` + +> ## Importing requires an HTTP client +> +> To import a feed, you will need to have an [HTTP client](zend.feed.http-clients) +> available. +> +> If you are not using zend-http, you will need to inject `Reader` with the HTTP +> client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader). + +You can also use `Zend\Feed\Reader\Reader` to fetch the contents of a feed from +a file or the contents of a PHP string variable: + +```php +// importing a feed from a text file +$feedFromFile = Zend\Feed\Reader\Reader::importFile('feed.xml'); + +// importing a feed from a PHP string variable +$feedFromPHP = Zend\Feed\Reader\Reader::importString($feedString); +``` + +In each of the examples above, an object of a class that extends +`Zend\Feed\Reader\Feed\AbstractFeed` is returned upon success, depending on the +type of the feed. If an RSS feed were retrieved via one of the import methods +above, then a `Zend\Feed\Reader\Feed\Rss` object would be returned. On the other +hand, if an Atom feed were imported, then a `Zend\Feed\Reader\Feed\Atom` object +is returned. The import methods will also throw a +`Zend\Feed\Exception\Reader\RuntimeException` object upon failure, such as an +unreadable or malformed feed. + +## Dumping the contents of a feed + +To dump the contents of a `Zend\Feed\Reader\Feed\AbstractFeed` instance, you may +use the `saveXml()` method. + +```php +assert($feed instanceof Zend\Feed\Reader\Feed\AbstractFeed); + +// dump the feed to standard output +print $feed->saveXml(); +``` diff --git a/vendor/zendframework/zend-feed/doc/book/index.html b/vendor/zendframework/zend-feed/doc/book/index.html new file mode 100644 index 000000000..f05b9c110 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/index.html @@ -0,0 +1,10 @@ +
    +
    +

    zend-feed

    + +

    Consume and generate Atom and RSS feeds, and interact with Pubsubhubbub.

    + +
    $ composer require zendframework/zend-feed
    +
    +
    + diff --git a/vendor/zendframework/zend-feed/doc/book/index.md b/vendor/zendframework/zend-feed/doc/book/index.md new file mode 100644 index 000000000..3e2afd557 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/index.md @@ -0,0 +1,13 @@ +# zend-feed + +[![Build Status](https://secure.travis-ci.org/zendframework/zend-feed.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-feed) +[![Coverage Status](https://coveralls.io/repos/zendframework/zend-feed/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-feed?branch=master) + +`Zend\Feed` provides functionality for consuming RSS and Atom feeds. It provides +a natural syntax for accessing elements of feeds, feed attributes, and entry +attributes. `Zend\Feed` also has extensive support for modifying feed and entry +structure with the same natural syntax, and turning the result back into XML. + + +- File issues at https://github.com/zendframework/zend-feed/issues +- Documentation is at https://zendframework.github.io/zend-feed/ diff --git a/vendor/zendframework/zend-feed/doc/book/intro.md b/vendor/zendframework/zend-feed/doc/book/intro.md new file mode 100644 index 000000000..784aac8f5 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/intro.md @@ -0,0 +1,62 @@ +# Introduction + +`Zend\Feed` provides functionality for consuming RSS and Atom feeds. It provides +a natural syntax for accessing elements of feeds, feed attributes, and entry +attributes. `Zend\Feed` also has extensive support for modifying feed and entry +structure with the same natural syntax, and turning the result back into XML. +In the future, this modification support could provide support for the Atom +Publishing Protocol. + +`Zend\Feed` consists of `Zend\Feed\Reader` for reading RSS and Atom feeds, +`Zend\Feed\Writer` for writing RSS and Atom feeds, and `Zend\Feed\PubSubHubbub` +for working with Hub servers. Furthermore, both `Zend\Feed\Reader` and +`Zend\Feed\Writer` support extensions which allows for working with additional +data in feeds, not covered in the core API but used in conjunction with RSS and +Atom feeds. + +In the example below, we demonstrate a simple use case of retrieving an RSS feed +and saving relevant portions of the feed data to a simple PHP array, which could +then be used for printing the data, storing to a database, etc. + +> ## RSS optional properties +> +> Many *RSS* feeds have different channel and item properties available. The +> *RSS* specification provides for many optional properties, so be aware of this +> when writing code to work with *RSS* data. `Zend\Feed` supports all optional +> properties of the core *RSS* and *Atom* specifications. + +## Reading RSS Feed Data + +```php +// Fetch the latest Slashdot headlines +try { + $slashdotRss = + Zend\Feed\Reader\Reader::import('http://rss.slashdot.org/Slashdot/slashdot'); +} catch (Zend\Feed\Reader\Exception\RuntimeException $e) { + // feed import failed + echo "Exception caught importing feed: {$e->getMessage()}\n"; + exit; +} + +// Initialize the channel/feed data array +$channel = [ + 'title' => $slashdotRss->getTitle(), + 'link' => $slashdotRss->getLink(), + 'description' => $slashdotRss->getDescription(), + 'items' => [], +]; + +// Loop over each channel item/entry and store relevant data for each +foreach ($slashdotRss as $item) { + $channel['items'][] = [ + 'title' => $item->getTitle(), + 'link' => $item->getLink(), + 'description' => $item->getDescription(), + ]; +} +``` + +Your `$channel` array now contains the basic meta-information for the RSS +channel and all items that it contained. The process is identical for Atom +feeds since `Zend\Feed` provides a common feed API; i.e. all getters and +setters are the same regardless of feed format. diff --git a/vendor/zendframework/zend-feed/doc/book/pubsubhubbub.md b/vendor/zendframework/zend-feed/doc/book/pubsubhubbub.md new file mode 100644 index 000000000..c5719fa44 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/pubsubhubbub.md @@ -0,0 +1,452 @@ +# Zend\\Feed\\PubSubHubbub + +`Zend\Feed\PubSubHubbub` is an implementation of the [PubSubHubbub Core 0.2/0.3 +Specification (Working Draft)](http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html). +It offers implementations of a Pubsubhubbub Publisher and Subscriber suited to +PHP applications. + +## What is PubSubHubbub? + +Pubsubhubbub is an open, simple, web-scale, pubsub protocol. A common use case +to enable blogs (Publishers) to "push" updates from their RSS or Atom feeds +(Topics) to end Subscribers. These Subscribers will have subscribed to the +blog's RSS or Atom feed via a Hub, a central server which is notified of any +updates by the Publisher, and which then distributes these updates to all +Subscribers. Any feed may advertise that it supports one or more Hubs using an +Atom namespaced link element with a rel attribute of "hub" (i.e., `rel="hub"`). + +Pubsubhubbub has garnered attention because it is a pubsub protocol which is +easy to implement and which operates over HTTP. Its philosophy is to replace the +traditional model where blog feeds have been polled at regular intervals to +detect and retrieve updates. Depending on the frequency of polling, this can +take a lot of time to propagate updates to interested parties from planet +aggregators to desktop readers. With a pubsub system in place, updates are not +simply polled by Subscribers, they are pushed to Subscribers, eliminating any +delay. For this reason, Pubsubhubbub forms part of what has been dubbed the +real-time web. + +The protocol does not exist in isolation. Pubsub systems have been around for a +while, such as the familiar Jabber Publish-Subscribe protocol, +[XEP-0060](http://www.xmpp.org/extensions/xep-0060.html), or the less well-known +[rssCloud](http://www.rssboard.org/rsscloud-interface) (described in 2001). +However, these have not achieved widespread adoption due to either their +complexity, poor timing, or lack of suitability for web applications. rssCloud, +which was recently revived as a response to the appearance of Pubsubhubbub, has +also seen its usage increase significantly, though it lacks a formal +specification and currently does not support Atom 1.0 feeds. + +Perhaps surprisingly given its relative early age, Pubsubhubbub is already in +use including in Google Reader and Feedburner, and there are plugins available +for Wordpress blogs. + +## Architecture + +`Zend\Feed\PubSubHubbub` implements two sides of the Pubsubhubbub 0.2/0.3 +Specification: a Publisher and a Subscriber. It does not currently implement a +Hub Server. + +A Publisher is responsible for notifying all supported Hubs (many can be +supported to add redundancy to the system) of any updates to its feeds, whether +they be Atom or RSS based. This is achieved by pinging the supported Hub Servers +with the URL of the updated feed. In Pubsubhubbub terminology, any updatable +resource capable of being subscribed to is referred to as a Topic. Once a ping +is received, the Hub will request the updated feed, process it for updated +items, and forward all updates to all Subscribers subscribed to that feed. + +A Subscriber is any party or application which subscribes to one or more Hubs to +receive updates from a Topic hosted by a Publisher. The Subscriber never +directly communicates with the Publisher since the Hub acts as an intermediary, +accepting subscriptions and sending updates to Subscribers. The Subscriber +therefore communicates only with the Hub, either to subscribe or unsubscribe to +Topics, or when it receives updates from the Hub. This communication design +("Fat Pings") effectively removes the possibility of a "Thundering Herd" issue. +(Thundering Herds occur in a pubsub system where the Hub merely informs +Subscribers that an update is available, prompting all Subscribers to +immediately retrieve the feed from the Publisher, giving rise to a traffic +spike.) In Pubsubhubbub, the Hub distributes the actual update in a "Fat Ping" +so the Publisher is not subjected to any traffic spike. + +`Zend\Feed\PubSubHubbub` implements Pubsubhubbub Publishers and Subscribers with +the classes `Zend\Feed\PubSubHubbub\Publisher` and +`Zend\Feed\PubSubHubbub\Subscriber`. In addition, the Subscriber implementation +may handle any feed updates forwarded from a Hub by using +`Zend\Feed\PubSubHubbub\Subscriber\Callback`. These classes, their use cases, +and etheir APIs are covered in subsequent sections. + +## Zend\\Feed\\PubSubHubbub\\Publisher + +In Pubsubhubbub, the Publisher is the party publishing a live feed with content +updates. This may be a blog, an aggregator, or even a web service with a public +feed based API. In order for these updates to be pushed to Subscribers, the +Publisher must notify all of its supported Hubs that an update has occurred +using a simple HTTP POST request containing the URI of the updated Topic (i.e., +the updated RSS or Atom feed). The Hub will confirm receipt of the notification, +fetch the updated feed, and forward any updates to any Subscribers who have +subscribed to that Hub for updates from the relevant feed. + +By design, this means the Publisher has very little to do except send these Hub +pings whenever its feeds change. As a result, the Publisher implementation is +extremely simple to use and requires very little work to setup and use when +feeds are updated. + +`Zend\Feed\PubSubHubbub\Publisher` implements a full Pubsubhubbub Publisher. Its +setup for use primarily requires that it is configured with the URI endpoint for +all Hubs to be notified of updates, and the URIs of all Topics to be included in +the notifications. + +The following example shows a Publisher notifying a collection of Hubs about +updates to a pair of local RSS and Atom feeds. The class retains a collection of +errors which include the Hub URLs, so that notification can be attempted again +later and/or logged if any notifications happen to fail. Each resulting error +array also includes a "response" key containing the related HTTP response +object. In the event of any errors, it is strongly recommended to attempt the +operation for failed Hub Endpoints at least once more at a future time. This may +require the use of either a scheduled task for this purpose or a job queue, +though such extra steps are optional. + +```php +use Zend\Feed\PubSubHubbub\Publisher; + +$publisher = Publisher; +$publisher->addHubUrls([ + 'http://pubsubhubbub.appspot.com/', + 'http://hubbub.example.com', +]); +$publisher->addUpdatedTopicUrls([ + 'http://www.example.net/rss', + 'http://www.example.net/atom', +]); +$publisher->notifyAll(); + +if (! $publisher->isSuccess()) { + // check for errors + $errors = $publisher->getErrors(); + $failedHubs = []; + foreach ($errors as $error) { + $failedHubs[] = $error['hubUrl']; + } +} + +// reschedule notifications for the failed Hubs in $failedHubs +``` + +If you prefer having more concrete control over the Publisher, the methods +`addHubUrls()` and `addUpdatedTopicUrls()` pass each array value to the singular +`addHubUrl()` and `addUpdatedTopicUrl()` public methods. There are also matching +`removeUpdatedTopicUrl()` and `removeHubUrl()` methods. + +You can also skip setting Hub URIs, and notify each in turn using the +`notifyHub()` method which accepts the URI of a Hub endpoint as its only +argument. + +There are no other tasks to cover. The Publisher implementation is very simple +since most of the feed processing and distribution is handled by the selected +Hubs. It is, however, important to detect errors and reschedule notifications as +soon as possible (with a reasonable maximum number of retries) to ensure +notifications reach all Subscribers. In many cases, as a final alternative, Hubs +may frequently poll your feeds to offer some additional tolerance for failures +both in terms of their own temporary downtime or Publisher errors or downtime. + +## Zend\\Feed\\PubSubHubbub\\Subscriber + +In Pubsubhubbub, the Subscriber is the party who wishes to receive updates to +any Topic (RSS or Atom feed). They achieve this by subscribing to one or more of +the Hubs advertised by that Topic, usually as a set of one or more Atom 1.0 +links with a rel attribute of "hub" (i.e., `rel="hub"`). The Hub from that point +forward will send an Atom or RSS feed containing all updates to that +Subscriber's callback URL when it receives an update notification from the +Publisher. In this way, the Subscriber need never actually visit the original +feed (though it's still recommended at some level to ensure updates are +retrieved if ever a Hub goes offline). All subscription requests must contain +the URI of the Topic being subscribed and a callback URL which the Hub will use +to confirm the subscription and to forward updates. + +The Subscriber therefore has two roles. The first is to *create* and *manage* +subscriptions, including subscribing for new Topics with a Hub, unsubscribing +(if necessary), and periodically renewing subscriptions, since they may have an +expiry set by the Hub. This is handled by `Zend\Feed\PubSubHubbub\Subscriber`. + +The second role is to *accept updates* sent by a Hub to the Subscriber's +callback URL, i.e. the URI the Subscriber has assigned to handle updates. The +callback URL also handles events where the Hub contacts the Subscriber to +confirm all subscriptions and unsubscriptions. This is handled by using an +instance of `Zend\Feed\PubSubHubbub\Subscriber\Callback` when the callback URL +is accessed. + +> ### Query strings in callback URLs +> +> `Zend\Feed\PubSubHubbub\Subscriber` implements the Pubsubhubbub 0.2/0.3 +> specification. As this is a new specification version, not all Hubs currently +> implement it. The new specification allows the callback URL to include a query +> string which is used by this class, but not supported by all Hubs. In the +> interests of maximising compatibility, it is therefore recommended that the +> query string component of the Subscriber callback URI be presented as a path +> element, i.e. recognised as a parameter in the route associated with the +> callback URI and used by the application's router. + +### Subscribing and Unsubscribing + +`Zend\Feed\PubSubHubbub\Subscriber` implements a full Pubsubhubbub Subscriber +capable of subscribing to, or unsubscribing from, any Topic via any Hub +advertised by that Topic. It operates in conjunction with +`Zend\Feed\PubSubHubbub\Subscriber\Callback`, which accepts requests from a Hub +to confirm all subscription or unsubscription attempts (to prevent third-party +misuse). + +Any subscription (or unsubscription) requires the relevant information before +proceeding, i.e. the URI of the Topic (Atom or RSS feed) to be subscribed to for +updates, and the URI of the endpoint for the Hub which will handle the +subscription and forwarding of the updates. The lifetime of a subscription may +be determined by the Hub, but most Hubs should support automatic subscription +refreshes by checking with the Subscriber. This is supported by +`Zend\Feed\PubSubHubbub\Subscriber\Callback` and requires no other work on your +part. It is still strongly recommended that you use the Hub-sourced subscription +time-to.live (ttl) to schedule the creation of new subscriptions (the process is +identical to that for any new subscription) to refresh it with the Hub. While it +should not be necessary per se, it covers cases where a Hub may not support +automatic subscription refreshing, and rules out Hub errors for additional +redundancy. + +With the relevant information to hand, a subscription can be attempted as +demonstrated below: + +```php +use Zend\Feed\PubSubHubbub\Model\Subscription; +use Zend\Feed\PubSubHubbub\Subscriber; + +$storage = new Subscription; +$subscriber = new Subscriber; +$subscriber->setStorage($storage); +$subscriber->addHubUrl('http://hubbub.example.com'); +$subscriber->setTopicUrl('http://www.example.net/rss.xml'); +$subscriber->setCallbackUrl('http://www.mydomain.com/hubbub/callback'); +$subscriber->subscribeAll(); +``` + +In order to store subscriptions and offer access to this data for general use, +the component requires a database (a schema is provided later in this section). +By default, it is assumed the table name is "subscription", and it utilises +`Zend\Db\TableGateway\TableGateway` in the background, meaning it will use the +default adapter you have set for your application. You may also pass a specific +custom `Zend\Db\TableGateway\TableGateway` instance into the associated model +`Zend\Feed\PubSubHubbub\Model\Subscription`. This custom adapter may be as +simple in intent as changing the table name to use or as complex as you deem +necessary. + +While this model is offered as a default ready-to-roll solution, you may create +your own model using any other backend or database layer (e.g. Doctrine) so long +as the resulting class implements the interface +`Zend\Feed\PubSubHubbub\Model\SubscriptionInterface`. + +An example schema (MySQL) for a subscription table accessible by the provided +model may look similar to: + +```sql +CREATE TABLE IF NOT EXISTS `subscription` ( + `id` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `topic_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `hub_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `created_time` datetime DEFAULT NULL, + `lease_seconds` bigint(20) DEFAULT NULL, + `verify_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `secret` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, + `expiration_time` datetime DEFAULT NULL, + `subscription_state` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +``` + +Behind the scenes, the Subscriber above will send a request to the Hub endpoint +containing the following parameters (based on the previous example): + +Parameter | Value | Explanation +--------- | ----- | ----------- +`hub.callback` | `http://www.mydomain.com/hubbub/callback?xhub.subscription=5536df06b5dcb966edab3a4c4d56213c16a8184` | The URI used by a Hub to contact the Subscriber and either request confirmation of a (un)subscription request, or send updates from subscribed feeds. The appended query string contains a custom parameter (hence the xhub designation). It is a query string parameter preserved by the Hub and re-sent with all Subscriber requests. Its purpose is to allow the Subscriber to identify and look up the subscription associated with any Hub request in a backend storage medium. This is a non-standard parameter used by this component in preference to encoding a subscription key in the URI path, which is difficult to enforce generically. Nevertheless, since not all Hubs support query string parameters, we still strongly recommend adding the subscription key as a path component in the form `http://www.mydomain.com/hubbub/callback/5536df06b5dcb966edab3a4c4d56213c16a8184`. This requires defining a route capable of parsing out the final value of the key, retrieving the value, and passing it to the Subscriber callback object. The value should be passed into the method `Zend\PubSubHubbub\Subscriber\Callback::setSubscriptionKey()`. A detailed example is offered later. +`hub.lease_seconds` | `2592000` | The number of seconds for which the Subscriber would like a new subscription to remain valid (i.e. a TTL). Hubs may enforce their own maximum subscription period. All subscriptions should be renewed by re-subscribing before the subscription period ends to ensure continuity of updates. Hubs should additionally attempt to automatically refresh subscriptions before they expire by contacting Subscribers (handled automatically by the `Callback` class). +`hub.mode` | `subscribe` | Value indicating this is a subscription request. Unsubscription requests would use the "unsubscribe" value. +`hub.topic` | `http://www.example.net/rss.xml` | The URI of the Topic (i.e. Atom or RSS feed) which the Subscriber wishes to subscribe to for updates. +`hub.verify` | `sync` or `async` | Indicates to the Hub the preferred mode of verifying subscriptions or unsubscriptions. It is repeated twice in order of preference. Technically this component does not distinguish between the two modes and treats both equally. +`hub.verify_token` | `3065919804abcaa7212ae89.879827871253878386` | A verification token returned to the Subscriber by the Hub when it is confirming a subscription or unsubscription. Offers a measure of reliance that the confirmation request originates from the correct Hub to prevent misuse. + +You can modify several of these parameters to indicate a different preference. +For example, you can set a different lease seconds value using +`Zend\Feed\PubSubHubbub\Subscriber::setLeaseSeconds(),` or show a preference for +the `async` verify mode by using `setPreferredVerificationMode(Zend\Feed\PubSubHubbub\PubSubHubbub::VERIFICATION_MODE_ASYNC)`. +However, the Hubs retain the capability to enforce their own preferences, and +for this reason the component is deliberately designed to work across almost any +set of options with minimum end-user configuration required. Conventions are +great when they work! + +> ### Verification modes +> +> While Hubs may require the use of a specific verification mode (both are +> supported by `Zend\Feed\PubSubHubbub`), you may indicate a specific preference +> using the `setPreferredVerificationMode()` method. In `sync` (synchronous) +> mode, the Hub attempts to confirm a subscription as soon as it is received, +> and before responding to the subscription request. In `async` (asynchronous) +> mode, the Hub will return a response to the subscription request immediately, +> and its verification request may occur at a later time. Since +> `Zend\Feed\PubSubHubbub` implements the Subscriber verification role as a +> separate callback class and requires the use of a backend storage medium, it +> actually supports both transparently. In terms of end-user performance, +> asynchronous verification is very much preferred to eliminate the impact of a +> poorly performing Hub tying up end-user server resources and connections for +> too long. + +Unsubscribing from a Topic follows the exact same pattern as the previous +example, with the exception that we should call `unsubscribeAll()` instead. The +parameters included are identical to a subscription request with the exception +that `hub.mode` is set to "unsubscribe". + +By default, a new instance of `Zend\PubSubHubbub\Subscriber` will attempt to use +a database backed storage medium which defaults to using the default zend-db +adapter with a table name of "subscription". It is recommended to set a custom +storage solution where these defaults are not apt either by passing in a new +model supporting the required interface or by passing a new instance of +`Zend\Db\TableGateway\TableGateway` to the default model's constructor to change +the used table name. + +### Handling Subscriber Callbacks + +Whenever a subscription or unsubscription request is made, the Hub must verify +the request by forwarding a new verification request to the callback URL set in +the subscription or unsubscription parameters. To handle these Hub requests, +which will include all future communications containing Topic (feed) updates, +the callback URL should trigger the execution of an instance of +`Zend\Feed\PubSubHubbub\Subscriber\Callback` to handle the request. + +The `Callback` class should be configured to use the same storage medium as the +`Subscriber` class. The bulk of the work is handled internal to these classes. + +```php +use Zend\Feed\PubSubHubbub\Model\Subscription; +use Zend\Feed\PubSubHubbub\Subscriber\Callback; + +$storage = new Subscription(); +$callback = new Callback(); +$callback->setStorage($storage); +$callback->handle(); +$callback->sendResponse(); + +/* + * Check if the callback resulting in the receipt of a feed update. + * Otherwise it was either a (un)sub verification request or invalid request. + * Typically we need do nothing other than add feed update handling; the rest + * is handled internally by the class. + */ +if ($callback->hasFeedUpdate()) { + $feedString = $callback->getFeedUpdate(); + /* + * Process the feed update asynchronously to avoid a Hub timeout. + */ +} +``` + +> #### Query and body parameters +> +> It should be noted that `Zend\Feed\PubSubHubbub\Subscriber\Callback` may +> independently parse any incoming query string and other parameters. This is +> necessary since PHP alters the structure and keys of a query string when it is +> parsed into the `$_GET` or `$_POST` superglobals; for example, all duplicate +> keys are ignored and periods are converted to underscores. Pubsubhubbub +> features both of these in the query strings it generates. + +> #### Always delay feed processing +> +> It is essential that developers recognise that Hubs are only concerned with +> sending requests and receiving a response which verifies its receipt. If a +> feed update is received, it should never be processed on the spot since this +> leaves the Hub waiting for a response. Rather, any processing should be +> offloaded to another process or deferred until after a response has been +> returned to the Hub. One symptom of a failure to promptly complete Hub +> requests is that a Hub may continue to attempt delivery of the update or +> verification request leading to duplicated update attempts being processed by +> the Subscriber. This appears problematic, but in reality a Hub may apply a +> timeout of just a few seconds, and if no response is received within that time +> it may disconnect (assuming a delivery failure) and retry later. Note that +> Hubs are expected to distribute vast volumes of updates so their resources are +> stretched; please process feeds asynchronously (e.g. in a separate process or +> a job queue or even a cronjob) as much as possible. + +### Setting Up And Using A Callback URL Route + +As noted earlier, the `Zend\Feed\PubSubHubbub\Subscriber\Callback` class +receives the combined key associated with any subscription from the Hub via one +of two methods. The technically preferred method is to add this key to the +callback URL employed by the Hub in all future requests using a query string +parameter with the key `xhub.subscription`. However, for historical reasons +(primarily that this was not supported in Pubsubhubbub 0.1, and a late addition +to 0.2 ), it is strongly recommended to use the most compatible means of adding +this key to the callback URL by appending it to the URL's path. + +Thus the URL `http://www.example.com/callback?xhub.subscription=key` would become +`http://www.example.com/callback/key`. + +Since the query string method is the default in anticipation of a greater level +of future support for the full 0.2/0.3 specification, this requires some +additional work to implement. + +The first step is to make the `Zend\Feed\PubSubHubbub\Subscriber\Callback` class +aware of the path contained subscription key. It's manually injected; therefore +it also requires manually defining a route for this purpose. This is achieved by +called the method `Zend\Feed\PubSubHubbub\Subscriber\Callback::setSubscriptionKey()` +with the parameter being the key value available from the router. The example +below demonstrates this using a zend-mvc controller. + +```php +use Zend\Feed\PubSubHubbub\Model\Subscription; +use Zend\Feed\PubSubHubbub\Subscriber\Callback; +use Zend\Mvc\Controller\AbstractActionController; + +class CallbackController extends AbstractActionController +{ + + public function indexAction() + { + $storage = new Subscription(); + $callback = new Callback(); + $callback->setStorage($storage); + + /* + * Inject subscription key parsing from URL path using + * a parameter from the router. + */ + $subscriptionKey = $this->params()->fromRoute('subkey'); + $callback->setSubscriptionKey($subscriptionKey); + $callback->handle(); + $callback->sendResponse(); + + /* + * Check if the callback resulting in the receipt of a feed update. + * Otherwise it was either a (un)sub verification request or invalid + * request. Typically we need do nothing other than add feed update + * handling; the rest is handled internally by the class. + */ + if ($callback->hasFeedUpdate()) { + $feedString = $callback->getFeedUpdate(); + /* + * Process the feed update asynchronously to avoid a Hub timeout. + */ + } + } +} +``` + +The example below illustrates adding a route mapping the path segment to a route +parameter, using zend-mvc: + +```php +use Zend\Mvc\Router\Http\Segment as SegmentRoute;; + +// Route defininition for enabling appending of a PuSH Subscription's lookup key +$route = SegmentRoute::factory([ + 'route' => '/callback/:subkey', + 'constraints' => [ + 'subkey' => '[a-z0-9]+', + ], + 'defaults' => [ + 'controller' => 'application-index', + 'action' => 'index', + ] +]); +``` diff --git a/vendor/zendframework/zend-feed/doc/book/reader.md b/vendor/zendframework/zend-feed/doc/book/reader.md new file mode 100644 index 000000000..ec1038ba4 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/reader.md @@ -0,0 +1,825 @@ +# Zend\\Feed\\Reader + +`Zend\Feed\Reader` is a component used to consume RSS and Atom feeds of +any version, including RDF/RSS 1.0, RSS 2.0, Atom 0.3, and Atom 1.0. The API for +retrieving feed data is deliberately simple since `Zend\Feed\Reader` is capable +of searching any feed of any type for the information requested through the API. +If the typical elements containing this information are not present, it will +adapt and fall back on a variety of alternative elements instead. This ability +to choose from alternatives removes the need for users to create their own +abstraction layer on top of the component to make it useful or have any in-depth +knowledge of the underlying standards, current alternatives, and namespaced +extensions. + +Internally, the `Zend\Feed\Reader\Reader` class works almost entirely on the +basis of making XPath queries against the feed XML's Document Object Model. This +singular approach to parsing is consistent, and the component offers a plugin +system to add to the Feed and Entry APIs by writing extensions on a similar +basis. + +Performance is assisted in three ways. First of all, `Zend\Feed\Reader\Reader` +supports caching using [zend-cache](https://github.com/zendframework/zend-cache) +to maintain a copy of the original feed XML. This allows you to skip network +requests for a feed URI if the cache is valid. Second, the Feed and Entry APIs +are backed by an internal cache (non-persistent) so repeat API calls for the +same feed will avoid additional DOM or XPath use. Thirdly, importing feeds from +a URI can take advantage of HTTP Conditional `GET` requests which allow servers +to issue an empty 304 response when the requested feed has not changed since the +last time you requested it. In the final case, an zend-cache storage instance +will hold the last received feed along with the ETag and Last-Modified header +values sent in the HTTP response. + +`Zend\Feed\Reader\Reader` is not capable of constructing feeds, and delegates +this responsibility to `Zend\Feed\Writer\Writer`. + +## Importing Feeds + +Feeds can be imported from a string, file or a URI. Importing from a URI can +additionally utilise an HTTP Conditional `GET` request. If importing fails, an +exception will be raised. The end result will be an object of type +`Zend\Feed\Reader\Feed\AbstractFeed`, the core implementations of which are +`Zend\Feed\Reader\Feed\Rss` and `Zend\Feed\Reader\Feed\Atom`. Both objects +support multiple (all existing) versions of these broad feed types. + +In the following example, we import an RDF/RSS 1.0 feed and extract some basic +information that can be saved to a database or elsewhere. + +```php +$feed = Zend\Feed\Reader\Reader::import('http://www.planet-php.net/rdf/'); +$data = [ + 'title' => $feed->getTitle(), + 'link' => $feed->getLink(), + 'dateModified' => $feed->getDateModified(), + 'description' => $feed->getDescription(), + 'language' => $feed->getLanguage(), + 'entries' => [], +]; + +foreach ($feed as $entry) { + $edata = [ + 'title' => $entry->getTitle(), + 'description' => $entry->getDescription(), + 'dateModified' => $entry->getDateModified(), + 'authors' => $entry->getAuthors(), + 'link' => $entry->getLink(), + 'content' => $entry->getContent(), + ]; + $data['entries'][] = $edata; +} +``` + +> ## Importing requires an HTTP client +> +> To import a feed, you will need to have an [HTTP client](zend.feed.http-clients) +> available. +> +> If you are not using zend-http, you will need to inject `Reader` with the HTTP +> client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader). + +The example above demonstrates `Zend\Feed\Reader\Reader`'s API, and it also +demonstrates some of its internal operation. In reality, the RDF feed selected +does not have any native date or author elements; however it does utilise the +Dublin Core 1.1 module which offers namespaced creator and date elements. +`Zend\Feed\Reader\Reader` falls back on these and similar options if no relevant +native elements exist. If it absolutely cannot find an alternative it will +return `NULL`, indicating the information could not be found in the feed. You +should note that classes implementing `Zend\Feed\Reader\Feed\AbstractFeed` also +implement the SPL `Iterator` and `Countable` interfaces. + +Feeds can also be imported from strings or files. + +```php +// from a URI +$feed = Zend\Feed\Reader\Reader::import('http://www.planet-php.net/rdf/'); + +// from a String +$feed = Zend\Feed\Reader\Reader::importString($feedXmlString); + +// from a file +$feed = Zend\Feed\Reader\Reader::importFile('./feed.xml'); +``` + +## Retrieving Underlying Feed and Entry Sources + +`Zend\Feed\Reader\Reader` does its best not to stick you in a narrow confine. If +you need to work on a feed outside of `Zend\Feed\Reader\Reader`, you can extract +the base DOMDocument or DOMElement objects from any class, or even an XML +string containing these. Also provided are methods to extract the current +DOMXPath object (with all core and extension namespaces registered) and the +correct prefix used in all XPath queries for the current feed or entry. The +basic methods to use (on any object) are `saveXml()`, `getDomDocument()`, +`getElement()`, `getXpath()` and `getXpathPrefix()`. These will let you break +free of `Zend\Feed\Reader` and do whatever else you want. + +- `saveXml()` returns an XML string containing only the element representing the + current object. +- `getDomDocument()` returns the DOMDocument object representing the entire feed + (even if called from an entry object). +- `getElement()` returns the DOMElement of the current object (i.e. the feed or + current entry). +- `getXpath()` returns the DOMXPath object for the current feed (even if called + from an entry object) with the namespaces of the current feed type and all + loaded extensions pre-registered. +- `getXpathPrefix()` returns the query prefix for the current object (i.e. the + feed or current entry) which includes the correct XPath query path for that + specific feed or entry. + +Let's look at an example where a feed might include an RSS extension not +supported by `Zend\Feed\Reader\Reader` out of the box. Notably, you could write +and register an extension (covered later) to do this, but that's not always +warranted for a quick check. You must register any new namespaces on the +DOMXPath object before use unless they are registered by `Zend\Feed\Reader` or +an extension beforehand. + +```php +$feed = Zend\Feed\Reader\Reader::import('http://www.planet-php.net/rdf/'); +$xpathPrefix = $feed->getXpathPrefix(); +$xpath = $feed->getXpath(); +$xpath->registerNamespace('admin', 'http://webns.net/mvcb/'); +$reportErrorsTo = $xpath->evaluate( + 'string(' . $xpathPrefix . '/admin:errorReportsTo)' +); +``` + +> ### Do not register duplicate namespaces +> +> If you register an already registered namespace with a different prefix name +> to that used internally by `Zend\Feed\Reader\Reader`, it will break the +> internal operation of this component. + +## Cache Support and Intelligent Requests + +### Adding Cache Support to Zend\\Feed\\Reader\\Reader + +`Zend\Feed\Reader\Reader` supports using a +[zend-cache](https://github.com/zendframework/zend-cache) storage instance to +cache feeds (as XML) to avoid unnecessary network requests. To add a cache, +create and configure your cache instance, and then tell +`Zend\Feed\Reader\Reader` to use it. The cache key used is +"`Zend\Feed\Reader\\`" followed by the MD5 hash of the feed's URI. + +```php +$cache = Zend\Cache\StorageFactory::adapterFactory('Memory'); +Zend\Feed\Reader\Reader::setCache($cache); +``` + +### HTTP Conditional GET Support + +The big question often asked when importing a feed frequently is if it has even +changed. With a cache enabled, you can add HTTP Conditional `GET` support to +your arsenal to answer that question. + +Using this method, you can request feeds from URIs and include their last known +ETag and Last-Modified response header values with the request (using the +If-None-Match and If-Modified-Since headers). If the feed on the server remains +unchanged, you should receive a 304 response which tells +`Zend\Feed\Reader\Reader` to use the cached version. If a full feed is sent in a +response with a status code of 200, this means the feed has changed and +`Zend\Feed\Reader\Reader` will parse the new version and save it to the cache. +It will also cache the new ETag and Last-Modified header values for future use. + +> #### Conditional GET requires a HeaderAwareClientInterface +> +> Conditional GET support only works for `Zend\Feed\Reader\Http\HeaderAwareClientInterface` +> client implementations, as it requires the ability to send HTTP headers. + +These "conditional" requests are not guaranteed to be supported by the server +you request a *URI* of, but can be attempted regardless. Most common feed +sources like blogs should however have this supported. To enable conditional +requests, you will need to provide a cache to `Zend\Feed\Reader\Reader`. + +```php +$cache = Zend\Cache\StorageFactory::adapterFactory('Memory'); + +Zend\Feed\Reader\Reader::setCache($cache); +Zend\Feed\Reader\Reader::useHttpConditionalGet(); + +$feed = Zend\Feed\Reader\Reader::import('http://www.planet-php.net/rdf/'); +``` + +In the example above, with HTTP Conditional `GET` requests enabled, the response +header values for ETag and Last-Modified will be cached along with the feed. For +the the cache's lifetime, feeds will only be updated on the cache if a non-304 +response is received containing a valid RSS or Atom XML document. + +If you intend on managing request headers from outside +`Zend\Feed\Reader\Reader`, you can set the relevant If-None-Matches and +If-Modified-Since request headers via the URI import method. + +```php +$lastEtagReceived = '5e6cefe7df5a7e95c8b1ba1a2ccaff3d'; +$lastModifiedDateReceived = 'Wed, 08 Jul 2009 13:37:22 GMT'; +$feed = Zend\Feed\Reader\Reader::import( + $uri, $lastEtagReceived, $lastModifiedDateReceived +); +``` + +## Locating Feed URIs from Websites + +These days, many websites are aware that the location of their XML feeds is not +always obvious. A small RDF, RSS, or Atom graphic helps when the user is reading +the page, but what about when a machine visits trying to identify where your +feeds are located? To assist in this, websites may point to their feeds using +`` tags in the `` section of their HTML. To take advantage +of this, you can use `Zend\Feed\Reader\Reader` to locate these feeds using the +static `findFeedLinks()` method. + +This method calls any URI and searches for the location of RSS, RDF, and Atom +feeds assuming, the website's HTML contains the relevant links. It then returns +a value object where you can check for the existence of a RSS, RDF or Atom feed +URI. + +The returned object is an `ArrayObject` subclass called +`Zend\Feed\Reader\FeedSet`, so you can cast it to an array or iterate over it to +access all the detected links. However, as a simple shortcut, you can just grab +the first RSS, RDF, or Atom link using its public properties as in the example +below. Otherwise, each element of the `ArrayObject` is a simple array with the +keys `type` and `uri` where the type is one of "rdf", "rss", or "atom". + +```php +$links = Zend\Feed\Reader\Reader::findFeedLinks('http://www.planet-php.net'); + +if (isset($links->rdf)) { + echo $links->rdf, "\n"; // http://www.planet-php.org/rdf/ +} +if (isset($links->rss)) { + echo $links->rss, "\n"; // http://www.planet-php.org/rss/ +} +if (isset($links->atom)) { + echo $links->atom, "\n"; // http://www.planet-php.org/atom/ +} +``` + +Based on these links, you can then import from whichever source you wish in the usual manner. + +> ### Finding feed links requires an HTTP client +> +> To find feed links, you will need to have an [HTTP client](zend.feed.http-clients) +> available. +> +> If you are not using zend-http, you will need to inject `Reader` with the HTTP +> client. See the [section on providing a client to Reader](http-clients.md#providing-a-client-to-reader). + +This quick method only gives you one link for each feed type, but websites may +indicate many links of any type. Perhaps it's a news site with a RSS feed for +each news category. You can iterate over all links using the ArrayObject's +iterator. + +```php +$links = Zend\Feed\Reader::findFeedLinks('http://www.planet-php.net'); + +foreach ($links as $link) { + echo $link['href'], "\n"; +} +``` + +## Attribute Collections + +In an attempt to simplify return types, return types from the various feed and +entry level methods may include an object of type +`Zend\Feed\Reader\Collection\AbstractCollection`. Despite the special class name +which I'll explain below, this is just a simple subclass of SPL's `ArrayObject`. + +The main purpose here is to allow the presentation of as much data as possible +from the requested elements, while still allowing access to the most relevant +data as a simple array. This also enforces a standard approach to returning such +data which previously may have wandered between arrays and objects. + +The new class type acts identically to `ArrayObject` with the sole addition +being a new method `getValues()` which returns a simple flat array containing +the most relevant information. + +A simple example of this is `Zend\Feed\Reader\Reader\FeedInterface::getCategories()`. +When used with any RSS or Atom feed, this method will return category data as a +container object called `Zend\Feed\Reader\Collection\Category`. The container +object will contain, per category, three fields of data: term, scheme, and label. +The "term" is the basic category name, often machine readable (i.e. plays nice +with URIs). The scheme represents a categorisation scheme (usually a URI +identifier) also known as a "domain" in RSS 2.0. The "label" is a human readable +category name which supports HTML entities. In RSS 2.0, there is no label +attribute so it is always set to the same value as the term for convenience. + +To access category labels by themselves in a simple value array, you might +commit to something like: + +```php +$feed = Zend\Feed\Reader\Reader::import('http://www.example.com/atom.xml'); +$categories = $feed->getCategories(); +$labels = []; +foreach ($categories as $cat) { + $labels[] = $cat['label'] +} +``` + +It's a contrived example, but the point is that the labels are tied up with +other information. + +However, the container class allows you to access the "most relevant" data as a +simple array using the `getValues()` method. The concept of "most relevant" is +obviously a judgement call. For categories it means the category labels (not the +terms or schemes) while for authors it would be the authors' names (not their +email addresses or URIs). The simple array is flat (just values) and passed +through `array_unique()` to remove duplication. + +```php +$feed = Zend\Feed\Reader\Reader::import('http://www.example.com/atom.xml'); +$categories = $feed->getCategories(); +$labels = $categories->getValues(); +``` + +The above example shows how to extract only labels and nothing else thus giving +simple access to the category labels without any additional work to extract that +data by itself. + +## Retrieving Feed Information + +Retrieving information from a feed (we'll cover entries and items in the next +section though they follow identical principals) uses a clearly defined API +which is exactly the same regardless of whether the feed in question is RSS, +RDF, or Atom. The same goes for sub-versions of these standards and we've tested +every single RSS and Atom version. While the underlying feed XML can differ +substantially in terms of the tags and elements they present, they nonetheless +are all trying to convey similar information and to reflect this all the +differences and wrangling over alternative tags are handled internally by +`Zend\Feed\Reader\Reader` presenting you with an identical interface for each. +Ideally, you should not have to care whether a feed is RSS or Atom so long as +you can extract the information you want. + +> ### RSS feeds vary widely +> +> While determining common ground between feed types is itself complex, it +> should be noted that *RSS* in particular is a constantly disputed +> "specification". This has its roots in the original RSS 2.0 document, which +> contains ambiguities and does not detail the correct treatment of all +> elements. As a result, this component rigorously applies the RSS 2.0.11 +> Specification published by the RSS Advisory Board and its accompanying RSS +> Best Practices Profile. No other interpretation of RSS +> 2.0 will be supported, though exceptions may be allowed where it does not +> directly prevent the application of the two documents mentioned above. + +Of course, we don't live in an ideal world, so there may be times the API just +does not cover what you're looking for. To assist you, `Zend\Feed\Reader\Reader` +offers a plugin system which allows you to write extensions to expand the core +API and cover any additional data you are trying to extract from feeds. If +writing another extension is too much trouble, you can simply grab the +underlying DOM or XPath objects and do it by hand in your application. Of +course, we really do encourage writing an extension simply to make it more +portable and reusable, and useful extensions may be proposed to the component +for formal addition. + +Below is a summary of the Core API for feeds. You should note it comprises not +only the basic RSS and Atom standards, but also accounts for a number of +included extensions bundled with `Zend\Feed\Reader\Reader`. The naming of these +extension sourced methods remain fairly generic; all Extension methods operate +at the same level as the Core API though we do allow you to retrieve any +specific extension object separately if required. + +### Feed Level API Methods + +Method | Description +------ | ----------- +`getId()` | Returns a unique ID associated with this feed +`getTitle()` | Returns the title of the feed +`getDescription()` | Returns the text description of the feed. +`getLink()` | Returns a URI to the HTML website containing the same or similar information as this feed (i.e. if the feed is from a blog, it should provide the blog's URI where the HTML version of the entries can be read). +`getFeedLink()` | Returns the URI of this feed, which may be the same as the URI used to import the feed. There are important cases where the feed link may differ because the source URI is being updated and is intended to be removed in the future. +`getAuthors()` | Returns an object of type `Zend\Feed\Reader\Collection\Author` which is an `ArrayObject` whose elements are each simple arrays containing any combination of the keys "name", "email" and "uri". Where irrelevant to the source data, some of these keys may be omitted. +`getAuthor(integer $index = 0)` | Returns either the first author known, or with the optional $index parameter any specific index on the array of authors as described above (returning `NULL` if an invalid index). +`getDateCreated()` | Returns the date on which this feed was created. Generally only applicable to Atom, where it represents the date the resource described by an Atom 1.0 document was created. The returned date will be a `DateTime` object. +`getDateModified()` | Returns the date on which this feed was last modified. The returned date will be a `DateTime` object. +`getLastBuildDate()` | Returns the date on which this feed was last built. The returned date will be a `DateTime` object. This is only supported by RSS; Atom feeds will always return `NULL`. +`getLanguage()` | Returns the language of the feed (if defined) or simply the language noted in the XML document. +`getGenerator()` | Returns the generator of the feed, e.g. the software which generated it. This may differ between RSS and Atom since Atom defines a different notation. +`getCopyright()` | Returns any copyright notice associated with the feed. +`getHubs()` | Returns an array of all Hub Server URI endpoints which are advertised by the feed for use with the Pubsubhubbub Protocol, allowing subscriptions to the feed for real-time updates. +`getCategories()` | Returns a `Zend\Feed\Reader\Collection\Category` object containing the details of any categories associated with the overall feed. The supported fields include "term" (the machine readable category name), "scheme" (the categorisation scheme and domain for this category), and "label" (a HTML decoded human readable category name). Where any of the three fields are absent from the field, they are either set to the closest available alternative or, in the case of "scheme", set to `NULL`. +`getImage()` | Returns an array containing data relating to any feed image or logo, or `NULL` if no image found. The resulting array may contain the following keys: uri, link, title, description, height, and width. Atom logos only contain a URI so the remaining metadata is drawn from RSS feeds only. + +Given the variety of feeds in the wild, some of these methods will undoubtedly +return `NULL` indicating the relevant information couldn't be located. Where +possible, `Zend\Feed\Reader\Reader` will fall back on alternative elements +during its search. For example, searching an RSS feed for a modification date is +more complicated than it looks. RSS 2.0 feeds should include a `` +tag and/or a `` element. But what if it doesn't? Maybe this is an RSS +1.0 feed? Perhaps it instead has an `` element with identical +information (Atom may be used to supplement RSS syntax)? Failing that, we +could simply look at the entries, pick the most recent, and use its `` +element. Assuming it exists, that is. Many feeds also use Dublin Core 1.0 or 1.1 +`` elements for feeds and entries. Or we could find Atom lurking again. + +The point is, `Zend\Feed\Reader\Reader` was designed to know this. When you ask +for the modification date (or anything else), it will run off and search for all +these alternatives until it either gives up and returns `NULL`, or finds an +alternative that should have the right answer. + +In addition to the above methods, all feed objects implement methods for +retrieving the DOM and XPath objects for the current feeds as described +earlier. Feed objects also implement the SPL Iterator and Countable +interfaces. The extended API is summarised below. + +### Extended Feed API Methods + +Method | Description +------ | ----------- +`getDomDocument()` | Returns the parent DOMDocument object for the entire source XML document. +`getElement()` | Returns the current feed level DOMElement object. +`saveXml()` | Returns a string containing an XML document of the entire feed element (this is not the original document, but a rebuilt version). +`getXpath()` | Returns the DOMXPath object used internally to run queries on the DOMDocument object (this includes core and extension namespaces pre-registered). +`getXpathPrefix()` | Returns the valid DOM path prefix prepended to all XPath queries matching the feed being queried. +`getEncoding()` | Returns the encoding of the source XML document (note: this cannot account for errors such as the server sending documents in a different encoding). Where not defined, the default UTF-8 encoding of Unicode is applied. +`count()` | Returns a count of the entries or items this feed contains (implements SPL `Countable` interface) +`current()` | Returns either the current entry (using the current index from `key()`). +`key()` | Returns the current entry index. +`next()` | Increments the entry index value by one. +`rewind()` | Resets the entry index to 0. +`valid()` | Checks that the current entry index is valid, i.e. it does not fall below 0 and does not exceed the number of entries existing. +`getExtensions()` | Returns an array of all extension objects loaded for the current feed (note: both feed-level and entry-level extensions exist, and only feed-level extensions are returned here). The array keys are of the form `{ExtensionName}_Feed`. +`getExtension(string $name)` | Returns an extension object for the feed registered under the provided name. This allows more fine-grained access to extensions which may otherwise be hidden within the implementation of the standard API methods. +`getType()` | Returns a static class constant (e.g. `Zend\Feed\Reader\Reader::TYPE_ATOM_03`, i.e. "Atom 0.3"), indicating exactly what kind of feed is being consumed. + +## Retrieving Entry/Item Information + +Retrieving information for specific entries or items (depending on whether you +speak Atom or RSS) is identical to feed level data. Accessing entries is +simply a matter of iterating over a feed object or using the SPL `Iterator` +interface feed objects implement, and calling the appropriate method on each. + +### Entry API Methods + +Method | Description +------ | ----------- +`getId()` | Returns a unique ID for the current entry. +`getTitle()` | Returns the title of the current entry. +`getDescription()` | Returns a description of the current entry. +`getLink()` | Returns a URI to the HTML version of the current entry. +`getPermaLink()` | Returns the permanent link to the current entry. In most cases, this is the same as using `getLink()`. +`getAuthors()` | Returns an object of type `Zend\Feed\Reader\Collection\Author`, which is an `ArrayObject` whose elements are each simple arrays containing any combination of the keys "name", "email" and "uri". Where irrelevant to the source data, some of these keys may be omitted. +`getAuthor(integer $index = 0)` | Returns either the first author known, or, with the optional `$index` parameter, any specific index on the array of Authors as described above (returning `NULL` if an invalid index). +`getDateCreated()` | Returns the date on which the current entry was created. Generally only applicable to Atom where it represents the date the resource described by an Atom 1.0 document was created. +`getDateModified()` | Returns the date on which the current entry was last modified. +`getContent()` | Returns the content of the current entry (this has any entities reversed if possible, assuming the content type is HTML). The description is returned if a separate content element does not exist. +`getEnclosure()` | Returns an array containing the value of all attributes from a multi-media `` element including as array keys: url, length, type. In accordance with the RSS Best Practices Profile of the RSS Advisory Board, no support is offers for multiple enclosures since such support forms no part of the RSS specification. +`getCommentCount()` | Returns the number of comments made on this entry at the time the feed was last generated. +`getCommentLink()` | Returns a URI pointing to the HTML page where comments can be made on this entry. +`getCommentFeedLink([string $type = ‘atom'|'rss'])` | Returns a URI pointing to a feed of the provided type containing all comments for this entry (type defaults to Atom/RSS depending on current feed type). +`getCategories()` | Returns a `Zend\Feed\Reader\Collection\Category` object containing the details of any categories associated with the entry. The supported fields include "term" (the machine readable category name), "scheme" (the categorisation scheme and domain for this category), and "label" (an HTML-decoded human readable category name). Where any of the three fields are absent from the field, they are either set to the closest available alternative or, in the case of "scheme", set to `NULL`. + +The extended API for entries is identical to that for feeds with the exception +of the `Iterator` methods, which are not needed here. + +> ### Modified vs Created dates +> +> There is often confusion over the concepts of *modified* and *created* dates. +> In Atom, these are two clearly defined concepts (so knock yourself out) but in +> RSS they are vague. RSS 2.0 defines a single `` element which +> typically refers to the date this entry was published, i.e. a creation date of +> sorts. This is not always the case, and it may change with updates or not. As a +> result, if you really want to check whether an entry has changed, don't rely on +> the results of `getDateModified()`. Instead, consider tracking the MD5 hash of +> three other elements concatenated, e.g. using `getTitle()`, `getDescription()`, +> and `getContent()`. If the entry was truly updated, this hash computation will +> give a different result than previously saved hashes for the same entry. This +> is obviously content oriented, and will not assist in detecting changes to +> other relevant elements. Atom feeds should not require such steps. + +> Further muddying the waters, dates in feeds may follow different standards. +> Atom and Dublin Core dates should follow ISO 8601, and RSS dates should +> follow RFC 822 or RFC 2822 (which is also common). Date methods will throw an +> exception if `DateTime` cannot load the date string using one of the above +> standards, or the PHP recognised possibilities for RSS dates. + +> ### Validation +> +> The values returned from these methods are not validated. This means users +> must perform validation on all retrieved data including the filtering of any +> HTML such as from `getContent()` before it is output from your application. +> Remember that most feeds come from external sources, and therefore the default +> assumption should be that they cannot be trusted. + +### Extended Entry Level API Methods + +Method | Description +------ | ----------- +`getDomDocument()` | Returns the parent DOMDocument object for the entire feed (not just the current entry). +`getElement()` | Returns the current entry level DOMElement object. +`getXpath()` | Returns the DOMXPath object used internally to run queries on the DOMDocument object (this includes core and extension namespaces pre-registered). +`getXpathPrefix()` | Returns the valid DOM path prefix prepended to all XPath queries matching the entry being queried. +`getEncoding()` | Returns the encoding of the source XML document (note: this cannot account for errors such as the server sending documents in a different encoding). The default encoding applied in the absence of any other is the UTF-8 encoding of Unicode. +`getExtensions()` | Returns an array of all extension objects loaded for the current entry (note: both feed-level and entry-level extensions exist, and only entry-level extensions are returned here). The array keys are in the form `{ExtensionName}Entry`. +`getExtension(string $name)` | Returns an extension object for the entry registered under the provided name. This allows more fine-grained access to extensions which may otherwise be hidden within the implementation of the standard API methods. +`getType()` | Returns a static class constant (e.g. `Zend\Feed\Reader\Reader::TYPE_ATOM_03`, i.e. "Atom 0.3") indicating exactly what kind of feed is being consumed. + +## Extending Feed and Entry APIs + +Extending `Zend\Feed\Reader\Reader` allows you to add methods at both the feed +and entry level which cover the retrieval of information not already supported +by `Zend\Feed\Reader\Reader`. Given the number of RSS and Atom extensions that +exist, this is a good thing, since `Zend\Feed\Reader\Reader` couldn't possibly +add everything. + +There are two types of extensions possible, those which retrieve information +from elements which are immediate children of the root element (e.g. +`` for RSS or `` for Atom), and those who retrieve information +from child elements of an entry (e.g. `` for RSS or `` for Atom). +On the filesystem, these are grouped as classes within a namespace based on the +extension standard's name. For example, internally we have +`Zend\Feed\Reader\Extension\DublinCore\Feed` and +`Zend\Feed\Reader\Extension\DublinCore\Entry` classes which are two extensions +implementing Dublin Core 1.0 and 1.1 support. + +Extensions are loaded into `Zend\Feed\Reader\Reader` using an "extension +manager". Extension managers must implement `Zend\Feed\Reader\ExtensionManagerInterface`. +Three implementations exist: + +- `Zend\Feed\Reader\StandaloneExtensionManager` is a hard-coded implementation + seeded with all feed and entry implementations. You can extend it to add + extensions, though it's likely easier to copy and paste it, adding your + changes. +- `Zend\Feed\Reader\ExtensionPluginManager` is a `Zend\ServiceManager\AbstractPluginManager` + implementation, `Zend\Feed\Reader\ExtensionManager`; as such, you can extend + it to add more extensions, use a `Zend\ServiceManager\ConfigInterface` instance + to inject it with more extensions, or use its public API for adding services + (e.g., `setService()`, `setFactory()`, etc.). This implementation *does not* + implement `ExtensionManagerInterface`, and must be used with `ExtensionManager`. +- `Zend\Feed\Reader\ExtensionManager` exists for legacy purposes; prior to 2.3, + this was an `AbstractPluginManager` implementation, and the only provided + extension manager. It now implements `ExtensionManagerInterface`, and acts as + a decorator for `ExtensionPluginManager`. + +By default, `Zend\Feed\Reader\Reader` composes a `StandaloneExtensionManager`. You +can inject an alternate implementation using `Reader::setExtensionManager()`: + +```php +$extensions = new Zend\Feed\Reader\ExtensionPluginManager(); +Zend\Feed\Reader\Reader::setExtensionManager( + new ExtensionManager($extensions) +); +``` + +The shipped implementations all provide the default extensions (so-called +"Core Extensions") used internally by `Zend\Feed\Reader\Reader`. These +include: + +Extension | Description +--------- | ----------- +DublinCore (Feed and Entry) | Implements support for Dublin Core Metadata Element Set 1.0 and 1.1. +Content (Entry only) | Implements support for Content 1.0. +Atom (Feed and Entry) | Implements support for Atom 0.3 and Atom 1.0. +Slash | Implements support for the Slash RSS 1.0 module. +WellFormedWeb | Implements support for the Well Formed Web CommentAPI 1.0. +Thread | Implements support for Atom Threading Extensions as described in RFC 4685. +Podcast | Implements support for the Podcast 1.0 DTD from Apple. + +The core extensions are somewhat special since they are extremely common and +multi-faceted. For example, we have a core extension for Atom. Atom is +implemented as an extension (not just a base class) because it doubles as a +valid RSS module; you can insert Atom elements into RSS feeds. I've even seen +RDF feeds which use a lot of Atom in place of more common extensions like +Dublin Core. + +The following is a list of non-Core extensions that are offered, but not registered +by default. If you want to use them, you'll need to +tell `Zend\Feed\Reader\Reader` to load them in advance of importing a feed. +Additional non-Core extensions will be included in future iterations of the +component. + +Extension | Description +--------- | ----------- +Syndication | Implements Syndication 1.0 support for RSS feeds. +CreativeCommons | An RSS module that adds an element at the `` or `` level that specifies which Creative Commons license applies. + +`Zend\Feed\Reader\Reader` requires you to explicitly register non-Core +extensions in order to expose their API to feed and entry objects. Below, we +register the optional Syndication extension, and discover that it can be +directly called from the entry API without any effort. (Note that +extension names are case sensitive and use camelCasing for multiple terms.) + +```php +use Zend\Feed\Reader\Reader; + +Reader::registerExtension('Syndication'); +$feed = Reader::import('http://rss.slashdot.org/Slashdot/slashdot'); +$updatePeriod = $feed->getUpdatePeriod(); +``` + +In the simple example above, we checked how frequently a feed is being updated +using the `getUpdatePeriod()` method. Since it's not part of +`Zend\Feed\Reader\Reader`'s core API, it could only be a method supported by +the newly registered Syndication extension. + +As you can also notice, methods provided by extensions are accessible from the +main API using method overloading. As an alternative, you can also directly +access any extension object for a similar result as seen below. + +```php +use Zend\Feed\Reader\Reader; + +Reader::registerExtension('Syndication'); +$feed = Reader::import('http://rss.slashdot.org/Slashdot/slashdot'); +$syndication = $feed->getExtension('Syndication'); +$updatePeriod = $syndication->getUpdatePeriod(); +``` + +### Writing Zend\\Feed\\Reader Extensions + +Inevitably, there will be times when the `Zend\Feed\Reader` API is just +not capable of getting something you need from a feed or entry. You can use the +underlying source objects, like DOMDocument, to get these by hand; however, there +is a more reusable method available: you can write extensions supporting these new +queries. + +As an example, let's take the case of a purely fictitious corporation named +Jungle Books. Jungle Books have been publishing a lot of reviews on books they +sell (from external sources and customers), which are distributed as an RSS 2.0 +feed. Their marketing department realises that web applications using this feed +cannot currently figure out exactly what book is being reviewed. To make life +easier for everyone, they determine that the geek department needs to extend +RSS 2.0 to include a new element per entry supplying the ISBN-10 or ISBN-13 +number of the publication the entry concerns. They define the new `` +element quite simply with a standard name and namespace URI: + +- Name: JungleBooks 1.0 +- Namespace URI: http://example.com/junglebooks/rss/module/1.0/ + +A snippet of RSS containing this extension in practice could be something +similar to: + +```xml + + + + Jungle Books Customer Reviews + http://example.com/junglebooks + Many book reviews! + Fri, 26 Jun 2009 19:15:10 GMT + + http://example.com/junglebooks/book/938 + + + Review Of Flatland: A Romance of Many Dimensions + http://example.com/junglebooks/review/987 + Confused Physics Student + + A romantic square?! + + Thu, 25 Jun 2009 20:03:28 -0700 + 048627263X + + + +``` + +Implementing this new ISBN element as a simple entry level extension would +require the following class (using your own namespace). + +```php +namespace My\FeedReader\Extension\JungleBooks; + +use Zend\Feed\Reader\Extension\AbstractEntry; + +class Entry extends AbstractEntry +{ + public function getIsbn() + { + if (isset($this->data['isbn'])) { + return $this->data['isbn']; + } + + $isbn = $this->xpath->evaluate( + 'string(' . $this->getXpathPrefix() . '/jungle:isbn)' + ); + + if (! $isbn) { + $isbn = null; + } + + $this->data['isbn'] = $isbn; + return $this->data['isbn']; + } + + protected function registerNamespaces() + { + $this->xpath->registerNamespace( + 'jungle', + 'http://example.com/junglebooks/rss/module/1.0/' + ); + } +} +``` + +This extension creates a new method `getIsbn()`, which runs an XPath query on +the current entry to extract the ISBN number enclosed by the `` +element. It can optionally store this to the internal non-persistent cache (no +need to keep querying the DOM if it's called again on the same entry). The +value is returned to the caller. At the end we have a protected method (it's +abstract, making it required by implementations) which registers the Jungle +Books namespace for their custom RSS module. While we call this an RSS module, +there's nothing to prevent the same element being used in Atom feeds; all +extensions which use the prefix provided by `getXpathPrefix()` are actually +neutral and work on RSS or Atom feeds with no extra code. + +Since this extension is stored outside of zend-feed, you'll need to ensure your +application can autoload it. Once that's in place, you will also need to ensure +your extension manager knows about it, and then register the extension with +`Zend\Feed\Reader\Reader`. + +The following example uses `Zend\Feed\Reader\ExtensionPluginManager` to manage +extensions, as it provides the ability to register new extensions without +requiring extension of the plugin manager itself. To use it, first intall +zend-servicemanager: + +```bash +$ composer require zendframework/zend-servicemanager +``` + +From there: + +```php +use My\FeedReader\Extension\JungleBooks; +use Zend\Feed\Reader\ExtensionManager; +use Zend\Feed\Reader\ExtensionPluginManager; +use Zend\Feed\Reader\Reader; + +$extensions = new ExtensionPluginManager(); +$extensions->setInvokableClass('JungleBooksEntry', JungleBooks\Entry::class); +Reader::setExtensionManager(new ExtensionManager($extensions)); +Reader::registerExtension('JungleBooks'); + +$feed = Reader::import('http://example.com/junglebooks/rss'); + +// ISBN for whatever book the first entry in the feed was concerned with +$firstIsbn = $feed->current()->getIsbn(); +``` + +Writing a feed extension is not much different. The example feed from earlier +included an unmentioned `` element which Jungle Books have +added to their standard to include a link to the day's most popular book (in +terms of visitor traffic). Here's an extension which adds a +`getDaysPopularBookLink()` method to the feel level API. + +```php +namespace My\FeedReader\Extension\JungleBooks; + +use Zend\Feed\Reader\Extension\AbstractFeed; + +class Feed extends AbstractFeed +{ + public function getDaysPopularBookLink() + { + if (isset($this->data['dayPopular'])) { + return $this->data['dayPopular']; + } + + $dayPopular = $this->xpath->evaluate( + 'string(' . $this->getXpathPrefix() . '/jungle:dayPopular)' + ); + + if (!$dayPopular) { + $dayPopular = null; + } + + $this->data['dayPopular'] = $dayPopular; + return $this->data['dayPopular']; + } + + protected function registerNamespaces() + { + $this->xpath->registerNamespace( + 'jungle', + 'http://example.com/junglebooks/rss/module/1.0/' + ); + } +} +``` + +Let's add to the previous example; we'll register the new class with the +extension manager, and then demonstrate using the newly exposed method: + +```php +use My\FeedReader\Extension\JungleBooks; +use Zend\Feed\Reader\ExtensionManager; +use Zend\Feed\Reader\ExtensionPluginManager; +use Zend\Feed\Reader\Reader; + +$extensions = new ExtensionPluginManager(); +$extensions->setInvokableClass('JungleBooksEntry', JungleBooks\Entry::class); +$extensions->setInvokableClass('JungleBooksFeed', JungleBooks\Feed::class); +Reader::setExtensionManager(new ExtensionManager($extensions)); +Reader::registerExtension('JungleBooks'); + +$feed = Reader::import('http://example.com/junglebooks/rss'); + +// URI to the information page of the day's most popular book with visitors +$daysPopularBookLink = $feed->getDaysPopularBookLink(); +``` + +Going through these examples, you'll note that while we need to register the +feed and entry classes separately with the plugin manager, we don't register +them separately when registering the extension with the `Reader`. Extensions +within the same standard may or may not include both a feed and entry class, so +`Zend\Feed\Reader\Reader` only requires you to register the overall parent name, +e.g. JungleBooks, DublinCore, Slash. Internally, it can check at what level +extensions exist and load them up if found. In our case, we have a complete +extension now, spanning the classes `JungleBooks\Feed` and `JungleBooks\Entry`. diff --git a/vendor/zendframework/zend-feed/doc/book/security.md b/vendor/zendframework/zend-feed/doc/book/security.md new file mode 100644 index 000000000..bc6ccd2c0 --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/security.md @@ -0,0 +1,161 @@ +# Zend\\Feed\\Reader and Security + +As with any data coming from a source that is beyond the developer's control, +special attention needs to be given to securing, validating and filtering that +data. Similar to data input to our application by users, data coming from RSS +and Atom feeds should also be considered unsafe and potentially dangerous, as it +allows the delivery of HTML and [xHTML](http://tools.ietf.org/html/rfc4287#section-8.1). +Because data validation and filtration is out of `Zend\Feed`'s scope, this task +is left for implementation by the developer, by using libraries such as +zend-escaper for escaping and [HTMLPurifier](http://www.htmlpurifier.org/) for +validating and filtering feed data. + +Escaping and filtering of potentially insecure data is highly recommended before +outputting it anywhere in our application or before storing that data in some +storage engine (be it a simple file or a database.). + +## Filtering data using HTMLPurifier + +Currently, the best available library for filtering and validating (x)HTML data +in PHP is [HTMLPurifier](http://www.htmlpurifier.org/), and, as such, is the +recommended tool for this task. HTMLPurifier works by filtering out all (x)HTML +from the data, except for the tags and attributes specifically allowed in a +whitelist, and by checking and fixing nesting of tags, ensuring +standards-compliant output. + +The following examples will show a basic usage of HTMLPurifier, but developers +are urged to go through and read [HTMLPurifier's documentation](http://www.htmlpurifier.org/docs). + +```php +// Setting HTMLPurifier's options +$options = [ + // Allow only paragraph tags + // and anchor tags wit the href attribute + [ + 'HTML.Allowed', + 'p,a[href]' + ], + // Format end output with Tidy + [ + 'Output.TidyFormat', + true + ], + // Assume XHTML 1.0 Strict Doctype + [ + 'HTML.Doctype', + 'XHTML 1.0 Strict' + ], + // Disable cache, but see note after the example + [ + 'Cache.DefinitionImpl', + null + ] +]; + +// Configuring HTMLPurifier +$config = HTMLPurifier_Config::createDefault(); +foreach ($options as $option) { + $config->set($option[0], $option[1]); +} + +// Creating a HTMLPurifier with it's config +$purifier = new HTMLPurifier($config); + +// Fetch the RSS +try { + $rss = Zend\Feed\Reader\Reader::import('http://www.planet-php.net/rss/'); +} catch (Zend\Feed\Exception\Reader\RuntimeException $e) { + // feed import failed + echo "Exception caught importing feed: {$e->getMessage()}\n"; + exit; +} + +// Initialize the channel data array +// See that we're cleaning the description with HTMLPurifier +$channel = [ + 'title' => $rss->getTitle(), + 'link' => $rss->getLink(), + 'description' => $purifier->purify($rss->getDescription()), + 'items' => [], +]; + +// Loop over each channel item and store relevant data +// See that we're cleaning the descriptions with HTMLPurifier +foreach ($rss as $item) { + $channel['items'][] = [ + 'title' => $item->getTitle(), + 'link' => $item->getLink(), + 'description' => $purifier->purify($item->getDescription()), + ]; +} +``` + +> ### Tidy is required +> +> HTMLPurifier is using the PHP [Tidy extension](http://php.net/tidy) to clean +> and repair the final output. If this extension is not available, it will +> silently fail, but its availability has no impact on the library's security. + +> ### Caching +> +> For the sake of this example, the HTMLPurifier's cache is disabled, but it is +> recommended to configure caching and use its standalone include file as it can +> improve the performance of HTMLPurifier substantially. + +## Escaping data using zend-escaper + +To help prevent XSS attacks, Zend Framework provides the [zend-escaper component](https://github.com/zendframework/zend-escaper), +which complies to the current [OWASP recommendations](https://www.owasp.org/index.php/XSS_Prevention_Cheat_Sheet), +and as such, is the recommended tool for escaping HTML tags and attributes, +Javascript, CSS and URLs before outputing any potentially insecure data to the +users. + +```php +try { + $rss = Zend\Feed\Reader\Reader::import('http://www.planet-php.net/rss/'); +} catch (Zend\Feed\Exception\Reader\RuntimeException $e) { + // feed import failed + echo "Exception caught importing feed: {$e->getMessage()}\n"; + exit; +} + +// Validate all URIs +$linkValidator = new Zend\Validator\Uri; +$link = null; +if ($linkValidator->isValid($rss->getLink())) { + $link = $rss->getLink(); +} + +// Escaper used for escaping data +$escaper = new Zend\Escaper\Escaper('utf-8'); + +// Initialize the channel data array +$channel = [ + 'title' => $escaper->escapeHtml($rss->getTitle()), + 'link' => $escaper->escapeUrl($link), + 'description' => $escaper->escapeHtml($rss->getDescription()), + 'items' => [], +]; + +// Loop over each channel item and store relevant data +foreach ($rss as $item) { + $link = null; + if ($linkValidator->isValid($rss->getLink())) { + $link = $item->getLink(); + } + $channel['items'][] = [ + 'title' => $escaper->escapeHtml($item->getTitle()), + 'link' => $escaper->escapeUrl($link), + 'description' => $escaper->escapeHtml($item->getDescription()), + ]; +} +``` + +The feed data is now safe for output to HTML templates. You can, of course, skip +escaping when simply storing the data persistently, but remember to escape it on +output later! + +Of course, these are just basic examples, and cannot cover all possible +scenarios that you, as a developer, can, and most likely will, encounter. Your +responsibility is to learn what libraries and tools are at your disposal, and +when and how to use them to secure your web applications. diff --git a/vendor/zendframework/zend-feed/doc/book/writer.md b/vendor/zendframework/zend-feed/doc/book/writer.md new file mode 100644 index 000000000..749b0e69d --- /dev/null +++ b/vendor/zendframework/zend-feed/doc/book/writer.md @@ -0,0 +1,280 @@ +# Zend\\Feed\\Writer + +`Zend\Feed\Writer` is the sibling component to `Zend\Feed\Reader` responsible +for *generating* feeds. It supports the Atom 1.0 specification (RFC 4287) and +RSS 2.0 as specified by the RSS Advisory Board (RSS 2.0.11). It does not deviate +from these standards. It does, however, offer a simple extension system which +allows for any extension and module for either of these two specifications to be +implemented if they are not provided out of the box. + +In many ways, `Zend\Feed\Writer` is the inverse of `Zend\Feed\Reader`. Where +`Zend\Reader\Reader` focuses on providing an easy to use architecture fronted by +getter methods, `Zend\Feed\Writer` is fronted by similarly named setters or +mutators. This ensures the API won't pose a learning curve to anyone familiar +with `Zend\Feed\Reader`. + +As a result of this design, the rest may even be obvious. Behind the scenes, +data set on any `Zend\Feed\Writer\Writer` instance is translated at render time +onto a DOMDocument object using the necessary feed elements. For each supported +feed type there is both an Atom 1.0 and RSS 2.0 renderer. Using a DOMDocument +class rather than a templating solution has numerous advantages, the most +obvious being the ability to export the DOMDocument for additional processing +and relying on PHP DOM for correct and valid rendering. + +## Architecture + +The architecture of `Zend\Feed\Writer` is very simple. It has two core sets of +classes: data containers and renderers. + +The containers include the `Zend\Feed\Writer\Feed` and `Zend\Feed\Writer\Entry` +classes. The Entry classes can be attached to any Feed class. The sole purpose +of these containers is to collect data about the feed to generate using a simple +interface of setter methods. These methods perform some data validity testing. +For example, it will validate any passed URIs, dates, etc. These checks are not +tied to any of the feed standards definitions. The container objects also +contain methods to allow for fast rendering and export of the final feed, and +these can be reused at will. + +In addition to the main data container classes, there are two additional Atom +2.0-specific classes: `Zend\Feed\Writer\Source` and `Zend\Feed\Writer\Deleted`. +The former implements Atom 2.0 source elements which carry source feed metadata +for a specific entry within an aggregate feed (i.e. the current feed is not the +entry's original source). The latter implements the [Atom Tombstones RFC](https://tools.ietf.org/html/rfc6721), +allowing feeds to carry references to entries which have been deleted. + +While there are two main data container types, there are four renderers: two +matching container renderers per supported feed type. Each renderer accepts a +container, and, based on its content, attempts to generate valid feed markup. If +the renderer is unable to generate valid feed markup (perhaps due to the +container missing an obligatory data point), it will report this by throwing an +exception. While it is possible to ignore exceptions, this removes the default +safeguard of ensuring you have sufficient data set to render a wholly valid +feed. + +To explain this more clearly: you may construct a set of data containers for a +feed where there is a Feed container, into which has been added some Entry +containers and a Deleted container. This forms a data hierarchy resembling a +normal feed. When rendering is performed, this hierarchy has its pieces passed +to relevant renderers, and the partial feeds (all DOMDocuments) are then pieced +together to create a complete feed. In the case of Source or Deleted (Tombstone) +containers, these are rendered only for Atom 2.0 and ignored for RSS. + +Due to the system being divided between data containers and renderers, +extensions have more mandatory requirements than their equivalents in the +`Zend\Feed\Reader` subcomponent. A typical extension offering namespaced feed +and entry level elements must itself reflect the exact same architecture: i.e. +it must offer both feed and entry level data containers, and matching renderers. +There is, fortunately, no complex integration work required since all extension +classes are simply registered and automatically used by the core classes. We +cover extensions in more detail at the end of this chapter. + +## Getting Started + +To use `Zend\Feed\Writer\Writer`, you will provide it with data, and then +trigger the renderer. What follows is an example demonstrating generation of a +minimal Atom 1.0 feed. Each feed or entry uses a separate data container. + +```php +use Zend\Feed\Writer\Feed; + +/** + * Create the parent feed + */ +$feed = new Feed; +$feed->setTitle("Paddy's Blog"); +$feed->setLink('http://www.example.com'); +$feed->setFeedLink('http://www.example.com/atom', 'atom'); +$feed->addAuthor([ + 'name' => 'Paddy', + 'email' => 'paddy@example.com', + 'uri' => 'http://www.example.com', +]); +$feed->setDateModified(time()); +$feed->addHub('http://pubsubhubbub.appspot.com/'); + +/** + * Add one or more entries. Note that entries must + * be manually added once created. + */ +$entry = $feed->createEntry(); +$entry->setTitle('All Your Base Are Belong To Us'); +$entry->setLink('http://www.example.com/all-your-base-are-belong-to-us'); +$entry->addAuthor([ + 'name' => 'Paddy', + 'email' => 'paddy@example.com', + 'uri' => 'http://www.example.com', +]); +$entry->setDateModified(time()); +$entry->setDateCreated(time()); +$entry->setDescription('Exposing the difficulty of porting games to English.'); +$entry->setContent( + 'I am not writing the article. The example is long enough as is ;).' +); +$feed->addEntry($entry); + +/** + * Render the resulting feed to Atom 1.0 and assign to $out. + * You can substitute "atom" with "rss" to generate an RSS 2.0 feed. + */ +$out = $feed->export('atom'); +``` + +The output rendered should be as follows: + +```xml + + + Paddy's Blog + Writing about PC Games since 176 BC. + 2009-12-14T20:28:18+00:00 + + Zend\Feed\Writer + + + + http://www.example.com + + Paddy + paddy@example.com + http://www.example.com + + + + <![CDATA[All Your Base Are Belong To + Us]]> + + + + 2009-12-14T20:28:18+00:00 + 2009-12-14T20:28:18+00:00 + + http://www.example.com/all-your-base-are-belong-to-us + + Paddy + paddy@example.com + http://www.example.com + + + + + + +``` + +This is a perfectly valid Atom 1.0 example. It should be noted that omitting an +obligatory point of data, such as a title, will trigger an exception when +rendering as Atom 1.0. This will differ for RSS 2.0, since a title may be +omitted so long as a description is present. This gives rise to exceptions that +differ between the two standards depending on the renderer in use. By design, +`Zend\Feed\Writer` will not render an invalid feed for either standard +unless the end-user deliberately elects to ignore all exceptions. This built in +safeguard was added to ensure users without in-depth knowledge of the relevant +specifications have a bit less to worry about. + +## Setting Feed Data Points + +Before you can render a feed, you must first setup the data necessary for the +feed being rendered. This utilises a simple setter style API, which doubles as +a method for validating the data being set. By design, the API closely matches +that for `Zend\Feed\Reader` to avoid undue confusion and uncertainty. + +`Zend\Feed\Writer` offers this API via its data container classes +`Zend\Feed\Writer\Feed` and `Zend\Feed\Writer\Entry` (not to mention the Atom +2.0 specific and extension classes). These classes merely store all feed data in +a type-agnostic manner, meaning you may reuse any data container with any +renderer without requiring additional work. Both classes are also amenable to +extensions, meaning that an extension may define its own container classes which +are registered to the base container classes as extensions, and are checked when +any method call triggers the base container's `__call()` method, allowing method +overloading to the extension classes. + +Here's a summary of the Core API for Feeds. You should note it comprises not +only the basic RSS and Atom standards, but also accounts for a number of +included extensions bundled with `Zend\Feed\Writer`. The naming of these +extension sourced methods remain fairly generic; all extension methods operate +at the same level as the Core API, though we do allow you to retrieve any +specific extension object separately if required. + +The Feed API for data is contained in `Zend\Feed\Writer\Feed`. In addition to the API +detailed below, the class also implements the `Countable` and `Iterator` interfaces. + +### Feed API Methods + +Method | Description +------ | ----------- +`setId()` | Set a unique identifier associated with this feed. For Atom 1.0 this is an `atom:id` element, whereas for RSS 2.0 it is added as a `guid` element. These are optional so long as a link is added; i.e. if no identifier is provided, the link is used. +`setTitle()` | Set the title of the feed. +`setDescription()` | Set the text description of the feed. +`setLink()` | Set a URI to the HTML website containing the same or similar information as this feed (i.e. if the feed is from a blog, it should provide the blog's URI where the HTML version of the entries can be read). +`setFeedLinks()` | Add a link to an XML feed, whether it is to the feed being generated, or an alternate URI pointing to the same feed but in a different format. At a minimum, it is recommended to include a link to the feed being generated so it has an identifiable final URI allowing a client to track its location changes without necessitating constant redirects. The parameter is an array of arrays, where each sub-array contains the keys "type" and "uri". The type should be one of "atom", "rss", or "rdf". +`addAuthors()` | Sets the data for authors. The parameter is an array of array,s where each sub-array may contain the keys "name", "email", and "uri". The "uri" value is only applicable for Atom feeds, since RSS contains no facility to show it. For RSS 2.0, rendering will create two elements: an author element containing the email reference with the name in brackets, and a Dublin Core creator element only containing the name. +`addAuthor()` | Sets the data for a single author following the same array format as described above for a single sub-array. +`setDateCreated()` | Sets the date on which this feed was created. Generally only applicable to Atom, where it represents the date the resource described by an Atom 1.0 document was created. The expected parameter may be a UNIX timestamp or a `DateTime` object. +`setDateModified()` | Sets the date on which this feed was last modified. The expected parameter may be a UNIX timestamp or a `DateTime` object. +`setLastBuildDate()` | Sets the date on which this feed was last build. The expected parameter may be a UNIX timestamp or a `DateTime` object. This will only be rendered for RSS 2.0 feeds, and is automatically rendered as the current date by default when not explicitly set. +`setLanguage()` | Sets the language of the feed. This will be omitted unless set. +`setGenerator()` | Allows the setting of a generator. The parameter should be an array containing the keys "name", "version", and "uri". If omitted a default generator will be added referencing `Zend\Feed\Writer`, the current zend-version version, and the Framework's URI. +`setCopyright()` | Sets a copyright notice associated with the feed. +`addHubs()` | Accepts an array of Pubsubhubbub Hub Endpoints to be rendered in the feed as Atom links so that PuSH Subscribers may subscribe to your feed. Note that you must implement a Pubsubhubbub Publisher in order for real-time updates to be enabled. A Publisher may be implemented using `Zend\Feed\Pubsubhubbub\Publisher`. The method `addHub()` allows adding a single hub at a time. +`addCategories()` | Accepts an array of categories for rendering, where each element is itself an array whose possible keys include "term", "label", and "scheme". The "term" is a typically a category name suitable for inclusion in a URI. The "label" may be a human readable category name supporting special characters (it is HTML encoded during rendering) and is a required key. The "scheme" (called the domain in RSS) is optional, but must be a valid URI. The method `addCategory()` allows adding a single category at a time. +`setImage()` | Accepts an array of image metadata for an RSS image or Atom logo. Atom 1.0 only requires a URI. RSS 2.0 requires a URI, HTML link, and an image title. RSS 2.0 optionally may send a width, height, and image description. To provide these, use an array argument with the following keys: "uri", "link", "title", "description", "height", and "width". The RSS 2.0 HTML link should point to the feed source's HTML page. +`createEntry()` | Returns a new instance of `Zend\Feed\Writer\Entry`. This is the Entry data container. New entries are not automatically assigned to the current feed, so you must explicitly call `addEntry()` to add the entry for rendering. +`addEntry()` | Adds an instance of `Zend\Feed\Writer\Entry` to the current feed container for rendering. +`createTombstone()` | Returns a new instance of `Zend\Feed\Writer\Deleted`. This is the Atom 2.0 Tombstone data container. New entries are not automatically assigned to the current feed, so you must explicitly call `addTombstone()` to add the deleted entry for rendering. +`addTombstone()` | Adds an instance of `Zend\Feed\Writer\Deleted` to the current feed container for rendering. +`removeEntry()` | Accepts a parameter indicating an array index of the entry to remove from the feed. +`export()` | Exports the entire data hierarchy to an XML feed. The method has two parameters. The first is the feed type, one of "atom" or "rss". The second is an optional boolean to set indicating whether or not Exceptions are thrown. The default is `TRUE`. + +> #### Retrieval methods +> +> In addition to the setters listed above, `Feed` instances also provide +> matching getters to retrieve data from the `Feed` data container. For +> example, `setImage()` is matched with a `getImage()` method. + +## Setting Entry Data Points + +Below is a summary of the Core API for entries and items. You should note that +it covers not only the basic RSS and Atom standards, but also a number of +included extensions bundled with `Zend\Feed\Writer`. The naming of these +extension sourced methods remain fairly generic; all extension methods operate +at the same level as the Core API, though we do allow you to retrieve any +specific extension object separately if required. + +The Entry *API* for data is contained in `Zend\Feed\Writer\Entry`. + +### Entry API Methods + +Method | Description +------ | ----------- +`setId()` | Set a unique identifier associated with this entry. For Atom 1.0 this is an `atom:id` element, whereas for RSS 2.0 it is added as a `guid` element. These are optional so long as a link is added; i.e. if no identifier is provided, the link is used. +`setTitle()` | Set the title of the entry. +`setDescription()` | Set the text description of the entry. +`setContent()` | Set the content of the entry. +`setLink()` | Set a URI to the HTML website containing the same or similar information as this entry (i.e. if the feed is from a blog, it should provide the blog article's URI where the HTML version of the entry can be read). +`setFeedLinks()` | Add a link to an XML feed, whether it is to the feed being generated, or an alternate URI pointing to the same feed but in a different format. At a minimum, it is recommended to include a link to the feed being generated so it has an identifiable final URI allowing a client to track its location changes without necessitating constant redirects. The parameter is an array of arrays, where each sub-array contains the keys "type" and "uri". The type should be one of "atom", "rss", or "rdf". If a type is omitted, it defaults to the type used when rendering the feed. +`addAuthors()` | Sets the data for authors. The parameter is an array of array,s where each sub-array may contain the keys "name", "email", and "uri". The "uri" value is only applicable for Atom feeds, since RSS contains no facility to show it. For RSS 2.0, rendering will create two elements: an author element containing the email reference with the name in brackets, and a Dublin Core creator element only containing the name. +`addAuthor()` | Sets the data for a single author following the same format as described above for a single sub-array. +`setDateCreated()` | Sets the date on which this entry was created. Generally only applicable to Atom where it represents the date the resource described by an Atom 1.0 document was created. The expected parameter may be a UNIX timestamp or a `DateTime` object. If omitted, the date used will be the current date and time. +`setDateModified()` | Sets the date on which this entry was last modified. The expected parameter may be a UNIX timestamp or a `DateTime` object. If omitted, the date used will be the current date and time. +`setCopyright()` | Sets a copyright notice associated with the entry. +`addCategories()` | Accepts an array of categories for rendering, where each element is itself an array whose possible keys include "term", "label", and "scheme". The "term" is a typically a category name suitable for inclusion in a URI. The "label" may be a human readable category name supporting special characters (it is encoded during rendering) and is a required key. The "scheme" (called the domain in RSS) is optional but must be a valid URI. +`addCategory()` | Sets the data for a single category following the same format as described above for a single sub-array. +`setCommentCount()` | Sets the number of comments associated with this entry. Rendering differs between RSS and Atom 2.0 depending on the element or attribute needed. +`setCommentLink()` | Sets a link to an HTML page containing comments associated with this entry. +`setCommentFeedLink()` | Sets a link to an XML feed containing comments associated with this entry. The parameter is an array containing the keys "uri" and "type", where the type is one of "rdf", "rss", or "atom". +`setCommentFeedLinks()` | Same as `setCommentFeedLink()`, except it accepts an array of arrays, where each subarray contains the expected parameters of `setCommentFeedLink()`. +`setEncoding()` | Sets the encoding of entry text. This will default to UTF-8, which is the preferred encoding. + +> #### Retrieval methods +> +> In addition to the setters listed above, `Entry` instances also provide +> matching getters to retrieve data from the `Entry` data container. For +> example, `setContent()` is matched with a `getContent()` method. + +## Extensions + +- TODO diff --git a/vendor/zendframework/zend-feed/mkdocs.yml b/vendor/zendframework/zend-feed/mkdocs.yml new file mode 100644 index 000000000..609957c1f --- /dev/null +++ b/vendor/zendframework/zend-feed/mkdocs.yml @@ -0,0 +1,20 @@ +docs_dir: doc/book +site_dir: doc/html +pages: + - index.md + - Introduction: intro.md + - Reader: + - "Zend\\Feed\\Reader": reader.md + - 'HTTP Clients': http-clients.md + - 'Importing Feeds': importing.md + - 'Feed Discovery': find-feeds.md + - 'Consuming RSS Feeds': consuming-rss.md + - 'Consuming Atom Feeds': consuming-atom.md + - 'Consuming Atom Entries': consuming-atom-entry.md + - Security: security.md + - Writer: writer.md + - Pubsubhubbub: pubsubhubbub.md +site_name: zend-feed +site_description: Zend\Feed +repo_url: 'https://github.com/zendframework/zend-feed' +copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' diff --git a/vendor/zendframework/zend-feed/src/Reader/Entry/Atom.php b/vendor/zendframework/zend-feed/src/Reader/Entry/Atom.php index c68f360f9..84efaadda 100644 --- a/vendor/zendframework/zend-feed/src/Reader/Entry/Atom.php +++ b/vendor/zendframework/zend-feed/src/Reader/Entry/Atom.php @@ -104,7 +104,7 @@ class Atom extends AbstractEntry implements EntryInterface /** * Get the entry creation date * - * @return string + * @return \DateTime */ public function getDateCreated() { @@ -122,7 +122,7 @@ class Atom extends AbstractEntry implements EntryInterface /** * Get the entry modification date * - * @return string + * @return \DateTime */ public function getDateModified() { diff --git a/vendor/zendframework/zend-feed/src/Reader/Entry/EntryInterface.php b/vendor/zendframework/zend-feed/src/Reader/Entry/EntryInterface.php index c5e5fb224..250f4b6e0 100644 --- a/vendor/zendframework/zend-feed/src/Reader/Entry/EntryInterface.php +++ b/vendor/zendframework/zend-feed/src/Reader/Entry/EntryInterface.php @@ -38,14 +38,14 @@ interface EntryInterface /** * Get the entry creation date * - * @return string + * @return \DateTime */ public function getDateCreated(); /** * Get the entry modification date * - * @return string + * @return \DateTime */ public function getDateModified(); diff --git a/vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php b/vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php index b55fdad42..0832ba369 100644 --- a/vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php +++ b/vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php @@ -167,7 +167,7 @@ class Rss extends AbstractEntry implements EntryInterface /** * Get the entry's date of creation * - * @return string + * @return \DateTime */ public function getDateCreated() { @@ -178,7 +178,7 @@ class Rss extends AbstractEntry implements EntryInterface * Get the entry's date of modification * * @throws Exception\RuntimeException - * @return string + * @return \DateTime */ public function getDateModified() { diff --git a/vendor/zendframework/zend-feed/src/Reader/Exception/InvalidHttpClientException.php b/vendor/zendframework/zend-feed/src/Reader/Exception/InvalidHttpClientException.php new file mode 100644 index 000000000..c5d662981 --- /dev/null +++ b/vendor/zendframework/zend-feed/src/Reader/Exception/InvalidHttpClientException.php @@ -0,0 +1,16 @@ + 'Zend\Feed\Reader\Extension\Atom\Entry', - 'atomfeed' => 'Zend\Feed\Reader\Extension\Atom\Feed', - 'contententry' => 'Zend\Feed\Reader\Extension\Content\Entry', - 'creativecommonsentry' => 'Zend\Feed\Reader\Extension\CreativeCommons\Entry', - 'creativecommonsfeed' => 'Zend\Feed\Reader\Extension\CreativeCommons\Feed', - 'dublincoreentry' => 'Zend\Feed\Reader\Extension\DublinCore\Entry', - 'dublincorefeed' => 'Zend\Feed\Reader\Extension\DublinCore\Feed', - 'podcastentry' => 'Zend\Feed\Reader\Extension\Podcast\Entry', - 'podcastfeed' => 'Zend\Feed\Reader\Extension\Podcast\Feed', - 'slashentry' => 'Zend\Feed\Reader\Extension\Slash\Entry', - 'syndicationfeed' => 'Zend\Feed\Reader\Extension\Syndication\Feed', - 'threadentry' => 'Zend\Feed\Reader\Extension\Thread\Entry', - 'wellformedwebentry' => 'Zend\Feed\Reader\Extension\WellFormedWeb\Entry', + protected $aliases = [ + 'atomentry' => Extension\Atom\Entry::class, + 'atomEntry' => Extension\Atom\Entry::class, + 'AtomEntry' => Extension\Atom\Entry::class, + 'atomfeed' => Extension\Atom\Feed::class, + 'atomFeed' => Extension\Atom\Feed::class, + 'AtomFeed' => Extension\Atom\Feed::class, + 'contententry' => Extension\Content\Entry::class, + 'contentEntry' => Extension\Content\Entry::class, + 'ContentEntry' => Extension\Content\Entry::class, + 'creativecommonsentry' => Extension\CreativeCommons\Entry::class, + 'creativeCommonsEntry' => Extension\CreativeCommons\Entry::class, + 'CreativeCommonsEntry' => Extension\CreativeCommons\Entry::class, + 'creativecommonsfeed' => Extension\CreativeCommons\Feed::class, + 'creativeCommonsFeed' => Extension\CreativeCommons\Feed::class, + 'CreativeCommonsFeed' => Extension\CreativeCommons\Feed::class, + 'dublincoreentry' => Extension\DublinCore\Entry::class, + 'dublinCoreEntry' => Extension\DublinCore\Entry::class, + 'DublinCoreEntry' => Extension\DublinCore\Entry::class, + 'dublincorefeed' => Extension\DublinCore\Feed::class, + 'dublinCoreFeed' => Extension\DublinCore\Feed::class, + 'DublinCoreFeed' => Extension\DublinCore\Feed::class, + 'podcastentry' => Extension\Podcast\Entry::class, + 'podcastEntry' => Extension\Podcast\Entry::class, + 'PodcastEntry' => Extension\Podcast\Entry::class, + 'podcastfeed' => Extension\Podcast\Feed::class, + 'podcastFeed' => Extension\Podcast\Feed::class, + 'PodcastFeed' => Extension\Podcast\Feed::class, + 'slashentry' => Extension\Slash\Entry::class, + 'slashEntry' => Extension\Slash\Entry::class, + 'SlashEntry' => Extension\Slash\Entry::class, + 'syndicationfeed' => Extension\Syndication\Feed::class, + 'syndicationFeed' => Extension\Syndication\Feed::class, + 'SyndicationFeed' => Extension\Syndication\Feed::class, + 'threadentry' => Extension\Thread\Entry::class, + 'threadEntry' => Extension\Thread\Entry::class, + 'ThreadEntry' => Extension\Thread\Entry::class, + 'wellformedwebentry' => Extension\WellFormedWeb\Entry::class, + 'wellFormedWebEntry' => Extension\WellFormedWeb\Entry::class, + 'WellFormedWebEntry' => Extension\WellFormedWeb\Entry::class, ]; /** - * Do not share instances + * Factories for default set of extension classes + * + * @var array + */ + protected $factories = [ + Extension\Atom\Entry::class => InvokableFactory::class, + Extension\Atom\Feed::class => InvokableFactory::class, + Extension\Content\Entry::class => InvokableFactory::class, + Extension\CreativeCommons\Entry::class => InvokableFactory::class, + Extension\CreativeCommons\Feed::class => InvokableFactory::class, + Extension\DublinCore\Entry::class => InvokableFactory::class, + Extension\DublinCore\Feed::class => InvokableFactory::class, + Extension\Podcast\Entry::class => InvokableFactory::class, + Extension\Podcast\Feed::class => InvokableFactory::class, + Extension\Slash\Entry::class => InvokableFactory::class, + Extension\Syndication\Feed::class => InvokableFactory::class, + Extension\Thread\Entry::class => InvokableFactory::class, + Extension\WellFormedWeb\Entry::class => InvokableFactory::class, + // Legacy (v2) due to alias resolution; canonical form of resolved + // alias is used to look up the factory, while the non-normalized + // resolved alias is used as the requested name passed to the factory. + 'zendfeedreaderextensionatomentry' => InvokableFactory::class, + 'zendfeedreaderextensionatomfeed' => InvokableFactory::class, + 'zendfeedreaderextensioncontententry' => InvokableFactory::class, + 'zendfeedreaderextensioncreativecommonsentry' => InvokableFactory::class, + 'zendfeedreaderextensioncreativecommonsfeed' => InvokableFactory::class, + 'zendfeedreaderextensiondublincoreentry' => InvokableFactory::class, + 'zendfeedreaderextensiondublincorefeed' => InvokableFactory::class, + 'zendfeedreaderextensionpodcastentry' => InvokableFactory::class, + 'zendfeedreaderextensionpodcastfeed' => InvokableFactory::class, + 'zendfeedreaderextensionslashentry' => InvokableFactory::class, + 'zendfeedreaderextensionsyndicationfeed' => InvokableFactory::class, + 'zendfeedreaderextensionthreadentry' => InvokableFactory::class, + 'zendfeedreaderextensionwellformedwebentry' => InvokableFactory::class, + ]; + + /** + * Do not share instances (v2) * * @var bool */ protected $shareByDefault = false; + /** + * Do not share instances (v3) + * + * @var bool + */ + protected $sharedByDefault = false; + /** * Validate the plugin * @@ -57,7 +129,7 @@ class ExtensionPluginManager extends AbstractPluginManager * @return void * @throws Exception\InvalidArgumentException if invalid */ - public function validatePlugin($plugin) + public function validate($plugin) { if ($plugin instanceof Extension\AbstractEntry || $plugin instanceof Extension\AbstractFeed @@ -66,7 +138,7 @@ class ExtensionPluginManager extends AbstractPluginManager return; } - throw new Exception\InvalidArgumentException(sprintf( + throw new InvalidServiceException(sprintf( 'Plugin of type %s is invalid; must implement %s\Extension\AbstractFeed ' . 'or %s\Extension\AbstractEntry', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), @@ -74,4 +146,26 @@ class ExtensionPluginManager extends AbstractPluginManager __NAMESPACE__ )); } + + /** + * Validate the plugin (v2) + * + * @param mixed $plugin + * @return void + * @throws Exception\InvalidArgumentException if invalid + */ + public function validatePlugin($plugin) + { + try { + $this->validate($plugin); + } catch (InvalidServiceException $e) { + throw new Exception\InvalidArgumentException(sprintf( + 'Plugin of type %s is invalid; must implement %s\Extension\AbstractFeed ' + . 'or %s\Extension\AbstractEntry', + (is_object($plugin) ? get_class($plugin) : gettype($plugin)), + __NAMESPACE__, + __NAMESPACE__ + )); + } + } } diff --git a/vendor/zendframework/zend-feed/src/Reader/Http/HeaderAwareClientInterface.php b/vendor/zendframework/zend-feed/src/Reader/Http/HeaderAwareClientInterface.php new file mode 100644 index 000000000..5895b7cd2 --- /dev/null +++ b/vendor/zendframework/zend-feed/src/Reader/Http/HeaderAwareClientInterface.php @@ -0,0 +1,33 @@ + + * [ + * 'header-name' => [ + * 'header', + * 'values' + * ] + * ] + * + * + * @param string $uri + * @param array $headers + * @return HeaderAwareResponseInterface + */ + public function get($uri, array $headers = []); +} diff --git a/vendor/zendframework/zend-feed/src/Reader/Http/HeaderAwareResponseInterface.php b/vendor/zendframework/zend-feed/src/Reader/Http/HeaderAwareResponseInterface.php new file mode 100644 index 000000000..509c5fd7e --- /dev/null +++ b/vendor/zendframework/zend-feed/src/Reader/Http/HeaderAwareResponseInterface.php @@ -0,0 +1,28 @@ +decoratedResponse = $response; + } + + /** + * Return the original PSR-7 response being decorated. + * + * @return Psr7ResponseInterface + */ + public function getDecoratedResponse() + { + return $this->decoratedResponse; + } + + /** + * {@inheritDoc} + */ + public function getBody() + { + return (string) $this->decoratedResponse->getBody(); + } + + /** + * {@inheritDoc} + */ + public function getStatusCode() + { + return $this->decoratedResponse->getStatusCode(); + } + + /** + * {@inheritDoc} + */ + public function getHeaderLine($name, $default = null) + { + if (! $this->decoratedResponse->hasHeader($name)) { + return $default; + } + return $this->decoratedResponse->getHeaderLine($name); + } +} diff --git a/vendor/zendframework/zend-feed/src/Reader/Http/Response.php b/vendor/zendframework/zend-feed/src/Reader/Http/Response.php new file mode 100644 index 000000000..482c33e1f --- /dev/null +++ b/vendor/zendframework/zend-feed/src/Reader/Http/Response.php @@ -0,0 +1,175 @@ +validateStatusCode($statusCode); + $this->validateBody($body); + $this->validateHeaders($headers); + + $this->statusCode = (int) $statusCode; + $this->body = (string) $body; + $this->headers = $this->normalizeHeaders($headers); + } + + /** + * {@inheritDoc} + */ + public function getStatusCode() + { + return $this->statusCode; + } + + /** + * {@inheritDoc} + */ + public function getBody() + { + return $this->body; + } + + /** + * {@inheritDoc} + */ + public function getHeaderLine($name, $default = null) + { + $normalizedName = strtolower($name); + return isset($this->headers[$normalizedName]) + ? $this->headers[$normalizedName] + : $default; + } + + /** + * Validate that we have a status code argument that will work for our context. + * + * @param mixed $body + * @throws Exception\InvalidArgumentException for arguments not castable + * to integer HTTP status codes. + */ + private function validateStatusCode($statusCode) + { + if (! is_numeric($statusCode)) { + throw new Exception\InvalidArgumentException(sprintf( + '%s expects a numeric status code; received %s', + __CLASS__, + (is_object($statusCode) ? get_class($statusCode) : gettype($statusCode)) + )); + } + + if (100 > $statusCode || 599 < $statusCode) { + throw new Exception\InvalidArgumentException(sprintf( + '%s expects an integer status code between 100 and 599 inclusive; received %s', + __CLASS__, + $statusCode + )); + } + + if (intval($statusCode) != $statusCode) { + throw new Exception\InvalidArgumentException(sprintf( + '%s expects an integer status code; received %s', + __CLASS__, + $statusCode + )); + } + } + + /** + * Validate that we have a body argument that will work for our context. + * + * @param mixed $body + * @throws Exception\InvalidArgumentException for arguments not castable + * to strings. + */ + private function validateBody($body) + { + if (is_string($body)) { + return; + } + + if (is_object($body) && method_exists($body, '__toString')) { + return; + } + + throw new Exception\InvalidArgumentException(sprintf( + '%s expects a string body, or an object that can cast to string; received %s', + __CLASS__, + (is_object($body) ? get_class($body) : gettype($body)) + )); + } + + /** + * Validate header values. + * + * @param array $headers + * @throws Exception\InvalidArgumentException + */ + private function validateHeaders(array $headers) + { + foreach ($headers as $name => $value) { + if (! is_string($name) || is_numeric($name) || empty($name)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Header names provided to %s must be non-empty, non-numeric strings; received %s', + __CLASS__, + $name + )); + } + + if (! is_string($value) && ! is_numeric($value)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Individual header values provided to %s must be a string or numeric; received %s for header %s', + __CLASS__, + (is_object($value) ? get_class($value) : gettype($value)), + $name + )); + } + } + } + + /** + * Normalize header names to lowercase. + * + * @param array $headers + * @return array + */ + private function normalizeHeaders(array $headers) + { + $normalized = []; + foreach ($headers as $name => $value) { + $normalized[strtolower($name)] = $value; + } + return $normalized; + } +} diff --git a/vendor/zendframework/zend-feed/src/Reader/Http/ZendHttpClientDecorator.php b/vendor/zendframework/zend-feed/src/Reader/Http/ZendHttpClientDecorator.php new file mode 100644 index 000000000..dbff9932e --- /dev/null +++ b/vendor/zendframework/zend-feed/src/Reader/Http/ZendHttpClientDecorator.php @@ -0,0 +1,118 @@ +client = $client; + } + + /** + * @return ZendHttpClient + */ + public function getDecoratedClient() + { + return $this->client; + } + + /** + * {@inheritDoc} + */ + public function get($uri, array $headers = []) + { + $this->client->resetParameters(); + $this->client->setMethod('GET'); + $this->client->setHeaders(new Headers()); + $this->client->setUri($uri); + if (! empty($headers)) { + $this->injectHeaders($headers); + } + $response = $this->client->send(); + + return new Response( + $response->getStatusCode(), + $response->getBody(), + $this->prepareResponseHeaders($response->getHeaders()) + ); + } + + /** + * Inject header values into the client. + * + * @param array $headerValues + */ + private function injectHeaders(array $headerValues) + { + $headers = $this->client->getRequest()->getHeaders(); + foreach ($headerValues as $name => $values) { + if (! is_string($name) || is_numeric($name) || empty($name)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Header names provided to %s::get must be non-empty, non-numeric strings; received %s', + __CLASS__, + $name + )); + } + + if (! is_array($values)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Header values provided to %s::get must be arrays of values; received %s', + __CLASS__, + (is_object($values) ? get_class($values) : gettype($values)) + )); + } + + foreach ($values as $value) { + if (! is_string($value) && ! is_numeric($value)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Individual header values provided to %s::get must be strings or numbers; ' + . 'received %s for header %s', + __CLASS__, + (is_object($value) ? get_class($value) : gettype($value)), + $name + )); + } + + $headers->addHeaderLine($name, $value); + } + } + } + + /** + * Normalize headers to use with HeaderAwareResponseInterface. + * + * Ensures multi-value headers are represented as a single string, via + * comma concatenation. + * + * @param Headers $headers + * @return array + */ + private function prepareResponseHeaders(Headers $headers) + { + $normalized = []; + foreach ($headers->toArray() as $name => $value) { + $normalized[$name] = is_array($value) ? implode(', ', $value) : $value; + } + return $normalized; + } +} diff --git a/vendor/zendframework/zend-feed/src/Reader/Reader.php b/vendor/zendframework/zend-feed/src/Reader/Reader.php index 09bdcf4b9..693a3e2ea 100644 --- a/vendor/zendframework/zend-feed/src/Reader/Reader.php +++ b/vendor/zendframework/zend-feed/src/Reader/Reader.php @@ -14,6 +14,7 @@ use DOMXPath; use Zend\Cache\Storage\StorageInterface as CacheStorage; use Zend\Http as ZendHttp; use Zend\Stdlib\ErrorHandler; +use Zend\Feed\Reader\Exception\InvalidHttpClientException; /** */ @@ -57,7 +58,7 @@ class Reader implements ReaderImportInterface /** * HTTP client object to use for retrieving feeds * - * @var ZendHttp\Client + * @var Http\ClientInterface */ protected static $httpClient = null; @@ -117,23 +118,30 @@ class Reader implements ReaderImportInterface * * Sets the HTTP client object to use for retrieving the feeds. * - * @param ZendHttp\Client $httpClient + * @param ZendHttp\Client | Http\ClientInterface $httpClient * @return void */ - public static function setHttpClient(ZendHttp\Client $httpClient) + public static function setHttpClient($httpClient) { + if ($httpClient instanceof ZendHttp\Client) { + $httpClient = new Http\ZendHttpClientDecorator($httpClient); + } + + if (! $httpClient instanceof Http\ClientInterface) { + throw new InvalidHttpClientException(); + } static::$httpClient = $httpClient; } /** * Gets the HTTP client object. If none is set, a new ZendHttp\Client will be used. * - * @return ZendHttp\Client + * @return Http\ClientInterface */ public static function getHttpClient() { - if (!static::$httpClient instanceof ZendHttp\Client) { - static::$httpClient = new ZendHttp\Client(); + if (! static::$httpClient) { + static::$httpClient = new Http\ZendHttpClientDecorator(new ZendHttp\Client()); } return static::$httpClient; @@ -189,17 +197,16 @@ class Reader implements ReaderImportInterface */ public static function import($uri, $etag = null, $lastModified = null) { - $cache = self::getCache(); - $client = self::getHttpClient(); - $client->resetParameters(); - $headers = new ZendHttp\Headers(); - $client->setHeaders($headers); - $client->setUri($uri); + $cache = self::getCache(); + $client = self::getHttpClient(); $cacheId = 'Zend_Feed_Reader_' . md5($uri); if (static::$httpConditionalGet && $cache) { - $data = $cache->getItem($cacheId); - if ($data) { + $headers = []; + $data = $cache->getItem($cacheId); + if ($data && $client instanceof Http\HeaderAwareClientInterface) { + // Only check for ETag and last modified values in the cache + // if we have a client capable of emitting headers in the first place. if ($etag === null) { $etag = $cache->getItem($cacheId . '_etag'); } @@ -207,13 +214,13 @@ class Reader implements ReaderImportInterface $lastModified = $cache->getItem($cacheId . '_lastmodified'); } if ($etag) { - $headers->addHeaderLine('If-None-Match', $etag); + $headers['If-None-Match'] = [$etag]; } if ($lastModified) { - $headers->addHeaderLine('If-Modified-Since', $lastModified); + $headers['If-Modified-Since'] = [$lastModified]; } } - $response = $client->send(); + $response = $client->get($uri, $headers); if ($response->getStatusCode() !== 200 && $response->getStatusCode() !== 304) { throw new Exception\RuntimeException('Feed failed to load, got response code ' . $response->getStatusCode()); } @@ -222,11 +229,14 @@ class Reader implements ReaderImportInterface } else { $responseXml = $response->getBody(); $cache->setItem($cacheId, $responseXml); - if ($response->getHeaders()->get('ETag')) { - $cache->setItem($cacheId . '_etag', $response->getHeaders()->get('ETag')->getFieldValue()); - } - if ($response->getHeaders()->get('Last-Modified')) { - $cache->setItem($cacheId . '_lastmodified', $response->getHeaders()->get('Last-Modified')->getFieldValue()); + + if ($response instanceof Http\HeaderAwareResponseInterface) { + if ($response->getHeaderLine('ETag', false)) { + $cache->setItem($cacheId . '_etag', $response->getHeaderLine('ETag')); + } + if ($response->getHeaderLine('Last-Modified', false)) { + $cache->setItem($cacheId . '_lastmodified', $response->getHeaderLine('Last-Modified')); + } } } return static::importString($responseXml); @@ -235,7 +245,7 @@ class Reader implements ReaderImportInterface if ($data) { return static::importString($data); } - $response = $client->send(); + $response = $client->get($uri); if ((int) $response->getStatusCode() !== 200) { throw new Exception\RuntimeException('Feed failed to load, got response code ' . $response->getStatusCode()); } @@ -243,7 +253,7 @@ class Reader implements ReaderImportInterface $cache->setItem($cacheId, $responseXml); return static::importString($responseXml); } else { - $response = $client->send(); + $response = $client->get($uri); if ((int) $response->getStatusCode() !== 200) { throw new Exception\RuntimeException('Feed failed to load, got response code ' . $response->getStatusCode()); } @@ -270,7 +280,7 @@ class Reader implements ReaderImportInterface public static function importRemoteFeed($uri, Http\ClientInterface $client) { $response = $client->get($uri); - if (!$response instanceof Http\ResponseInterface) { + if (! $response instanceof Http\ResponseInterface) { throw new Exception\RuntimeException(sprintf( 'Did not receive a %s\Http\ResponseInterface from the provided HTTP client; received "%s"', __NAMESPACE__, @@ -371,9 +381,8 @@ class Reader implements ReaderImportInterface */ public static function findFeedLinks($uri) { - $client = static::getHttpClient(); - $client->setUri($uri); - $response = $client->send(); + $client = static::getHttpClient(); + $response = $client->get($uri); if ($response->getStatusCode() !== 200) { throw new Exception\RuntimeException("Failed to access $uri, got response code " . $response->getStatusCode()); } diff --git a/vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php b/vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php index 0b21b3b0a..054fe3e33 100644 --- a/vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php +++ b/vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Feed.php @@ -14,8 +14,6 @@ use Zend\Feed\Writer; use Zend\Stdlib\StringUtils; use Zend\Stdlib\StringWrapper\StringWrapperInterface; -/** -*/ class Feed { /** diff --git a/vendor/zendframework/zend-feed/src/Writer/ExtensionManager.php b/vendor/zendframework/zend-feed/src/Writer/ExtensionManager.php index b0e0e3bf7..a7efb3e1a 100644 --- a/vendor/zendframework/zend-feed/src/Writer/ExtensionManager.php +++ b/vendor/zendframework/zend-feed/src/Writer/ExtensionManager.php @@ -12,7 +12,7 @@ namespace Zend\Feed\Writer; /** * Default implementation of ExtensionManagerInterface * - * Decorator of ExtensionPluginManager. + * Decorator for an ExtensionManagerInstance. */ class ExtensionManager implements ExtensionManagerInterface { @@ -22,14 +22,14 @@ class ExtensionManager implements ExtensionManagerInterface * Constructor * * Seeds the extension manager with a plugin manager; if none provided, - * creates an instance. + * creates and decorates an instance of StandaloneExtensionManager. * - * @param null|ExtensionPluginManager $pluginManager + * @param null|ExtensionManagerInterface $pluginManager */ - public function __construct(ExtensionPluginManager $pluginManager = null) + public function __construct(ExtensionManagerInterface $pluginManager = null) { if (null === $pluginManager) { - $pluginManager = new ExtensionPluginManager(); + $pluginManager = new StandaloneExtensionManager(); } $this->pluginManager = $pluginManager; } @@ -37,7 +37,7 @@ class ExtensionManager implements ExtensionManagerInterface /** * Method overloading * - * Proxy to composed ExtensionPluginManager instance. + * Proxy to composed ExtensionManagerInterface instance. * * @param string $method * @param array $args diff --git a/vendor/zendframework/zend-feed/src/Writer/ExtensionPluginManager.php b/vendor/zendframework/zend-feed/src/Writer/ExtensionPluginManager.php index 8586b48aa..34cc57f48 100644 --- a/vendor/zendframework/zend-feed/src/Writer/ExtensionPluginManager.php +++ b/vendor/zendframework/zend-feed/src/Writer/ExtensionPluginManager.php @@ -10,6 +10,8 @@ namespace Zend\Feed\Writer; use Zend\ServiceManager\AbstractPluginManager; +use Zend\ServiceManager\Exception\InvalidServiceException; +use Zend\ServiceManager\Factory\InvokableFactory; /** * Plugin manager implementation for feed writer extensions @@ -19,41 +21,107 @@ use Zend\ServiceManager\AbstractPluginManager; class ExtensionPluginManager extends AbstractPluginManager { /** - * Default set of extension classes + * Aliases for default set of extension classes * * @var array */ - protected $invokableClasses = [ - 'atomrendererfeed' => 'Zend\Feed\Writer\Extension\Atom\Renderer\Feed', - 'contentrendererentry' => 'Zend\Feed\Writer\Extension\Content\Renderer\Entry', - 'dublincorerendererentry' => 'Zend\Feed\Writer\Extension\DublinCore\Renderer\Entry', - 'dublincorerendererfeed' => 'Zend\Feed\Writer\Extension\DublinCore\Renderer\Feed', - 'itunesentry' => 'Zend\Feed\Writer\Extension\ITunes\Entry', - 'itunesfeed' => 'Zend\Feed\Writer\Extension\ITunes\Feed', - 'itunesrendererentry' => 'Zend\Feed\Writer\Extension\ITunes\Renderer\Entry', - 'itunesrendererfeed' => 'Zend\Feed\Writer\Extension\ITunes\Renderer\Feed', - 'slashrendererentry' => 'Zend\Feed\Writer\Extension\Slash\Renderer\Entry', - 'threadingrendererentry' => 'Zend\Feed\Writer\Extension\Threading\Renderer\Entry', - 'wellformedwebrendererentry' => 'Zend\Feed\Writer\Extension\WellFormedWeb\Renderer\Entry', + protected $aliases = [ + 'atomrendererfeed' => Extension\Atom\Renderer\Feed::class, + 'atomRendererFeed' => Extension\Atom\Renderer\Feed::class, + 'AtomRendererFeed' => Extension\Atom\Renderer\Feed::class, + 'contentrendererentry' => Extension\Content\Renderer\Entry::class, + 'contentRendererEntry' => Extension\Content\Renderer\Entry::class, + 'ContentRendererEntry' => Extension\Content\Renderer\Entry::class, + 'dublincorerendererentry' => Extension\DublinCore\Renderer\Entry::class, + 'dublinCoreRendererEntry' => Extension\DublinCore\Renderer\Entry::class, + 'DublinCoreRendererEntry' => Extension\DublinCore\Renderer\Entry::class, + 'dublincorerendererfeed' => Extension\DublinCore\Renderer\Feed::class, + 'dublinCoreRendererFeed' => Extension\DublinCore\Renderer\Feed::class, + 'DublinCoreRendererFeed' => Extension\DublinCore\Renderer\Feed::class, + 'itunesentry' => Extension\ITunes\Entry::class, + 'itunesEntry' => Extension\ITunes\Entry::class, + 'iTunesEntry' => Extension\ITunes\Entry::class, + 'ItunesEntry' => Extension\ITunes\Entry::class, + 'itunesfeed' => Extension\ITunes\Feed::class, + 'itunesFeed' => Extension\ITunes\Feed::class, + 'iTunesFeed' => Extension\ITunes\Feed::class, + 'ItunesFeed' => Extension\ITunes\Feed::class, + 'itunesrendererentry' => Extension\ITunes\Renderer\Entry::class, + 'itunesRendererEntry' => Extension\ITunes\Renderer\Entry::class, + 'iTunesRendererEntry' => Extension\ITunes\Renderer\Entry::class, + 'ItunesRendererEntry' => Extension\ITunes\Renderer\Entry::class, + 'itunesrendererfeed' => Extension\ITunes\Renderer\Feed::class, + 'itunesRendererFeed' => Extension\ITunes\Renderer\Feed::class, + 'iTunesRendererFeed' => Extension\ITunes\Renderer\Feed::class, + 'ItunesRendererFeed' => Extension\ITunes\Renderer\Feed::class, + 'slashrendererentry' => Extension\Slash\Renderer\Entry::class, + 'slashRendererEntry' => Extension\Slash\Renderer\Entry::class, + 'SlashRendererEntry' => Extension\Slash\Renderer\Entry::class, + 'threadingrendererentry' => Extension\Threading\Renderer\Entry::class, + 'threadingRendererEntry' => Extension\Threading\Renderer\Entry::class, + 'ThreadingRendererEntry' => Extension\Threading\Renderer\Entry::class, + 'wellformedwebrendererentry' => Extension\WellFormedWeb\Renderer\Entry::class, + 'wellFormedWebRendererEntry' => Extension\WellFormedWeb\Renderer\Entry::class, + 'WellFormedWebRendererEntry' => Extension\WellFormedWeb\Renderer\Entry::class, ]; /** - * Do not share instances + * Factories for default set of extension classes + * + * @var array + */ + protected $factories = [ + Extension\Atom\Renderer\Feed::class => InvokableFactory::class, + Extension\Content\Renderer\Entry::class => InvokableFactory::class, + Extension\DublinCore\Renderer\Entry::class => InvokableFactory::class, + Extension\DublinCore\Renderer\Feed::class => InvokableFactory::class, + Extension\ITunes\Entry::class => InvokableFactory::class, + Extension\ITunes\Feed::class => InvokableFactory::class, + Extension\ITunes\Renderer\Entry::class => InvokableFactory::class, + Extension\ITunes\Renderer\Feed::class => InvokableFactory::class, + Extension\Slash\Renderer\Entry::class => InvokableFactory::class, + Extension\Threading\Renderer\Entry::class => InvokableFactory::class, + Extension\WellFormedWeb\Renderer\Entry::class => InvokableFactory::class, + // Legacy (v2) due to alias resolution; canonical form of resolved + // alias is used to look up the factory, while the non-normalized + // resolved alias is used as the requested name passed to the factory. + 'zendfeedwriterextensionatomrendererfeed' => InvokableFactory::class, + 'zendfeedwriterextensioncontentrendererentry' => InvokableFactory::class, + 'zendfeedwriterextensiondublincorerendererentry' => InvokableFactory::class, + 'zendfeedwriterextensiondublincorerendererfeed' => InvokableFactory::class, + 'zendfeedwriterextensionitunesentry' => InvokableFactory::class, + 'zendfeedwriterextensionitunesfeed' => InvokableFactory::class, + 'zendfeedwriterextensionitunesrendererentry' => InvokableFactory::class, + 'zendfeedwriterextensionitunesrendererfeed' => InvokableFactory::class, + 'zendfeedwriterextensionslashrendererentry' => InvokableFactory::class, + 'zendfeedwriterextensionthreadingrendererentry' => InvokableFactory::class, + 'zendfeedwriterextensionwellformedwebrendererentry' => InvokableFactory::class, + ]; + + /** + * Do not share instances (v2) * * @var bool */ protected $shareByDefault = false; /** - * Validate the plugin + * Do not share instances (v3) + * + * @var bool + */ + protected $sharedByDefault = false; + + /** + * Validate the plugin (v3) * * Checks that the extension loaded is of a valid type. * * @param mixed $plugin * @return void - * @throws Exception\InvalidArgumentException if invalid + * @throws InvalidServiceException if invalid */ - public function validatePlugin($plugin) + public function validate($plugin) { if ($plugin instanceof Extension\AbstractRenderer) { // we're okay @@ -70,11 +138,32 @@ class ExtensionPluginManager extends AbstractPluginManager return; } - throw new Exception\InvalidArgumentException(sprintf( + throw new InvalidServiceException(sprintf( 'Plugin of type %s is invalid; must implement %s\Extension\RendererInterface ' . 'or the classname must end in "Feed" or "Entry"', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); } + + /** + * Validate plugin (v2) + * + * @param mixed $plugin + * @return void + * @throws Exception\InvalidArgumentException when invalid + */ + public function validatePlugin($plugin) + { + try { + $this->validate($plugin); + } catch (InvalidServiceException $e) { + throw new Exception\InvalidArgumentException(sprintf( + 'Plugin of type %s is invalid; must implement %s\Extension\RendererInterface ' + . 'or the classname must end in "Feed" or "Entry"', + (is_object($plugin) ? get_class($plugin) : gettype($plugin)), + __NAMESPACE__ + )); + } + } } diff --git a/vendor/zendframework/zend-feed/src/Writer/StandaloneExtensionManager.php b/vendor/zendframework/zend-feed/src/Writer/StandaloneExtensionManager.php new file mode 100644 index 000000000..c9a88c76a --- /dev/null +++ b/vendor/zendframework/zend-feed/src/Writer/StandaloneExtensionManager.php @@ -0,0 +1,50 @@ + Extension\Atom\Renderer\Feed::class, + 'Content\Renderer\Entry' => Extension\Content\Renderer\Entry::class, + 'DublinCore\Renderer\Entry' => Extension\DublinCore\Renderer\Entry::class, + 'DublinCore\Renderer\Feed' => Extension\DublinCore\Renderer\Feed::class, + 'ITunes\Entry' => Extension\ITunes\Entry::class, + 'ITunes\Feed' => Extension\ITunes\Feed::class, + 'ITunes\Renderer\Entry' => Extension\ITunes\Renderer\Entry::class, + 'ITunes\Renderer\Feed' => Extension\ITunes\Renderer\Feed::class, + 'Slash\Renderer\Entry' => Extension\Slash\Renderer\Entry::class, + 'Threading\Renderer\Entry' => Extension\Threading\Renderer\Entry::class, + 'WellFormedWeb\Renderer\Entry' => Extension\WellFormedWeb\Renderer\Entry::class, + ]; + + /** + * Do we have the extension? + * + * @param string $extension + * @return bool + */ + public function has($extension) + { + return array_key_exists($extension, $this->extensions); + } + + /** + * Retrieve the extension + * + * @param string $extension + * @return mixed + */ + public function get($extension) + { + $class = $this->extensions[$extension]; + return new $class(); + } +} diff --git a/vendor/zendframework/zend-feed/src/Writer/Writer.php b/vendor/zendframework/zend-feed/src/Writer/Writer.php index a4f95bfc8..4c1e257fb 100644 --- a/vendor/zendframework/zend-feed/src/Writer/Writer.php +++ b/vendor/zendframework/zend-feed/src/Writer/Writer.php @@ -105,13 +105,16 @@ class Writer return; } } - if (!$manager->has($feedName) - && !$manager->has($entryName) - && !$manager->has($feedRendererName) - && !$manager->has($entryRendererName) + if (! $manager->has($feedName) + && ! $manager->has($entryName) + && ! $manager->has($feedRendererName) + && ! $manager->has($entryRendererName) ) { - throw new Exception\RuntimeException('Could not load extension: ' . $name - . 'using Plugin Loader. Check prefix paths are configured and extension exists.'); + throw new Exception\RuntimeException(sprintf( + 'Could not load extension "%s" using Plugin Loader. ' + . 'Check prefix paths are configured and extension exists.', + $name + )); } if ($manager->has($feedName)) { static::$extensions['feed'][] = $feedName; diff --git a/vendor/zendframework/zend-stdlib/CHANGELOG.md b/vendor/zendframework/zend-stdlib/CHANGELOG.md index 5ce14e677..65177990d 100644 --- a/vendor/zendframework/zend-stdlib/CHANGELOG.md +++ b/vendor/zendframework/zend-stdlib/CHANGELOG.md @@ -2,6 +2,89 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 3.0.1 - 2016-04-12 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [#59](https://github.com/zendframework/zend-stdlib/pull/59) fixes a notice + when defining the `Zend\Json\Json::GLOB_BRACE` constant on systems using + non-gcc glob implementations. + +## 3.0.0 - 2016-02-03 + +### Added + +- [#51](https://github.com/zendframework/zend-stdlib/pull/51) adds PHP 7 as a + supported PHP version. +- [#51](https://github.com/zendframework/zend-stdlib/pull/51) adds a migration + document from v2 to v3. Hint: if you use hydrators, you need to be using + zend-hydrator instead! +- [#51](https://github.com/zendframework/zend-stdlib/pull/51) adds automated + documentation builds to gh-pages. + +### Deprecated + +- Nothing. + +### Removed + +- [#33](https://github.com/zendframework/zend-stdlib/pull/33) - removed + deprecated classes + - *All Hydrator classes* see #22. + - `Zend\Stdlib\CallbackHandler` see #35 +- [#37](https://github.com/zendframework/zend-stdlib/pull/37) - removed + deprecated classes and polyfills: + - `Zend\Stdlib\DateTime`; this had been deprecated since 2.5, and only + existed as a polyfill for the `createFromISO8601()` support, now standard + in all PHP versions we support. + - `Zend\Stdlib\Exception\InvalidCallbackException`, which was unused since #33. + - `Zend\Stdlib\Guard\GuardUtils`, which duplicated `Zend\Stdlib\Guard\AllGuardsTrait` + to allow usage with pre-PHP 5.4 versions. + - `src/compatibility/autoload.php`, which has been dprecated since 2.5. +- [#37](https://github.com/zendframework/zend-stdlib/pull/37) - removed + unneeded dependencies: + - zend-config (used only in testing ArrayUtils, and the test was redundant) + - zend-serializer (no longer used) +- [#51](https://github.com/zendframework/zend-stdlib/pull/51) removes the + documentation for hydrators, as those are part of the zend-hydrator + component. + +### Fixed + +- Nothing. + +## 2.7.4 - 2015-10-15 + +### Added + +- Nothing. + +### Deprecated + +- [#35](https://github.com/zendframework/zend-stdlib/pull/35) deprecates + `Zend\Stdlib\CallbackHandler`, as the one component that used it, + zend-eventmanager, will no longer depend on it starting in v3. + +### Removed + +- Nothing. + +### Fixed + +- Nothing. + ## 2.7.3 - 2015-09-24 ### Added diff --git a/vendor/zendframework/zend-stdlib/CONDUCT.md b/vendor/zendframework/zend-stdlib/CONDUCT.md new file mode 100644 index 000000000..c663d2be9 --- /dev/null +++ b/vendor/zendframework/zend-stdlib/CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) +as its guidelines for contributor interactions. + +## The Code Manifesto + +We want to work in an ecosystem that empowers developers to reach their +potential — one that encourages growth and effective collaboration. A space that +is safe for all. + +A space such as this benefits everyone that participates in it. It encourages +new developers to enter our field. It is through discussion and collaboration +that we grow, and through growth that we improve. + +In the effort to create such a place, we hold to these values: + +1. **Discrimination limits us.** This includes discrimination on the basis of + race, gender, sexual orientation, gender identity, age, nationality, technology + and any other arbitrary exclusion of a group of people. +2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort + levels. Remember that, and if brought to your attention, heed it. +3. **We are our biggest assets.** None of us were born masters of our trade. + Each of us has been helped along the way. Return that favor, when and where + you can. +4. **We are resources for the future.** As an extension of #3, share what you + know. Make yourself a resource to help those that come after you. +5. **Respect defines us.** Treat others as you wish to be treated. Make your + discussions, criticisms and debates from a position of respectfulness. Ask + yourself, is it true? Is it necessary? Is it constructive? Anything less is + unacceptable. +6. **Reactions require grace.** Angry responses are valid, but abusive language + and vindictive actions are toxic. When something happens that offends you, + handle it assertively, but be respectful. Escalate reasonably, and try to + allow the offender an opportunity to explain themselves, and possibly correct + the issue. +7. **Opinions are just that: opinions.** Each and every one of us, due to our + background and upbringing, have varying opinions. The fact of the matter, is + that is perfectly acceptable. Remember this: if you respect your own + opinions, you should respect the opinions of others. +8. **To err is human.** You might not intend it, but mistakes do happen and + contribute to build experience. Tolerate honest mistakes, and don't hesitate + to apologize if you make one yourself. diff --git a/vendor/zendframework/zend-stdlib/CONTRIBUTING.md b/vendor/zendframework/zend-stdlib/CONTRIBUTING.md index 1083b840a..39327161b 100644 --- a/vendor/zendframework/zend-stdlib/CONTRIBUTING.md +++ b/vendor/zendframework/zend-stdlib/CONTRIBUTING.md @@ -237,3 +237,8 @@ repository, we suggest doing some cleanup of these branches. ```console $ git push {username} : ``` + + +## Conduct + +Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. diff --git a/vendor/zendframework/zend-stdlib/README.md b/vendor/zendframework/zend-stdlib/README.md index d87d00c90..f4ca9532d 100644 --- a/vendor/zendframework/zend-stdlib/README.md +++ b/vendor/zendframework/zend-stdlib/README.md @@ -7,7 +7,6 @@ class for different scopes like: - array utilities functions; -- hydrators; - json serializable interfaces; - general messaging systems; - string wrappers; diff --git a/vendor/zendframework/zend-stdlib/composer.json b/vendor/zendframework/zend-stdlib/composer.json index 4a5ecd55d..46f6af007 100644 --- a/vendor/zendframework/zend-stdlib/composer.json +++ b/vendor/zendframework/zend-stdlib/composer.json @@ -13,32 +13,17 @@ } }, "require": { - "php": ">=5.5", - "zendframework/zend-hydrator": "~1.0" + "php": "^5.5 || ^7.0" }, "require-dev": { - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-inputfilter": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5", - "zendframework/zend-filter": "~2.5", "fabpot/php-cs-fixer": "1.7.*", "phpunit/PHPUnit": "~4.0", "athletic/athletic": "~0.1" }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage", - "zendframework/zend-filter": "To support naming strategy hydrator usage" - }, - "minimum-stability": "dev", - "prefer-stable": true, "extra": { "branch-alias": { - "dev-master": "2.7-dev", - "dev-develop": "2.8-dev" + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" } }, "autoload-dev": { diff --git a/vendor/zendframework/zend-stdlib/doc/book/index.html b/vendor/zendframework/zend-stdlib/doc/book/index.html new file mode 100644 index 000000000..f4b09ab44 --- /dev/null +++ b/vendor/zendframework/zend-stdlib/doc/book/index.html @@ -0,0 +1,10 @@ +
    +
    +

    zend-stdlib

    + +

    SPL extensions, array utilities, error handlers, and more.

    + +
    $ composer require zendframework/zend-stdlib
    +
    +
    + diff --git a/vendor/zendframework/zend-stdlib/doc/book/index.md b/vendor/zendframework/zend-stdlib/doc/book/index.md new file mode 100644 index 000000000..f4ca9532d --- /dev/null +++ b/vendor/zendframework/zend-stdlib/doc/book/index.md @@ -0,0 +1,18 @@ +# zend-stdlib + +[![Build Status](https://secure.travis-ci.org/zendframework/zend-stdlib.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-stdlib) +[![Coverage Status](https://coveralls.io/repos/zendframework/zend-stdlib/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-stdlib?branch=master) + +`Zend\Stdlib` is a set of components that implements general purpose utility +class for different scopes like: + +- array utilities functions; +- json serializable interfaces; +- general messaging systems; +- string wrappers; +- etc. + +--- + +- File issues at https://github.com/zendframework/zend-stdlib/issues +- Documentation is at http://framework.zend.com/manual/current/en/index.html#zend-stdlib diff --git a/vendor/zendframework/zend-stdlib/doc/book/migration.md b/vendor/zendframework/zend-stdlib/doc/book/migration.md new file mode 100644 index 000000000..a0c7ff398 --- /dev/null +++ b/vendor/zendframework/zend-stdlib/doc/book/migration.md @@ -0,0 +1,60 @@ +# Migration Guide + +## From v2 to v3 + +The changes made going from v2 to v3 were: + +- Removal of the Hydrator subcomponent. +- Removal of the `CallbackHandler` class. +- Removal of `Zend\Stdlib\Guard\GuardUtils`. + +### Hydrators + +The biggest single change from version 2 to version 3 is that the hydrator +subcomponent, which was deprecated in v2.7.0, is now removed. This means that if +you were using zend-stdlib principally for the hydrators, you need to convert +your code to use [zend-hydrator](https://github.com/zendframework/zend-hydrator). + +This will also mean a multi-step migration. zend-stdlib v3 pre-dates +zend-hydrator v2.1, which will be the first version that supports zend-stdlib v3 +and zend-servicemanager v3. If you are using Composer, the migration should be +seamless: + +- Remove your zend-stdlib dependency: + + ```bash + $ composer remove zendframework/zend-stdlib + ``` + +- Update to use zend-hydrator: + + ```bash + $ composer require zendframework/zend-hydrator + ``` + +When zend-hydrator updates to newer versions of zend-stdlib and +zend-servicemanager, you will either automatically get those versions, or you +can tell composer to use those specific versions: + +```bash +$ composer require "zendframework/zend-stdlib:^3.0" +``` + +### CallbackHandler + +`Zend\Stdlib\CallbackHandler` primarily existed for legacy purposes; it was +created before the `callable` typehint existed, so that we could typehint PHP +callables. It also provided some minimal features around lazy-loading callables +from instantiable classes, but these features were rarely used, and better +approaches already exist for handling such functinality in zend-servicemanager +and zend-expressive. + +As such, the class was marked deprecated in v2.7.0, and removed for v3.0.0. + +### GuardUtils + +Version 3 removes `Zend\Stdlib\Guard\GuardUtils`. This abstract class existed to +provide the functionality of the various traits also present in that +subcomponent, for consumers on versions of PHP earlier than 5.4. Since the +minimum required version is now PHP 5.5, the class is unnecessary. If you were +using it previously, compose the related traits instead. diff --git a/vendor/zendframework/zend-stdlib/doc/bookdown.json b/vendor/zendframework/zend-stdlib/doc/bookdown.json new file mode 100644 index 000000000..ad93f485f --- /dev/null +++ b/vendor/zendframework/zend-stdlib/doc/bookdown.json @@ -0,0 +1,14 @@ +{ + "title": "Zend\\Stdlib", + "target": "html/", + "content": [ + "book/zend.stdlib.hydrator.md", + "book/zend.stdlib.hydrator.filter.md", + "book/zend.stdlib.hydrator.strategy.md", + "book/zend.stdlib.hydrator.aggregate.md", + "book/zend.stdlib.hydrator.namingstrategy.compositenamingstrategy.md", + "book/zend.stdlib.hydrator.namingstrategy.identitynamingstrategy.md", + "book/zend.stdlib.hydrator.namingstrategy.mapnamingstrategy.md", + "book/zend.stdlib.hydrator.namingstrategy.underscorenamingstrategy.md" + ] +} \ No newline at end of file diff --git a/vendor/zendframework/zend-stdlib/mkdocs.yml b/vendor/zendframework/zend-stdlib/mkdocs.yml new file mode 100644 index 000000000..bf87a22ad --- /dev/null +++ b/vendor/zendframework/zend-stdlib/mkdocs.yml @@ -0,0 +1,9 @@ +docs_dir: doc/book +site_dir: doc/html +pages: + - index.md + - Migration: migration.md +site_name: zend-stdlib +site_description: Zend\Stdlib +repo_url: 'https://github.com/zendframework/zend-stdlib' +copyright: 'Copyright (c) 2016 Zend Technologies USA Inc.' diff --git a/vendor/zendframework/zend-stdlib/src/Glob.php b/vendor/zendframework/zend-stdlib/src/Glob.php index 5358740ed..dc37562ad 100644 --- a/vendor/zendframework/zend-stdlib/src/Glob.php +++ b/vendor/zendframework/zend-stdlib/src/Glob.php @@ -61,7 +61,7 @@ abstract class Glob self::GLOB_NOSORT => GLOB_NOSORT, self::GLOB_NOCHECK => GLOB_NOCHECK, self::GLOB_NOESCAPE => GLOB_NOESCAPE, - self::GLOB_BRACE => GLOB_BRACE, + self::GLOB_BRACE => defined('GLOB_BRACE') ? GLOB_BRACE : 0, self::GLOB_ONLYDIR => GLOB_ONLYDIR, self::GLOB_ERR => GLOB_ERR, ]; diff --git a/web.config b/web.config index 562847125..3fc5b10aa 100644 --- a/web.config +++ b/web.config @@ -33,7 +33,10 @@ - +