From 56426a8e08275731f0da2582636beeb35e388d81 Mon Sep 17 00:00:00 2001 From: jeroendedauw Date: Wed, 5 Aug 2015 23:58:05 +0200 Subject: [PATCH 01/32] Upper bound the version ranges of the dependencies This avoids pulling in breaking releases without first explicitly defining compatibility. See http://semver.org/ --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3b9833a..83053f8 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,10 @@ "minimum-stability": "stable", "require": { "php": ">=5.3.2", - "symfony/process": ">=2.3" + "symfony/process": "~2.3" }, "require-dev": { - "symfony/finder": ">=2.3" + "symfony/finder": "~2.3" }, "autoload": { "psr-0": { From c574b72f8834b84cfedee45d458ad4b51151e08e Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 25 Jun 2015 04:43:55 +0100 Subject: [PATCH 02/32] readme: Add link to pygments.org and use their tagline --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b2e441a..a163f9a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Pygments.php - A Thin Wrapper for the Python Pygments [![Coverage Status](https://coveralls.io/repos/kzykhys/Pygments.php/badge.png)](https://coveralls.io/r/kzykhys/Pygments.php) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/3efddd61-f6e2-4f4a-949d-9ca7230f6e56/mini.png)](https://insight.sensiolabs.com/projects/3efddd61-f6e2-4f4a-949d-9ca7230f6e56) -A PHP wrapper for the Python Pygments syntax highlighter +A PHP wrapper for the [Pygments](http://pygments.org/), the Python syntax highlighter. Requirements ------------ From ea7e59e248784d165712baa088573c18d4fe316c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 23 Jun 2015 16:06:26 +0200 Subject: [PATCH 03/32] Use -P rather than -O when passing options To allow option values containing commas. -P is new in Pygments 0.9. http://pygments.org/docs/cmdline/#options-and-filters Fixes https://github.com/kzykhys/Pygments.php/issues/4. --- src/KzykHys/Pygments/Pygments.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/KzykHys/Pygments/Pygments.php b/src/KzykHys/Pygments/Pygments.php index 6ebd652..c19366c 100644 --- a/src/KzykHys/Pygments/Pygments.php +++ b/src/KzykHys/Pygments/Pygments.php @@ -53,13 +53,9 @@ public function highlight($code, $lexer = null, $formatter = null, $options = ar } if (count($options)) { - $arg = array(); - foreach ($options as $key => $value) { - $arg[] = sprintf('%s=%s', $key, $value); + $builder->add('-P')->add(sprintf('%s=%s', $key, $value)); } - - $builder->add('-O')->add(implode(',', $arg)); } $process = $builder->getProcess()->setStdin($code); From 1925c3f5763cba9ebeaa7d53167a536bcf89aee6 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 16 Jun 2015 03:15:04 +0100 Subject: [PATCH 04/32] travis: Add PHP 5.6 and HHVM builds --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3b42073..48e1ad3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ language: php php: + - 5.6 - 5.5 - 5.4 - 5.3 + - hhvm before_install: - sudo easy_install Pygments @@ -18,4 +20,4 @@ script: - php vendor/bin/security-checker security:check composer.lock after_script: - - php vendor/bin/coveralls \ No newline at end of file + - php vendor/bin/coveralls From 6128d5ca157243e65dfd316dede41f7b61a95503 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 15:48:25 -0600 Subject: [PATCH 05/32] Apply updates to make tests pass on Travis CI again --- .travis.yml | 10 +- composer.json | 5 +- composer.lock | 1400 +++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 1366 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index 48e1ad3..d51418c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,17 +7,19 @@ php: - 5.3 - hhvm +sudo: required + before_install: - - sudo easy_install Pygments + - sudo pip install --upgrade pip + - sudo pip install Pygments==1.6 before_script: - - composer require --no-update satooshi/php-coveralls:dev-master sensiolabs/security-checker:dev-master + - composer require --no-update satooshi/php-coveralls:0.6.1 - composer update --dev --no-interaction script: - mkdir -p build/logs - - phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml - - php vendor/bin/security-checker security:check composer.lock + - ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml after_script: - php vendor/bin/coveralls diff --git a/composer.json b/composer.json index 83053f8..261d7ae 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,11 @@ "minimum-stability": "stable", "require": { "php": ">=5.3.2", - "symfony/process": "~2.3" + "symfony/process": "^2.3" }, "require-dev": { - "symfony/finder": "~2.3" + "symfony/finder": "^2.3", + "phpunit/phpunit": "^4.8 || ^5.7" }, "autoload": { "psr-0": { diff --git a/composer.lock b/composer.lock index fa03182..b2a4749 100644 --- a/composer.lock +++ b/composer.lock @@ -1,39 +1,1301 @@ { "_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": "d2e111fb167611c09ab96baa0504b60b", + "content-hash": "c9c6cabe8a47c85278b74b00a124a477", "packages": [ { "name": "symfony/process", - "version": "v2.4.0", - "target-dir": "Symfony/Component/Process", + "version": "v2.8.18", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "87738ff42e2467730ed74d941866e95513844b70" + "url": "https://github.com/symfony/process.git", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/87738ff42e2467730ed74d941866e95513844b70", - "reference": "87738ff42e2467730ed74d941866e95513844b70", + "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", + "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "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 Process Component", + "homepage": "https://symfony.com", + "time": "2017-03-04T12:20:59+00:00" + } + ], + "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-14T21:17:01+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe", + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "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": "2017-01-26T22:05:40+00:00" + }, + { + "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": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27T11:43:31+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "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/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "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-09-30T07:12:33+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "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-11-25T06:54:22+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "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.5|^3.2", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "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": "2017-03-02T20:05:34+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "09e2277d14ea467e5a984010f501343ef29ffc69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69", + "reference": "09e2277d14ea467e5a984010f501343ef29ffc69", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" + }, + "require-dev": { + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-xdebug": "^2.5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.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": "2017-03-01T09:12:17+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "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": "2016-10-03T07:40:28+00:00" + }, + { + "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-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "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/" + ] + }, + "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": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.11", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "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": "2017-02-27T10:12:30+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b99112aecc01f62acf3d81a3f59646700a1849e5", + "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "~1.2", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0.3|~2.0", + "symfony/yaml": "~2.1|~3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.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": "2017-03-02T15:22:43+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.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": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2016-12-08T20:27:08+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "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 || ~2.0" + }, + "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": "2017-01-29T09:50:25+00:00" + }, + { + "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-08T07:14:41+00:00" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.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 functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-11-26T07:53:53+00:00" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.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": "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-11-19T08:54:04+00:00" + }, + { + "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": "2.4-dev" + "dev-master": "1.0-dev" } }, "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" + "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-12T03:26:01+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.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": "2017-02-18T15:18:39+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.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": "2016-11-19T07:33:16+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "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-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "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": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/finder", + "version": "v2.8.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/5fc4b5cab38b9d28be318fcffd8066988e7d9451", + "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" } }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -45,43 +1307,49 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", - "homepage": "http://symfony.com", - "time": "2013-11-26 16:40:27" - } - ], - "packages-dev": [ + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2017-02-21T08:33:48+00:00" + }, { - "name": "symfony/finder", - "version": "v2.4.0", - "target-dir": "Symfony/Component/Finder", + "name": "symfony/yaml", + "version": "v3.2.6", "source": { "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "72356bf0646b11af1bae666c28a639bd8ede459f" + "url": "https://github.com/symfony/yaml.git", + "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/72356bf0646b11af1bae666c28a639bd8ede459f", - "reference": "72356bf0646b11af1bae666c28a639bd8ede459f", + "url": "https://api.github.com/repos/symfony/yaml/zipball/093e416ad096355149e265ea2e4cc1f9ee40ab1a", + "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "3.2-dev" } }, "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -94,25 +1362,71 @@ }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com", - "time": "2013-11-26 16:40:27" + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2017-03-07T16:47:02+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-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": "2016-11-23T20:04:58+00:00" } ], - "aliases": [ - - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": [ - - ], + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, "platform": { "php": ">=5.3.2" }, - "platform-dev": [ - - ] + "platform-dev": [] } From 267811be196570a7b3f201d70846adfe243e2f13 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 16:19:38 -0600 Subject: [PATCH 06/32] Test on newer versions of PHP --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index d51418c..065c575 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,14 @@ language: php php: + - 7.1 + - 7.0 - 5.6 - 5.5 - 5.4 - 5.3 - hhvm + - nightly sudo: required From ad3f861ce8cdd88eb3e67b787cf31e31052d76a4 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 16:35:52 -0600 Subject: [PATCH 07/32] Remove the composer.lock file --- composer.lock | 1432 ------------------------------------------------- 1 file changed, 1432 deletions(-) delete mode 100644 composer.lock diff --git a/composer.lock b/composer.lock deleted file mode 100644 index b2a4749..0000000 --- a/composer.lock +++ /dev/null @@ -1,1432 +0,0 @@ -{ - "_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" - ], - "content-hash": "c9c6cabe8a47c85278b74b00a124a477", - "packages": [ - { - "name": "symfony/process", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/41336b20b52f5fd5b42a227e394e673c8071118f", - "reference": "41336b20b52f5fd5b42a227e394e673c8071118f", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "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 Process Component", - "homepage": "https://symfony.com", - "time": "2017-03-04T12:20:59+00:00" - } - ], - "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-14T21:17:01+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe", - "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - }, - "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": "2017-01-26T22:05:40+00:00" - }, - { - "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": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2015-12-27T11:43:31+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "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/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "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-09-30T07:12:33+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "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-11-25T06:54:22+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.7.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "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.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" - }, - "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": "2017-03-02T20:05:34+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "4.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "09e2277d14ea467e5a984010f501343ef29ffc69" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69", - "reference": "09e2277d14ea467e5a984010f501343ef29ffc69", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "^1.3", - "phpunit/php-text-template": "^1.2", - "phpunit/php-token-stream": "^1.4.2 || ^2.0", - "sebastian/code-unit-reverse-lookup": "^1.0", - "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "^1.0 || ^2.0" - }, - "require-dev": { - "ext-xdebug": "^2.1.4", - "phpunit/phpunit": "^5.7" - }, - "suggest": { - "ext-xdebug": "^2.5.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0.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": "2017-03-01T09:12:17+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "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": "2016-10-03T07:40:28+00:00" - }, - { - "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-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "shasum": "" - }, - "require": { - "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/" - ] - }, - "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": "2017-02-26T11:10:40+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.11", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", - "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": "2017-02-27T10:12:30+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "5.7.15", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b99112aecc01f62acf3d81a3f59646700a1849e5", - "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "myclabs/deep-copy": "~1.3", - "php": "^5.6 || ^7.0", - "phpspec/prophecy": "^1.6.2", - "phpunit/php-code-coverage": "^4.0.4", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "^1.2.4", - "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3.4 || ^2.0", - "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.1", - "sebastian/object-enumerator": "~2.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" - }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-xdebug": "*", - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.7.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": "2017-03-02T15:22:43+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "3.4.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.6 || ^7.0", - "phpunit/php-text-template": "^1.2", - "sebastian/exporter": "^1.2 || ^2.0" - }, - "conflict": { - "phpunit/phpunit": "<5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.4" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.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": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2016-12-08T20:27:08+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "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 || ~2.0" - }, - "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": "2017-01-29T09:50:25+00:00" - }, - { - "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-08T07:14:41+00:00" - }, - { - "name": "sebastian/environment", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.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 functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2016-11-26T07:53:53+00:00" - }, - { - "name": "sebastian/exporter", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.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": "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-11-19T08:54:04+00:00" - }, - { - "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-12T03:26:01+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", - "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "sebastian/recursion-context": "~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.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": "2017-02-18T15:18:39+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.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": "2016-11-19T07:33:16+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "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-28T20:34:47+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "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": "2016-10-03T07:35:21+00:00" - }, - { - "name": "symfony/finder", - "version": "v2.8.18", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5fc4b5cab38b9d28be318fcffd8066988e7d9451", - "reference": "5fc4b5cab38b9d28be318fcffd8066988e7d9451", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "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 Finder Component", - "homepage": "https://symfony.com", - "time": "2017-02-21T08:33:48+00:00" - }, - { - "name": "symfony/yaml", - "version": "v3.2.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/093e416ad096355149e265ea2e4cc1f9ee40ab1a", - "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-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": "2017-03-07T16:47:02+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-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": "2016-11-23T20:04:58+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.3.2" - }, - "platform-dev": [] -} From bf76068b08e02dd6721a4d11806cb8f6ea1a5a93 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 16:36:51 -0600 Subject: [PATCH 08/32] Modernize the Travis CI configuration --- .travis.yml | 20 +++++++++++++------- composer.json | 5 +++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 065c575..e216304 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: php +sudo: required + php: - 7.1 - 7.0 @@ -10,19 +12,23 @@ php: - hhvm - nightly -sudo: required +matrix: + allow_failures: + - php: nightly before_install: - sudo pip install --upgrade pip - sudo pip install Pygments==1.6 + - travis_retry composer self-update + +install: + - travis_retry composer install --no-interaction --prefer-dist before_script: - - composer require --no-update satooshi/php-coveralls:0.6.1 - - composer update --dev --no-interaction + - mkdir -p build/logs script: - - mkdir -p build/logs - - ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml + - ./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml -after_script: - - php vendor/bin/coveralls +after_success: + - travis_retry php vendor/bin/coveralls diff --git a/composer.json b/composer.json index 261d7ae..8e476cd 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,9 @@ "symfony/process": "^2.3" }, "require-dev": { - "symfony/finder": "^2.3", - "phpunit/phpunit": "^4.8 || ^5.7" + "phpunit/phpunit": "^4.8 || ^5.7", + "satooshi/php-coveralls": "0.6.1", + "symfony/finder": "^2.3" }, "autoload": { "psr-0": { From 5afda7aa1fe9d44687d45d3ac183717f0df204bf Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 16:44:33 -0600 Subject: [PATCH 09/32] Ignore the composer.lock file --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 809b698..697e972 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -/vendor/ /build/ -composer.phar \ No newline at end of file +/vendor/ +composer.lock +composer.phar From b2cc7146de12bca2bd9c31c18f57fe922bfa782f Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 16:48:38 -0600 Subject: [PATCH 10/32] Rename `test/` to `tests/`, according to modern conventions --- phpunit.xml.dist | 39 ++++++------------- .../KzykHys/Pygments/PygmentsTest.php | 0 .../Pygments/Resources/css/default.css | 0 .../Pygments/Resources/css/default.prefix.css | 0 .../Pygments/Resources/example/php.php.in | 0 .../Resources/example/php.php.linenos.out | 0 .../Pygments/Resources/example/php.php.out | 0 7 files changed, 12 insertions(+), 27 deletions(-) rename {test => tests}/KzykHys/Pygments/PygmentsTest.php (100%) rename {test => tests}/KzykHys/Pygments/Resources/css/default.css (100%) rename {test => tests}/KzykHys/Pygments/Resources/css/default.prefix.css (100%) rename {test => tests}/KzykHys/Pygments/Resources/example/php.php.in (100%) rename {test => tests}/KzykHys/Pygments/Resources/example/php.php.linenos.out (100%) rename {test => tests}/KzykHys/Pygments/Resources/example/php.php.out (100%) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ad8dd7b..7e088e4 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,13 @@ - - - - - - - test - - - - - - src - - - - \ No newline at end of file + + + + ./tests + + + + + ./src + + + diff --git a/test/KzykHys/Pygments/PygmentsTest.php b/tests/KzykHys/Pygments/PygmentsTest.php similarity index 100% rename from test/KzykHys/Pygments/PygmentsTest.php rename to tests/KzykHys/Pygments/PygmentsTest.php diff --git a/test/KzykHys/Pygments/Resources/css/default.css b/tests/KzykHys/Pygments/Resources/css/default.css similarity index 100% rename from test/KzykHys/Pygments/Resources/css/default.css rename to tests/KzykHys/Pygments/Resources/css/default.css diff --git a/test/KzykHys/Pygments/Resources/css/default.prefix.css b/tests/KzykHys/Pygments/Resources/css/default.prefix.css similarity index 100% rename from test/KzykHys/Pygments/Resources/css/default.prefix.css rename to tests/KzykHys/Pygments/Resources/css/default.prefix.css diff --git a/test/KzykHys/Pygments/Resources/example/php.php.in b/tests/KzykHys/Pygments/Resources/example/php.php.in similarity index 100% rename from test/KzykHys/Pygments/Resources/example/php.php.in rename to tests/KzykHys/Pygments/Resources/example/php.php.in diff --git a/test/KzykHys/Pygments/Resources/example/php.php.linenos.out b/tests/KzykHys/Pygments/Resources/example/php.php.linenos.out similarity index 100% rename from test/KzykHys/Pygments/Resources/example/php.php.linenos.out rename to tests/KzykHys/Pygments/Resources/example/php.php.linenos.out diff --git a/test/KzykHys/Pygments/Resources/example/php.php.out b/tests/KzykHys/Pygments/Resources/example/php.php.out similarity index 100% rename from test/KzykHys/Pygments/Resources/example/php.php.out rename to tests/KzykHys/Pygments/Resources/example/php.php.out From d7c9432834f9d3521c2b8d8b5fe7dec5e57e1ddc Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 16:51:01 -0600 Subject: [PATCH 11/32] Update the library to use PSR-4 autoloading --- composer.json | 9 +++++++-- src/{KzykHys/Pygments => }/Pygments.php | 0 tests/{KzykHys/Pygments => }/PygmentsTest.php | 6 ++++-- tests/{KzykHys/Pygments => }/Resources/css/default.css | 0 .../Pygments => }/Resources/css/default.prefix.css | 0 .../{KzykHys/Pygments => }/Resources/example/php.php.in | 0 .../Pygments => }/Resources/example/php.php.linenos.out | 0 .../{KzykHys/Pygments => }/Resources/example/php.php.out | 0 8 files changed, 11 insertions(+), 4 deletions(-) rename src/{KzykHys/Pygments => }/Pygments.php (100%) rename tests/{KzykHys/Pygments => }/PygmentsTest.php (97%) rename tests/{KzykHys/Pygments => }/Resources/css/default.css (100%) rename tests/{KzykHys/Pygments => }/Resources/css/default.prefix.css (100%) rename tests/{KzykHys/Pygments => }/Resources/example/php.php.in (100%) rename tests/{KzykHys/Pygments => }/Resources/example/php.php.linenos.out (100%) rename tests/{KzykHys/Pygments => }/Resources/example/php.php.out (100%) diff --git a/composer.json b/composer.json index 8e476cd..44fd9e9 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,13 @@ "symfony/finder": "^2.3" }, "autoload": { - "psr-0": { - "": "src" + "psr-4": { + "KzykHys\\Pygments\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "KzykHys\\Pygments\\Test\\": "tests" } } } diff --git a/src/KzykHys/Pygments/Pygments.php b/src/Pygments.php similarity index 100% rename from src/KzykHys/Pygments/Pygments.php rename to src/Pygments.php diff --git a/tests/KzykHys/Pygments/PygmentsTest.php b/tests/PygmentsTest.php similarity index 97% rename from tests/KzykHys/Pygments/PygmentsTest.php rename to tests/PygmentsTest.php index 2110e0d..302e67c 100644 --- a/tests/KzykHys/Pygments/PygmentsTest.php +++ b/tests/PygmentsTest.php @@ -1,12 +1,14 @@ */ -class PygmentsTest extends PHPUnit_Framework_TestCase +class PygmentsTest extends \PHPUnit_Framework_TestCase { /** @@ -113,4 +115,4 @@ public function provideCss() return $css; } -} \ No newline at end of file +} diff --git a/tests/KzykHys/Pygments/Resources/css/default.css b/tests/Resources/css/default.css similarity index 100% rename from tests/KzykHys/Pygments/Resources/css/default.css rename to tests/Resources/css/default.css diff --git a/tests/KzykHys/Pygments/Resources/css/default.prefix.css b/tests/Resources/css/default.prefix.css similarity index 100% rename from tests/KzykHys/Pygments/Resources/css/default.prefix.css rename to tests/Resources/css/default.prefix.css diff --git a/tests/KzykHys/Pygments/Resources/example/php.php.in b/tests/Resources/example/php.php.in similarity index 100% rename from tests/KzykHys/Pygments/Resources/example/php.php.in rename to tests/Resources/example/php.php.in diff --git a/tests/KzykHys/Pygments/Resources/example/php.php.linenos.out b/tests/Resources/example/php.php.linenos.out similarity index 100% rename from tests/KzykHys/Pygments/Resources/example/php.php.linenos.out rename to tests/Resources/example/php.php.linenos.out diff --git a/tests/KzykHys/Pygments/Resources/example/php.php.out b/tests/Resources/example/php.php.out similarity index 100% rename from tests/KzykHys/Pygments/Resources/example/php.php.out rename to tests/Resources/example/php.php.out From 34e59160c8aadc7a37d115e3afc64a90abd502c1 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 17:11:17 -0600 Subject: [PATCH 12/32] Change PHP version requirements to exclude unsupported PHP versions --- .travis.yml | 3 --- composer.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e216304..d73b6dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,6 @@ php: - 7.1 - 7.0 - 5.6 - - 5.5 - - 5.4 - - 5.3 - hhvm - nightly diff --git a/composer.json b/composer.json index 44fd9e9..a2221cb 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "minimum-stability": "stable", "require": { - "php": ">=5.3.2", + "php": "^5.6 || ^7.0", "symfony/process": "^2.3" }, "require-dev": { From 69c1e1e800d61ce07b5c7eb13542c62373b42318 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 17:15:22 -0600 Subject: [PATCH 13/32] Update the lowest PHPUnit version required --- composer.json | 2 +- tests/PygmentsTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a2221cb..8147311 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "symfony/process": "^2.3" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.7", + "phpunit/phpunit": "^5.7 || ^6.0", "satooshi/php-coveralls": "0.6.1", "symfony/finder": "^2.3" }, diff --git a/tests/PygmentsTest.php b/tests/PygmentsTest.php index 302e67c..7ce02c7 100644 --- a/tests/PygmentsTest.php +++ b/tests/PygmentsTest.php @@ -3,12 +3,13 @@ namespace KzykHys\Pygments\Test; use KzykHys\Pygments\Pygments; +use PHPUnit\Framework\TestCase; use Symfony\Component\Finder\Finder; /** * @author Kazuyuki Hayashi */ -class PygmentsTest extends \PHPUnit_Framework_TestCase +class PygmentsTest extends TestCase { /** From 2e579aee83579003e782e3a81e5b5069b665eb05 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 19:48:38 -0600 Subject: [PATCH 14/32] Upgrade library to use Symfony components from the 3.x series --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 8147311..744c925 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,12 @@ "minimum-stability": "stable", "require": { "php": "^5.6 || ^7.0", - "symfony/process": "^2.3" + "symfony/process": "^3.0" }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.0", "satooshi/php-coveralls": "0.6.1", - "symfony/finder": "^2.3" + "symfony/finder": "^3.0" }, "autoload": { "psr-4": { From 11f0c234783411ae01c9799384ffcd41068d44a9 Mon Sep 17 00:00:00 2001 From: Samuel ROZE Date: Thu, 29 Sep 2016 15:54:38 +0100 Subject: [PATCH 15/32] Uses builder's `setInput` --- src/Pygments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pygments.php b/src/Pygments.php index c19366c..85f51ac 100644 --- a/src/Pygments.php +++ b/src/Pygments.php @@ -58,7 +58,7 @@ public function highlight($code, $lexer = null, $formatter = null, $options = ar } } - $process = $builder->getProcess()->setStdin($code); + $process = $builder->setInput($code)->getProcess(); return $this->getOutput($process); } @@ -193,4 +193,4 @@ protected function parseList($input) return $list; } -} \ No newline at end of file +} From 3ae57848383b32778d1d02c33aa5294d9e70978c Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 17:33:50 -0600 Subject: [PATCH 16/32] Move coveralls installation back to Travis CI configuration --- .travis.yml | 1 + composer.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d73b6dd..a1b391a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ before_install: - travis_retry composer self-update install: + - travis_retry composer require --no-update satooshi/php-coveralls:^1.0 - travis_retry composer install --no-interaction --prefer-dist before_script: diff --git a/composer.json b/composer.json index 744c925..5607684 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,6 @@ }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.0", - "satooshi/php-coveralls": "0.6.1", "symfony/finder": "^3.0" }, "autoload": { From 8d47c426df2b5f26404fcb235c583efb31d77457 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 17:47:02 -0600 Subject: [PATCH 17/32] Add PHP CodeSniffer and sniff for PSR-2 coding standards violations --- .travis.yml | 1 + composer.json | 5 +++++ src/Pygments.php | 3 +-- tests/PygmentsTest.php | 1 - 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1b391a..f01bb61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ before_script: script: - ./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml + - ./vendor/bin/phpcs src tests --standard=psr2 -sp after_success: - travis_retry php vendor/bin/coveralls diff --git a/composer.json b/composer.json index 5607684..6926eba 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ }, "require-dev": { "phpunit/phpunit": "^5.7 || ^6.0", + "squizlabs/php_codesniffer": "^2.8", "symfony/finder": "^3.0" }, "autoload": { @@ -27,5 +28,9 @@ "psr-4": { "KzykHys\\Pygments\\Test\\": "tests" } + }, + "scripts": { + "phpunit": "phpunit --verbose --colors=always", + "phpcs": "phpcs src tests --standard=psr2 -sp --colors" } } diff --git a/src/Pygments.php b/src/Pygments.php index 85f51ac..a7bcce8 100644 --- a/src/Pygments.php +++ b/src/Pygments.php @@ -192,5 +192,4 @@ protected function parseList($input) return $list; } - -} +} diff --git a/tests/PygmentsTest.php b/tests/PygmentsTest.php index 7ce02c7..0426406 100644 --- a/tests/PygmentsTest.php +++ b/tests/PygmentsTest.php @@ -115,5 +115,4 @@ public function provideCss() return $css; } - } From cc47c8b0fac1c00bffa505431f6247bd5c283f6f Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 17:51:00 -0600 Subject: [PATCH 18/32] Add PHP script linting and Composer helpers to run all tests --- .travis.yml | 1 + composer.json | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f01bb61..98f7178 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ before_script: - mkdir -p build/logs script: + - ./vendor/bin/parallel-lint src tests - ./vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml - ./vendor/bin/phpcs src tests --standard=psr2 -sp diff --git a/composer.json b/composer.json index 6926eba..20ab6e3 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "symfony/process": "^3.0" }, "require-dev": { + "jakub-onderka/php-parallel-lint": "^0.9.2", "phpunit/phpunit": "^5.7 || ^6.0", "squizlabs/php_codesniffer": "^2.8", "symfony/finder": "^3.0" @@ -30,7 +31,13 @@ } }, "scripts": { + "lint": "parallel-lint src tests", "phpunit": "phpunit --verbose --colors=always", - "phpcs": "phpcs src tests --standard=psr2 -sp --colors" + "phpcs": "phpcs src tests --standard=psr2 -sp --colors", + "test": [ + "@lint", + "@phpunit", + "@phpcs" + ] } } From f343d1d341e55ffebe1881ecbd586134e62081ad Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Fri, 10 Mar 2017 17:56:44 -0600 Subject: [PATCH 19/32] Add a .gitattributes file to ignore certain files/dirs on export --- .gitattributes | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..877169b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/phpunit.xml.dist export-ignore +/tests export-ignore From b2eb16b7c94856fa4e2cb3332378d69cbeef30c4 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 12:09:14 -0600 Subject: [PATCH 20/32] Use Travis CI Python build environment to test Pygments versions --- .gitattributes | 1 + .travis.yml | 60 +++++++++++++++++++++++++++++++++------------ util/install-php.sh | 54 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 16 deletions(-) create mode 100755 util/install-php.sh diff --git a/.gitattributes b/.gitattributes index 877169b..77913e9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,4 @@ /.travis.yml export-ignore /phpunit.xml.dist export-ignore /tests export-ignore +/util export-ignore diff --git a/.travis.yml b/.travis.yml index 98f7178..d369b66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,26 +1,54 @@ -language: php - -sudo: required - -php: - - 7.1 - - 7.0 - - 5.6 - - hhvm - - nightly +language: python + +sudo: false + +python: + - 2.7 + - 3.2 + +env: + global: + - PATH="$HOME/.phpenv/bin:$HOME/.phpenv/shims:$PATH" + matrix: + - PHP_VERSION=7.1 PYGMENTS_VERSION=1.6 + - PHP_VERSION=7.1 PYGMENTS_VERSION=2.0 + - PHP_VERSION=7.1 PYGMENTS_VERSION=2.1 + - PHP_VERSION=7.1 PYGMENTS_VERSION=2.2 + - PHP_VERSION=7.0 PYGMENTS_VERSION=1.6 + - PHP_VERSION=7.0 PYGMENTS_VERSION=2.0 + - PHP_VERSION=7.0 PYGMENTS_VERSION=2.1 + - PHP_VERSION=7.0 PYGMENTS_VERSION=2.2 + - PHP_VERSION=5.6 PYGMENTS_VERSION=1.6 + - PHP_VERSION=5.6 PYGMENTS_VERSION=2.0 + - PHP_VERSION=5.6 PYGMENTS_VERSION=2.1 + - PHP_VERSION=5.6 PYGMENTS_VERSION=2.2 + - PHP_VERSION=nightly PYGMENTS_VERSION=1.6 + - PHP_VERSION=nightly PYGMENTS_VERSION=2.0 + - PHP_VERSION=nightly PYGMENTS_VERSION=2.1 + - PHP_VERSION=nightly PYGMENTS_VERSION=2.2 matrix: + fast_finish: true allow_failures: - - php: nightly + - env: PHP_VERSION=nightly + +addons: + apt: + packages: + - libc-client-dev + - libtidy-dev + - libmcrypt-dev before_install: - - sudo pip install --upgrade pip - - sudo pip install Pygments==1.6 - - travis_retry composer self-update + - ./util/install-php.sh + - eval "$(phpenv init -)" && phpenv rehash + - php --version + - php composer.phar --version install: - - travis_retry composer require --no-update satooshi/php-coveralls:^1.0 - - travis_retry composer install --no-interaction --prefer-dist + - travis_retry pip install Pygments==$PYGMENTS_VERSION + - travis_retry php composer.phar require --no-update satooshi/php-coveralls:^1.0 + - travis_retry php composer.phar install --no-interaction --prefer-dist before_script: - mkdir -p build/logs diff --git a/util/install-php.sh b/util/install-php.sh new file mode 100755 index 0000000..9b57188 --- /dev/null +++ b/util/install-php.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# +# Installs Travis CI PHP into a Travis CI Python environment +# + +if [ -z "$TRAVIS" ]; then + >&2 echo 'ERROR: This script may only run inside the Travis CI environment' + exit 1 +fi + +archive_url="https://s3.amazonaws.com/travis-php-archives/binaries/ubuntu/12.04/x86_64/php-${PHP_VERSION}.tar.bz2" + +# Install phpenv +type phpenv >/dev/null 2>&1 +if [ $? -ne 0 ]; then + git clone git://github.com/CHH/phpenv.git $HOME/phpenv.git + $HOME/phpenv.git/bin/phpenv-install.sh + PATH="$HOME/.phpenv/bin:$HOME/.phpenv/shims:$PATH" + eval "$(phpenv init -)" +fi + +phpenv rehash + +# Install PHP +phpenv global $PHP_VERSION 2>/dev/null +if [ $? -ne 0 ]; then + curl -s -o archive.tar.bz2 $archive_url && tar xjf archive.tar.bz2 --directory / + phpenv rehash + phpenv global $PHP_VERSION +fi + +if [ $? -ne 0 ]; then + >&2 echo 'ERROR: PHP was not properly installed' + exit 1 +fi + +# Install Composer +cd $TRAVIS_BUILD_DIR +EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');") + +if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then + >&2 echo 'ERROR: Invalid installer signature' + exit 1 +fi + +php composer-setup.php --quiet +if [ $? -ne 0 ]; then + >&2 echo 'ERROR: Unable to set up Composer' + exit 1 +fi + +rm composer-setup.php From 917de37240d81adce4f22e730275da070c45da46 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 21:18:10 -0600 Subject: [PATCH 21/32] Split up test resources by Pygments version --- phpunit.xml.dist | 5 +- tests/PygmentsTest.php | 17 +++--- .../{ => pygments-1.6}/css/default.css | 0 .../{ => pygments-1.6}/css/default.prefix.css | 0 .../{ => pygments-1.6}/example/php.php.in | 0 .../example/php.php.linenos.out | 0 .../{ => pygments-1.6}/example/php.php.out | 0 tests/bootstrap.php | 54 +++++++++++++++++++ 8 files changed, 66 insertions(+), 10 deletions(-) rename tests/Resources/{ => pygments-1.6}/css/default.css (100%) rename tests/Resources/{ => pygments-1.6}/css/default.prefix.css (100%) rename tests/Resources/{ => pygments-1.6}/example/php.php.in (100%) rename tests/Resources/{ => pygments-1.6}/example/php.php.linenos.out (100%) rename tests/Resources/{ => pygments-1.6}/example/php.php.out (100%) create mode 100644 tests/bootstrap.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7e088e4..c0269a4 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - + ./tests @@ -10,4 +10,7 @@ ./src + + + diff --git a/tests/PygmentsTest.php b/tests/PygmentsTest.php index 0426406..dfd3a94 100644 --- a/tests/PygmentsTest.php +++ b/tests/PygmentsTest.php @@ -11,13 +11,12 @@ */ class PygmentsTest extends TestCase { - /** * @dataProvider provideSamples */ public function testHighlight($input, $expected, $expectedL, $lexer) { - $pygments = new Pygments(); + $pygments = new Pygments(getenv('PYGMENTIZE_PATH')); $this->assertEquals($expected, $pygments->highlight($input, null, 'html')); $this->assertEquals($expected, $pygments->highlight($input, $lexer, 'html')); @@ -29,7 +28,7 @@ public function testHighlight($input, $expected, $expectedL, $lexer) */ public function testGetCss($expected, $expectedA, $style) { - $pygments = new Pygments(); + $pygments = new Pygments(getenv('PYGMENTIZE_PATH')); $this->assertEquals($expected, $pygments->getCss($style)); $this->assertEquals($expectedA, $pygments->getCss($style, '.syntax')); @@ -37,7 +36,7 @@ public function testGetCss($expected, $expectedA, $style) public function testGetLexers() { - $pygments = new Pygments(); + $pygments = new Pygments(getenv('PYGMENTIZE_PATH')); $lexers = $pygments->getLexers(); $this->assertArrayHasKey('python', $lexers); @@ -45,7 +44,7 @@ public function testGetLexers() public function testGetFormatters() { - $pygments = new Pygments(); + $pygments = new Pygments(getenv('PYGMENTIZE_PATH')); $formatters = $pygments->getFormatters(); $this->assertArrayHasKey('html', $formatters); @@ -53,7 +52,7 @@ public function testGetFormatters() public function testGetStyles() { - $pygments = new Pygments(); + $pygments = new Pygments(getenv('PYGMENTIZE_PATH')); $styles = $pygments->getStyles(); $this->assertArrayHasKey('monokai', $styles); @@ -61,7 +60,7 @@ public function testGetStyles() public function testGuessLexer() { - $pygments = new Pygments(); + $pygments = new Pygments(getenv('PYGMENTIZE_PATH')); $this->assertEquals('php', $pygments->guessLexer('index.php')); $this->assertEquals('go', $pygments->guessLexer('main.go')); @@ -71,7 +70,7 @@ public function provideSamples() { $finder = new Finder(); $finder - ->in(__DIR__ . '/Resources/example') + ->in(__DIR__ . '/Resources/pygments-' . getenv('PYGMENTIZE_VERSION') . '/example') ->name("*.in") ->notName('*.linenos.out') ->files() @@ -96,7 +95,7 @@ public function provideCss() { $finder = new Finder(); $finder - ->in(__DIR__ . '/Resources/css') + ->in(__DIR__ . '/Resources/pygments-' . getenv('PYGMENTIZE_VERSION') . '/css') ->files() ->ignoreVCS(true) ->name('*.css') diff --git a/tests/Resources/css/default.css b/tests/Resources/pygments-1.6/css/default.css similarity index 100% rename from tests/Resources/css/default.css rename to tests/Resources/pygments-1.6/css/default.css diff --git a/tests/Resources/css/default.prefix.css b/tests/Resources/pygments-1.6/css/default.prefix.css similarity index 100% rename from tests/Resources/css/default.prefix.css rename to tests/Resources/pygments-1.6/css/default.prefix.css diff --git a/tests/Resources/example/php.php.in b/tests/Resources/pygments-1.6/example/php.php.in similarity index 100% rename from tests/Resources/example/php.php.in rename to tests/Resources/pygments-1.6/example/php.php.in diff --git a/tests/Resources/example/php.php.linenos.out b/tests/Resources/pygments-1.6/example/php.php.linenos.out similarity index 100% rename from tests/Resources/example/php.php.linenos.out rename to tests/Resources/pygments-1.6/example/php.php.linenos.out diff --git a/tests/Resources/example/php.php.out b/tests/Resources/pygments-1.6/example/php.php.out similarity index 100% rename from tests/Resources/example/php.php.out rename to tests/Resources/pygments-1.6/example/php.php.out diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..d507592 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,54 @@ + Date: Sat, 11 Mar 2017 21:25:46 -0600 Subject: [PATCH 22/32] Add resources for Pygments 2.0 --- tests/Resources/pygments-2.0/css/default.css | 61 ++++++++++++++++++ .../pygments-2.0/css/default.prefix.css | 62 +++++++++++++++++++ .../Resources/pygments-2.0/example/php.php.in | 21 +++++++ .../pygments-2.0/example/php.php.linenos.out | 43 +++++++++++++ .../pygments-2.0/example/php.php.out | 22 +++++++ 5 files changed, 209 insertions(+) create mode 100644 tests/Resources/pygments-2.0/css/default.css create mode 100644 tests/Resources/pygments-2.0/css/default.prefix.css create mode 100644 tests/Resources/pygments-2.0/example/php.php.in create mode 100644 tests/Resources/pygments-2.0/example/php.php.linenos.out create mode 100644 tests/Resources/pygments-2.0/example/php.php.out diff --git a/tests/Resources/pygments-2.0/css/default.css b/tests/Resources/pygments-2.0/css/default.css new file mode 100644 index 0000000..67e6ea3 --- /dev/null +++ b/tests/Resources/pygments-2.0/css/default.css @@ -0,0 +1,61 @@ +.hll { background-color: #ffffcc } +.c { color: #408080; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.cp { color: #BC7A00 } /* Comment.Preproc */ +.c1 { color: #408080; font-style: italic } /* Comment.Single */ +.cs { color: #408080; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #FF0000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #00A000 } /* Generic.Inserted */ +.go { color: #888888 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0044DD } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #7D9029 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.no { color: #880000 } /* Name.Constant */ +.nd { color: #AA22FF } /* Name.Decorator */ +.ni { color: #999999; font-weight: bold } /* Name.Entity */ +.ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.nf { color: #0000FF } /* Name.Function */ +.nl { color: #A0A000 } /* Name.Label */ +.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mf { color: #666666 } /* Literal.Number.Float */ +.mh { color: #666666 } /* Literal.Number.Hex */ +.mi { color: #666666 } /* Literal.Number.Integer */ +.mo { color: #666666 } /* Literal.Number.Oct */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #BB6688 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/tests/Resources/pygments-2.0/css/default.prefix.css b/tests/Resources/pygments-2.0/css/default.prefix.css new file mode 100644 index 0000000..eb17bc3 --- /dev/null +++ b/tests/Resources/pygments-2.0/css/default.prefix.css @@ -0,0 +1,62 @@ +.syntax .hll { background-color: #ffffcc } +.syntax { background: #f8f8f8; } +.syntax .c { color: #408080; font-style: italic } /* Comment */ +.syntax .err { border: 1px solid #FF0000 } /* Error */ +.syntax .k { color: #008000; font-weight: bold } /* Keyword */ +.syntax .o { color: #666666 } /* Operator */ +.syntax .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.syntax .cp { color: #BC7A00 } /* Comment.Preproc */ +.syntax .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.syntax .cs { color: #408080; font-style: italic } /* Comment.Special */ +.syntax .gd { color: #A00000 } /* Generic.Deleted */ +.syntax .ge { font-style: italic } /* Generic.Emph */ +.syntax .gr { color: #FF0000 } /* Generic.Error */ +.syntax .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.syntax .gi { color: #00A000 } /* Generic.Inserted */ +.syntax .go { color: #888888 } /* Generic.Output */ +.syntax .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.syntax .gs { font-weight: bold } /* Generic.Strong */ +.syntax .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.syntax .gt { color: #0044DD } /* Generic.Traceback */ +.syntax .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.syntax .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.syntax .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.syntax .kp { color: #008000 } /* Keyword.Pseudo */ +.syntax .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.syntax .kt { color: #B00040 } /* Keyword.Type */ +.syntax .m { color: #666666 } /* Literal.Number */ +.syntax .s { color: #BA2121 } /* Literal.String */ +.syntax .na { color: #7D9029 } /* Name.Attribute */ +.syntax .nb { color: #008000 } /* Name.Builtin */ +.syntax .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.syntax .no { color: #880000 } /* Name.Constant */ +.syntax .nd { color: #AA22FF } /* Name.Decorator */ +.syntax .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.syntax .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.syntax .nf { color: #0000FF } /* Name.Function */ +.syntax .nl { color: #A0A000 } /* Name.Label */ +.syntax .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.syntax .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.syntax .nv { color: #19177C } /* Name.Variable */ +.syntax .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.syntax .w { color: #bbbbbb } /* Text.Whitespace */ +.syntax .mf { color: #666666 } /* Literal.Number.Float */ +.syntax .mh { color: #666666 } /* Literal.Number.Hex */ +.syntax .mi { color: #666666 } /* Literal.Number.Integer */ +.syntax .mo { color: #666666 } /* Literal.Number.Oct */ +.syntax .sb { color: #BA2121 } /* Literal.String.Backtick */ +.syntax .sc { color: #BA2121 } /* Literal.String.Char */ +.syntax .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.syntax .s2 { color: #BA2121 } /* Literal.String.Double */ +.syntax .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.syntax .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.syntax .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.syntax .sx { color: #008000 } /* Literal.String.Other */ +.syntax .sr { color: #BB6688 } /* Literal.String.Regex */ +.syntax .s1 { color: #BA2121 } /* Literal.String.Single */ +.syntax .ss { color: #19177C } /* Literal.String.Symbol */ +.syntax .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.syntax .vc { color: #19177C } /* Name.Variable.Class */ +.syntax .vg { color: #19177C } /* Name.Variable.Global */ +.syntax .vi { color: #19177C } /* Name.Variable.Instance */ +.syntax .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/tests/Resources/pygments-2.0/example/php.php.in b/tests/Resources/pygments-2.0/example/php.php.in new file mode 100644 index 0000000..b5d9404 --- /dev/null +++ b/tests/Resources/pygments-2.0/example/php.php.in @@ -0,0 +1,21 @@ +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
+ \ No newline at end of file diff --git a/tests/Resources/pygments-2.0/example/php.php.out b/tests/Resources/pygments-2.0/example/php.php.out new file mode 100644 index 0000000..c5e907f --- /dev/null +++ b/tests/Resources/pygments-2.0/example/php.php.out @@ -0,0 +1,22 @@ +
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
From 0d422472784cf0091bc14aa6bfc633999d7aa660 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Thu, 3 Dec 2015 00:47:19 +1100 Subject: [PATCH 23/32] Add Literal.Number.Bin to expected results --- tests/Resources/pygments-2.0/css/default.css | 1 + tests/Resources/pygments-2.0/css/default.prefix.css | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/Resources/pygments-2.0/css/default.css b/tests/Resources/pygments-2.0/css/default.css index 67e6ea3..251b50d 100644 --- a/tests/Resources/pygments-2.0/css/default.css +++ b/tests/Resources/pygments-2.0/css/default.css @@ -39,6 +39,7 @@ .nv { color: #19177C } /* Name.Variable */ .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ .w { color: #bbbbbb } /* Text.Whitespace */ +.mb { color: #666666 } /* Literal.Number.Bin */ .mf { color: #666666 } /* Literal.Number.Float */ .mh { color: #666666 } /* Literal.Number.Hex */ .mi { color: #666666 } /* Literal.Number.Integer */ diff --git a/tests/Resources/pygments-2.0/css/default.prefix.css b/tests/Resources/pygments-2.0/css/default.prefix.css index eb17bc3..b8b872f 100644 --- a/tests/Resources/pygments-2.0/css/default.prefix.css +++ b/tests/Resources/pygments-2.0/css/default.prefix.css @@ -40,6 +40,7 @@ .syntax .nv { color: #19177C } /* Name.Variable */ .syntax .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ .syntax .w { color: #bbbbbb } /* Text.Whitespace */ +.syntax .mb { color: #666666 } /* Literal.Number.Bin */ .syntax .mf { color: #666666 } /* Literal.Number.Float */ .syntax .mh { color: #666666 } /* Literal.Number.Hex */ .syntax .mi { color: #666666 } /* Literal.Number.Integer */ From e1e2444c24302fb34fc264f3fb206b593d379c1c Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 21:30:25 -0600 Subject: [PATCH 24/32] Add test resources for Pygments 2.1 --- tests/Resources/pygments-2.1/css/default.css | 64 ++++++++++++++++++ .../pygments-2.1/css/default.prefix.css | 65 +++++++++++++++++++ .../Resources/pygments-2.1/example/php.php.in | 21 ++++++ .../pygments-2.1/example/php.php.linenos.out | 43 ++++++++++++ .../pygments-2.1/example/php.php.out | 22 +++++++ 5 files changed, 215 insertions(+) create mode 100644 tests/Resources/pygments-2.1/css/default.css create mode 100644 tests/Resources/pygments-2.1/css/default.prefix.css create mode 100644 tests/Resources/pygments-2.1/example/php.php.in create mode 100644 tests/Resources/pygments-2.1/example/php.php.linenos.out create mode 100644 tests/Resources/pygments-2.1/example/php.php.out diff --git a/tests/Resources/pygments-2.1/css/default.css b/tests/Resources/pygments-2.1/css/default.css new file mode 100644 index 0000000..f76b8b5 --- /dev/null +++ b/tests/Resources/pygments-2.1/css/default.css @@ -0,0 +1,64 @@ +.hll { background-color: #ffffcc } +.c { color: #408080; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.ch { color: #408080; font-style: italic } /* Comment.Hashbang */ +.cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.cp { color: #BC7A00 } /* Comment.Preproc */ +.cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #408080; font-style: italic } /* Comment.Single */ +.cs { color: #408080; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #FF0000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #00A000 } /* Generic.Inserted */ +.go { color: #888888 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0044DD } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #7D9029 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.no { color: #880000 } /* Name.Constant */ +.nd { color: #AA22FF } /* Name.Decorator */ +.ni { color: #999999; font-weight: bold } /* Name.Entity */ +.ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.nf { color: #0000FF } /* Name.Function */ +.nl { color: #A0A000 } /* Name.Label */ +.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mb { color: #666666 } /* Literal.Number.Bin */ +.mf { color: #666666 } /* Literal.Number.Float */ +.mh { color: #666666 } /* Literal.Number.Hex */ +.mi { color: #666666 } /* Literal.Number.Integer */ +.mo { color: #666666 } /* Literal.Number.Oct */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #BB6688 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/tests/Resources/pygments-2.1/css/default.prefix.css b/tests/Resources/pygments-2.1/css/default.prefix.css new file mode 100644 index 0000000..77b77d2 --- /dev/null +++ b/tests/Resources/pygments-2.1/css/default.prefix.css @@ -0,0 +1,65 @@ +.syntax .hll { background-color: #ffffcc } +.syntax { background: #f8f8f8; } +.syntax .c { color: #408080; font-style: italic } /* Comment */ +.syntax .err { border: 1px solid #FF0000 } /* Error */ +.syntax .k { color: #008000; font-weight: bold } /* Keyword */ +.syntax .o { color: #666666 } /* Operator */ +.syntax .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ +.syntax .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.syntax .cp { color: #BC7A00 } /* Comment.Preproc */ +.syntax .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ +.syntax .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.syntax .cs { color: #408080; font-style: italic } /* Comment.Special */ +.syntax .gd { color: #A00000 } /* Generic.Deleted */ +.syntax .ge { font-style: italic } /* Generic.Emph */ +.syntax .gr { color: #FF0000 } /* Generic.Error */ +.syntax .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.syntax .gi { color: #00A000 } /* Generic.Inserted */ +.syntax .go { color: #888888 } /* Generic.Output */ +.syntax .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.syntax .gs { font-weight: bold } /* Generic.Strong */ +.syntax .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.syntax .gt { color: #0044DD } /* Generic.Traceback */ +.syntax .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.syntax .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.syntax .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.syntax .kp { color: #008000 } /* Keyword.Pseudo */ +.syntax .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.syntax .kt { color: #B00040 } /* Keyword.Type */ +.syntax .m { color: #666666 } /* Literal.Number */ +.syntax .s { color: #BA2121 } /* Literal.String */ +.syntax .na { color: #7D9029 } /* Name.Attribute */ +.syntax .nb { color: #008000 } /* Name.Builtin */ +.syntax .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.syntax .no { color: #880000 } /* Name.Constant */ +.syntax .nd { color: #AA22FF } /* Name.Decorator */ +.syntax .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.syntax .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.syntax .nf { color: #0000FF } /* Name.Function */ +.syntax .nl { color: #A0A000 } /* Name.Label */ +.syntax .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.syntax .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.syntax .nv { color: #19177C } /* Name.Variable */ +.syntax .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.syntax .w { color: #bbbbbb } /* Text.Whitespace */ +.syntax .mb { color: #666666 } /* Literal.Number.Bin */ +.syntax .mf { color: #666666 } /* Literal.Number.Float */ +.syntax .mh { color: #666666 } /* Literal.Number.Hex */ +.syntax .mi { color: #666666 } /* Literal.Number.Integer */ +.syntax .mo { color: #666666 } /* Literal.Number.Oct */ +.syntax .sb { color: #BA2121 } /* Literal.String.Backtick */ +.syntax .sc { color: #BA2121 } /* Literal.String.Char */ +.syntax .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.syntax .s2 { color: #BA2121 } /* Literal.String.Double */ +.syntax .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.syntax .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.syntax .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.syntax .sx { color: #008000 } /* Literal.String.Other */ +.syntax .sr { color: #BB6688 } /* Literal.String.Regex */ +.syntax .s1 { color: #BA2121 } /* Literal.String.Single */ +.syntax .ss { color: #19177C } /* Literal.String.Symbol */ +.syntax .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.syntax .vc { color: #19177C } /* Name.Variable.Class */ +.syntax .vg { color: #19177C } /* Name.Variable.Global */ +.syntax .vi { color: #19177C } /* Name.Variable.Instance */ +.syntax .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/tests/Resources/pygments-2.1/example/php.php.in b/tests/Resources/pygments-2.1/example/php.php.in new file mode 100644 index 0000000..b5d9404 --- /dev/null +++ b/tests/Resources/pygments-2.1/example/php.php.in @@ -0,0 +1,21 @@ +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
+ \ No newline at end of file diff --git a/tests/Resources/pygments-2.1/example/php.php.out b/tests/Resources/pygments-2.1/example/php.php.out new file mode 100644 index 0000000..c5e907f --- /dev/null +++ b/tests/Resources/pygments-2.1/example/php.php.out @@ -0,0 +1,22 @@ +
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
From bb29c0265c517293a59e1d40b5117eba7c2d456b Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 22:06:55 -0600 Subject: [PATCH 25/32] Add parameter for expected guessed lexer output The "guessed" lexer output in Pygments 2.2 differs from the output when manually providing the lexer. As a result, we need to also provide a file demonstrating the expected guessed output. --- tests/PygmentsTest.php | 6 ++--- .../pygments-1.6/example/php.php.guess.out | 22 +++++++++++++++++++ .../pygments-2.0/example/php.php.guess.out | 22 +++++++++++++++++++ .../pygments-2.1/example/php.php.guess.out | 22 +++++++++++++++++++ 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 tests/Resources/pygments-1.6/example/php.php.guess.out create mode 100644 tests/Resources/pygments-2.0/example/php.php.guess.out create mode 100644 tests/Resources/pygments-2.1/example/php.php.guess.out diff --git a/tests/PygmentsTest.php b/tests/PygmentsTest.php index dfd3a94..0bad3f7 100644 --- a/tests/PygmentsTest.php +++ b/tests/PygmentsTest.php @@ -14,11 +14,11 @@ class PygmentsTest extends TestCase /** * @dataProvider provideSamples */ - public function testHighlight($input, $expected, $expectedL, $lexer) + public function testHighlight($input, $expected, $expectedL, $expectedG, $lexer) { $pygments = new Pygments(getenv('PYGMENTIZE_PATH')); - $this->assertEquals($expected, $pygments->highlight($input, null, 'html')); + $this->assertEquals($expectedG, $pygments->highlight($input, null, 'html')); $this->assertEquals($expected, $pygments->highlight($input, $lexer, 'html')); $this->assertEquals($expectedL, $pygments->highlight($input, null, 'html', array('linenos' => 1))); } @@ -72,7 +72,6 @@ public function provideSamples() $finder ->in(__DIR__ . '/Resources/pygments-' . getenv('PYGMENTIZE_VERSION') . '/example') ->name("*.in") - ->notName('*.linenos.out') ->files() ->ignoreVCS(true); @@ -84,6 +83,7 @@ public function provideSamples() $file->getContents(), file_get_contents(str_replace('.in', '.out', $file->getPathname())), file_get_contents(str_replace('.in', '.linenos.out', $file->getPathname())), + file_get_contents(str_replace('.in', '.guess.out', $file->getPathname())), preg_replace('/\..*/', '', $file->getFilename()) ); } diff --git a/tests/Resources/pygments-1.6/example/php.php.guess.out b/tests/Resources/pygments-1.6/example/php.php.guess.out new file mode 100644 index 0000000..c5e907f --- /dev/null +++ b/tests/Resources/pygments-1.6/example/php.php.guess.out @@ -0,0 +1,22 @@ +
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
diff --git a/tests/Resources/pygments-2.0/example/php.php.guess.out b/tests/Resources/pygments-2.0/example/php.php.guess.out new file mode 100644 index 0000000..c5e907f --- /dev/null +++ b/tests/Resources/pygments-2.0/example/php.php.guess.out @@ -0,0 +1,22 @@ +
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
diff --git a/tests/Resources/pygments-2.1/example/php.php.guess.out b/tests/Resources/pygments-2.1/example/php.php.guess.out new file mode 100644 index 0000000..c5e907f --- /dev/null +++ b/tests/Resources/pygments-2.1/example/php.php.guess.out @@ -0,0 +1,22 @@ +
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
From 998766656b2e1d490d40beb5b94447038cfc773d Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 22:08:56 -0600 Subject: [PATCH 26/32] Add test resources for Pygments 2.2 --- tests/Resources/pygments-2.2/css/default.css | 68 ++++++++++++++++++ .../pygments-2.2/css/default.prefix.css | 69 +++++++++++++++++++ .../pygments-2.2/example/php.php.guess.out | 22 ++++++ .../Resources/pygments-2.2/example/php.php.in | 21 ++++++ .../pygments-2.2/example/php.php.linenos.out | 43 ++++++++++++ .../pygments-2.2/example/php.php.out | 22 ++++++ 6 files changed, 245 insertions(+) create mode 100644 tests/Resources/pygments-2.2/css/default.css create mode 100644 tests/Resources/pygments-2.2/css/default.prefix.css create mode 100644 tests/Resources/pygments-2.2/example/php.php.guess.out create mode 100644 tests/Resources/pygments-2.2/example/php.php.in create mode 100644 tests/Resources/pygments-2.2/example/php.php.linenos.out create mode 100644 tests/Resources/pygments-2.2/example/php.php.out diff --git a/tests/Resources/pygments-2.2/css/default.css b/tests/Resources/pygments-2.2/css/default.css new file mode 100644 index 0000000..2a4cfcb --- /dev/null +++ b/tests/Resources/pygments-2.2/css/default.css @@ -0,0 +1,68 @@ +.hll { background-color: #ffffcc } +.c { color: #408080; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.ch { color: #408080; font-style: italic } /* Comment.Hashbang */ +.cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.cp { color: #BC7A00 } /* Comment.Preproc */ +.cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #408080; font-style: italic } /* Comment.Single */ +.cs { color: #408080; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #FF0000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #00A000 } /* Generic.Inserted */ +.go { color: #888888 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0044DD } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #7D9029 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.no { color: #880000 } /* Name.Constant */ +.nd { color: #AA22FF } /* Name.Decorator */ +.ni { color: #999999; font-weight: bold } /* Name.Entity */ +.ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.nf { color: #0000FF } /* Name.Function */ +.nl { color: #A0A000 } /* Name.Label */ +.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mb { color: #666666 } /* Literal.Number.Bin */ +.mf { color: #666666 } /* Literal.Number.Float */ +.mh { color: #666666 } /* Literal.Number.Hex */ +.mi { color: #666666 } /* Literal.Number.Integer */ +.mo { color: #666666 } /* Literal.Number.Oct */ +.sa { color: #BA2121 } /* Literal.String.Affix */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.dl { color: #BA2121 } /* Literal.String.Delimiter */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #BB6688 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.fm { color: #0000FF } /* Name.Function.Magic */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.vm { color: #19177C } /* Name.Variable.Magic */ +.il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/tests/Resources/pygments-2.2/css/default.prefix.css b/tests/Resources/pygments-2.2/css/default.prefix.css new file mode 100644 index 0000000..bfe69e6 --- /dev/null +++ b/tests/Resources/pygments-2.2/css/default.prefix.css @@ -0,0 +1,69 @@ +.syntax .hll { background-color: #ffffcc } +.syntax { background: #f8f8f8; } +.syntax .c { color: #408080; font-style: italic } /* Comment */ +.syntax .err { border: 1px solid #FF0000 } /* Error */ +.syntax .k { color: #008000; font-weight: bold } /* Keyword */ +.syntax .o { color: #666666 } /* Operator */ +.syntax .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ +.syntax .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.syntax .cp { color: #BC7A00 } /* Comment.Preproc */ +.syntax .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ +.syntax .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.syntax .cs { color: #408080; font-style: italic } /* Comment.Special */ +.syntax .gd { color: #A00000 } /* Generic.Deleted */ +.syntax .ge { font-style: italic } /* Generic.Emph */ +.syntax .gr { color: #FF0000 } /* Generic.Error */ +.syntax .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.syntax .gi { color: #00A000 } /* Generic.Inserted */ +.syntax .go { color: #888888 } /* Generic.Output */ +.syntax .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.syntax .gs { font-weight: bold } /* Generic.Strong */ +.syntax .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.syntax .gt { color: #0044DD } /* Generic.Traceback */ +.syntax .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.syntax .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.syntax .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.syntax .kp { color: #008000 } /* Keyword.Pseudo */ +.syntax .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.syntax .kt { color: #B00040 } /* Keyword.Type */ +.syntax .m { color: #666666 } /* Literal.Number */ +.syntax .s { color: #BA2121 } /* Literal.String */ +.syntax .na { color: #7D9029 } /* Name.Attribute */ +.syntax .nb { color: #008000 } /* Name.Builtin */ +.syntax .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.syntax .no { color: #880000 } /* Name.Constant */ +.syntax .nd { color: #AA22FF } /* Name.Decorator */ +.syntax .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.syntax .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.syntax .nf { color: #0000FF } /* Name.Function */ +.syntax .nl { color: #A0A000 } /* Name.Label */ +.syntax .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.syntax .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.syntax .nv { color: #19177C } /* Name.Variable */ +.syntax .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.syntax .w { color: #bbbbbb } /* Text.Whitespace */ +.syntax .mb { color: #666666 } /* Literal.Number.Bin */ +.syntax .mf { color: #666666 } /* Literal.Number.Float */ +.syntax .mh { color: #666666 } /* Literal.Number.Hex */ +.syntax .mi { color: #666666 } /* Literal.Number.Integer */ +.syntax .mo { color: #666666 } /* Literal.Number.Oct */ +.syntax .sa { color: #BA2121 } /* Literal.String.Affix */ +.syntax .sb { color: #BA2121 } /* Literal.String.Backtick */ +.syntax .sc { color: #BA2121 } /* Literal.String.Char */ +.syntax .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.syntax .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.syntax .s2 { color: #BA2121 } /* Literal.String.Double */ +.syntax .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.syntax .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.syntax .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.syntax .sx { color: #008000 } /* Literal.String.Other */ +.syntax .sr { color: #BB6688 } /* Literal.String.Regex */ +.syntax .s1 { color: #BA2121 } /* Literal.String.Single */ +.syntax .ss { color: #19177C } /* Literal.String.Symbol */ +.syntax .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.syntax .fm { color: #0000FF } /* Name.Function.Magic */ +.syntax .vc { color: #19177C } /* Name.Variable.Class */ +.syntax .vg { color: #19177C } /* Name.Variable.Global */ +.syntax .vi { color: #19177C } /* Name.Variable.Instance */ +.syntax .vm { color: #19177C } /* Name.Variable.Magic */ +.syntax .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/tests/Resources/pygments-2.2/example/php.php.guess.out b/tests/Resources/pygments-2.2/example/php.php.guess.out new file mode 100644 index 0000000..aa79e0d --- /dev/null +++ b/tests/Resources/pygments-2.2/example/php.php.guess.out @@ -0,0 +1,22 @@ +
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
diff --git a/tests/Resources/pygments-2.2/example/php.php.in b/tests/Resources/pygments-2.2/example/php.php.in new file mode 100644 index 0000000..b5d9404 --- /dev/null +++ b/tests/Resources/pygments-2.2/example/php.php.in @@ -0,0 +1,21 @@ +
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
+ \ No newline at end of file diff --git a/tests/Resources/pygments-2.2/example/php.php.out b/tests/Resources/pygments-2.2/example/php.php.out new file mode 100644 index 0000000..6509663 --- /dev/null +++ b/tests/Resources/pygments-2.2/example/php.php.out @@ -0,0 +1,22 @@ +
<?php
+
+class Foo
+{
+    const TEST_CONST = 1;
+
+    public static $staticProperty = null;
+
+    public $property = null;
+
+    public static function staticMethod()
+    {
+        return new static();
+    }
+
+    public function method()
+    {
+        return $this;
+    }
+
+}
+
From c9e24134590b2eb129f4791a36f8adfd39aad92a Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 22:11:36 -0600 Subject: [PATCH 27/32] Update README to note updated requirements & installation best practices --- README.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a163f9a..630dd41 100644 --- a/README.md +++ b/README.md @@ -6,26 +6,22 @@ Pygments.php - A Thin Wrapper for the Python Pygments [![Coverage Status](https://coveralls.io/repos/kzykhys/Pygments.php/badge.png)](https://coveralls.io/r/kzykhys/Pygments.php) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/3efddd61-f6e2-4f4a-949d-9ca7230f6e56/mini.png)](https://insight.sensiolabs.com/projects/3efddd61-f6e2-4f4a-949d-9ca7230f6e56) -A PHP wrapper for the [Pygments](http://pygments.org/), the Python syntax highlighter. +A PHP wrapper for [Pygments](http://pygments.org/), the Python syntax highlighter. Requirements ------------ -* PHP5.3+ -* Python 2.4+ -* Pygments (`sudo easy_install Pygments`) +* PHP 5.6+ +* Python 2.7+ +* Pygments 1.6+ (`pip install Pygments`) Installation ------------ -Create or update your composer.json and run `composer update` +Use [Composer](https://getcomposer.org) to require this package: -``` json -{ - "require": { - "kzykhys/pygments": ">=1.0" - } -} +``` +composer require kzykhys/pygments ``` Usage From e2f7d14dc190978c8ed448245fef4d1e4dc61600 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 22:51:31 -0600 Subject: [PATCH 28/32] Update Travis build matrix for testing Pygments with PHP & Python --- .travis.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d369b66..fc960cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,12 @@ language: python sudo: false python: + - 2.6 - 2.7 - - 3.2 + - 3.3 + - 3.4 + - 3.5 + - 3.6 env: global: @@ -22,15 +26,16 @@ env: - PHP_VERSION=5.6 PYGMENTS_VERSION=2.0 - PHP_VERSION=5.6 PYGMENTS_VERSION=2.1 - PHP_VERSION=5.6 PYGMENTS_VERSION=2.2 - - PHP_VERSION=nightly PYGMENTS_VERSION=1.6 - - PHP_VERSION=nightly PYGMENTS_VERSION=2.0 - - PHP_VERSION=nightly PYGMENTS_VERSION=2.1 - - PHP_VERSION=nightly PYGMENTS_VERSION=2.2 matrix: fast_finish: true - allow_failures: - - env: PHP_VERSION=nightly + include: + - python: 3.2 + env: PHP_VERSION=7.1 PYGMENTS_VERSION=1.6 + - python: 3.2 + env: PHP_VERSION=7.0 PYGMENTS_VERSION=1.6 + - python: 3.2 + env: PHP_VERSION=5.6 PYGMENTS_VERSION=1.6 addons: apt: From c96aa118ce4ab76c150f3d292e4b1e5fa95db5be Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 23:11:48 -0600 Subject: [PATCH 29/32] Add table listing supported Python and Pygments versions --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 630dd41..3fdcb7e 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,20 @@ Requirements ------------ * PHP 5.6+ -* Python 2.7+ -* Pygments 1.6+ (`pip install Pygments`) +* Python +* Pygments (`pip install Pygments`) + +Python and Pygments versions supported: + +| Pygments: | 1.6 | 2.0 | 2.1 | 2.2 | +| :--------- | :-: | :-: | :-: | :-: | +| Python 2.6 | ✔ | ✔ | ✔ | - | +| Python 2.7 | ✔ | ✔ | ✔ | ✔ | +| Python 3.2 | ✔ | - | - | - | +| Python 3.3 | ✔ | ✔ | ✔ | ✔ | +| Python 3.4 | ✔ | ✔ | ✔ | ✔ | +| Python 3.5 | ✔ | ✔ | ✔ | ✔ | +| Python 3.6 | ✔ | ✔ | ✔ | ✔ | Installation ------------ From 25e30882e44524e9690cee27c1b9248775026c8a Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 23:43:35 -0600 Subject: [PATCH 30/32] Allow failures for Pygments 2.2 on Python 2.6 --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index fc960cd..d8e43bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,13 @@ matrix: env: PHP_VERSION=7.0 PYGMENTS_VERSION=1.6 - python: 3.2 env: PHP_VERSION=5.6 PYGMENTS_VERSION=1.6 + allow_failures: + - python: 2.6 + env: PHP_VERSION=7.1 PYGMENTS_VERSION=2.2 + - python: 2.6 + env: PHP_VERSION=7.0 PYGMENTS_VERSION=2.2 + - python: 2.6 + env: PHP_VERSION=5.6 PYGMENTS_VERSION=2.2 addons: apt: From 717ec16ca3d68221c91fe7691381655a07c90326 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 23:49:46 -0600 Subject: [PATCH 31/32] Add MIT license file with copyright information --- LICENSE | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ff064c4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +Pygments.php - A Thin Wrapper for the Python Pygments +Copyright (c) 2013-2017 Kazuyuki Hayashi + +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. From 98fa83a73ba6f4b6358417c3bd36504b7349530f Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Sat, 11 Mar 2017 23:54:47 -0600 Subject: [PATCH 32/32] Use short array syntax --- src/Pygments.php | 13 ++++++------- tests/PygmentsTest.php | 18 +++++++++--------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/Pygments.php b/src/Pygments.php index a7bcce8..b2a770a 100644 --- a/src/Pygments.php +++ b/src/Pygments.php @@ -12,7 +12,6 @@ */ class Pygments { - /** * @var string */ @@ -38,7 +37,7 @@ public function __construct($pygmentize = 'pygmentize') * * @return string */ - public function highlight($code, $lexer = null, $formatter = null, $options = array()) + public function highlight($code, $lexer = null, $formatter = null, $options = []) { $builder = $this->createProcessBuilder(); @@ -94,7 +93,7 @@ public function getCss($style = 'default', $selector = null) public function guessLexer($fileName) { $process = $this->createProcessBuilder() - ->setArguments(array('-N', $fileName)) + ->setArguments(['-N', $fileName]) ->getProcess(); return trim($this->getOutput($process)); @@ -108,7 +107,7 @@ public function guessLexer($fileName) public function getLexers() { $process = $this->createProcessBuilder() - ->setArguments(array('-L', 'lexer')) + ->setArguments(['-L', 'lexer']) ->getProcess(); $output = $this->getOutput($process); @@ -124,7 +123,7 @@ public function getLexers() public function getFormatters() { $process = $this->createProcessBuilder() - ->setArguments(array('-L', 'formatter')) + ->setArguments(['-L', 'formatter']) ->getProcess(); $output = $this->getOutput($process); @@ -140,7 +139,7 @@ public function getFormatters() public function getStyles() { $process = $this->createProcessBuilder() - ->setArguments(array('-L', 'style')) + ->setArguments(['-L', 'style']) ->getProcess(); $output = $this->getOutput($process); @@ -178,7 +177,7 @@ protected function getOutput(Process $process) */ protected function parseList($input) { - $list = array(); + $list = []; if (preg_match_all('/^\* (.*?):\r?\n *([^\r\n]*?)$/m', $input, $matches, PREG_SET_ORDER)) { foreach ($matches as $match) { diff --git a/tests/PygmentsTest.php b/tests/PygmentsTest.php index 0bad3f7..a39a82f 100644 --- a/tests/PygmentsTest.php +++ b/tests/PygmentsTest.php @@ -20,7 +20,7 @@ public function testHighlight($input, $expected, $expectedL, $expectedG, $lexer) $this->assertEquals($expectedG, $pygments->highlight($input, null, 'html')); $this->assertEquals($expected, $pygments->highlight($input, $lexer, 'html')); - $this->assertEquals($expectedL, $pygments->highlight($input, null, 'html', array('linenos' => 1))); + $this->assertEquals($expectedL, $pygments->highlight($input, null, 'html', ['linenos' => 1])); } /** @@ -75,17 +75,17 @@ public function provideSamples() ->files() ->ignoreVCS(true); - $samples = array(); + $samples = []; /* @var \Symfony\Component\Finder\SplFileInfo $file */ foreach ($finder as $file) { - $samples[] = array( + $samples[] = [ $file->getContents(), file_get_contents(str_replace('.in', '.out', $file->getPathname())), file_get_contents(str_replace('.in', '.linenos.out', $file->getPathname())), file_get_contents(str_replace('.in', '.guess.out', $file->getPathname())), - preg_replace('/\..*/', '', $file->getFilename()) - ); + preg_replace('/\..*/', '', $file->getFilename()), + ]; } return $samples; @@ -101,15 +101,15 @@ public function provideCss() ->name('*.css') ->notName('*.prefix.css'); - $css = array(); + $css = []; /* @var \Symfony\Component\Finder\SplFileInfo $file */ foreach ($finder as $file) { - $css[] = array( + $css[] = [ $file->getContents(), file_get_contents(str_replace('.css', '.prefix.css', $file->getPathname())), - str_replace('.css', '', $file->getFilename()) - ); + str_replace('.css', '', $file->getFilename()), + ]; } return $css;