From e69aa792c461b7e8c4f24b0811193bf1c22e9f85 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 13 Jun 2016 11:21:32 -0400 Subject: [PATCH 1/2] - Prevents URLs in link titles from being processed when tracking is enabled. Closes #519 --- composer.json | 8 +- composer.lock | 897 ++++++++++++++++++++------- lib/Newsletter/Links/Links.php | 59 +- lib/Newsletter/Renderer/Renderer.php | 1 - 4 files changed, 707 insertions(+), 258 deletions(-) diff --git a/composer.json b/composer.json index 3be91d72b0..b3b8f0f345 100644 --- a/composer.json +++ b/composer.json @@ -1,4 +1,10 @@ { + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/mailpoet/html2text" + } + ], "require": { "php": ">=5.3.3", "twig/twig": "1.*", @@ -11,7 +17,7 @@ "phpseclib/phpseclib": "*", "mtdowling/cron-expression": "^1.1", "nesbot/carbon": "^1.21", - "soundasleep/html2text": "^0.3.0" + "soundasleep/html2text": "dev-master" }, "require-dev": { "codeception/codeception": "*", diff --git a/composer.lock b/composer.lock index 6ee1bdc8e1..2c4b1bc658 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "2bed8395d84740d7c0ae644a6c6216fd", - "content-hash": "7b66e221814f3d5839ed4faabd2f50ad", + "hash": "1ca212f3a40d935947bfb9aee5a159d1", + "content-hash": "a2bae80e75ebce4506fc6d7bd8394a04", "packages": [ { "name": "cerdic/css-tidy", @@ -251,16 +251,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v5.2.15", + "version": "v5.2.16", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "d0186171b28af4f06ac2ad8a84a8f3d6cbc3ba6c" + "reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/d0186171b28af4f06ac2ad8a84a8f3d6cbc3ba6c", - "reference": "d0186171b28af4f06ac2ad8a84a8f3d6cbc3ba6c", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a", + "reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a", "shasum": "" }, "require": { @@ -307,20 +307,20 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2016-05-10 18:39:36" + "time": "2016-06-06 09:09:37" }, { "name": "phpseclib/phpseclib", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "ba6fb78f727cd09f2a649113b95468019e490585" + "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ba6fb78f727cd09f2a649113b95468019e490585", - "reference": "ba6fb78f727cd09f2a649113b95468019e490585", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/3d265f7c079f5b37d33475f996d7a383c5fc8aeb", + "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb", "shasum": "" }, "require": { @@ -340,6 +340,9 @@ }, "type": "library", "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], "psr-4": { "phpseclib\\": "phpseclib/" } @@ -396,20 +399,20 @@ "x.509", "x509" ], - "time": "2016-01-18 17:07:21" + "time": "2016-05-13 01:15:21" }, { "name": "soundasleep/html2text", - "version": "0.3.1", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/soundasleep/html2text.git", - "reference": "2a5fd94bf58b653a5a9d777ac6a5593f82d087db" + "url": "https://github.com/mailpoet/html2text.git", + "reference": "6e6c48d07a542f4b4ae24341cc6ab92335c32922" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/soundasleep/html2text/zipball/2a5fd94bf58b653a5a9d777ac6a5593f82d087db", - "reference": "2a5fd94bf58b653a5a9d777ac6a5593f82d087db", + "url": "https://api.github.com/repos/mailpoet/html2text/zipball/6e6c48d07a542f4b4ae24341cc6ab92335c32922", + "reference": "6e6c48d07a542f4b4ae24341cc6ab92335c32922", "shasum": "" }, "require": { @@ -427,7 +430,6 @@ "Html2Text\\": "src" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "EPL-1.0" ], @@ -446,20 +448,24 @@ "php", "text" ], - "time": "2016-02-25 00:00:36" + "support": { + "email": "support@jevon.org", + "source": "https://github.com/mailpoet/html2text/tree/master" + }, + "time": "2016-06-13 18:24:35" }, { "name": "sunra/php-simple-html-dom-parser", - "version": "v1.5.0", + "version": "v1.5.1", "source": { "type": "git", "url": "https://github.com/sunra/php-simple-html-dom-parser.git", - "reference": "a0b80ace086c7e09085669205e1b3c2c9c7a453c" + "reference": "f910346ce47513a49ed5b8de197cde26c3f0b193" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sunra/php-simple-html-dom-parser/zipball/a0b80ace086c7e09085669205e1b3c2c9c7a453c", - "reference": "a0b80ace086c7e09085669205e1b3c2c9c7a453c", + "url": "https://api.github.com/repos/sunra/php-simple-html-dom-parser/zipball/f910346ce47513a49ed5b8de197cde26c3f0b193", + "reference": "f910346ce47513a49ed5b8de197cde26c3f0b193", "shasum": "" }, "require": { @@ -479,7 +485,7 @@ { "name": "Sunra", "email": "sunra@yandex.ru", - "homepage": "http://github.com/sunra" + "homepage": "https://github.com/sunra" } ], "description": "Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.", @@ -489,7 +495,7 @@ "html", "parser" ], - "time": "2013-05-04 14:32:03" + "time": "2016-05-20 11:21:15" }, { "name": "swiftmailer/swiftmailer", @@ -546,16 +552,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "1289d16209491b584839022f29257ad859b8532d" + "reference": "dff51f72b0706335131b00a7f49606168c582594" }, "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/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", "shasum": "" }, "require": { @@ -567,7 +573,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -601,20 +607,20 @@ "portable", "shim" ], - "time": "2016-01-20 09:13:37" + "time": "2016-05-18 14:26:46" }, { "name": "symfony/translation", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "d60b8e076d22953aabebeebda53bf334438e7aca" + "reference": "8a1648d2e165ba87c759ba57d7f4c13d95fdf4a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/d60b8e076d22953aabebeebda53bf334438e7aca", - "reference": "d60b8e076d22953aabebeebda53bf334438e7aca", + "url": "https://api.github.com/repos/symfony/translation/zipball/8a1648d2e165ba87c759ba57d7f4c13d95fdf4a1", + "reference": "8a1648d2e165ba87c759ba57d7f4c13d95fdf4a1", "shasum": "" }, "require": { @@ -665,7 +671,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-03-25 01:40:30" + "time": "2016-06-06 11:11:27" }, { "name": "tburry/pquery", @@ -721,16 +727,16 @@ }, { "name": "twig/twig", - "version": "v1.24.0", + "version": "v1.24.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8" + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", - "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512", + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512", "shasum": "" }, "require": { @@ -778,25 +784,84 @@ "keywords": [ "templating" ], - "time": "2016-01-25 21:22:18" + "time": "2016-05-30 09:11:59" } ], "packages-dev": [ { - "name": "codeception/codeception", - "version": "2.1.8", + "name": "behat/gherkin", + "version": "v4.4.1", "source": { "type": "git", - "url": "https://github.com/Codeception/Codeception.git", - "reference": "f3daa61f0f11c531b33eb3623ab0daa599d88a79" + "url": "https://github.com/Behat/Gherkin.git", + "reference": "1576b485c0f92ef6d27da9c4bbfc57ee30cf6911" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/f3daa61f0f11c531b33eb3623ab0daa599d88a79", - "reference": "f3daa61f0f11c531b33eb3623ab0daa599d88a79", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/1576b485c0f92ef6d27da9c4bbfc57ee30cf6911", + "reference": "1576b485c0f92ef6d27da9c4bbfc57ee30cf6911", "shasum": "" }, "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "symfony/yaml": "~2.1" + }, + "suggest": { + "symfony/yaml": "If you want to parse features, represented in YAML files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Gherkin": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Gherkin DSL parser for PHP 5.3", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "Cucumber", + "DSL", + "gherkin", + "parser" + ], + "time": "2015-12-30 14:47:00" + }, + { + "name": "codeception/codeception", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/Codeception/Codeception.git", + "reference": "f137636f0c185e7d4a495b9cea70c1afae27dfc7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/f137636f0c185e7d4a495b9cea70c1afae27dfc7", + "reference": "f137636f0c185e7d4a495b9cea70c1afae27dfc7", + "shasum": "" + }, + "require": { + "behat/gherkin": "~4.4.0", "ext-json": "*", "ext-mbstring": "*", "facebook/webdriver": ">=1.0.1 <2.0", @@ -804,29 +869,36 @@ "guzzlehttp/psr7": "~1.0", "php": ">=5.4.0 <8.0", "phpunit/php-code-coverage": ">=2.1.3", - "phpunit/phpunit": ">4.8.20 <6.0", - "symfony/browser-kit": ">=2.5 <3.1", - "symfony/console": ">=2.5 <3.1", - "symfony/css-selector": ">=2.5 <3.1", - "symfony/dom-crawler": ">=2.5 <3.1", - "symfony/event-dispatcher": ">=2.5 <3.1", - "symfony/finder": ">=2.5 <3.1", - "symfony/yaml": ">=2.5 <3.1" + "phpunit/phpunit": ">4.8.20 <5.5", + "symfony/browser-kit": ">=2.7 <4.0", + "symfony/console": ">=2.7 <4.0", + "symfony/css-selector": ">=2.7 <4.0", + "symfony/dom-crawler": ">=2.7 <4.0", + "symfony/event-dispatcher": ">=2.7 <4.0", + "symfony/finder": ">=2.7 <4.0", + "symfony/yaml": ">=2.7 <4.0" }, "require-dev": { "codeception/specify": "~0.3", "facebook/php-sdk-v4": "~5.0", "flow/jsonpath": "~0.2", + "league/factory-muffin": "^3.0", + "league/factory-muffin-faker": "^1.0", + "mongodb/mongodb": "^1.0", "monolog/monolog": "~1.8", - "pda/pheanstalk": "~2.0", - "php-amqplib/php-amqplib": "~2.4" + "pda/pheanstalk": "~3.0", + "php-amqplib/php-amqplib": "~2.4", + "predis/predis": "^1.0", + "squizlabs/php_codesniffer": "~2.0" }, "suggest": { - "codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests", "codeception/specify": "BDD-style code blocks", "codeception/verify": "BDD-style assertions", - "monolog/monolog": "Log test steps", - "phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module." + "flow/jsonpath": "For using JSONPath in REST module", + "league/factory-muffin": "For DataFactory module", + "league/factory-muffin-faker": "For Faker support in DataFactory module", + "phpseclib/phpseclib": "for SFTP option in FTP Module", + "symfony/phpunit-bridge": "For phpunit-bridge support" }, "bin": [ "codecept" @@ -861,7 +933,7 @@ "functional testing", "unit testing" ], - "time": "2016-04-15 02:56:43" + "time": "2016-06-03 12:44:06" }, { "name": "codeception/verify", @@ -901,12 +973,12 @@ "version": "0.7.2", "source": { "type": "git", - "url": "https://github.com/Codegyre/Robo.git", + "url": "https://github.com/consolidation-org/Robo.git", "reference": "9982edecb19f59420031dd9855b0d31e861b8b68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codegyre/Robo/zipball/9982edecb19f59420031dd9855b0d31e861b8b68", + "url": "https://api.github.com/repos/consolidation-org/Robo/zipball/9982edecb19f59420031dd9855b0d31e861b8b68", "reference": "9982edecb19f59420031dd9855b0d31e861b8b68", "shasum": "" }, @@ -1007,19 +1079,20 @@ }, { "name": "facebook/webdriver", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/facebook/php-webdriver.git", - "reference": "1c98108ba3eb435b681655764de11502a0653705" + "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/1c98108ba3eb435b681655764de11502a0653705", - "reference": "1c98108ba3eb435b681655764de11502a0653705", + "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/0b889d7de7461439f8a3bbcca46e0f696cb27986", + "reference": "0b889d7de7461439f8a3bbcca46e0f696cb27986", "shasum": "" }, "require": { + "ext-curl": "*", "php": ">=5.3.19" }, "require-dev": { @@ -1046,7 +1119,7 @@ "selenium", "webdriver" ], - "time": "2015-12-31 15:58:49" + "time": "2016-06-04 00:02:34" }, { "name": "guzzlehttp/guzzle", @@ -1112,16 +1185,16 @@ }, { "name": "guzzlehttp/promises", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8" + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bb9024c526b22f3fe6ae55a561fd70653d470aa8", - "reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8", + "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", "shasum": "" }, "require": { @@ -1159,7 +1232,7 @@ "keywords": [ "promise" ], - "time": "2016-03-08 01:15:46" + "time": "2016-05-18 16:56:05" }, { "name": "guzzlehttp/psr7", @@ -1279,38 +1352,129 @@ "time": "2015-10-27 09:19:19" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", + "name": "myclabs/deep-copy", + "version": "1.5.1", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "a8773992b362b58498eed24bf85005f363c34771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a8773992b362b58498eed24bf85005f363c34771", + "reference": "a8773992b362b58498eed24bf85005f363c34771", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2015-11-20 12:04:31" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "phpDocumentor": [ + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9270140b940ff02e58ec577c237274e92cd40cdd", + "reference": "9270140b940ff02e58ec577c237274e92cd40cdd", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ "src/" ] } @@ -1322,39 +1486,87 @@ "authors": [ { "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" + "email": "me@mikevanriel.com" } ], - "time": "2015-02-03 12:10:50" + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-06-10 09:48:41" }, { - "name": "phpspec/prophecy", - "version": "v1.6.0", + "name": "phpdocumentor/type-resolver", + "version": "0.2", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", - "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-06-10 07:14:17" + }, + { + "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", - "sebastian/comparator": "~1.1", - "sebastian/recursion-context": "~1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -1387,43 +1599,44 @@ "spy", "stub" ], - "time": "2016-02-15 07:46:21" + "time": "2016-06-07 08:13:47" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/900370c81280cc0d942ffbc5912d80464eaee7e9", + "reference": "900370c81280cc0d942ffbc5912d80464eaee7e9", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": "^5.6 || ^7.0", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", + "phpunit/php-token-stream": "^1.4.2", + "sebastian/code-unit-reverse-lookup": "~1.0", "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "sebastian/version": "~1.0|~2.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.2.1", + "ext-xdebug": ">=2.4.0", "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -1449,7 +1662,7 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2016-06-03 05:03:56" }, { "name": "phpunit/php-file-iterator", @@ -1541,21 +1754,24 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.7", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "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/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, "type": "library", "autoload": { "classmap": [ @@ -1578,7 +1794,7 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2016-05-12 18:03:57" }, { "name": "phpunit/php-token-stream", @@ -1631,16 +1847,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.24", + "version": "5.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1066c562c52900a142a0e2bbf0582994671385e" + "reference": "02d5b64aa0837a038a5a4faeeefa5ef44bdcb928" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1066c562c52900a142a0e2bbf0582994671385e", - "reference": "a1066c562c52900a142a0e2bbf0582994671385e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/02d5b64aa0837a038a5a4faeeefa5ef44bdcb928", + "reference": "02d5b64aa0837a038a5a4faeeefa5ef44bdcb928", "shasum": "" }, "require": { @@ -1649,21 +1865,27 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.3.3", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", + "phpunit/php-code-coverage": "^4.0", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", "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", + "sebastian/object-enumerator": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", "symfony/yaml": "~2.1|~3.0" }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, "suggest": { "phpunit/php-invoker": "~1.1" }, @@ -1673,7 +1895,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.4.x-dev" } }, "autoload": { @@ -1699,30 +1921,33 @@ "testing", "xunit" ], - "time": "2016-03-14 06:16:08" + "time": "2016-06-09 09:09:27" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "b13d0d9426ced06958bd32104653526a6c998a52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b13d0d9426ced06958bd32104653526a6c998a52", + "reference": "b13d0d9426ced06958bd32104653526a6c998a52", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-soap": "*" @@ -1730,7 +1955,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -1755,7 +1980,7 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "time": "2016-06-12 07:37:26" }, { "name": "psr/http-message", @@ -1857,6 +2082,51 @@ ], "time": "2015-09-16 14:09:00" }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2016-02-13 06:45:14" + }, { "name": "sebastian/comparator", "version": "1.2.0", @@ -1975,16 +2245,16 @@ }, { "name": "sebastian/environment", - "version": "1.3.6", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "2292b116f43c272ff4328083096114f84ea46a56" + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/2292b116f43c272ff4328083096114f84ea46a56", - "reference": "2292b116f43c272ff4328083096114f84ea46a56", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { @@ -2021,7 +2291,7 @@ "environment", "hhvm" ], - "time": "2016-05-04 07:59:13" + "time": "2016-05-17 03:18:57" }, { "name": "sebastian/exporter", @@ -2140,6 +2410,52 @@ ], "time": "2015-10-12 03:26:01" }, + { + "name": "sebastian/object-enumerator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", + "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2016-01-28 13:25:10" + }, { "name": "sebastian/recursion-context", "version": "1.0.2", @@ -2194,20 +2510,70 @@ "time": "2015-11-11 19:50:13" }, { - "name": "sebastian/version", - "version": "1.0.6", + "name": "sebastian/resource-operations", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, + "require": { + "php": ">=5.6.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" + }, + { + "name": "sebastian/version", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -2226,20 +2592,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-02-04 12:56:52" }, { "name": "symfony/browser-kit", - "version": "v3.0.6", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "e07127ac31230b30887c2dddf3708d883d239b14" + "reference": "b645a9b23d6c0eeba5ac823fa87bf010db9aff22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/e07127ac31230b30887c2dddf3708d883d239b14", - "reference": "e07127ac31230b30887c2dddf3708d883d239b14", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/b645a9b23d6c0eeba5ac823fa87bf010db9aff22", + "reference": "b645a9b23d6c0eeba5ac823fa87bf010db9aff22", "shasum": "" }, "require": { @@ -2256,7 +2622,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2283,20 +2649,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:55:57" + "time": "2016-03-04 07:56:56" }, { "name": "symfony/config", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "edbbcf33cffa2a85104fc80de8dc052cc51596bb" + "reference": "a2edd59c2163c65747fc3f35d132b5a39266bd05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/edbbcf33cffa2a85104fc80de8dc052cc51596bb", - "reference": "edbbcf33cffa2a85104fc80de8dc052cc51596bb", + "url": "https://api.github.com/repos/symfony/config/zipball/a2edd59c2163c65747fc3f35d132b5a39266bd05", + "reference": "a2edd59c2163c65747fc3f35d132b5a39266bd05", "shasum": "" }, "require": { @@ -2336,20 +2702,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-04-20 18:52:26" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/console", - "version": "v3.0.6", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "34a214710e0714b6efcf40ba3cd1e31373a97820" + "reference": "f62db5b8afec27073a4609b8c84b1f9936652259" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/34a214710e0714b6efcf40ba3cd1e31373a97820", - "reference": "34a214710e0714b6efcf40ba3cd1e31373a97820", + "url": "https://api.github.com/repos/symfony/console/zipball/f62db5b8afec27073a4609b8c84b1f9936652259", + "reference": "f62db5b8afec27073a4609b8c84b1f9936652259", "shasum": "" }, "require": { @@ -2369,7 +2735,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2396,20 +2762,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-04-28 09:48:42" + "time": "2016-05-30 06:58:39" }, { "name": "symfony/css-selector", - "version": "v3.0.6", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "65e764f404685f2dc20c057e889b3ad04b2e2db0" + "reference": "e17f386efef7258ac671c24e727673abd086b0cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/65e764f404685f2dc20c057e889b3ad04b2e2db0", - "reference": "65e764f404685f2dc20c057e889b3ad04b2e2db0", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e17f386efef7258ac671c24e727673abd086b0cf", + "reference": "e17f386efef7258ac671c24e727673abd086b0cf", "shasum": "" }, "require": { @@ -2418,7 +2784,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2449,20 +2815,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:55:57" + "time": "2016-03-04 07:56:56" }, { "name": "symfony/dom-crawler", - "version": "v3.0.6", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "49b588841225b205700e5122fa01911cabada857" + "reference": "12aa63fd41b060d2bee9a34623d29eda70bc8fe3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/49b588841225b205700e5122fa01911cabada857", - "reference": "49b588841225b205700e5122fa01911cabada857", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/12aa63fd41b060d2bee9a34623d29eda70bc8fe3", + "reference": "12aa63fd41b060d2bee9a34623d29eda70bc8fe3", "shasum": "" }, "require": { @@ -2478,7 +2844,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2505,20 +2871,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2016-04-12 18:09:53" + "time": "2016-05-13 15:49:09" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a158f13992a3147d466af7a23b564ac719a4ddd8" + "reference": "2a6b8713f8bdb582058cfda463527f195b066110" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a158f13992a3147d466af7a23b564ac719a4ddd8", - "reference": "a158f13992a3147d466af7a23b564ac719a4ddd8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2a6b8713f8bdb582058cfda463527f195b066110", + "reference": "2a6b8713f8bdb582058cfda463527f195b066110", "shasum": "" }, "require": { @@ -2565,11 +2931,11 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-05-03 18:59:18" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/filesystem", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -2618,16 +2984,16 @@ }, { "name": "symfony/finder", - "version": "v3.0.6", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "c54e407b35bc098916704e9fd090da21da4c4f52" + "reference": "40d17ed287bf51a2f884c4619ce8ff2a1c5cd219" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/c54e407b35bc098916704e9fd090da21da4c4f52", - "reference": "c54e407b35bc098916704e9fd090da21da4c4f52", + "url": "https://api.github.com/repos/symfony/finder/zipball/40d17ed287bf51a2f884c4619ce8ff2a1c5cd219", + "reference": "40d17ed287bf51a2f884c4619ce8ff2a1c5cd219", "shasum": "" }, "require": { @@ -2636,7 +3002,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2663,20 +3029,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-03-10 11:13:05" + "time": "2016-05-13 18:06:41" }, { "name": "symfony/form", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/form.git", - "reference": "922807a06e25c0c6e06b86f83ffe4710080a8b2e" + "reference": "edfb109ac1ebb755ad0ce964f32e43ddbddae7bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/form/zipball/922807a06e25c0c6e06b86f83ffe4710080a8b2e", - "reference": "922807a06e25c0c6e06b86f83ffe4710080a8b2e", + "url": "https://api.github.com/repos/symfony/form/zipball/edfb109ac1ebb755ad0ce964f32e43ddbddae7bb", + "reference": "edfb109ac1ebb755ad0ce964f32e43ddbddae7bb", "shasum": "" }, "require": { @@ -2737,20 +3103,20 @@ ], "description": "Symfony Form Component", "homepage": "https://symfony.com", - "time": "2016-04-28 09:59:09" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/intl", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "a602fe5a36cfc6367c5495b38a88c443570e75da" + "reference": "96ce72abb3538c4256585ce278cf30ceb1e86f16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/a602fe5a36cfc6367c5495b38a88c443570e75da", - "reference": "a602fe5a36cfc6367c5495b38a88c443570e75da", + "url": "https://api.github.com/repos/symfony/intl/zipball/96ce72abb3538c4256585ce278cf30ceb1e86f16", + "reference": "96ce72abb3538c4256585ce278cf30ceb1e86f16", "shasum": "" }, "require": { @@ -2812,20 +3178,20 @@ "l10n", "localization" ], - "time": "2016-04-01 06:34:33" + "time": "2016-05-13 18:03:36" }, { "name": "symfony/options-resolver", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "5e4a8ee6e823428257f2002f6daf52de854d8384" + "reference": "ddad0be20d6f2cb266cded8c349e046731df09b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/5e4a8ee6e823428257f2002f6daf52de854d8384", - "reference": "5e4a8ee6e823428257f2002f6daf52de854d8384", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/ddad0be20d6f2cb266cded8c349e046731df09b8", + "reference": "ddad0be20d6f2cb266cded8c349e046731df09b8", "shasum": "" }, "require": { @@ -2866,20 +3232,20 @@ "configuration", "options" ], - "time": "2016-05-09 18:12:35" + "time": "2016-05-24 10:00:02" }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "8328069d9f5322f0e7b3c3518485acfdc94c3942" + "reference": "0f8dc2c45f69f8672379e9210bca4a115cd5146f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/8328069d9f5322f0e7b3c3518485acfdc94c3942", - "reference": "8328069d9f5322f0e7b3c3518485acfdc94c3942", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/0f8dc2c45f69f8672379e9210bca4a115cd5146f", + "reference": "0f8dc2c45f69f8672379e9210bca4a115cd5146f", "shasum": "" }, "require": { @@ -2892,7 +3258,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -2924,20 +3290,20 @@ "portable", "shim" ], - "time": "2016-02-26 16:18:12" + "time": "2016-05-18 14:26:46" }, { "name": "symfony/process", - "version": "v3.0.6", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb" + "reference": "1574f3451b40fa9bbae518ef71d19a56f409cac0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb", - "reference": "53f9407c0bb1c5a79127db8f7bfe12f0f6f3dcdb", + "url": "https://api.github.com/repos/symfony/process/zipball/1574f3451b40fa9bbae518ef71d19a56f409cac0", + "reference": "1574f3451b40fa9bbae518ef71d19a56f409cac0", "shasum": "" }, "require": { @@ -2946,7 +3312,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2973,20 +3339,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-04-14 15:30:28" + "time": "2016-04-12 19:11:33" }, { "name": "symfony/property-access", - "version": "v3.0.6", + "version": "v3.0.7", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "d9deeca5d2f0dffd90f9547d3d9a2007bd6ee61b" + "reference": "6a958de831366005603432ef438c22cd93fad1ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/d9deeca5d2f0dffd90f9547d3d9a2007bd6ee61b", - "reference": "d9deeca5d2f0dffd90f9547d3d9a2007bd6ee61b", + "url": "https://api.github.com/repos/symfony/property-access/zipball/6a958de831366005603432ef438c22cd93fad1ef", + "reference": "6a958de831366005603432ef438c22cd93fad1ef", "shasum": "" }, "require": { @@ -3033,20 +3399,20 @@ "property path", "reflection" ], - "time": "2016-04-20 18:53:54" + "time": "2016-05-29 09:50:11" }, { "name": "symfony/routing", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0d814e0c1dc07cb688ca2298bbf7b32ace80cee1" + "reference": "4cbc81aa378869445fbd2d18c8c8b4a056c632a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0d814e0c1dc07cb688ca2298bbf7b32ace80cee1", - "reference": "0d814e0c1dc07cb688ca2298bbf7b32ace80cee1", + "url": "https://api.github.com/repos/symfony/routing/zipball/4cbc81aa378869445fbd2d18c8c8b4a056c632a0", + "reference": "4cbc81aa378869445fbd2d18c8c8b4a056c632a0", "shasum": "" }, "require": { @@ -3108,20 +3474,20 @@ "uri", "url" ], - "time": "2016-05-03 12:21:46" + "time": "2016-05-30 06:57:11" }, { "name": "symfony/twig-bridge", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "789ffb6f63574d8d5573520ba12156f5c395fcd5" + "reference": "360f3330e1df67edde1bb5d72fe5aa7c1bc74b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/789ffb6f63574d8d5573520ba12156f5c395fcd5", - "reference": "789ffb6f63574d8d5573520ba12156f5c395fcd5", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/360f3330e1df67edde1bb5d72fe5aa7c1bc74b9d", + "reference": "360f3330e1df67edde1bb5d72fe5aa7c1bc74b9d", "shasum": "" }, "require": { @@ -3189,20 +3555,20 @@ ], "description": "Symfony Twig Bridge", "homepage": "https://symfony.com", - "time": "2016-03-30 10:37:34" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/yaml", - "version": "v3.0.6", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "0047c8366744a16de7516622c5b7355336afae96" + "reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/0047c8366744a16de7516622c5b7355336afae96", - "reference": "0047c8366744a16de7516622c5b7355336afae96", + "url": "https://api.github.com/repos/symfony/yaml/zipball/eca51b7b65eb9be6af88ad7cc91685f1556f5c9a", + "reference": "eca51b7b65eb9be6af88ad7cc91685f1556f5c9a", "shasum": "" }, "require": { @@ -3211,7 +3577,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -3238,7 +3604,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-03-04 07:55:57" + "time": "2016-05-26 21:46:24" }, { "name": "twig/extensions", @@ -3390,11 +3756,62 @@ "environment" ], "time": "2016-04-15 10:48:49" + }, + { + "name": "webmozart/assert", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2015-08-24 13:29:44" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "soundasleep/html2text": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/lib/Newsletter/Links/Links.php b/lib/Newsletter/Links/Links.php index 7fd0879689..f949a00067 100644 --- a/lib/Newsletter/Links/Links.php +++ b/lib/Newsletter/Links/Links.php @@ -9,6 +9,7 @@ class Links { const DATA_TAG = '[mailpoet_data]'; static function extract($content) { + $extracted_links = array(); // adopted from WP's wp_extract_urls() function & modified to work on hrefs # match href=' or href=" $regex = '#(?:href.*?=.*?)(["\']?)(' @@ -29,31 +30,57 @@ class Links { // extract shortcodes with [link:*] format $shortcodes = new Shortcodes(); $shortcodes = $shortcodes->extract($content, $categories = array('link')); - // extract links - preg_match_all($regex, $content, $links); - return array_merge( - array_unique($links[2]), - $shortcodes - ); + $extracted_links = array_map(function ($shortcode) { + return array( + 'html' => $shortcode, + 'link' => $shortcode + ); + }, $shortcodes); + // extract urls with href="url" format + preg_match_all($regex, $content, $matched_urls); + for($index = 0; $index <= count($matched_urls[1]); $index++) { + $extracted_links[] = array( + 'html' => $matched_urls[0][$index], + 'link' => $matched_urls[2][$index] + ); + } + return $extracted_links; } static function process($content) { - $links = self::extract($content); + $extracted_links = self::extract($content); $processed_links = array(); - foreach($links as $link) { + foreach($extracted_links as $extracted_link) { $hash = Security::generateRandomString(5); $processed_links[] = array( 'hash' => $hash, - 'url' => $link + 'url' => $extracted_link['link'] ); - $encoded_link = sprintf( - '%s/?mailpoet&endpoint=track&action=click&data=%s-%s', - home_url(), - self::DATA_TAG, - $hash + $params = array( + 'mailpoet' => '', + 'endpoint' => 'track', + 'action' => 'click', + 'data' => self::DATA_TAG . '-' . $hash + ); + $tracked_link = add_query_arg($params, home_url()); + // first, replace URL in the extracted HTML source with encoded link + $tracked_link_html_source = str_replace( + $extracted_link['link'], $tracked_link, + $extracted_link['html'] + ); + // second, replace original extracted HTML source with tracked URL source + $content = str_replace( + $extracted_link['html'], $tracked_link_html_source, $content + ); + // third, replace text version URL with tracked link: [description](url) + // regex is used to avoid replacing description URLs that are wrapped in round brackets + // i.e., (http://google.com) => [(http://google.com)](http://tracked_link) + $regex_escaped_tracked_link = preg_quote($tracked_link, '/'); + $content = preg_replace( + '/(\[' . $regex_escaped_tracked_link . '\])(\(' . $regex_escaped_tracked_link . '\))/', + '[$1](' . $tracked_link . ')', + $content ); - $link_regex = '/' . preg_quote($link, '/') . '/'; - $content = preg_replace($link_regex, $encoded_link, $content); } return array( $content, diff --git a/lib/Newsletter/Renderer/Renderer.php b/lib/Newsletter/Renderer/Renderer.php index fb547d21c4..397454cbef 100644 --- a/lib/Newsletter/Renderer/Renderer.php +++ b/lib/Newsletter/Renderer/Renderer.php @@ -87,7 +87,6 @@ class Renderer { } function renderTextVersion($template) { - $template = mb_convert_encoding($template, 'HTML-ENTITIES', 'UTF-8'); return \Html2Text\Html2Text::convert($template); } From f22cadd319b103247db8a1dbb791f90f3f475936 Mon Sep 17 00:00:00 2001 From: Vlad Date: Tue, 14 Jun 2016 09:02:08 -0400 Subject: [PATCH 2/2] - Declares hash length as constant - Introduces check for nonexistent values/updates loop condition --- lib/Newsletter/Links/Links.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/Newsletter/Links/Links.php b/lib/Newsletter/Links/Links.php index f949a00067..ea72c569c8 100644 --- a/lib/Newsletter/Links/Links.php +++ b/lib/Newsletter/Links/Links.php @@ -7,6 +7,7 @@ use MailPoet\Util\Security; class Links { const DATA_TAG = '[mailpoet_data]'; + const HASH_LENGTH = 5; static function extract($content) { $extracted_links = array(); @@ -30,7 +31,7 @@ class Links { // extract shortcodes with [link:*] format $shortcodes = new Shortcodes(); $shortcodes = $shortcodes->extract($content, $categories = array('link')); - $extracted_links = array_map(function ($shortcode) { + $extracted_links = array_map(function($shortcode) { return array( 'html' => $shortcode, 'link' => $shortcode @@ -38,11 +39,14 @@ class Links { }, $shortcodes); // extract urls with href="url" format preg_match_all($regex, $content, $matched_urls); - for($index = 0; $index <= count($matched_urls[1]); $index++) { - $extracted_links[] = array( - 'html' => $matched_urls[0][$index], - 'link' => $matched_urls[2][$index] - ); + $matched_urls_count = count($matched_urls[1]); + if($matched_urls_count) { + for($index = 0; $index <= $matched_urls_count; $index++) { + $extracted_links[] = array( + 'html' => $matched_urls[0][$index], + 'link' => $matched_urls[2][$index] + ); + } } return $extracted_links; } @@ -51,7 +55,7 @@ class Links { $extracted_links = self::extract($content); $processed_links = array(); foreach($extracted_links as $extracted_link) { - $hash = Security::generateRandomString(5); + $hash = Security::generateRandomString(self::HASH_LENGTH); $processed_links[] = array( 'hash' => $hash, 'url' => $extracted_link['link']