Issue #1989230 by ParisLiakos, alexpott: Update to Symfony 2.3.
parent
980604905d
commit
4f01c099fb
|
@ -4,15 +4,15 @@
|
|||
"type": "drupal-core",
|
||||
"license": "GPL-2.0+",
|
||||
"require": {
|
||||
"symfony/class-loader": "2.2.*",
|
||||
"symfony/dependency-injection": "2.2.*",
|
||||
"symfony/event-dispatcher": "2.2.*",
|
||||
"symfony/http-foundation": "2.2.*",
|
||||
"symfony/http-kernel": "2.2.*",
|
||||
"symfony/routing": "2.2.*",
|
||||
"symfony/serializer": "2.2.*",
|
||||
"symfony/validator": "2.2.*",
|
||||
"symfony/yaml": "2.2.*",
|
||||
"symfony/class-loader": "2.3.*",
|
||||
"symfony/dependency-injection": "2.3.*",
|
||||
"symfony/event-dispatcher": "2.3.*",
|
||||
"symfony/http-foundation": "2.3.*",
|
||||
"symfony/http-kernel": "2.3.*",
|
||||
"symfony/routing": "2.3.*",
|
||||
"symfony/serializer": "2.3.*",
|
||||
"symfony/validator": "2.3.*",
|
||||
"symfony/yaml": "2.3.*",
|
||||
"twig/twig": "1.12.*",
|
||||
"doctrine/common": "2.3.*",
|
||||
"guzzle/http": "3.1.*",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"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"
|
||||
],
|
||||
"hash": "8969a2b9cb8e5b12a6649cadfa010bab",
|
||||
"hash": "e2836b171e18ace7a3f758875041815a",
|
||||
"packages": [
|
||||
{
|
||||
"name": "doctrine/common",
|
||||
|
@ -57,9 +57,9 @@
|
|||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Johannes M. Schmitt",
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com",
|
||||
"homepage": "https://github.com/schmittjoh",
|
||||
"homepage": "http://jmsyst.com",
|
||||
"role": "Developer of wrapped JMSSerializerBundle"
|
||||
}
|
||||
],
|
||||
|
@ -325,21 +325,21 @@
|
|||
},
|
||||
{
|
||||
"name": "kriswallsmith/assetic",
|
||||
"version": "v1.1.0-alpha4",
|
||||
"version": "v1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kriswallsmith/assetic.git",
|
||||
"reference": "v1.1.0-alpha4"
|
||||
"reference": "v1.1.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/v1.1.0-alpha4",
|
||||
"reference": "v1.1.0-alpha4",
|
||||
"url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/v1.1.1",
|
||||
"reference": "v1.1.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.1",
|
||||
"symfony/process": ">=2.1.0,<2.3-dev"
|
||||
"symfony/process": ">=2.1,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"cssmin/cssmin": "*",
|
||||
|
@ -349,9 +349,9 @@
|
|||
"leafo/scssphp": "*",
|
||||
"leafo/scssphp-compass": "*",
|
||||
"mrclay/minify": "*",
|
||||
"phpunit/phpunit": "3.7.*",
|
||||
"phpunit/phpunit": ">=3.7,<4.0",
|
||||
"ptachoire/cssembed": "*",
|
||||
"twig/twig": ">=1.6.0,<2.0"
|
||||
"twig/twig": ">=1.6,<2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
|
||||
|
@ -392,20 +392,20 @@
|
|||
"compression",
|
||||
"minification"
|
||||
],
|
||||
"time": "2013-02-24 17:22:20"
|
||||
"time": "2013-06-01 22:13:43"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "1.2.9",
|
||||
"version": "1.2.11",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "1.2.9"
|
||||
"reference": "1.2.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.9",
|
||||
"reference": "1.2.9",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.11",
|
||||
"reference": "1.2.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -414,6 +414,9 @@
|
|||
"phpunit/php-text-template": ">=1.1.1@stable",
|
||||
"phpunit/php-token-stream": ">=1.1.3@stable"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.0.5"
|
||||
|
@ -445,7 +448,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2013-02-26 18:55:56"
|
||||
"time": "2013-05-23 18:23:24"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
|
@ -627,16 +630,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "3.7.19",
|
||||
"version": "3.7.21",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "3.7.19"
|
||||
"reference": "3.7.21"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.19",
|
||||
"reference": "3.7.19",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.21",
|
||||
"reference": "3.7.21",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -650,7 +653,7 @@
|
|||
"phpunit/php-text-template": ">=1.1.1",
|
||||
"phpunit/php-timer": ">=1.0.2,<1.1.0",
|
||||
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
|
||||
"symfony/yaml": ">=2.0.0,<2.3.0"
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pear-pear/pear": "1.9.4"
|
||||
|
@ -697,7 +700,7 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2013-03-25 11:45:06"
|
||||
"time": "2013-05-23 18:54:29"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
|
@ -788,24 +791,24 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony-cmf/routing",
|
||||
"version": "1.1.0-alpha1",
|
||||
"version": "1.1.0-alpha2",
|
||||
"target-dir": "Symfony/Cmf/Component/Routing",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony-cmf/Routing.git",
|
||||
"reference": "1.1.0-alpha1"
|
||||
"reference": "1.1.0-alpha2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/1.1.0-alpha1",
|
||||
"reference": "1.1.0-alpha1",
|
||||
"url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/1.1.0-alpha2",
|
||||
"reference": "1.1.0-alpha2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"psr/log": ">=1.0,<2.0",
|
||||
"symfony/http-kernel": ">=2.2,<2.3-dev",
|
||||
"symfony/routing": ">=2.2,<2.3-dev"
|
||||
"symfony/http-kernel": ">=2.2,<2.4-dev",
|
||||
"symfony/routing": ">=2.2,<2.4-dev"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/http-foundation": "ChainRouter/DynamicRouter have optional support for Request instances, several enhancers require a Request instances, >=2.2,<2.3-dev"
|
||||
|
@ -837,21 +840,21 @@
|
|||
"database",
|
||||
"routing"
|
||||
],
|
||||
"time": "2013-05-07 06:30:59"
|
||||
"time": "2013-05-28 19:50:20"
|
||||
},
|
||||
{
|
||||
"name": "symfony/class-loader",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.1",
|
||||
"target-dir": "Symfony/Component/ClassLoader",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/ClassLoader.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -863,7 +866,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -887,38 +890,95 @@
|
|||
],
|
||||
"description": "Symfony ClassLoader Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-19 08:32:26"
|
||||
"time": "2013-05-24 17:54:44"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v2.2.1",
|
||||
"target-dir": "Symfony/Component/DependencyInjection",
|
||||
"name": "symfony/debug",
|
||||
"version": "v2.3.1",
|
||||
"target-dir": "Symfony/Component/Debug",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/DependencyInjection.git",
|
||||
"reference": "v2.2.1"
|
||||
"url": "https://github.com/symfony/Debug.git",
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Debug/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": ">=2.2,<2.3-dev",
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
"symfony/http-foundation": ">=2.1,<3.0",
|
||||
"symfony/http-kernel": ">=2.1,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"symfony/class-loader": "",
|
||||
"symfony/http-foundation": "",
|
||||
"symfony/http-kernel": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Symfony\\Component\\Debug\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-06-02 11:58:44"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v2.3.1",
|
||||
"target-dir": "Symfony/Component/DependencyInjection",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/DependencyInjection.git",
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": ">=2.2,<3.0",
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "",
|
||||
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -942,21 +1002,21 @@
|
|||
],
|
||||
"description": "Symfony DependencyInjection Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-23 07:49:54"
|
||||
"time": "2013-06-05 09:51:05"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.0",
|
||||
"target-dir": "Symfony/Component/EventDispatcher",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/EventDispatcher.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0-RC1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.3.0-RC1",
|
||||
"reference": "v2.3.0-RC1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -966,13 +1026,13 @@
|
|||
"symfony/dependency-injection": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/dependency-injection": "2.2.*",
|
||||
"symfony/http-kernel": "2.2.*"
|
||||
"symfony/dependency-injection": "",
|
||||
"symfony/http-kernel": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -996,21 +1056,21 @@
|
|||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-02-11 11:26:43"
|
||||
"time": "2013-05-13 14:36:40"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.1",
|
||||
"target-dir": "Symfony/Component/HttpFoundation",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1019,7 +1079,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1046,28 +1106,29 @@
|
|||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-04-06 10:15:43"
|
||||
"time": "2013-05-10 06:00:03"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.0",
|
||||
"target-dir": "Symfony/Component/HttpKernel",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpKernel.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.3.0",
|
||||
"reference": "v2.3.0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"psr/log": ">=1.0,<2.0",
|
||||
"symfony/debug": ">=2.3,<3.0",
|
||||
"symfony/event-dispatcher": ">=2.1,<3.0",
|
||||
"symfony/http-foundation": ">=2.2,<2.3-dev"
|
||||
"symfony/http-foundation": ">=2.2,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/browser-kit": "2.2.*",
|
||||
|
@ -1077,21 +1138,21 @@
|
|||
"symfony/dependency-injection": ">=2.0,<3.0",
|
||||
"symfony/finder": ">=2.0,<3.0",
|
||||
"symfony/process": ">=2.0,<3.0",
|
||||
"symfony/routing": ">=2.2,<2.3-dev",
|
||||
"symfony/stopwatch": ">=2.2,<2.3-dev"
|
||||
"symfony/routing": ">=2.2,<3.0",
|
||||
"symfony/stopwatch": ">=2.2,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/browser-kit": "2.2.*",
|
||||
"symfony/class-loader": "2.2.*",
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/console": "2.2.*",
|
||||
"symfony/dependency-injection": "2.2.*",
|
||||
"symfony/finder": "2.2.*"
|
||||
"symfony/browser-kit": "",
|
||||
"symfony/class-loader": "",
|
||||
"symfony/config": "",
|
||||
"symfony/console": "",
|
||||
"symfony/dependency-injection": "",
|
||||
"symfony/finder": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1115,21 +1176,21 @@
|
|||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-04-06 10:16:33"
|
||||
"time": "2013-06-03 14:13:35"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.1",
|
||||
"target-dir": "Symfony/Component/Process",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Process.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1138,7 +1199,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1162,21 +1223,21 @@
|
|||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-23 07:49:54"
|
||||
"time": "2013-05-06 20:03:44"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.0",
|
||||
"target-dir": "Symfony/Component/Routing",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Routing.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.3.0",
|
||||
"reference": "v2.3.0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1185,18 +1246,18 @@
|
|||
"require-dev": {
|
||||
"doctrine/common": ">=2.2,<3.0",
|
||||
"psr/log": ">=1.0,<2.0",
|
||||
"symfony/config": ">=2.2,<2.3-dev",
|
||||
"symfony/config": ">=2.2,<3.0",
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/common": "~2.2",
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"doctrine/common": "",
|
||||
"symfony/config": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1220,21 +1281,21 @@
|
|||
],
|
||||
"description": "Symfony Routing Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-23 12:03:22"
|
||||
"time": "2013-05-20 08:57:26"
|
||||
},
|
||||
{
|
||||
"name": "symfony/serializer",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.1",
|
||||
"target-dir": "Symfony/Component/Serializer",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Serializer.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Serializer/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Serializer/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1243,7 +1304,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1267,38 +1328,38 @@
|
|||
],
|
||||
"description": "Symfony Serializer Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-06 21:43:23"
|
||||
"time": "2013-05-10 18:12:13"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.0",
|
||||
"target-dir": "Symfony/Component/Translation",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Translation.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0-RC1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Translation/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Translation/zipball/v2.3.0-RC1",
|
||||
"reference": "v2.3.0-RC1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": ">=2.0,<2.3-dev",
|
||||
"symfony/config": ">=2.0,<3.0",
|
||||
"symfony/yaml": ">=2.2,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"symfony/config": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1322,21 +1383,21 @@
|
|||
],
|
||||
"description": "Symfony Translation Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-04-01 08:06:05"
|
||||
"time": "2013-05-13 14:36:40"
|
||||
},
|
||||
{
|
||||
"name": "symfony/validator",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.1",
|
||||
"target-dir": "Symfony/Component/Validator",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Validator.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Validator/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Validator/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1344,22 +1405,22 @@
|
|||
"symfony/translation": ">=2.0,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": ">=2.2,<2.3-dev",
|
||||
"symfony/config": ">=2.2,<3.0",
|
||||
"symfony/http-foundation": ">=2.1,<3.0",
|
||||
"symfony/locale": ">=2.0,<3.0",
|
||||
"symfony/intl": ">=2.3,<3.0",
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/common": "~2.2",
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/http-foundation": "2.2.*",
|
||||
"symfony/locale": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"doctrine/common": "",
|
||||
"symfony/config": "",
|
||||
"symfony/http-foundation": "",
|
||||
"symfony/intl": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1383,21 +1444,21 @@
|
|||
],
|
||||
"description": "Symfony Validator Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-04-01 08:06:05"
|
||||
"time": "2013-06-10 16:23:25"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.2.1",
|
||||
"version": "v2.3.0",
|
||||
"target-dir": "Symfony/Component/Yaml",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Yaml.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0-RC1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.3.0-RC1",
|
||||
"reference": "v2.3.0-RC1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1406,7 +1467,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1430,7 +1491,7 @@
|
|||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2013-03-23 07:49:54"
|
||||
"time": "2013-05-10 18:12:13"
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitc244582ae2d491644d70197d64a9670b::getLoader();
|
||||
return ComposerAutoloaderInitc269e792cec97d4c278bb968546f51b4::getLoader();
|
||||
|
|
|
@ -197,6 +197,7 @@ class ClassLoader
|
|||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
|
||||
if ('\\' == $class[0]) {
|
||||
$class = substr($class, 1);
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ return array(
|
|||
'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/PHPUnit/Framework/Constraint/IsFalse.php',
|
||||
'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/PHPUnit/Framework/Constraint/IsIdentical.php',
|
||||
'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/PHPUnit/Framework/Constraint/IsInstanceOf.php',
|
||||
'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/PHPUnit/Framework/Constraint/IsJson.php',
|
||||
'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/PHPUnit/Framework/Constraint/IsNull.php',
|
||||
'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/PHPUnit/Framework/Constraint/IsTrue.php',
|
||||
'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/PHPUnit/Framework/Constraint/IsType.php',
|
||||
|
|
|
@ -17,6 +17,7 @@ return array(
|
|||
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
|
||||
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
|
||||
'Symfony\\Component\\DependencyInjection\\' => array($vendorDir . '/symfony/dependency-injection'),
|
||||
'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'),
|
||||
'Symfony\\Component\\ClassLoader\\' => array($vendorDir . '/symfony/class-loader'),
|
||||
'Symfony\\Cmf\\Component\\Routing' => array($vendorDir . '/symfony-cmf/routing'),
|
||||
'Psr\\Log\\' => array($vendorDir . '/psr/log'),
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitc244582ae2d491644d70197d64a9670b
|
||||
class ComposerAutoloaderInitc269e792cec97d4c278bb968546f51b4
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -19,9 +19,9 @@ class ComposerAutoloaderInitc244582ae2d491644d70197d64a9670b
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitc244582ae2d491644d70197d64a9670b', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitc269e792cec97d4c278bb968546f51b4', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitc244582ae2d491644d70197d64a9670b', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitc269e792cec97d4c278bb968546f51b4', 'loadClassLoader'));
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname(dirname($vendorDir));
|
||||
|
|
|
@ -54,9 +54,9 @@
|
|||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Johannes M. Schmitt",
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com",
|
||||
"homepage": "https://github.com/schmittjoh",
|
||||
"homepage": "http://jmsyst.com",
|
||||
"role": "Developer of wrapped JMSSerializerBundle"
|
||||
}
|
||||
],
|
||||
|
@ -70,6 +70,114 @@
|
|||
"spl"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "easyrdf/easyrdf",
|
||||
"version": "0.8.0-beta.1",
|
||||
"version_normalized": "0.8.0.0-beta1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/njh/easyrdf.git",
|
||||
"reference": "0.8.0-beta.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://github.com/njh/easyrdf/archive/0.8.0-beta.1.zip",
|
||||
"reference": "0.8.0-beta.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.8"
|
||||
},
|
||||
"replace": {
|
||||
"njh/easyrdf": "self.version"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=3.5.15",
|
||||
"sami/sami": "dev-master",
|
||||
"squizlabs/php_codesniffer": ">=1.4.3"
|
||||
},
|
||||
"time": "2013-01-18 15:54:28",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"EasyRdf_": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicholas Humfrey",
|
||||
"email": "njh@aelius.com",
|
||||
"homepage": "http://www.aelius.com/njh/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.",
|
||||
"homepage": "http://www.easyrdf.org/",
|
||||
"keywords": [
|
||||
"Linked Data",
|
||||
"RDF",
|
||||
"Semantic Web",
|
||||
"Turtle",
|
||||
"rdfa"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/class-loader",
|
||||
"version": "v2.3.1",
|
||||
"version_normalized": "2.3.1.0",
|
||||
"target-dir": "Symfony/Component/ClassLoader",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/ClassLoader.git",
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/finder": ">=2.0,<3.0"
|
||||
},
|
||||
"time": "2013-05-24 17:54:44",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Symfony\\Component\\ClassLoader\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony ClassLoader Component",
|
||||
"homepage": "http://symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.0.0",
|
||||
|
@ -162,29 +270,87 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"target-dir": "Symfony/Component/HttpFoundation",
|
||||
"name": "symfony/debug",
|
||||
"version": "v2.3.1",
|
||||
"version_normalized": "2.3.1.0",
|
||||
"target-dir": "Symfony/Component/Debug",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||
"reference": "v2.2.1"
|
||||
"url": "https://github.com/symfony/Debug.git",
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Debug/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"time": "2013-04-06 10:15:43",
|
||||
"require-dev": {
|
||||
"symfony/http-foundation": ">=2.1,<3.0",
|
||||
"symfony/http-kernel": ">=2.1,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/class-loader": "",
|
||||
"symfony/http-foundation": "",
|
||||
"symfony/http-kernel": ""
|
||||
},
|
||||
"time": "2013-06-02 11:58:44",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Symfony\\Component\\Debug\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "http://symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v2.3.1",
|
||||
"version_normalized": "2.3.1.0",
|
||||
"target-dir": "Symfony/Component/HttpFoundation",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"time": "2013-05-10 06:00:03",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -215,18 +381,18 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.0",
|
||||
"version_normalized": "2.3.0.0",
|
||||
"target-dir": "Symfony/Component/EventDispatcher",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/EventDispatcher.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0-RC1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.3.0-RC1",
|
||||
"reference": "v2.3.0-RC1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -236,14 +402,14 @@
|
|||
"symfony/dependency-injection": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/dependency-injection": "2.2.*",
|
||||
"symfony/http-kernel": "2.2.*"
|
||||
"symfony/dependency-injection": "",
|
||||
"symfony/http-kernel": ""
|
||||
},
|
||||
"time": "2013-02-11 11:26:43",
|
||||
"time": "2013-05-13 14:36:40",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -271,25 +437,26 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.0",
|
||||
"version_normalized": "2.3.0.0",
|
||||
"target-dir": "Symfony/Component/HttpKernel",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpKernel.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.3.0",
|
||||
"reference": "v2.3.0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"psr/log": ">=1.0,<2.0",
|
||||
"symfony/debug": ">=2.3,<3.0",
|
||||
"symfony/event-dispatcher": ">=2.1,<3.0",
|
||||
"symfony/http-foundation": ">=2.2,<2.3-dev"
|
||||
"symfony/http-foundation": ">=2.2,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/browser-kit": "2.2.*",
|
||||
|
@ -299,22 +466,22 @@
|
|||
"symfony/dependency-injection": ">=2.0,<3.0",
|
||||
"symfony/finder": ">=2.0,<3.0",
|
||||
"symfony/process": ">=2.0,<3.0",
|
||||
"symfony/routing": ">=2.2,<2.3-dev",
|
||||
"symfony/stopwatch": ">=2.2,<2.3-dev"
|
||||
"symfony/routing": ">=2.2,<3.0",
|
||||
"symfony/stopwatch": ">=2.2,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/browser-kit": "2.2.*",
|
||||
"symfony/class-loader": "2.2.*",
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/console": "2.2.*",
|
||||
"symfony/dependency-injection": "2.2.*",
|
||||
"symfony/finder": "2.2.*"
|
||||
"symfony/browser-kit": "",
|
||||
"symfony/class-loader": "",
|
||||
"symfony/config": "",
|
||||
"symfony/console": "",
|
||||
"symfony/dependency-injection": "",
|
||||
"symfony/finder": ""
|
||||
},
|
||||
"time": "2013-04-06 10:16:33",
|
||||
"time": "2013-06-03 14:13:35",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -342,18 +509,18 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.0",
|
||||
"version_normalized": "2.3.0.0",
|
||||
"target-dir": "Symfony/Component/Routing",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Routing.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/v2.3.0",
|
||||
"reference": "v2.3.0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -362,19 +529,19 @@
|
|||
"require-dev": {
|
||||
"doctrine/common": ">=2.2,<3.0",
|
||||
"psr/log": ">=1.0,<2.0",
|
||||
"symfony/config": ">=2.2,<2.3-dev",
|
||||
"symfony/config": ">=2.2,<3.0",
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/common": "~2.2",
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"doctrine/common": "",
|
||||
"symfony/config": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"time": "2013-03-23 12:03:22",
|
||||
"time": "2013-05-20 08:57:26",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -401,94 +568,41 @@
|
|||
"homepage": "http://symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "easyrdf/easyrdf",
|
||||
"version": "0.8.0-beta.1",
|
||||
"version_normalized": "0.8.0.0-beta1",
|
||||
"name": "symfony-cmf/routing",
|
||||
"version": "1.1.0-alpha2",
|
||||
"version_normalized": "1.1.0.0-alpha2",
|
||||
"target-dir": "Symfony/Cmf/Component/Routing",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/njh/easyrdf.git",
|
||||
"reference": "0.8.0-beta.1"
|
||||
"url": "https://github.com/symfony-cmf/Routing.git",
|
||||
"reference": "1.1.0-alpha2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://github.com/njh/easyrdf/archive/0.8.0-beta.1.zip",
|
||||
"reference": "0.8.0-beta.1",
|
||||
"url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/1.1.0-alpha2",
|
||||
"reference": "1.1.0-alpha2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.8"
|
||||
"php": ">=5.3.2",
|
||||
"psr/log": ">=1.0,<2.0",
|
||||
"symfony/http-kernel": ">=2.2,<2.4-dev",
|
||||
"symfony/routing": ">=2.2,<2.4-dev"
|
||||
},
|
||||
"replace": {
|
||||
"njh/easyrdf": "self.version"
|
||||
"suggest": {
|
||||
"symfony/http-foundation": "ChainRouter/DynamicRouter have optional support for Request instances, several enhancers require a Request instances, >=2.2,<2.3-dev"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=3.5.15",
|
||||
"sami/sami": "dev-master",
|
||||
"squizlabs/php_codesniffer": ">=1.4.3"
|
||||
},
|
||||
"time": "2013-01-18 15:54:28",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"EasyRdf_": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicholas Humfrey",
|
||||
"email": "njh@aelius.com",
|
||||
"homepage": "http://www.aelius.com/njh/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.",
|
||||
"homepage": "http://www.easyrdf.org/",
|
||||
"keywords": [
|
||||
"Linked Data",
|
||||
"RDF",
|
||||
"Semantic Web",
|
||||
"Turtle",
|
||||
"rdfa"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/class-loader",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"target-dir": "Symfony/Component/ClassLoader",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/ClassLoader.git",
|
||||
"reference": "v2.2.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/finder": ">=2.0,<3.0"
|
||||
},
|
||||
"time": "2013-03-19 08:32:26",
|
||||
"time": "2013-05-28 19:50:20",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Symfony\\Component\\ClassLoader\\": ""
|
||||
"Symfony\\Cmf\\Component\\Routing": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
|
@ -497,49 +611,50 @@
|
|||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "http://symfony.com/contributors"
|
||||
"name": "Symfony CMF Community",
|
||||
"homepage": "https://github.com/symfony-cmf/Routing/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony ClassLoader Component",
|
||||
"homepage": "http://symfony.com"
|
||||
"description": "Extends the Symfony2 routing component for dynamic routes and chaining several routers",
|
||||
"homepage": "http://cmf.symfony.com",
|
||||
"keywords": [
|
||||
"database",
|
||||
"routing"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.1",
|
||||
"version_normalized": "2.3.1.0",
|
||||
"target-dir": "Symfony/Component/DependencyInjection",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/DependencyInjection.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": ">=2.2,<2.3-dev",
|
||||
"symfony/config": ">=2.2,<3.0",
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"symfony/config": "",
|
||||
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"time": "2013-03-23 07:49:54",
|
||||
"time": "2013-06-05 09:51:05",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -567,28 +682,28 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/serializer",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.1",
|
||||
"version_normalized": "2.3.1.0",
|
||||
"target-dir": "Symfony/Component/Serializer",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Serializer.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Serializer/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Serializer/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"time": "2013-03-06 21:43:23",
|
||||
"time": "2013-05-10 18:12:13",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -616,36 +731,36 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.0",
|
||||
"version_normalized": "2.3.0.0",
|
||||
"target-dir": "Symfony/Component/Translation",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Translation.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0-RC1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Translation/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Translation/zipball/v2.3.0-RC1",
|
||||
"reference": "v2.3.0-RC1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": ">=2.0,<2.3-dev",
|
||||
"symfony/config": ">=2.0,<3.0",
|
||||
"symfony/yaml": ">=2.2,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"symfony/config": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"time": "2013-04-01 08:06:05",
|
||||
"time": "2013-05-13 14:36:40",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -673,18 +788,18 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/validator",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.1",
|
||||
"version_normalized": "2.3.1.0",
|
||||
"target-dir": "Symfony/Component/Validator",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Validator.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Validator/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Validator/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -692,23 +807,23 @@
|
|||
"symfony/translation": ">=2.0,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": ">=2.2,<2.3-dev",
|
||||
"symfony/config": ">=2.2,<3.0",
|
||||
"symfony/http-foundation": ">=2.1,<3.0",
|
||||
"symfony/locale": ">=2.0,<3.0",
|
||||
"symfony/intl": ">=2.3,<3.0",
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/common": "~2.2",
|
||||
"symfony/config": "2.2.*",
|
||||
"symfony/http-foundation": "2.2.*",
|
||||
"symfony/locale": "2.2.*",
|
||||
"symfony/yaml": "2.2.*"
|
||||
"doctrine/common": "",
|
||||
"symfony/config": "",
|
||||
"symfony/http-foundation": "",
|
||||
"symfony/intl": "",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"time": "2013-04-01 08:06:05",
|
||||
"time": "2013-06-10 16:23:25",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -939,28 +1054,28 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.1",
|
||||
"version_normalized": "2.3.1.0",
|
||||
"target-dir": "Symfony/Component/Process",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Process.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/v2.3.1",
|
||||
"reference": "v2.3.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"time": "2013-03-23 07:49:54",
|
||||
"time": "2013-05-06 20:03:44",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -988,22 +1103,22 @@
|
|||
},
|
||||
{
|
||||
"name": "kriswallsmith/assetic",
|
||||
"version": "v1.1.0-alpha4",
|
||||
"version_normalized": "1.1.0.0-alpha4",
|
||||
"version": "v1.1.1",
|
||||
"version_normalized": "1.1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kriswallsmith/assetic.git",
|
||||
"reference": "v1.1.0-alpha4"
|
||||
"reference": "v1.1.1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/v1.1.0-alpha4",
|
||||
"reference": "v1.1.0-alpha4",
|
||||
"url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/v1.1.1",
|
||||
"reference": "v1.1.1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.1",
|
||||
"symfony/process": ">=2.1.0,<2.3-dev"
|
||||
"symfony/process": ">=2.1,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"cssmin/cssmin": "*",
|
||||
|
@ -1013,9 +1128,9 @@
|
|||
"leafo/scssphp": "*",
|
||||
"leafo/scssphp-compass": "*",
|
||||
"mrclay/minify": "*",
|
||||
"phpunit/phpunit": "3.7.*",
|
||||
"phpunit/phpunit": ">=3.7,<4.0",
|
||||
"ptachoire/cssembed": "*",
|
||||
"twig/twig": ">=1.6.0,<2.0"
|
||||
"twig/twig": ">=1.6,<2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
|
||||
|
@ -1024,7 +1139,7 @@
|
|||
"ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris",
|
||||
"twig/twig": "Assetic provides the integration with the Twig templating engine"
|
||||
},
|
||||
"time": "2013-02-24 17:22:20",
|
||||
"time": "2013-06-01 22:13:43",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
@ -1061,28 +1176,28 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.2.1",
|
||||
"version_normalized": "2.2.1.0",
|
||||
"version": "v2.3.0",
|
||||
"version_normalized": "2.3.0.0",
|
||||
"target-dir": "Symfony/Component/Yaml",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Yaml.git",
|
||||
"reference": "v2.2.1"
|
||||
"reference": "v2.3.0-RC1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.1",
|
||||
"reference": "v2.2.1",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.3.0-RC1",
|
||||
"reference": "v2.3.0-RC1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"time": "2013-03-23 07:49:54",
|
||||
"time": "2013-05-10 18:12:13",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.2-dev"
|
||||
"dev-master": "2.3-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
|
@ -1347,17 +1462,17 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "1.2.9",
|
||||
"version_normalized": "1.2.9.0",
|
||||
"version": "1.2.11",
|
||||
"version_normalized": "1.2.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "1.2.9"
|
||||
"reference": "1.2.11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.9",
|
||||
"reference": "1.2.9",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/1.2.11",
|
||||
"reference": "1.2.11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1366,11 +1481,14 @@
|
|||
"phpunit/php-text-template": ">=1.1.1@stable",
|
||||
"phpunit/php-token-stream": ">=1.1.3@stable"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.0.5"
|
||||
},
|
||||
"time": "2013-02-26 18:55:56",
|
||||
"time": "2013-05-23 18:23:24",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
@ -1402,17 +1520,17 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "3.7.19",
|
||||
"version_normalized": "3.7.19.0",
|
||||
"version": "3.7.21",
|
||||
"version_normalized": "3.7.21.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "3.7.19"
|
||||
"reference": "3.7.21"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.19",
|
||||
"reference": "3.7.19",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3.7.21",
|
||||
"reference": "3.7.21",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1426,7 +1544,7 @@
|
|||
"phpunit/php-text-template": ">=1.1.1",
|
||||
"phpunit/php-timer": ">=1.0.2,<1.1.0",
|
||||
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
|
||||
"symfony/yaml": ">=2.0.0,<2.3.0"
|
||||
"symfony/yaml": ">=2.0,<3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pear-pear/pear": "1.9.4"
|
||||
|
@ -1437,7 +1555,7 @@
|
|||
"ext-tokenizer": "*",
|
||||
"phpunit/php-invoker": ">=1.1.0,<1.2.0"
|
||||
},
|
||||
"time": "2013-03-25 11:45:06",
|
||||
"time": "2013-05-23 18:54:29",
|
||||
"bin": [
|
||||
"composer/bin/phpunit"
|
||||
],
|
||||
|
@ -1475,60 +1593,5 @@
|
|||
"testing",
|
||||
"xunit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "symfony-cmf/routing",
|
||||
"version": "1.1.0-alpha1",
|
||||
"version_normalized": "1.1.0.0-alpha1",
|
||||
"target-dir": "Symfony/Cmf/Component/Routing",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony-cmf/Routing.git",
|
||||
"reference": "1.1.0-alpha1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony-cmf/Routing/zipball/1.1.0-alpha1",
|
||||
"reference": "1.1.0-alpha1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.2",
|
||||
"psr/log": ">=1.0,<2.0",
|
||||
"symfony/http-kernel": ">=2.2,<2.3-dev",
|
||||
"symfony/routing": ">=2.2,<2.3-dev"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/http-foundation": "ChainRouter/DynamicRouter have optional support for Request instances, several enhancers require a Request instances, >=2.2,<2.3-dev"
|
||||
},
|
||||
"time": "2013-05-07 06:30:59",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Symfony\\Cmf\\Component\\Routing": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Symfony CMF Community",
|
||||
"homepage": "https://github.com/symfony-cmf/Routing/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Extends the Symfony2 routing component for dynamic routes and chaining several routers",
|
||||
"homepage": "http://cmf.symfony.com",
|
||||
"keywords": [
|
||||
"database",
|
||||
"routing"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
1.1.0
|
||||
-----
|
||||
1.1.1 (June 1, 2013)
|
||||
--------------------
|
||||
|
||||
* Fixed cloning of asset collections
|
||||
* Fixed environment var inheritance
|
||||
* Replaced `AssetWriter::getCombinations()` for BC, even though we don't use it
|
||||
* Added support for `@import-once` to Less filters
|
||||
|
||||
1.1.0 (May 15, 2013)
|
||||
--------------------
|
||||
|
||||
* Added LazyAssetManager::getLastModified() for determining "deep" mtime
|
||||
* Added DartFilter
|
||||
* Added EmberPrecompile
|
||||
* Added GssFilter
|
||||
* Added PhpCssEmbedFilter
|
||||
* Added RooleFilter
|
||||
* Added TypeScriptFilter
|
||||
* Added the possibility to configure additional load paths for less and lessphp
|
||||
* Added the UglifyCssFilter
|
||||
* Fixed the handling of directories in the GlobAsset. #256
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "sprockets", "~> 1.0.0"
|
||||
gem "sass"
|
||||
gem "compass"
|
|
@ -79,6 +79,7 @@ The core provides the following filters in the `Assetic\Filter` namespace:
|
|||
* `CssMinFilter`: minifies CSS
|
||||
* `CssRewriteFilter`: fixes relative URLs in CSS assets when moving to a new URL
|
||||
* `DartFilter`: compiles Javascript using dart2js
|
||||
* `EmberPrecompileFilter`: precompiles Handlebars templates into Javascript for use in the Ember.js framework
|
||||
* `GoogleClosure\CompilerApiFilter`: compiles Javascript using the Google Closure Compiler API
|
||||
* `GoogleClosure\CompilerJarFilter`: compiles Javascript using the Google Closure Compiler JAR
|
||||
* `GssFilter`: compliles CSS using the Google Closure Stylesheets Compiler
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
],
|
||||
"require": {
|
||||
"php": ">=5.3.1",
|
||||
"symfony/process": ">=2.1.0,<2.3-dev"
|
||||
"symfony/process": "~2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*",
|
||||
"twig/twig": ">=1.6.0,<2.0",
|
||||
"phpunit/phpunit": "~3.7",
|
||||
"twig/twig": "~1.6",
|
||||
"leafo/lessphp": "*",
|
||||
"leafo/scssphp": "*",
|
||||
"ptachoire/cssembed": "*",
|
||||
|
@ -30,7 +30,6 @@
|
|||
"kamicane/packager": "*",
|
||||
"joliclic/javascript-packer": "*"
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"suggest": {
|
||||
"twig/twig": "Assetic provides the integration with the Twig templating engine",
|
||||
"leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
|
||||
|
@ -60,15 +59,6 @@
|
|||
"autoload": { "classmap": [ "cssmin-v3.0.1.php" ] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"name": "mrclay/minify",
|
||||
"version": "2.1.5",
|
||||
"dist": { "url": "http://minify.googlecode.com/files/minify-2.1.5.zip", "type": "zip" },
|
||||
"autoload": { "classmap": [ "min/lib/" ] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"uglifycss": "*",
|
||||
"coffee-script": "*",
|
||||
"stylus": "*",
|
||||
"ember-precompile": "*",
|
||||
"typescript": "*",
|
||||
"less": "*",
|
||||
"handlebars": "*",
|
||||
"uglify-js": "*"
|
||||
}
|
||||
}
|
|
@ -54,6 +54,12 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
|
|||
$this->values = array();
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
$this->filters = clone $this->filters;
|
||||
$this->clones = new \SplObjectStorage();
|
||||
}
|
||||
|
||||
public function all()
|
||||
{
|
||||
return $this->assets;
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
namespace Assetic\Asset;
|
||||
|
||||
use Assetic\Util\PathUtils;
|
||||
use Assetic\Filter\FilterInterface;
|
||||
use Assetic\Util\VarUtils;
|
||||
|
||||
/**
|
||||
* Represents an asset loaded from a file.
|
||||
|
@ -56,7 +56,7 @@ class FileAsset extends BaseAsset
|
|||
|
||||
public function load(FilterInterface $additionalFilter = null)
|
||||
{
|
||||
$source = PathUtils::resolvePath($this->source, $this->getVars(), $this->getValues());
|
||||
$source = VarUtils::resolve($this->source, $this->getVars(), $this->getValues());
|
||||
|
||||
if (!is_file($source)) {
|
||||
throw new \RuntimeException(sprintf('The source file "%s" does not exist.', $source));
|
||||
|
@ -67,7 +67,7 @@ class FileAsset extends BaseAsset
|
|||
|
||||
public function getLastModified()
|
||||
{
|
||||
$source = PathUtils::resolvePath($this->source, $this->getVars(), $this->getValues());
|
||||
$source = VarUtils::resolve($this->source, $this->getVars(), $this->getValues());
|
||||
|
||||
if (!is_file($source)) {
|
||||
throw new \RuntimeException(sprintf('The source file "%s" does not exist.', $source));
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
namespace Assetic\Asset;
|
||||
|
||||
use Assetic\Util\PathUtils;
|
||||
|
||||
use Assetic\Filter\FilterInterface;
|
||||
use Assetic\Util\VarUtils;
|
||||
|
||||
/**
|
||||
* A collection of assets loaded by glob.
|
||||
|
@ -98,7 +97,7 @@ class GlobAsset extends AssetCollection
|
|||
private function initialize()
|
||||
{
|
||||
foreach ($this->globs as $glob) {
|
||||
$glob = PathUtils::resolvePath($glob, $this->getVars(), $this->getValues());
|
||||
$glob = VarUtils::resolve($glob, $this->getVars(), $this->getValues());
|
||||
|
||||
if (false !== $paths = glob($glob)) {
|
||||
foreach ($paths as $path) {
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
namespace Assetic\Asset;
|
||||
|
||||
use Assetic\Util\PathUtils;
|
||||
|
||||
use Assetic\Filter\FilterInterface;
|
||||
use Assetic\Util\VarUtils;
|
||||
|
||||
/**
|
||||
* Represents an asset loaded via an HTTP request.
|
||||
|
@ -54,13 +53,11 @@ class HttpAsset extends BaseAsset
|
|||
|
||||
public function load(FilterInterface $additionalFilter = null)
|
||||
{
|
||||
if (false === $content = @file_get_contents(PathUtils::resolvePath(
|
||||
$this->sourceUrl, $this->getVars(), $this->getValues()))
|
||||
) {
|
||||
if ($this->ignoreErrors) {
|
||||
return;
|
||||
}
|
||||
$content = @file_get_contents(
|
||||
VarUtils::resolve($this->sourceUrl, $this->getVars(), $this->getValues())
|
||||
);
|
||||
|
||||
if (false === $content && !$this->ignoreErrors) {
|
||||
throw new \RuntimeException(sprintf('Unable to load asset from URL "%s"', $this->sourceUrl));
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ class AssetManager
|
|||
* @param string $name The asset name
|
||||
* @param AssetInterface $asset The asset
|
||||
*
|
||||
* @throws \InvalidArgumentException If tthe asset name is invalid
|
||||
* @throws \InvalidArgumentException If the asset name is invalid
|
||||
*/
|
||||
public function set($name, AssetInterface $asset)
|
||||
{
|
||||
|
@ -78,4 +78,12 @@ class AssetManager
|
|||
{
|
||||
return array_keys($this->assets);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all assets.
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->assets = array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
|
||||
namespace Assetic;
|
||||
|
||||
use Assetic\Util\PathUtils;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Util\VarUtils;
|
||||
|
||||
/**
|
||||
* Writes assets to the filesystem.
|
||||
|
@ -24,20 +23,20 @@ use Assetic\Asset\AssetInterface;
|
|||
class AssetWriter
|
||||
{
|
||||
private $dir;
|
||||
private $varValues;
|
||||
private $values;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $dir The base web directory
|
||||
* @param array $varValues
|
||||
* @param string $dir The base web directory
|
||||
* @param array $values Variable values
|
||||
*
|
||||
* @throws \InvalidArgumentException if a variable value is not a string
|
||||
*/
|
||||
public function __construct($dir, array $varValues = array())
|
||||
public function __construct($dir, array $values = array())
|
||||
{
|
||||
foreach ($varValues as $var => $values) {
|
||||
foreach ($values as $value) {
|
||||
foreach ($values as $var => $vals) {
|
||||
foreach ($vals as $value) {
|
||||
if (!is_string($value)) {
|
||||
throw new \InvalidArgumentException(sprintf('All variable values must be strings, but got %s for variable "%s".', json_encode($value), $var));
|
||||
}
|
||||
|
@ -45,7 +44,7 @@ class AssetWriter
|
|||
}
|
||||
|
||||
$this->dir = $dir;
|
||||
$this->varValues = $varValues;
|
||||
$this->values = $values;
|
||||
}
|
||||
|
||||
public function writeManagerAssets(AssetManager $am)
|
||||
|
@ -57,46 +56,20 @@ class AssetWriter
|
|||
|
||||
public function writeAsset(AssetInterface $asset)
|
||||
{
|
||||
foreach ($this->getCombinations($asset->getVars()) as $combination) {
|
||||
foreach (VarUtils::getCombinations($asset->getVars(), $this->values) as $combination) {
|
||||
$asset->setValues($combination);
|
||||
|
||||
static::write($this->dir.'/'.PathUtils::resolvePath(
|
||||
$asset->getTargetPath(), $asset->getVars(), $asset->getValues()),
|
||||
$asset->dump());
|
||||
static::write(
|
||||
$this->dir.'/'.VarUtils::resolve(
|
||||
$asset->getTargetPath(),
|
||||
$asset->getVars(),
|
||||
$asset->getValues()
|
||||
),
|
||||
$asset->dump()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function getCombinations(array $vars)
|
||||
{
|
||||
if (!$vars) {
|
||||
return array(array());
|
||||
}
|
||||
|
||||
$combinations = array();
|
||||
$nbValues = array();
|
||||
foreach ($this->varValues as $var => $values) {
|
||||
if (!in_array($var, $vars, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$nbValues[$var] = count($values);
|
||||
}
|
||||
|
||||
for ($i=array_product($nbValues),$c=$i*2; $i<$c; $i++) {
|
||||
$k = $i;
|
||||
$combination = array();
|
||||
|
||||
foreach ($vars as $var) {
|
||||
$combination[$var] = $this->varValues[$var][$k % $nbValues[$var]];
|
||||
$k = intval($k/$nbValues[$var]);
|
||||
}
|
||||
|
||||
$combinations[] = $combination;
|
||||
}
|
||||
|
||||
return $combinations;
|
||||
}
|
||||
|
||||
protected static function write($path, $contents)
|
||||
{
|
||||
if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) {
|
||||
|
@ -107,4 +80,15 @@ class AssetWriter
|
|||
throw new \RuntimeException('Unable to write file '.$path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Not used.
|
||||
*
|
||||
* This method is provided for backward compatibility with certain versions
|
||||
* of AsseticBundle.
|
||||
*/
|
||||
private function getCombinations(array $vars)
|
||||
{
|
||||
return VarUtils::getCombinations($vars, $this->values);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
namespace Assetic\Extension\Twig;
|
||||
|
||||
use Assetic\ValueSupplierInterface;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
use Assetic\ValueSupplierInterface;
|
||||
|
||||
class AsseticExtension extends \Twig_Extension
|
||||
{
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
|
||||
namespace Assetic\Factory;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\AssetManager;
|
||||
use Assetic\Factory\Loader\FormulaLoaderInterface;
|
||||
use Assetic\Factory\Resource\ResourceInterface;
|
||||
use Assetic\Filter\DependencyExtractorInterface;
|
||||
|
||||
/**
|
||||
* A lazy asset manager is a composition of a factory and many formula loaders.
|
||||
|
@ -201,4 +203,40 @@ class LazyAssetManager extends AssetManager
|
|||
{
|
||||
return $this->factory->isDebug();
|
||||
}
|
||||
|
||||
public function getLastModified(AssetInterface $asset)
|
||||
{
|
||||
$mtime = $asset->getLastModified();
|
||||
if (!$filters = $asset->getFilters()) {
|
||||
return $mtime;
|
||||
}
|
||||
|
||||
// prepare load path
|
||||
$sourceRoot = $asset->getSourceRoot();
|
||||
$sourcePath = $asset->getSourcePath();
|
||||
$loadPath = $sourceRoot && $sourcePath ? dirname($sourceRoot.'/'.$sourcePath) : null;
|
||||
|
||||
$prevFilters = array();
|
||||
foreach ($filters as $filter) {
|
||||
$prevFilters[] = $filter;
|
||||
|
||||
if (!$filter instanceof DependencyExtractorInterface) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// extract children from asset after running all preceeding filters
|
||||
$clone = clone $asset;
|
||||
$clone->clearFilters();
|
||||
foreach (array_slice($prevFilters, 0, -1) as $prevFilter) {
|
||||
$clone->ensureFilter($prevFilter);
|
||||
}
|
||||
$clone->load();
|
||||
|
||||
foreach ($filter->getChildren($this->factory, $clone->getContent(), $loadPath) as $child) {
|
||||
$mtime = max($mtime, $this->getLastModified($child));
|
||||
}
|
||||
}
|
||||
|
||||
return $mtime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
|
||||
namespace Assetic\Factory\Worker;
|
||||
|
||||
use Assetic\Asset\AssetCollectionInterface;
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Factory\LazyAssetManager;
|
||||
|
||||
/**
|
||||
* Adds cache busting code
|
||||
|
@ -20,59 +22,51 @@ use Assetic\Asset\AssetInterface;
|
|||
*/
|
||||
class CacheBustingWorker implements WorkerInterface
|
||||
{
|
||||
const STRATEGY_CONTENT = 1;
|
||||
const STRATEGY_MODIFICATION = 2;
|
||||
protected $am;
|
||||
private $separator;
|
||||
|
||||
private $strategy;
|
||||
|
||||
public function __construct($strategy = self::STRATEGY_CONTENT)
|
||||
public function __construct(LazyAssetManager $am, $separator = '-')
|
||||
{
|
||||
$this->strategy = $strategy;
|
||||
$this->am = $am;
|
||||
$this->separator = $separator;
|
||||
}
|
||||
|
||||
public function process(AssetInterface $asset)
|
||||
{
|
||||
$hash = hash_init('sha1');
|
||||
|
||||
switch($this->strategy) {
|
||||
case self::STRATEGY_MODIFICATION:
|
||||
hash_update($hash, $asset->getLastModified());
|
||||
break;
|
||||
case self::STRATEGY_CONTENT:
|
||||
hash_update($hash, $asset->dump());
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($asset as $i => $leaf) {
|
||||
if ($sourcePath = $leaf->getSourcePath()) {
|
||||
hash_update($hash, $sourcePath);
|
||||
} else {
|
||||
hash_update($hash, $i);
|
||||
}
|
||||
}
|
||||
|
||||
$hash = substr(hash_final($hash), 0, 7);
|
||||
$url = $asset->getTargetPath();
|
||||
|
||||
$oldExt = pathinfo($url, PATHINFO_EXTENSION);
|
||||
$newExt = '-'.$hash.'.'.$oldExt;
|
||||
|
||||
if (!$oldExt || 0 < preg_match('/'.preg_quote($newExt, '/').'$/', $url)) {
|
||||
if (!$path = $asset->getTargetPath()) {
|
||||
// no path to work with
|
||||
return;
|
||||
}
|
||||
|
||||
$asset->setTargetPath(substr($url, 0, (strlen($oldExt) + 1) * -1).$newExt);
|
||||
if (!$search = pathinfo($path, PATHINFO_EXTENSION)) {
|
||||
// nothing to replace
|
||||
return;
|
||||
}
|
||||
|
||||
$replace = $this->separator.$this->getHash($asset).'.'.$search;
|
||||
if (preg_match('/'.preg_quote($replace, '/').'$/', $path)) {
|
||||
// already replaced
|
||||
return;
|
||||
}
|
||||
|
||||
$asset->setTargetPath(
|
||||
preg_replace('/\.'.preg_quote($search, '/').'$/', $replace, $path)
|
||||
);
|
||||
}
|
||||
|
||||
public function getStrategy()
|
||||
protected function getHash(AssetInterface $asset)
|
||||
{
|
||||
return $this->strategy;
|
||||
}
|
||||
$hash = hash_init('sha1');
|
||||
|
||||
public function setStrategy($strategy)
|
||||
{
|
||||
$this->strategy = $strategy;
|
||||
hash_update($hash, $this->am->getLastModified($asset));
|
||||
|
||||
return $this;
|
||||
if ($asset instanceof AssetCollectionInterface) {
|
||||
foreach ($asset as $i => $leaf) {
|
||||
$sourcePath = $leaf->getSourcePath();
|
||||
hash_update($hash, $sourcePath ?: $i);
|
||||
}
|
||||
}
|
||||
|
||||
return substr(hash_final($hash), 0, 7);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Util\CssUtils;
|
||||
|
||||
/**
|
||||
* An abstract filter for dealing with CSS.
|
||||
*
|
||||
|
@ -19,71 +21,34 @@ namespace Assetic\Filter;
|
|||
abstract class BaseCssFilter implements FilterInterface
|
||||
{
|
||||
/**
|
||||
* Filters all references -- url() and "@import" -- through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit
|
||||
* @param integer $count
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
* @see CssUtils::filterReferences()
|
||||
*/
|
||||
protected function filterReferences($content, $callback, $limit = -1, &$count = 0)
|
||||
{
|
||||
$content = $this->filterUrls($content, $callback, $limit, $count);
|
||||
$content = $this->filterImports($content, $callback, $limit, $count, false);
|
||||
$content = $this->filterIEFilters($content, $callback, $limit, $count);
|
||||
|
||||
return $content;
|
||||
return CssUtils::filterReferences($content, $callback, $limit, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters all CSS url()'s through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit Limit the number of replacements
|
||||
* @param integer $count Will be populated with the count
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
* @see CssUtils::filterUrls()
|
||||
*/
|
||||
protected function filterUrls($content, $callback, $limit = -1, &$count = 0)
|
||||
{
|
||||
return preg_replace_callback('/url\((["\']?)(?P<url>.*?)(\\1)\)/', $callback, $content, $limit, $count);
|
||||
return CssUtils::filterUrls($content, $callback, $limit, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters all CSS imports through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit Limit the number of replacements
|
||||
* @param integer $count Will be populated with the count
|
||||
* @param Boolean $includeUrl Whether to include url() in the pattern
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
* @see CssUtils::filterImports()
|
||||
*/
|
||||
protected function filterImports($content, $callback, $limit = -1, &$count = 0, $includeUrl = true)
|
||||
{
|
||||
$pattern = $includeUrl
|
||||
? '/@import (?:url\()?(\'|"|)(?P<url>[^\'"\)\n\r]*)\1\)?;?/'
|
||||
: '/@import (?!url\()(\'|"|)(?P<url>[^\'"\)\n\r]*)\1;?/';
|
||||
|
||||
return preg_replace_callback($pattern, $callback, $content, $limit, $count);
|
||||
return CssUtils::filterImports($content, $callback, $limit, $count, $includeUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters all IE filters (AlphaImageLoader filter) through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit Limit the number of replacements
|
||||
* @param integer $count Will be populated with the count
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
* @see CssUtils::filterIEFilters()
|
||||
*/
|
||||
protected function filterIEFilters($content, $callback, $limit = -1, &$count = 0)
|
||||
{
|
||||
return preg_replace_callback('/src=(["\']?)(?P<url>.*?)\\1/', $callback, $content, $limit, $count);
|
||||
return CssUtils::filterIEFilters($content, $callback, $limit, $count);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ abstract class BaseNodeFilter extends BaseProcessFilter
|
|||
|
||||
if ($this->nodePaths) {
|
||||
$pb->setEnv('NODE_PATH', implode(':', $this->nodePaths));
|
||||
$this->mergeEnv($pb);
|
||||
}
|
||||
|
||||
return $pb;
|
||||
|
|
|
@ -48,4 +48,11 @@ abstract class BaseProcessFilter implements FilterInterface
|
|||
|
||||
return $pb;
|
||||
}
|
||||
|
||||
protected function mergeEnv(ProcessBuilder $pb)
|
||||
{
|
||||
foreach (array_filter($_SERVER, 'is_scalar') as $key => $value) {
|
||||
$pb->setEnv($key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
|
||||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* Loads Compass files.
|
||||
|
@ -20,7 +21,7 @@ use Assetic\Asset\AssetInterface;
|
|||
* @link http://compass-style.org/
|
||||
* @author Maxime Thirouin <maxime.thirouin@gmail.com>
|
||||
*/
|
||||
class CompassFilter extends BaseProcessFilter
|
||||
class CompassFilter extends BaseProcessFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $compassPath;
|
||||
private $rubyPath;
|
||||
|
@ -210,7 +211,6 @@ class CompassFilter extends BaseProcessFilter
|
|||
}
|
||||
|
||||
$pb = $this->createProcessBuilder($compassProcessArgs);
|
||||
$pb->inheritEnvironmentVariables();
|
||||
|
||||
if ($this->force) {
|
||||
$pb->add('--force');
|
||||
|
@ -345,6 +345,7 @@ class CompassFilter extends BaseProcessFilter
|
|||
if ($this->homeEnv) {
|
||||
// it's not really usefull but... https://github.com/chriseppstein/compass/issues/376
|
||||
$pb->setEnv('HOME', sys_get_temp_dir());
|
||||
$this->mergeEnv($pb);
|
||||
}
|
||||
|
||||
$proc = $pb->getProcess();
|
||||
|
@ -372,6 +373,12 @@ class CompassFilter extends BaseProcessFilter
|
|||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
|
||||
private function formatArrayToRuby($array)
|
||||
{
|
||||
$output = array();
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace Assetic\Filter;
|
|||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* CSSEmbed filter
|
||||
|
@ -20,7 +21,7 @@ use Assetic\Exception\FilterException;
|
|||
* @link https://github.com/nzakas/cssembed
|
||||
* @author Maxime Thirouin <maxime.thirouin@gmail.com>
|
||||
*/
|
||||
class CssEmbedFilter extends BaseProcessFilter
|
||||
class CssEmbedFilter extends BaseProcessFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $jarPath;
|
||||
private $javaPath;
|
||||
|
@ -135,4 +136,10 @@ class CssEmbedFilter extends BaseProcessFilter
|
|||
|
||||
$asset->setContent($proc->getOutput());
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,13 +14,14 @@ namespace Assetic\Filter;
|
|||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Asset\FileAsset;
|
||||
use Assetic\Asset\HttpAsset;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* Inlines imported stylesheets.
|
||||
*
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
class CssImportFilter extends BaseCssFilter
|
||||
class CssImportFilter extends BaseCssFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $importFilter;
|
||||
|
||||
|
@ -103,4 +104,10 @@ class CssImportFilter extends BaseCssFilter
|
|||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
34
core/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php
vendored
Normal file
34
core/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Assetic package, an OpenSky project.
|
||||
*
|
||||
* (c) 2010-2013 OpenSky Project Inc
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* A filter that knows how to extract dependencies.
|
||||
*
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
interface DependencyExtractorInterface extends FilterInterface
|
||||
{
|
||||
/**
|
||||
* Returns child assets.
|
||||
*
|
||||
* @param AssetFactory $factory The asset factory
|
||||
* @param string $content The asset content
|
||||
* @param string $loadPath An optional load path
|
||||
*
|
||||
* @return AssetInterface[] Child assets
|
||||
*/
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null);
|
||||
}
|
83
core/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php
vendored
Normal file
83
core/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Assetic package, an OpenSky project.
|
||||
*
|
||||
* (c) 2010-2013 OpenSky Project Inc
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
|
||||
/**
|
||||
* Precompiles Handlebars templates for use in the Ember.js framework. This filter
|
||||
* requires that the npm package ember-precompile be installed. You can find this
|
||||
* package at https://github.com/gabrielgrant/node-ember-precompile.
|
||||
*
|
||||
* @link http://www.emberjs.com/
|
||||
* @author Jarrod Nettles <jarrod.nettles@icloud.com>
|
||||
*/
|
||||
class EmberPrecompileFilter extends BaseNodeFilter
|
||||
{
|
||||
private $emberBin;
|
||||
private $nodeBin;
|
||||
|
||||
public function __construct($handlebarsBin = '/usr/bin/ember-precompile', $nodeBin = null)
|
||||
{
|
||||
$this->emberBin = $handlebarsBin;
|
||||
$this->nodeBin = $nodeBin;
|
||||
}
|
||||
|
||||
public function filterLoad(AssetInterface $asset)
|
||||
{
|
||||
$pb = $this->createProcessBuilder($this->nodeBin
|
||||
? array($this->nodeBin, $this->emberBin)
|
||||
: array($this->emberBin));
|
||||
|
||||
$templateName = basename($asset->getSourcePath());
|
||||
|
||||
$inputDirPath = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('input_dir');
|
||||
$inputPath = $inputDirPath.DIRECTORY_SEPARATOR.$templateName;
|
||||
$outputPath = tempnam(sys_get_temp_dir(), 'output');
|
||||
|
||||
mkdir($inputDirPath);
|
||||
file_put_contents($inputPath, $asset->getContent());
|
||||
|
||||
$pb->add($inputPath)->add('-f')->add($outputPath);
|
||||
|
||||
$process = $pb->getProcess();
|
||||
$returnCode = $process->run();
|
||||
|
||||
unlink($inputPath);
|
||||
rmdir($inputDirPath);
|
||||
|
||||
if (127 === $returnCode) {
|
||||
throw new \RuntimeException('Path to node executable could not be resolved.');
|
||||
}
|
||||
|
||||
if (0 !== $returnCode) {
|
||||
if (file_exists($outputPath)) {
|
||||
unlink($outputPath);
|
||||
}
|
||||
throw FilterException::fromProcess($process)->setInput($asset->getContent());
|
||||
}
|
||||
|
||||
if (!file_exists($outputPath)) {
|
||||
throw new \RuntimeException('Error creating output file.');
|
||||
}
|
||||
|
||||
$compiledJs = file_get_contents($outputPath);
|
||||
unlink($outputPath);
|
||||
|
||||
$asset->setContent($compiledJs);
|
||||
}
|
||||
|
||||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
}
|
|
@ -101,7 +101,7 @@ class CompilerApiFilter extends BaseCompilerFilter
|
|||
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
||||
if (null !== $this->timeout) {
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
|
||||
}
|
||||
if ($this->proxy) {
|
||||
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
|
||||
|
|
|
@ -13,6 +13,8 @@ namespace Assetic\Filter;
|
|||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
use Assetic\Util\LessUtils;
|
||||
|
||||
/**
|
||||
* Loads LESS files.
|
||||
|
@ -20,10 +22,19 @@ use Assetic\Exception\FilterException;
|
|||
* @link http://lesscss.org/
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
class LessFilter extends BaseNodeFilter
|
||||
class LessFilter extends BaseNodeFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $nodeBin;
|
||||
private $compress;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $treeOptions;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $parserOptions;
|
||||
|
||||
/**
|
||||
* Load Paths
|
||||
|
@ -44,11 +55,21 @@ class LessFilter extends BaseNodeFilter
|
|||
{
|
||||
$this->nodeBin = $nodeBin;
|
||||
$this->setNodePaths($nodePaths);
|
||||
$this->treeOptions = array();
|
||||
$this->parserOptions = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $compress
|
||||
*/
|
||||
public function setCompress($compress)
|
||||
{
|
||||
$this->compress = $compress;
|
||||
$this->addTreeOption('compress', $compress);
|
||||
}
|
||||
|
||||
public function setLoadPaths(array $loadPaths)
|
||||
{
|
||||
$this->loadPaths = $loadPaths;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,6 +82,24 @@ class LessFilter extends BaseNodeFilter
|
|||
$this->loadPaths[] = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
* @param string $value
|
||||
*/
|
||||
public function addTreeOption($code, $value)
|
||||
{
|
||||
$this->treeOptions[$code] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
* @param string $value
|
||||
*/
|
||||
public function addParserOption($code, $value)
|
||||
{
|
||||
$this->parserOptions[$code] = $value;
|
||||
}
|
||||
|
||||
public function filterLoad(AssetInterface $asset)
|
||||
{
|
||||
static $format = <<<'EOF'
|
||||
|
@ -87,29 +126,23 @@ EOF;
|
|||
$path = $asset->getSourcePath();
|
||||
|
||||
// parser options
|
||||
$parserOptions = array();
|
||||
$parserOptions = $this->parserOptions;
|
||||
if ($root && $path) {
|
||||
$parserOptions['paths'] = array(dirname($root.'/'.$path));
|
||||
$parserOptions['filename'] = basename($path);
|
||||
}
|
||||
|
||||
foreach ($this->loadPaths as $loadPath) {
|
||||
$parserOptions['paths'][] = $loadPath;
|
||||
}
|
||||
|
||||
// tree options
|
||||
$treeOptions = array();
|
||||
if (null !== $this->compress) {
|
||||
$treeOptions['compress'] = $this->compress;
|
||||
}
|
||||
|
||||
$pb = $this->createProcessBuilder();
|
||||
$pb->inheritEnvironmentVariables();
|
||||
|
||||
$pb->add($this->nodeBin)->add($input = tempnam(sys_get_temp_dir(), 'assetic_less'));
|
||||
file_put_contents($input, sprintf($format,
|
||||
json_encode($parserOptions),
|
||||
json_encode($asset->getContent()),
|
||||
json_encode($treeOptions)
|
||||
json_encode($this->treeOptions)
|
||||
));
|
||||
|
||||
$proc = $pb->getProcess();
|
||||
|
@ -126,4 +159,48 @@ EOF;
|
|||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo support for @import-once
|
||||
* @todo support for @import (less) "lib.css"
|
||||
*/
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
$loadPaths = $this->loadPaths;
|
||||
if (null !== $loadPath) {
|
||||
$loadPaths[] = $loadPath;
|
||||
}
|
||||
|
||||
if (empty($loadPaths)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$children = array();
|
||||
foreach (LessUtils::extractImports($content) as $reference) {
|
||||
if ('.css' === substr($reference, -4)) {
|
||||
// skip normal css imports
|
||||
// todo: skip imports with media queries
|
||||
continue;
|
||||
}
|
||||
|
||||
if ('.less' !== substr($reference, -5)) {
|
||||
$reference .= '.less';
|
||||
}
|
||||
|
||||
foreach ($loadPaths as $loadPath) {
|
||||
if (file_exists($file = $loadPath.'/'.$reference)) {
|
||||
$coll = $factory->createAsset($file, array(), array('root' => $loadPath));
|
||||
foreach ($coll as $leaf) {
|
||||
$leaf->ensureFilter($this);
|
||||
$children[] = $leaf;
|
||||
goto next_reference;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
next_reference:
|
||||
}
|
||||
|
||||
return $children;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
use Assetic\Util\LessUtils;
|
||||
|
||||
/**
|
||||
* Loads LESS files using the PHP implementation of less, lessphp.
|
||||
|
@ -23,7 +25,7 @@ use Assetic\Asset\AssetInterface;
|
|||
* @author David Buchmann <david@liip.ch>
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
class LessphpFilter implements FilterInterface
|
||||
class LessphpFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $presets = array();
|
||||
private $formatter;
|
||||
|
@ -46,6 +48,16 @@ class LessphpFilter implements FilterInterface
|
|||
$this->loadPaths[] = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets load paths used by lessphp
|
||||
*
|
||||
* @param array $loadPaths Load paths
|
||||
*/
|
||||
public function setLoadPaths(array $loadPaths)
|
||||
{
|
||||
$this->loadPaths = $loadPaths;
|
||||
}
|
||||
|
||||
public function setPresets(array $presets)
|
||||
{
|
||||
$this->presets = $presets;
|
||||
|
@ -95,4 +107,44 @@ class LessphpFilter implements FilterInterface
|
|||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
$loadPaths = $this->loadPaths;
|
||||
if (null !== $loadPath) {
|
||||
$loadPaths[] = $loadPath;
|
||||
}
|
||||
|
||||
if (empty($loadPaths)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$children = array();
|
||||
foreach (LessUtils::extractImports($content) as $reference) {
|
||||
if ('.css' === substr($reference, -4)) {
|
||||
// skip normal css imports
|
||||
// todo: skip imports with media queries
|
||||
continue;
|
||||
}
|
||||
|
||||
if ('.less' !== substr($reference, -5)) {
|
||||
$reference .= '.less';
|
||||
}
|
||||
|
||||
foreach ($loadPaths as $loadPath) {
|
||||
if (file_exists($file = $loadPath.'/'.$reference)) {
|
||||
$coll = $factory->createAsset($file, array(), array('root' => $loadPath));
|
||||
foreach ($coll as $leaf) {
|
||||
$leaf->ensureFilter($this);
|
||||
$children[] = $leaf;
|
||||
goto next_reference;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
next_reference:
|
||||
}
|
||||
|
||||
return $children;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
use CssEmbed\CssEmbed;
|
||||
|
||||
/**
|
||||
|
@ -20,7 +21,7 @@ use CssEmbed\CssEmbed;
|
|||
* @author Pierre Tachoire <pierre.tachoire@gmail.com>
|
||||
* @link https://github.com/krichprollsch/phpCssEmbed
|
||||
*/
|
||||
class PhpCssEmbedFilter implements FilterInterface
|
||||
class PhpCssEmbedFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $presets = array();
|
||||
|
||||
|
@ -45,4 +46,10 @@ class PhpCssEmbedFilter implements FilterInterface
|
|||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Assetic package, an OpenSky project.
|
||||
*
|
||||
* (c) 2010-2013 OpenSky Project Inc
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* Loads Roole files.
|
||||
*
|
||||
* @link http://roole.org
|
||||
* @author Marcin Chwedziak <tiraeth@gmail.com>
|
||||
*/
|
||||
class RooleFilter extends BaseNodeFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $rooleBin;
|
||||
private $nodeBin;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $rooleBin The path to the roole binary
|
||||
* @param string $nodeBin The path to the node binary
|
||||
*/
|
||||
public function __construct($rooleBin = '/usr/bin/roole', $nodeBin = null)
|
||||
{
|
||||
$this->rooleBin = $rooleBin;
|
||||
$this->nodeBin = $nodeBin;
|
||||
}
|
||||
|
||||
public function filterLoad(AssetInterface $asset)
|
||||
{
|
||||
$input = tempnam(sys_get_temp_dir(), 'assetic_roole');
|
||||
file_put_contents($input, $asset->getContent());
|
||||
|
||||
$pb = $this->createProcessBuilder($this->nodeBin
|
||||
? array($this->nodeBin, $this->rooleBin)
|
||||
: array($this->rooleBin));
|
||||
|
||||
$pb->add('-p');
|
||||
|
||||
$pb->add($input);
|
||||
$proc = $pb->getProcess();
|
||||
$code = $proc->run();
|
||||
unlink($input);
|
||||
|
||||
if (0 !== $code) {
|
||||
throw FilterException::fromProcess($proc)->setInput($asset->getContent());
|
||||
}
|
||||
|
||||
$asset->setContent($proc->getOutput());
|
||||
}
|
||||
|
||||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
}
|
|
@ -13,7 +13,10 @@ namespace Assetic\Filter\Sass;
|
|||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
use Assetic\Filter\BaseProcessFilter;
|
||||
use Assetic\Filter\DependencyExtractorInterface;
|
||||
use Assetic\Util\CssUtils;
|
||||
|
||||
/**
|
||||
* Loads SASS files.
|
||||
|
@ -21,7 +24,7 @@ use Assetic\Filter\BaseProcessFilter;
|
|||
* @link http://sass-lang.com/
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
class SassFilter extends BaseProcessFilter
|
||||
class SassFilter extends BaseProcessFilter implements DependencyExtractorInterface
|
||||
{
|
||||
const STYLE_NESTED = 'nested';
|
||||
const STYLE_EXPANDED = 'expanded';
|
||||
|
@ -78,6 +81,11 @@ class SassFilter extends BaseProcessFilter
|
|||
$this->lineNumbers = $lineNumbers;
|
||||
}
|
||||
|
||||
public function setLoadPaths(array $loadPaths)
|
||||
{
|
||||
$this->loadPaths = $loadPaths;
|
||||
}
|
||||
|
||||
public function addLoadPath($loadPath)
|
||||
{
|
||||
$this->loadPaths[] = $loadPath;
|
||||
|
@ -172,4 +180,57 @@ class SassFilter extends BaseProcessFilter
|
|||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
$loadPaths = $this->loadPaths;
|
||||
if ($loadPath) {
|
||||
array_unshift($loadPaths, $loadPath);
|
||||
}
|
||||
|
||||
if (!$loadPaths) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$children = array();
|
||||
foreach (CssUtils::extractImports($content) as $reference) {
|
||||
if ('.css' === substr($reference, -4)) {
|
||||
// skip normal css imports
|
||||
// todo: skip imports with media queries
|
||||
continue;
|
||||
}
|
||||
|
||||
// the reference may or may not have an extension or be a partial
|
||||
if (pathinfo($reference, PATHINFO_EXTENSION)) {
|
||||
$needles = array(
|
||||
$reference,
|
||||
'_'.$reference,
|
||||
);
|
||||
} else {
|
||||
$needles = array(
|
||||
$reference.'.scss',
|
||||
$reference.'.sass',
|
||||
'_'.$reference.'.scss',
|
||||
'_'.$reference.'.sass',
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($loadPaths as $loadPath) {
|
||||
foreach ($needles as $needle) {
|
||||
if (file_exists($file = $loadPath.'/'.$needle)) {
|
||||
$coll = $factory->createAsset($file, array(), array('root' => $loadPath));
|
||||
foreach ($coll as $leaf) {
|
||||
$leaf->ensureFilter($this);
|
||||
$children[] = $leaf;
|
||||
goto next_reference;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
next_reference:
|
||||
}
|
||||
|
||||
return $children;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
namespace Assetic\Filter;
|
||||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* Loads SCSS files using the PHP implementation of scss, scssphp.
|
||||
|
@ -22,7 +23,7 @@ use Assetic\Asset\AssetInterface;
|
|||
*
|
||||
* @author Bart van den Burg <bart@samson-it.nl>
|
||||
*/
|
||||
class ScssphpFilter implements FilterInterface
|
||||
class ScssphpFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $compass = false;
|
||||
|
||||
|
@ -70,4 +71,10 @@ class ScssphpFilter implements FilterInterface
|
|||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace Assetic\Filter;
|
|||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* Runs assets through Sprockets.
|
||||
|
@ -24,7 +25,7 @@ use Assetic\Exception\FilterException;
|
|||
*
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
class SprocketsFilter extends BaseProcessFilter
|
||||
class SprocketsFilter extends BaseProcessFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $sprocketsLib;
|
||||
private $rubyBin;
|
||||
|
@ -122,6 +123,12 @@ EOF;
|
|||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
|
||||
private function getHack(AssetInterface $asset)
|
||||
{
|
||||
static $format = <<<'EOF'
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace Assetic\Filter;
|
|||
|
||||
use Assetic\Asset\AssetInterface;
|
||||
use Assetic\Exception\FilterException;
|
||||
use Assetic\Factory\AssetFactory;
|
||||
|
||||
/**
|
||||
* Loads STYL files.
|
||||
|
@ -20,7 +21,7 @@ use Assetic\Exception\FilterException;
|
|||
* @link http://learnboost.github.com/stylus/
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*/
|
||||
class StylusFilter extends BaseNodeFilter
|
||||
class StylusFilter extends BaseNodeFilter implements DependencyExtractorInterface
|
||||
{
|
||||
private $nodeBin;
|
||||
private $compress;
|
||||
|
@ -82,7 +83,6 @@ EOF;
|
|||
}
|
||||
|
||||
$pb = $this->createProcessBuilder();
|
||||
$pb->inheritEnvironmentVariables();
|
||||
|
||||
$pb->add($this->nodeBin)->add($input = tempnam(sys_get_temp_dir(), 'assetic_stylus'));
|
||||
file_put_contents($input, sprintf($format,
|
||||
|
@ -107,4 +107,10 @@ EOF;
|
|||
public function filterDump(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
||||
public function getChildren(AssetFactory $factory, $content, $loadPath = null)
|
||||
{
|
||||
// todo
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,9 @@ class UglifyJs2Filter extends BaseNodeFilter
|
|||
private $compress;
|
||||
private $beautify;
|
||||
private $mangle;
|
||||
private $screwIe8;
|
||||
private $comments;
|
||||
private $wrap;
|
||||
|
||||
public function __construct($uglifyjsBin = '/usr/bin/uglifyjs', $nodeBin = null)
|
||||
{
|
||||
|
@ -49,6 +52,21 @@ class UglifyJs2Filter extends BaseNodeFilter
|
|||
$this->mangle = $mangle;
|
||||
}
|
||||
|
||||
public function setScrewIe8($screwIe8)
|
||||
{
|
||||
$this->screwIe8 = $screwIe8;
|
||||
}
|
||||
|
||||
public function setComments($comments)
|
||||
{
|
||||
$this->comments = $comments;
|
||||
}
|
||||
|
||||
public function setWrap($wrap)
|
||||
{
|
||||
$this->wrap = $wrap;
|
||||
}
|
||||
|
||||
public function filterLoad(AssetInterface $asset)
|
||||
{
|
||||
}
|
||||
|
@ -71,6 +89,18 @@ class UglifyJs2Filter extends BaseNodeFilter
|
|||
$pb->add('--mangle');
|
||||
}
|
||||
|
||||
if ($this->screwIe8) {
|
||||
$pb->add('--screw-ie8');
|
||||
}
|
||||
|
||||
if ($this->comments) {
|
||||
$pb->add('--comments')->add(true === $this->comments ? 'all' : $this->comments);
|
||||
}
|
||||
|
||||
if ($this->wrap) {
|
||||
$pb->add('--wrap')->add($this->wrap);
|
||||
}
|
||||
|
||||
// input and output files
|
||||
$input = tempnam(sys_get_temp_dir(), 'input');
|
||||
$output = tempnam(sys_get_temp_dir(), 'output');
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Assetic package, an OpenSky project.
|
||||
*
|
||||
* (c) 2010-2013 OpenSky Project Inc
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Assetic\Util;
|
||||
|
||||
/**
|
||||
* CSS Utils.
|
||||
*
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
abstract class CssUtils
|
||||
{
|
||||
const REGEX_URLS = '/url\((["\']?)(?P<url>.*?)(\\1)\)/';
|
||||
const REGEX_IMPORTS = '/@import (?:url\()?(\'|"|)(?P<url>[^\'"\)\n\r]*)\1\)?;?/';
|
||||
const REGEX_IMPORTS_NO_URLS = '/@import (?!url\()(\'|"|)(?P<url>[^\'"\)\n\r]*)\1;?/';
|
||||
const REGEX_IE_FILTERS = '/src=(["\']?)(?P<url>.*?)\\1/';
|
||||
|
||||
/**
|
||||
* Filters all references -- url() and "@import" -- through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit
|
||||
* @param integer $count
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
*/
|
||||
public static function filterReferences($content, $callback, $limit = -1, &$count = 0)
|
||||
{
|
||||
$content = static::filterUrls($content, $callback, $limit, $count);
|
||||
$content = static::filterImports($content, $callback, $limit, $count, false);
|
||||
$content = static::filterIEFilters($content, $callback, $limit, $count);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters all CSS url()'s through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit Limit the number of replacements
|
||||
* @param integer $count Will be populated with the count
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
*/
|
||||
public static function filterUrls($content, $callback, $limit = -1, &$count = 0)
|
||||
{
|
||||
return preg_replace_callback(static::REGEX_URLS, $callback, $content, $limit, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters all CSS imports through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit Limit the number of replacements
|
||||
* @param integer $count Will be populated with the count
|
||||
* @param Boolean $includeUrl Whether to include url() in the pattern
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
*/
|
||||
public static function filterImports($content, $callback, $limit = -1, &$count = 0, $includeUrl = true)
|
||||
{
|
||||
$pattern = $includeUrl ? static::REGEX_IMPORTS : static::REGEX_IMPORTS_NO_URLS;
|
||||
|
||||
return preg_replace_callback($pattern, $callback, $content, $limit, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters all IE filters (AlphaImageLoader filter) through a callable.
|
||||
*
|
||||
* @param string $content The CSS
|
||||
* @param callable $callback A PHP callable
|
||||
* @param integer $limit Limit the number of replacements
|
||||
* @param integer $count Will be populated with the count
|
||||
*
|
||||
* @return string The filtered CSS
|
||||
*/
|
||||
public static function filterIEFilters($content, $callback, $limit = -1, &$count = 0)
|
||||
{
|
||||
return preg_replace_callback(static::REGEX_IE_FILTERS, $callback, $content, $limit, $count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts all references from the supplied CSS content.
|
||||
*
|
||||
* @param string $content The CSS content
|
||||
*
|
||||
* @return array An array of unique URLs
|
||||
*/
|
||||
public static function extractImports($content)
|
||||
{
|
||||
$imports = array();
|
||||
static::filterImports($content, function($matches) use(& $imports) {
|
||||
$imports[] = $matches['url'];
|
||||
});
|
||||
|
||||
return array_unique($imports);
|
||||
}
|
||||
|
||||
final private function __construct() { }
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Assetic package, an OpenSky project.
|
||||
*
|
||||
* (c) 2010-2013 OpenSky Project Inc
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Assetic\Util;
|
||||
|
||||
/**
|
||||
* Less Utils.
|
||||
*
|
||||
* @author Kris Wallsmith <kris.wallsmith@gmail.com>
|
||||
*/
|
||||
abstract class LessUtils extends CssUtils
|
||||
{
|
||||
const REGEX_IMPORTS = '/@import(?:-once)? (?:url\()?(\'|"|)(?P<url>[^\'"\)\n\r]*)\1\)?;?/';
|
||||
const REGEX_IMPORTS_NO_URLS = '/@import(?:-once)? (?!url\()(\'|"|)(?P<url>[^\'"\)\n\r]*)\1;?/';
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Assetic package, an OpenSky project.
|
||||
*
|
||||
* (c) 2010-2013 OpenSky Project Inc
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Assetic\Util;
|
||||
|
||||
/**
|
||||
* Path Utils.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*/
|
||||
abstract class PathUtils
|
||||
{
|
||||
public static function resolvePath($path, array $vars, array $values)
|
||||
{
|
||||
$map = array();
|
||||
foreach ($vars as $var) {
|
||||
if (false === strpos($path, '{'.$var.'}')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($values[$var])) {
|
||||
throw new \InvalidArgumentException(sprintf('The path "%s" contains the variable "%s", but was not given any value for it.', $path, $var));
|
||||
}
|
||||
|
||||
$map['{'.$var.'}'] = $values[$var];
|
||||
}
|
||||
|
||||
return strtr($path, $map);
|
||||
}
|
||||
|
||||
final private function __construct() { }
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Assetic package, an OpenSky project.
|
||||
*
|
||||
* (c) 2010-2013 OpenSky Project Inc
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Assetic\Util;
|
||||
|
||||
/**
|
||||
* Variable utilities.
|
||||
*
|
||||
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
||||
*/
|
||||
abstract class VarUtils
|
||||
{
|
||||
/**
|
||||
* Resolves variable placeholders.
|
||||
*
|
||||
* @param string $template A template string
|
||||
* @param array $vars Variable names
|
||||
* @param array $values Variable values
|
||||
*
|
||||
* @return string The resolved string
|
||||
*
|
||||
* @throws \InvalidArgumentException If there is a variable with no value
|
||||
*/
|
||||
public static function resolve($template, array $vars, array $values)
|
||||
{
|
||||
$map = array();
|
||||
foreach ($vars as $var) {
|
||||
if (false === strpos($template, '{'.$var.'}')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($values[$var])) {
|
||||
throw new \InvalidArgumentException(sprintf('The path "%s" contains the variable "%s", but was not given any value for it.', $template, $var));
|
||||
}
|
||||
|
||||
$map['{'.$var.'}'] = $values[$var];
|
||||
}
|
||||
|
||||
return strtr($template, $map);
|
||||
}
|
||||
|
||||
public static function getCombinations(array $vars, array $values)
|
||||
{
|
||||
if (!$vars) {
|
||||
return array(array());
|
||||
}
|
||||
|
||||
$combinations = array();
|
||||
$nbValues = array();
|
||||
foreach ($values as $var => $vals) {
|
||||
if (!in_array($var, $vars, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$nbValues[$var] = count($vals);
|
||||
}
|
||||
|
||||
for ($i = array_product($nbValues), $c = $i * 2; $i < $c; $i++) {
|
||||
$k = $i;
|
||||
$combination = array();
|
||||
|
||||
foreach ($vars as $var) {
|
||||
$combination[$var] = $values[$var][$k % $nbValues[$var]];
|
||||
$k = intval($k / $nbValues[$var]);
|
||||
}
|
||||
|
||||
$combinations[] = $combination;
|
||||
}
|
||||
|
||||
return $combinations;
|
||||
}
|
||||
|
||||
final private function __construct() { }
|
||||
}
|
|
@ -5,3 +5,5 @@ build/logs
|
|||
build/pdepend
|
||||
cache.properties
|
||||
phpunit.xml
|
||||
/vendor
|
||||
/composer.lock
|
||||
|
|
|
@ -3,6 +3,18 @@ PHP_CodeCoverage 1.2
|
|||
|
||||
This is the list of changes for the PHP_CodeCoverage 1.2 release series.
|
||||
|
||||
PHP_CodeCoverage 1.2.11
|
||||
-----------------------
|
||||
|
||||
* Fixed #151: Blacklisted PHPUnit Phar.
|
||||
* Fixed sebastianbergmann/phpunit#924.
|
||||
|
||||
PHP_CodeCoverage 1.2.10
|
||||
-----------------------
|
||||
|
||||
* Fixed #158: Executable code on a line that has a comment is processed incorrectly.
|
||||
* Eliminated the coupling to `PHPUnit_Util_Printer` in `PHP_CodeCoverage_Report_Text`.
|
||||
|
||||
PHP_CodeCoverage 1.2.9
|
||||
----------------------
|
||||
|
||||
|
@ -64,6 +76,6 @@ PHP_CodeCoverage 1.2.0
|
|||
|
||||
* The HTML report has been redesigned.
|
||||
* The new `@coversDefaultClass` annotation enables short `@covers` annotations when working with long class names or namespaces.
|
||||
* The new `@coversNothing` annotation can be used so tests do not record any code coverage. Useful for integration testing.
|
||||
* The new `@coversNothing` annotation can be used so tests do not record any code coverage. Useful for integration testing.
|
||||
* When `processUncoveredFilesFromWhitelist=FALSE` is set then files that are whitelisted but not covered by a single test are now included in the code coverage but with all lines, including those that are not executable, counted as not executed.
|
||||
* PHP_CodeCoverage 1.2 is only supported on PHP 5.3.3 (or later) and PHP 5.4.7 (or later) is highly recommended.
|
||||
|
|
|
@ -620,7 +620,7 @@ class PHP_CodeCoverage
|
|||
}
|
||||
|
||||
$classShortcut = preg_match_all(
|
||||
'(@coversDefaultClass\s+(?P<coveredClass>.*?)\s*$)m',
|
||||
'(@coversDefaultClass\s+(?P<coveredClass>[^\s]++)\s*$)m',
|
||||
$class->getDocComment(),
|
||||
$matches
|
||||
);
|
||||
|
@ -639,7 +639,7 @@ class PHP_CodeCoverage
|
|||
}
|
||||
|
||||
$match = preg_match_all(
|
||||
'(@covers\s+(?P<coveredElement>.*?)\s*(\(\s*\))?\s*$)m',
|
||||
'(@covers\s+(?P<coveredElement>[^\s()]++)[\s()]*$)m',
|
||||
$docComment,
|
||||
$matches
|
||||
);
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
* @since File available since Release 1.1.0
|
||||
*/
|
||||
|
||||
if (defined('PHPUNIT_COMPOSER_INSTALL')) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once 'File/Iterator/Autoload.php';
|
||||
require_once 'PHP/Token/Stream/Autoload.php';
|
||||
require_once 'Text/Template/Autoload.php';
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
* @since File available since Release 1.1.0
|
||||
*/
|
||||
|
||||
if (defined('PHPUNIT_COMPOSER_INSTALL')) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once 'File/Iterator/Autoload.php';
|
||||
require_once 'PHP/Token/Stream/Autoload.php';
|
||||
require_once 'Text/Template/Autoload.php';
|
||||
|
|
|
@ -304,6 +304,10 @@ class PHP_CodeCoverage_Filter
|
|||
*/
|
||||
protected function prefillBlacklist()
|
||||
{
|
||||
if (defined('__PHPUNIT_PHAR__')) {
|
||||
$this->addFileToBlacklist(__PHPUNIT_PHAR__);
|
||||
}
|
||||
|
||||
$this->addDirectoryContainingClassToBlacklist('File_Iterator');
|
||||
$this->addDirectoryContainingClassToBlacklist('PHP_CodeCoverage');
|
||||
$this->addDirectoryContainingClassToBlacklist('PHP_Invoker');
|
||||
|
|
|
@ -114,25 +114,9 @@ class PHP_CodeCoverage_Util
|
|||
switch (get_class($token)) {
|
||||
case 'PHP_Token_COMMENT':
|
||||
case 'PHP_Token_DOC_COMMENT': {
|
||||
$count = substr_count($token, "\n");
|
||||
$line = $token->getLine();
|
||||
|
||||
for ($i = $line; $i < $line + $count; $i++) {
|
||||
self::$ignoredLines[$filename][$i] = TRUE;
|
||||
}
|
||||
|
||||
if ($token instanceof PHP_Token_DOC_COMMENT) {
|
||||
// Workaround for the fact the DOC_COMMENT token
|
||||
// does not include the final \n character in its
|
||||
// text.
|
||||
if (substr(trim($lines[$i-1]), -2) == '*/') {
|
||||
self::$ignoredLines[$filename][$i] = TRUE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$_token = trim($token);
|
||||
$_line = trim($lines[$token->getLine() - 1]);
|
||||
|
||||
if ($_token == '// @codeCoverageIgnore' ||
|
||||
$_token == '//@codeCoverageIgnore') {
|
||||
|
@ -149,6 +133,26 @@ class PHP_CodeCoverage_Util
|
|||
$_token == '//@codeCoverageIgnoreEnd') {
|
||||
$stop = TRUE;
|
||||
}
|
||||
|
||||
// be sure the comment doesn't have some token BEFORE it on the same line...
|
||||
// it would not be safe to ignore the whole line in those cases.
|
||||
if (0 === strpos($_token, $_line)) {
|
||||
$count = substr_count($token, "\n");
|
||||
$line = $token->getLine();
|
||||
|
||||
for ($i = $line; $i < $line + $count; $i++) {
|
||||
self::$ignoredLines[$filename][$i] = TRUE;
|
||||
}
|
||||
|
||||
if ($token instanceof PHP_Token_DOC_COMMENT) {
|
||||
// Workaround for the fact the DOC_COMMENT token
|
||||
// does not include the final \n character in its
|
||||
// text.
|
||||
if (substr(trim($lines[$i-1]), -2) == '*/') {
|
||||
self::$ignoredLines[$filename][$i] = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
*/
|
||||
class PHP_CodeCoverage_Version
|
||||
{
|
||||
const VERSION = '1.2.9';
|
||||
const VERSION = '1.2.11';
|
||||
protected static $version;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
PHP_CodeCoverage
|
||||
================
|
||||
# PHP_CodeCoverage
|
||||
|
||||
**PHP_CodeCoverage** is a library that provides collection, processing, and rendering functionality for PHP code coverage information.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
## Requirements
|
||||
|
||||
* PHP_CodeCoverage 1.2 requires PHP 5.3.3 (or later) but PHP 5.4.7 (or later) is highly recommended.
|
||||
* [Xdebug](http://xdebug.org/) 2.0.5 (or later) is required but Xdebug 2.2.1 (or later) is highly recommended.
|
||||
|
||||
Installation
|
||||
------------
|
||||
## Installation
|
||||
|
||||
PHP_CodeCoverage should be installed using the PEAR Installer, the backbone of the [PHP Extension and Application Repository](http://pear.php.net/) that provides a distribution system for PHP packages.
|
||||
You can use the [PEAR Installer](http://pear.php.net/manual/en/guide.users.commandline.cli.php) or [Composer](http://getcomposer.org/) to download and install PHP_CodeCoverage as well as its dependencies
|
||||
|
||||
### PEAR Installer
|
||||
|
||||
Depending on your OS distribution and/or your PHP environment, you may need to install PEAR or update your existing PEAR installation before you can proceed with the following instructions. `sudo pear upgrade PEAR` usually suffices to upgrade an existing PEAR installation. The [PEAR Manual ](http://pear.php.net/manual/en/installation.getting.php) explains how to perform a fresh installation of PEAR.
|
||||
|
||||
|
@ -23,21 +22,32 @@ The following two commands (which you may have to run as `root`) are all that is
|
|||
|
||||
After the installation you can find the PHP_CodeCoverage source files inside your local PEAR directory; the path is usually `/usr/lib/php/PHP/CodeCoverage`.
|
||||
|
||||
Using the PHP_CodeCoverage API
|
||||
------------------------------
|
||||
### Composer
|
||||
|
||||
<?php
|
||||
require 'PHP/CodeCoverage/Autoload.php';
|
||||
To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 1.2:
|
||||
|
||||
$coverage = new PHP_CodeCoverage;
|
||||
$coverage->start('<name of test>');
|
||||
{
|
||||
"require": {
|
||||
"phpunit/php-code-coverage": ">=1.2.10,<1.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
// ...
|
||||
## Using the PHP_CodeCoverage API
|
||||
|
||||
$coverage->stop();
|
||||
```php
|
||||
<?php
|
||||
require 'PHP/CodeCoverage/Autoload.php';
|
||||
|
||||
$writer = new PHP_CodeCoverage_Report_Clover;
|
||||
$writer->process($coverage, '/tmp/clover.xml');
|
||||
$coverage = new PHP_CodeCoverage;
|
||||
$coverage->start('<name of test>');
|
||||
|
||||
$writer = new PHP_CodeCoverage_Report_HTML;
|
||||
$writer->process($coverage, '/tmp/code-coverage-report');
|
||||
// ...
|
||||
|
||||
$coverage->stop();
|
||||
|
||||
$writer = new PHP_CodeCoverage_Report_Clover;
|
||||
$writer->process($coverage, '/tmp/clover.xml');
|
||||
|
||||
$writer = new PHP_CodeCoverage_Report_HTML;
|
||||
$writer->process($coverage, '/tmp/code-coverage-report');
|
||||
```
|
|
@ -78,8 +78,12 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase
|
|||
TEST_FILES_PATH . 'BankAccountTest.php',
|
||||
TEST_FILES_PATH . 'CoverageClassExtendedTest.php',
|
||||
TEST_FILES_PATH . 'CoverageClassTest.php',
|
||||
TEST_FILES_PATH . 'CoverageFunctionParenthesesTest.php',
|
||||
TEST_FILES_PATH . 'CoverageFunctionParenthesesWhitespaceTest.php',
|
||||
TEST_FILES_PATH . 'CoverageFunctionTest.php',
|
||||
TEST_FILES_PATH . 'CoverageMethodOneLineAnnotationTest.php',
|
||||
TEST_FILES_PATH . 'CoverageMethodParenthesesTest.php',
|
||||
TEST_FILES_PATH . 'CoverageMethodParenthesesWhitespaceTest.php',
|
||||
TEST_FILES_PATH . 'CoverageMethodTest.php',
|
||||
TEST_FILES_PATH . 'CoverageNoneTest.php',
|
||||
TEST_FILES_PATH . 'CoverageNotPrivateTest.php',
|
||||
|
|
|
@ -55,8 +55,12 @@ if (!defined('TEST_FILES_PATH')) {
|
|||
require_once TEST_FILES_PATH . 'CoverageClassExtendedTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageClassTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageFunctionTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageFunctionParenthesesTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageFunctionParenthesesWhitespaceTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageMethodTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageMethodOneLineAnnotationTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageMethodParenthesesTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageMethodParenthesesWhitespaceTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageNoneTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageNotPrivateTest.php';
|
||||
require_once TEST_FILES_PATH . 'CoverageNotProtectedTest.php';
|
||||
|
@ -164,17 +168,29 @@ class PHP_CodeCoverage_UtilTest extends PHPUnit_Framework_TestCase
|
|||
array(
|
||||
1 => TRUE,
|
||||
2 => TRUE,
|
||||
7 => TRUE,
|
||||
3 => TRUE,
|
||||
4 => TRUE,
|
||||
5 => TRUE,
|
||||
6 => TRUE,
|
||||
7 => TRUE,
|
||||
8 => TRUE,
|
||||
9 => TRUE,
|
||||
10 => TRUE,
|
||||
11 => TRUE,
|
||||
12 => TRUE,
|
||||
13 => TRUE
|
||||
13 => TRUE,
|
||||
14 => TRUE,
|
||||
17 => TRUE,
|
||||
19 => TRUE,
|
||||
22 => TRUE,
|
||||
23 => TRUE,
|
||||
27 => TRUE,
|
||||
28 => TRUE,
|
||||
29 => TRUE,
|
||||
30 => TRUE,
|
||||
31 => TRUE,
|
||||
32 => TRUE,
|
||||
33 => TRUE,
|
||||
),
|
||||
PHP_CodeCoverage_Util::getLinesToBeIgnored(
|
||||
TEST_FILES_PATH . 'source_with_oneline_annotations.php'
|
||||
|
|
|
@ -234,13 +234,10 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* Add parenthesis to the covers annotation below in a couple of different ways to make sure it
|
||||
* works as expected
|
||||
*
|
||||
* @covers PHP_CodeCoverage::start()
|
||||
* @covers PHP_CodeCoverage::stop( )
|
||||
* @covers PHP_CodeCoverage::append ()
|
||||
* @covers PHP_CodeCoverage::applyListsFilter ( )
|
||||
* @covers PHP_CodeCoverage::start
|
||||
* @covers PHP_CodeCoverage::stop
|
||||
* @covers PHP_CodeCoverage::append
|
||||
* @covers PHP_CodeCoverage::applyListsFilter
|
||||
* @covers PHP_CodeCoverage::initializeFilesThatAreSeenTheFirstTime
|
||||
* @covers PHP_CodeCoverage::applyCoversAnnotationFilter
|
||||
* @covers PHP_CodeCoverage::getTests
|
||||
|
@ -399,6 +396,66 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHP_CodeCoverage::getLinesToBeCovered
|
||||
*/
|
||||
public function testFunctionParenthesesAreAllowed()
|
||||
{
|
||||
$this->assertSame(
|
||||
array(TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)),
|
||||
$this->getLinesToBeCovered->invoke(
|
||||
$this->coverage,
|
||||
'CoverageFunctionParenthesesTest',
|
||||
'testSomething'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHP_CodeCoverage::getLinesToBeCovered
|
||||
*/
|
||||
public function testFunctionParenthesesAreAllowedWithWhitespace()
|
||||
{
|
||||
$this->assertSame(
|
||||
array(TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)),
|
||||
$this->getLinesToBeCovered->invoke(
|
||||
$this->coverage,
|
||||
'CoverageFunctionParenthesesWhitespaceTest',
|
||||
'testSomething'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHP_CodeCoverage::getLinesToBeCovered
|
||||
*/
|
||||
public function testMethodParenthesesAreAllowed()
|
||||
{
|
||||
$this->assertSame(
|
||||
array(TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)),
|
||||
$this->getLinesToBeCovered->invoke(
|
||||
$this->coverage,
|
||||
'CoverageMethodParenthesesTest',
|
||||
'testSomething'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHP_CodeCoverage::getLinesToBeCovered
|
||||
*/
|
||||
public function testMethodParenthesesAreAllowedWithWhitespace()
|
||||
{
|
||||
$this->assertSame(
|
||||
array(TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)),
|
||||
$this->getLinesToBeCovered->invoke(
|
||||
$this->coverage,
|
||||
'CoverageMethodParenthesesWhitespaceTest',
|
||||
'testSomething'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function getLinesToBeCoveredProvider()
|
||||
{
|
||||
return array(
|
||||
|
|
11
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionParenthesesTest.php
vendored
Normal file
11
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionParenthesesTest.php
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
class CoverageFunctionParenthesesTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers ::globalFunction()
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
globalFunction();
|
||||
}
|
||||
}
|
11
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionParenthesesWhitespaceTest.php
vendored
Normal file
11
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionParenthesesWhitespaceTest.php
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
class CoverageFunctionParenthesesWhitespaceTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers ::globalFunction ( )
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
globalFunction();
|
||||
}
|
||||
}
|
12
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodParenthesesTest.php
vendored
Normal file
12
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodParenthesesTest.php
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
class CoverageMethodParenthesesTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::publicMethod()
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodParenthesesWhitespaceTest.php
vendored
Normal file
12
core/vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodParenthesesWhitespaceTest.php
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
class CoverageMethodParenthesesWhitespaceTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::publicMethod ( )
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
|
@ -11,3 +11,25 @@ class Foo
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
function baz()
|
||||
{
|
||||
// a one-line comment
|
||||
print '*'; // a one-line comment
|
||||
|
||||
/* a one-line comment */
|
||||
print '*'; /* a one-line comment */
|
||||
|
||||
/* a one-line comment
|
||||
*/
|
||||
print '*'; /* a one-line comment
|
||||
*/
|
||||
|
||||
print '*'; // @codeCoverageIgnore
|
||||
|
||||
print '*'; // @codeCoverageIgnoreStart
|
||||
print '*';
|
||||
print '*'; // @codeCoverageIgnoreEnd
|
||||
|
||||
print '*';
|
||||
}
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
"phpunit/php-token-stream": ">=1.1.3@stable",
|
||||
"phpunit/php-text-template": ">=1.1.1@stable"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": ">=2.0.5"
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<email>sb@sebastian-bergmann.de</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2013-02-26</date>
|
||||
<date>2013-05-23</date>
|
||||
<version>
|
||||
<release>1.2.9</release>
|
||||
<api>1.2.0</api>
|
||||
<release>1.2.11</release>
|
||||
<api>1.2.11</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
|
|
|
@ -11,6 +11,8 @@ Tests/TextUI/*.exp
|
|||
Tests/TextUI/*.log
|
||||
Tests/TextUI/*.out
|
||||
Tests/TextUI/*.php
|
||||
/vendor
|
||||
/composer.lock
|
||||
phpunit.xml
|
||||
cache.properties
|
||||
.idea
|
||||
|
|
|
@ -3,6 +3,23 @@ PHPUnit 3.7
|
|||
|
||||
This is the list of changes for the PHPUnit 3.7 release series.
|
||||
|
||||
PHPUnit 3.7.21
|
||||
--------------
|
||||
|
||||
* Fixed #277: Account for `auto-globals-jit` when setting `$_ENV` and `$_SERVER` variables in the xml config.
|
||||
* Fixed #924: PHPUnit depends on packages that broke backwards compatability.
|
||||
|
||||
PHPUnit 3.7.20
|
||||
--------------
|
||||
|
||||
* Fixed #883: Stand-alone functions `logicalAnd()`, `logicalOr()`, and `logicalXor()` did not work.
|
||||
* Fixed #889: Suppress `open_basedir` warnings while searching for the composer autoloader.
|
||||
* Fixed #890: Correctly parse single-line @expectedException annotations.
|
||||
* Fixed #891: Better messages when JSON-related assertions receive invalid JSON.
|
||||
* Fixed #896: Use the proper `toString()` method inside `PHPUnit_Framework_TestFailure::toString()`.
|
||||
* Fixed #902: Allow symfony/yaml >=2.0,<3.0
|
||||
* Fixed #908: Don't rely on composer to set up the `include_path` for `ErrorHandler.php`.
|
||||
|
||||
PHPUnit 3.7.19
|
||||
--------------
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ $paths = array(
|
|||
);
|
||||
|
||||
foreach ($paths as $path) {
|
||||
if (is_dir($path . '/composer') &&
|
||||
is_file($path . '/autoload.php')) {
|
||||
if (@is_dir($path . '/composer') &&
|
||||
@is_file($path . '/autoload.php')) {
|
||||
require_once $path . '/autoload.php';
|
||||
define('PHPUNIT_COMPOSER_INSTALL', $path . '/autoload.php');
|
||||
|
||||
|
@ -118,6 +118,7 @@ spl_autoload_register(
|
|||
'phpunit_framework_constraint_isfalse' => '/Framework/Constraint/IsFalse.php',
|
||||
'phpunit_framework_constraint_isidentical' => '/Framework/Constraint/IsIdentical.php',
|
||||
'phpunit_framework_constraint_isinstanceof' => '/Framework/Constraint/IsInstanceOf.php',
|
||||
'phpunit_framework_constraint_isjson' => '/Framework/Constraint/IsJson.php',
|
||||
'phpunit_framework_constraint_isnull' => '/Framework/Constraint/IsNull.php',
|
||||
'phpunit_framework_constraint_istrue' => '/Framework/Constraint/IsTrue.php',
|
||||
'phpunit_framework_constraint_istype' => '/Framework/Constraint/IsType.php',
|
||||
|
|
|
@ -52,8 +52,8 @@ $paths = array(
|
|||
);
|
||||
|
||||
foreach ($paths as $path) {
|
||||
if (is_dir($path . '/composer') &&
|
||||
is_file($path . '/autoload.php')) {
|
||||
if (@is_dir($path . '/composer') &&
|
||||
@is_file($path . '/autoload.php')) {
|
||||
require_once $path . '/autoload.php';
|
||||
define('PHPUNIT_COMPOSER_INSTALL', $path . '/autoload.php');
|
||||
|
||||
|
|
|
@ -2134,6 +2134,22 @@ abstract class PHPUnit_Framework_Assert
|
|||
$constraint->evaluate($value, $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that a string is a valid JSON string.
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $message
|
||||
* @since Method available since Release 3.7.20
|
||||
*/
|
||||
public static function assertJson($expectedJson, $message = '')
|
||||
{
|
||||
if (!is_string($expectedJson)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
|
||||
}
|
||||
|
||||
self::assertThat($expectedJson, self::isJson(), $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that two given JSON encoded objects or arrays are equal.
|
||||
*
|
||||
|
@ -2143,23 +2159,12 @@ abstract class PHPUnit_Framework_Assert
|
|||
*/
|
||||
public static function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = '')
|
||||
{
|
||||
$expected = json_decode($expectedJson);
|
||||
if ($jsonError = json_last_error()) {
|
||||
$message .=
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
|
||||
$jsonError,
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::translateTypeToPrefix('expected')
|
||||
);
|
||||
}
|
||||
self::assertJson($expectedJson, $message);
|
||||
self::assertJson($actualJson, $message);
|
||||
|
||||
$expected = json_decode($expectedJson);
|
||||
$actual = json_decode($actualJson);
|
||||
if ($jsonError = json_last_error()) {
|
||||
$message .=
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
|
||||
$jsonError,
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::translateTypeToPrefix('actual')
|
||||
);
|
||||
}
|
||||
|
||||
return self::assertEquals($expected, $actual, $message);
|
||||
}
|
||||
|
||||
|
@ -2172,23 +2177,11 @@ abstract class PHPUnit_Framework_Assert
|
|||
*/
|
||||
public static function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = '')
|
||||
{
|
||||
$expected = json_decode($expectedJson);
|
||||
if ($jsonError = json_last_error()) {
|
||||
$message .=
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
|
||||
$jsonError,
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::translateTypeToPrefix('expected')
|
||||
);
|
||||
}
|
||||
self::assertJson($expectedJson, $message);
|
||||
self::assertJson($actualJson, $message);
|
||||
|
||||
$expected = json_decode($expectedJson);
|
||||
$actual = json_decode($actualJson);
|
||||
if ($jsonError = json_last_error()) {
|
||||
$message .=
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
|
||||
$jsonError,
|
||||
PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::translateTypeToPrefix('actual')
|
||||
);
|
||||
}
|
||||
|
||||
self::assertNotEquals($expected, $actual, $message);
|
||||
}
|
||||
|
@ -2203,14 +2196,14 @@ abstract class PHPUnit_Framework_Assert
|
|||
public static function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = '')
|
||||
{
|
||||
self::assertFileExists($expectedFile, $message);
|
||||
$expectedJson = file_get_contents($expectedFile);
|
||||
|
||||
if (!is_string($actualJson)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
|
||||
}
|
||||
self::assertJson($expectedJson, $message);
|
||||
self::assertJson($actualJson, $message);
|
||||
|
||||
// call constraint
|
||||
$constraint = new PHPUnit_Framework_Constraint_JsonMatches(
|
||||
file_get_contents($expectedFile)
|
||||
$expectedJson
|
||||
);
|
||||
|
||||
self::assertThat($actualJson, $constraint, $message);
|
||||
|
@ -2226,14 +2219,14 @@ abstract class PHPUnit_Framework_Assert
|
|||
public static function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = '')
|
||||
{
|
||||
self::assertFileExists($expectedFile, $message);
|
||||
$expectedJson = file_get_contents($expectedFile);
|
||||
|
||||
if (!is_string($actualJson)) {
|
||||
throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
|
||||
}
|
||||
self::assertJson($expectedJson, $message);
|
||||
self::assertJson($actualJson, $message);
|
||||
|
||||
// call constraint
|
||||
$constraint = new PHPUnit_Framework_Constraint_JsonMatches(
|
||||
file_get_contents($expectedFile)
|
||||
$expectedJson
|
||||
);
|
||||
|
||||
self::assertThat($actualJson, new PHPUnit_Framework_Constraint_Not($constraint), $message);
|
||||
|
@ -2254,9 +2247,12 @@ abstract class PHPUnit_Framework_Assert
|
|||
$actualJson = file_get_contents($actualFile);
|
||||
$expectedJson = file_get_contents($expectedFile);
|
||||
|
||||
self::assertJson($expectedJson, $message);
|
||||
self::assertJson($actualJson, $message);
|
||||
|
||||
// call constraint
|
||||
$constraintExpected = new PHPUnit_Framework_Constraint_JsonMatches(
|
||||
file_get_contents($expectedFile)
|
||||
$expectedJson
|
||||
);
|
||||
|
||||
$constraintActual = new PHPUnit_Framework_Constraint_JsonMatches($actualJson);
|
||||
|
@ -2280,9 +2276,12 @@ abstract class PHPUnit_Framework_Assert
|
|||
$actualJson = file_get_contents($actualFile);
|
||||
$expectedJson = file_get_contents($expectedFile);
|
||||
|
||||
self::assertJson($expectedJson, $message);
|
||||
self::assertJson($actualJson, $message);
|
||||
|
||||
// call constraint
|
||||
$constraintExpected = new PHPUnit_Framework_Constraint_JsonMatches(
|
||||
file_get_contents($expectedFile)
|
||||
$expectedJson
|
||||
);
|
||||
|
||||
$constraintActual = new PHPUnit_Framework_Constraint_JsonMatches($actualJson);
|
||||
|
@ -2395,6 +2394,17 @@ abstract class PHPUnit_Framework_Assert
|
|||
return new PHPUnit_Framework_Constraint_IsFalse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
|
||||
*
|
||||
* @return PHPUnit_Framework_Constraint_IsJson
|
||||
* @since Method available since Release 3.7.20
|
||||
*/
|
||||
public static function isJson()
|
||||
{
|
||||
return new PHPUnit_Framework_Constraint_IsJson;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
|
||||
*
|
||||
|
@ -2524,6 +2534,7 @@ abstract class PHPUnit_Framework_Assert
|
|||
{
|
||||
return new PHPUnit_Framework_Constraint_IsEmpty;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,109 @@
|
|||
<?php
|
||||
/**
|
||||
* PHPUnit
|
||||
*
|
||||
* Copyright (c) 2001-2013, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Sebastian Bergmann nor the names of his
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @package PHPUnit
|
||||
* @subpackage Framework_Constraint
|
||||
* @author Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
|
||||
* @link http://www.phpunit.de/
|
||||
* @since File available since Release 3.7.20
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constraint that asserts that a string is valid JSON.
|
||||
*
|
||||
* @package PHPUnit
|
||||
* @subpackage Framework_Constraint
|
||||
* @author Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
|
||||
* @link http://www.phpunit.de/
|
||||
* @since Class available since Release 3.7.20
|
||||
*/
|
||||
class PHPUnit_Framework_Constraint_IsJson extends PHPUnit_Framework_Constraint
|
||||
{
|
||||
/**
|
||||
* Evaluates the constraint for parameter $other. Returns TRUE if the
|
||||
* constraint is met, FALSE otherwise.
|
||||
*
|
||||
* @param mixed $other Value or object to evaluate.
|
||||
* @return bool
|
||||
*/
|
||||
protected function matches($other)
|
||||
{
|
||||
json_decode($other);
|
||||
if (json_last_error()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description of the failure
|
||||
*
|
||||
* The beginning of failure messages is "Failed asserting that" in most
|
||||
* cases. This method should return the second part of that sentence.
|
||||
*
|
||||
* @param mixed $other Evaluated value or object.
|
||||
* @return string
|
||||
*/
|
||||
protected function failureDescription($other)
|
||||
{
|
||||
json_decode($other);
|
||||
$error = PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
|
||||
json_last_error()
|
||||
);
|
||||
|
||||
return sprintf(
|
||||
'%s is valid JSON (%s)',
|
||||
|
||||
PHPUnit_Util_Type::shortenedExport($other),
|
||||
$error
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the constraint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
return 'is valid JSON';
|
||||
}
|
||||
}
|
|
@ -84,33 +84,17 @@ class PHPUnit_Framework_Constraint_JsonMatches extends PHPUnit_Framework_Constra
|
|||
{
|
||||
$decodedOther = json_decode($other);
|
||||
if (json_last_error()) {
|
||||
$this->failure_reason = $this->getJsonError();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$decodedValue = json_decode($this->value);
|
||||
if (json_last_error()) {
|
||||
$this->failure_reason = $this->getJsonError();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return $decodedOther == $decodedValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the last occurd JSON error.
|
||||
*
|
||||
* @param string $messagePrefix
|
||||
* @return string The last JSON error prefixed with $messagePrefix.
|
||||
*/
|
||||
protected function getJsonError($messagePrefix = 'Json error!')
|
||||
{
|
||||
return PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError(
|
||||
json_last_error(),
|
||||
$messagePrefix
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the object.
|
||||
*
|
||||
|
|
|
@ -57,25 +57,25 @@
|
|||
class PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider
|
||||
{
|
||||
/**
|
||||
* Translatets accourd JSON error to a human readable string.
|
||||
* Translates JSON error to a human readable string.
|
||||
*
|
||||
* @param string $error
|
||||
* @return string
|
||||
*/
|
||||
public static function determineJsonError($error, $prefix = '')
|
||||
{
|
||||
switch (strtoupper($error)) {
|
||||
case 'JSON_ERROR_NONE':
|
||||
switch ($error) {
|
||||
case JSON_ERROR_NONE:
|
||||
return;
|
||||
case 'JSON_ERROR_DEPTH':
|
||||
case JSON_ERROR_DEPTH:
|
||||
return $prefix . 'Maximum stack depth exceeded';
|
||||
case 'JSON_ERROR_STATE_MISMATCH':
|
||||
case JSON_ERROR_STATE_MISMATCH:
|
||||
return $prefix . 'Underflow or the modes mismatch';
|
||||
case 'JSON_ERROR_CTRL_CHAR':
|
||||
case JSON_ERROR_CTRL_CHAR:
|
||||
return $prefix . 'Unexpected control character found';
|
||||
case 'JSON_ERROR_SYNTAX':
|
||||
case JSON_ERROR_SYNTAX:
|
||||
return $prefix . 'Syntax error, malformed JSON';
|
||||
case 'JSON_ERROR_UTF8':
|
||||
case JSON_ERROR_UTF8:
|
||||
return $prefix . 'Malformed UTF-8 characters, possibly incorrectly encoded';
|
||||
default:
|
||||
return $prefix . 'Unknown error';
|
||||
|
|
|
@ -68,6 +68,6 @@ class PHPUnit_Framework_Constraint_SameSize extends PHPUnit_Framework_Constraint
|
|||
*/
|
||||
public function __construct($expected)
|
||||
{
|
||||
$this->expectedCount = $this->getCountOf($expected);
|
||||
parent::__construct($this->getCountOf($expected));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple
|
|||
*/
|
||||
public function hasOutput()
|
||||
{
|
||||
if (empty($this->output)) {
|
||||
if (strlen($this->output) === 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ class PHPUnit_Framework_TestFailure
|
|||
return sprintf(
|
||||
'%s: %s',
|
||||
|
||||
$this->failedTest,
|
||||
$this->failedTest->toString(),
|
||||
$this->thrownException->getMessage()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
*/
|
||||
class PHPUnit_Runner_Version
|
||||
{
|
||||
const VERSION = '3.7.19';
|
||||
const VERSION = '3.7.21';
|
||||
protected static $version;
|
||||
|
||||
/**
|
||||
|
|
|
@ -535,10 +535,23 @@ class PHPUnit_Util_Configuration
|
|||
}
|
||||
|
||||
foreach (array('var', 'env', 'post', 'get', 'cookie', 'server', 'files', 'request') as $array) {
|
||||
if ($array == 'var') {
|
||||
$target = &$GLOBALS;
|
||||
} else {
|
||||
$target = &$GLOBALS['_' . strtoupper($array)];
|
||||
// See https://github.com/sebastianbergmann/phpunit/issues/277
|
||||
switch ($array) {
|
||||
case 'var':
|
||||
$target = &$GLOBALS;
|
||||
break;
|
||||
|
||||
case 'env':
|
||||
$target = &$_ENV;
|
||||
break;
|
||||
|
||||
case 'server':
|
||||
$target = &$_SERVER;
|
||||
break;
|
||||
|
||||
default:
|
||||
$target = &$GLOBALS['_' . strtoupper($array)];
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($configuration[$array] as $name => $value) {
|
||||
|
@ -816,7 +829,7 @@ class PHPUnit_Util_Configuration
|
|||
if ($testSuiteFilter && $directoryNode->parentNode->getAttribute('name') != $testSuiteFilter) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$directory = (string)$directoryNode->nodeValue;
|
||||
|
||||
if (empty($directory)) {
|
||||
|
@ -864,7 +877,7 @@ class PHPUnit_Util_Configuration
|
|||
if ($testSuiteFilter && $fileNode->parentNode->getAttribute('name') != $testSuiteFilter) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$file = (string)$fileNode->nodeValue;
|
||||
|
||||
if (empty($file)) {
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
|
||||
// Workaround for http://bugs.php.net/bug.php?id=47987,
|
||||
// see https://github.com/sebastianbergmann/phpunit/issues#issue/125 for details
|
||||
require_once 'PHPUnit/Framework/Error.php';
|
||||
require_once 'PHPUnit/Framework/Error/Notice.php';
|
||||
require_once 'PHPUnit/Framework/Error/Warning.php';
|
||||
require_once 'PHPUnit/Framework/Error/Deprecated.php';
|
||||
require_once __DIR__ . '/../Framework/Error.php';
|
||||
require_once __DIR__ . '/../Framework/Error/Notice.php';
|
||||
require_once __DIR__ . '/../Framework/Error/Warning.php';
|
||||
require_once __DIR__ . '/../Framework/Error/Deprecated.php';
|
||||
|
||||
/**
|
||||
* Error handler that converts PHP errors and warnings to exceptions.
|
||||
|
|
|
@ -147,6 +147,7 @@ class PHPUnit_Util_Test
|
|||
{
|
||||
$reflector = new ReflectionMethod($className, $methodName);
|
||||
$docComment = $reflector->getDocComment();
|
||||
$docComment = substr($docComment, 3, -2);
|
||||
|
||||
if (preg_match(self::REGEX_EXPECTED_EXCEPTION, $docComment, $matches)) {
|
||||
$annotations = self::parseTestMethodAnnotations(
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
/**
|
||||
* PHPUnit
|
||||
*
|
||||
* Copyright (c) 2001-2013, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Sebastian Bergmann nor the names of his
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @package PHPUnit
|
||||
* @author Kuzuha SHINODA <kuzuha01@hotmail.com>
|
||||
* @copyright 2013-2013 Kuzuha SHINODA <kuzuha01@hotmail.com>
|
||||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
|
||||
* @link http://www.phpunit.de/
|
||||
* @since File available since Release 3.7.20
|
||||
*/
|
||||
|
||||
require_once dirname(dirname(dirname(__DIR__))) . '/PHPUnit/Framework/Assert/Functions.php';
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @package PHPUnit
|
||||
* @author Kuzuha SHINODA <kuzuha01@hotmail.com>
|
||||
* @copyright 2013-2013 Kuzuha SHINODA <kuzuha01@hotmail.com>
|
||||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
|
||||
* @link http://www.phpunit.de/
|
||||
* @since File available since Release 3.7.20
|
||||
*/
|
||||
class Framework_Assert_FunctionsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testLogicalAnd()
|
||||
{
|
||||
$expected = $this->logicalAnd($this->isTrue(), $this->isFalse());
|
||||
$actual = logicalAnd($this->isTrue(), $this->isFalse());
|
||||
$this->assertSame($expected->toString(), $actual->toString());
|
||||
}
|
||||
|
||||
public function testLogicalOr()
|
||||
{
|
||||
$expected = $this->logicalOr($this->isTrue(), $this->isFalse());
|
||||
$actual = logicalOr($this->isTrue(), $this->isFalse());
|
||||
$this->assertSame($expected->toString(), $actual->toString());
|
||||
}
|
||||
|
||||
public function testLogicalXor()
|
||||
{
|
||||
$expected = $this->logicalXor($this->isTrue(), $this->isFalse());
|
||||
$actual = logicalXor($this->isTrue(), $this->isFalse());
|
||||
$this->assertSame($expected->toString(), $actual->toString());
|
||||
}
|
||||
}
|
|
@ -4033,6 +4033,63 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase
|
|||
$this->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Assert::assertSameSize
|
||||
*/
|
||||
public function testAssertSameSize()
|
||||
{
|
||||
$this->assertSameSize(array(1,2), array(3,4));
|
||||
|
||||
try {
|
||||
$this->assertSameSize(array(1,2), array(1,2,3));
|
||||
}
|
||||
|
||||
catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Assert::assertSameSize
|
||||
*/
|
||||
public function testAssertSameSizeThrowsExceptionIfExpectedIsNotCoutable()
|
||||
{
|
||||
|
||||
try {
|
||||
$this->assertSameSize('a', array());
|
||||
}
|
||||
|
||||
catch (PHPUnit_Framework_Exception $e) {
|
||||
$this->assertEquals('Argument #1 of PHPUnit_Framework_Assert::assertSameSize() must be a countable', $e->getMessage());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Assert::assertSameSize
|
||||
*/
|
||||
public function testAssertSameSizeThrowsExceptionIfActualIsNotCountable()
|
||||
{
|
||||
|
||||
try {
|
||||
$this->assertSameSize(array(), '');
|
||||
}
|
||||
|
||||
catch (PHPUnit_Framework_Exception $e) {
|
||||
$this->assertEquals('Argument #2 of PHPUnit_Framework_Assert::assertSameSize() must be a countable', $e->getMessage());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString
|
||||
*/
|
||||
|
@ -4053,7 +4110,7 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase
|
|||
{
|
||||
try {
|
||||
$this->assertJsonStringEqualsJsonString($expected, $actual);
|
||||
} catch (PHPUnit_Framework_ExpectationFailedException $e) {
|
||||
} catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
return;
|
||||
}
|
||||
$this->fail('Expected exception not found');
|
||||
|
@ -4077,7 +4134,12 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testAssertJsonStringNotEqualsJsonStringErrorRaised($expected, $actual)
|
||||
{
|
||||
$this->assertJsonStringNotEqualsJsonString($expected, $actual);
|
||||
try {
|
||||
$this->assertJsonStringNotEqualsJsonString($expected, $actual);
|
||||
} catch (PHPUnit_Framework_AssertionFailedError $e) {
|
||||
return;
|
||||
}
|
||||
$this->fail('Expected exception not found');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -86,27 +86,27 @@ class Framework_Constraint_JsonMatches_ErrorMessageProviderTest extends PHPUnit_
|
|||
NULL, 'json_error_none', ''
|
||||
),
|
||||
'JSON_ERROR_DEPTH' => array(
|
||||
'Maximum stack depth exceeded', 'json_error_depth', ''
|
||||
'Maximum stack depth exceeded', JSON_ERROR_DEPTH, ''
|
||||
),
|
||||
'prefixed JSON_ERROR_DEPTH' => array(
|
||||
'TUX: Maximum stack depth exceeded', 'json_error_depth', 'TUX: '
|
||||
'TUX: Maximum stack depth exceeded', JSON_ERROR_DEPTH, 'TUX: '
|
||||
),
|
||||
'JSON_ERROR_STATE_MISMatch' => array(
|
||||
'Underflow or the modes mismatch', 'json_error_state_mismatch', ''
|
||||
'Underflow or the modes mismatch', JSON_ERROR_STATE_MISMATCH, ''
|
||||
),
|
||||
'JSON_ERROR_CTRL_CHAR' => array(
|
||||
'Unexpected control character found', 'json_error_ctrl_char', ''
|
||||
'Unexpected control character found', JSON_ERROR_CTRL_CHAR, ''
|
||||
),
|
||||
'JSON_ERROR_SYNTAX' => array(
|
||||
'Syntax error, malformed JSON', 'json_error_syntax', ''
|
||||
'Syntax error, malformed JSON', JSON_ERROR_SYNTAX, ''
|
||||
),
|
||||
'JSON_ERROR_UTF8`' => array(
|
||||
'Malformed UTF-8 characters, possibly incorrectly encoded',
|
||||
'json_error_utf8',
|
||||
JSON_ERROR_UTF8,
|
||||
''
|
||||
),
|
||||
'Invalid error indicator' => array(
|
||||
'Unknown error', 'invalid_error_indicator', ''
|
||||
'Unknown error', 55, ''
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,6 @@ class Framework_Constraint_JsonMatchesTest extends PHPUnit_Framework_TestCase
|
|||
* @covers PHPUnit_Framework_Constraint_JsonMatches::evaluate
|
||||
* @covers PHPUnit_Framework_Constraint_JsonMatches::matches
|
||||
* @covers PHPUnit_Framework_Constraint_JsonMatches::__construct
|
||||
* @covers PHPUnit_Framework_Constraint_JsonMatches::getJsonError
|
||||
*/
|
||||
public function testEvaluate($expected, $jsonOther, $jsonValue)
|
||||
{
|
||||
|
|
|
@ -3541,6 +3541,99 @@ EOF
|
|||
<<<EOF
|
||||
Failed asserting that actual size 2 does not match expected size 2.
|
||||
|
||||
EOF
|
||||
,
|
||||
PHPUnit_Framework_TestFailure::exceptionToString($e)
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Constraint_SameSize
|
||||
*/
|
||||
public function testConstraintSameSizeWithAnArray()
|
||||
{
|
||||
$constraint = new PHPUnit_Framework_Constraint_SameSize(array(1,2,3,4,5));
|
||||
|
||||
$this->assertTrue($constraint->evaluate(array(6,7,8,9,10), '', TRUE));
|
||||
$this->assertFalse($constraint->evaluate(array(1,2,3,4), '', TRUE));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Constraint_SameSize
|
||||
*/
|
||||
public function testConstraintSameSizeWithAnIteratorWhichDoesNotImplementCountable()
|
||||
{
|
||||
$constraint = new PHPUnit_Framework_Constraint_SameSize(new TestIterator(array(1,2,3,4,5)));
|
||||
|
||||
$this->assertTrue($constraint->evaluate(new TestIterator(array(6,7,8,9,10)), '', TRUE));
|
||||
$this->assertFalse($constraint->evaluate(new TestIterator(array(1,2,3,4)), '', TRUE));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Constraint_SameSize
|
||||
*/
|
||||
public function testConstraintSameSizeWithAnObjectImplementingCountable()
|
||||
{
|
||||
$constraint = new PHPUnit_Framework_Constraint_SameSize(new ArrayObject(array(1,2,3,4,5)));
|
||||
|
||||
$this->assertTrue($constraint->evaluate(new ArrayObject(array(6,7,8,9,10)), '', TRUE));
|
||||
$this->assertFalse($constraint->evaluate(new ArrayObject(array(1,2,3,4)), '', TRUE));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Constraint_SameSize
|
||||
* @covers PHPUnit_Framework_TestFailure::exceptionToString
|
||||
*/
|
||||
public function testConstraintSameSizeFailing()
|
||||
{
|
||||
$constraint = new PHPUnit_Framework_Constraint_SameSize(array(1,2,3,4,5));
|
||||
|
||||
try {
|
||||
$constraint->evaluate(array(1,2));
|
||||
}
|
||||
|
||||
catch (PHPUnit_Framework_ExpectationFailedException $e) {
|
||||
$this->assertEquals(
|
||||
<<<EOF
|
||||
Failed asserting that actual size 2 matches expected size 5.
|
||||
|
||||
EOF
|
||||
,
|
||||
PHPUnit_Framework_TestFailure::exceptionToString($e)
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPUnit_Framework_Constraint_SameSize
|
||||
* @covers PHPUnit_Framework_Constraint_Not
|
||||
* @covers PHPUnit_Framework_Assert::logicalNot
|
||||
* @covers PHPUnit_Framework_TestFailure::exceptionToString
|
||||
*/
|
||||
public function testConstraintNotSameSizeFailing()
|
||||
{
|
||||
$constraint = PHPUnit_Framework_Assert::logicalNot(
|
||||
new PHPUnit_Framework_Constraint_SameSize(array(1,2))
|
||||
);
|
||||
|
||||
try {
|
||||
$constraint->evaluate(array(3,4));
|
||||
}
|
||||
|
||||
catch (PHPUnit_Framework_ExpectationFailedException $e) {
|
||||
$this->assertEquals(
|
||||
<<<EOF
|
||||
Failed asserting that actual size 2 does not match expected size 2.
|
||||
|
||||
EOF
|
||||
,
|
||||
PHPUnit_Framework_TestFailure::exceptionToString($e)
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/**
|
||||
* PHPUnit
|
||||
*
|
||||
* Copyright (c) 2001-2013, Sebastian Bergmann <sebastian@phpunit.de>.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* * Neither the name of Sebastian Bergmann nor the names of his
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @package PHPUnit
|
||||
* @author Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
|
||||
* @link http://www.phpunit.de/
|
||||
* @since File available since Release 3.7.20
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @package PHPUnit
|
||||
* @author Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
|
||||
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
|
||||
* @link http://www.phpunit.de/
|
||||
* @since File available since Release 3.7.20
|
||||
*/
|
||||
class Framework_TestFailureTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers PHPUnit_Framework_TestFailure::toString
|
||||
*/
|
||||
public function testToString()
|
||||
{
|
||||
$test = new self(__FUNCTION__);
|
||||
$exception = new PHPUnit_Framework_Exception('message');
|
||||
$failure = new PHPUnit_Framework_TestFailure($test, $exception);
|
||||
|
||||
$this->assertEquals(__METHOD__ . ': message', $failure->toString());
|
||||
}
|
||||
}
|
|
@ -104,6 +104,10 @@ class Util_TestTest extends PHPUnit_Framework_TestCase
|
|||
array('class' => 'Class', 'code' => ExceptionTest::ERROR_CODE, 'message' => ExceptionTest::ERROR_MESSAGE),
|
||||
PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testNine')
|
||||
);
|
||||
$this->assertSame(
|
||||
array('class' => 'Class', 'code' => NULL, 'message' => ''),
|
||||
PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testSingleLine')
|
||||
);
|
||||
$this->assertSame(
|
||||
array('class' => 'Class', 'code' => My\Space\ExceptionNamespaceTest::ERROR_CODE, 'message' => My\Space\ExceptionNamespaceTest::ERROR_MESSAGE),
|
||||
PHPUnit_Util_Test::getExpectedException('My\Space\ExceptionNamespaceTest', 'testConstants')
|
||||
|
|
|
@ -86,6 +86,11 @@ class ExceptionTest extends PHPUnit_Framework_TestCase
|
|||
{
|
||||
}
|
||||
|
||||
/** @expectedException Class */
|
||||
public function testSingleLine()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Class
|
||||
* @expectedExceptionCode ExceptionTest::UNKNOWN_CODE_CONSTANT
|
||||
|
|
|
@ -50,7 +50,7 @@ ksort($methods);
|
|||
|
||||
foreach ($methods as $name => $data) {
|
||||
$buffer .= sprintf(
|
||||
"\n\n%s\nfunction %s(%s)\n{\n return %s::%s(%s);\n}",
|
||||
"\n\n%s\nfunction %s(%s)\n{\n return call_user_func_array(\n '%s::%s',\n func_get_args()\n );\n}",
|
||||
str_replace(' ', '', $data['docblock']),
|
||||
$name,
|
||||
$data['sigDecl'],
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
"phpunit/php-code-coverage": ">=1.2.1,<1.3.0",
|
||||
"phpunit/php-timer": ">=1.0.2,<1.1.0",
|
||||
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
|
||||
"symfony/yaml": ">=2.0.0,<2.3.0",
|
||||
"symfony/yaml": "~2.0",
|
||||
"ext-dom": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
<email>sebastian@phpunit.de</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2013-03-25</date>
|
||||
<date>2013-05-23</date>
|
||||
<version>
|
||||
<release>3.7.19</release>
|
||||
<release>3.7.21</release>
|
||||
<api>3.7.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
|
@ -82,6 +82,7 @@
|
|||
<file baseinstalldir="/" name="IsFalse.php" role="php" />
|
||||
<file baseinstalldir="/" name="IsIdentical.php" role="php" />
|
||||
<file baseinstalldir="/" name="IsInstanceOf.php" role="php" />
|
||||
<file baseinstalldir="/" name="IsJson.php" role="php" />
|
||||
<file baseinstalldir="/" name="IsNull.php" role="php" />
|
||||
<file baseinstalldir="/" name="IsTrue.php" role="php" />
|
||||
<file baseinstalldir="/" name="IsType.php" role="php" />
|
||||
|
@ -246,7 +247,7 @@
|
|||
<name>Yaml</name>
|
||||
<channel>pear.symfony.com</channel>
|
||||
<min>2.0.0</min>
|
||||
<max>2.2.99</max>
|
||||
<max>2.99.99</max>
|
||||
</package>
|
||||
<extension>
|
||||
<name>dom</name>
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
</collector>
|
||||
|
||||
<generator output="build">
|
||||
<build engine="html" enabled="true" output="api"/>
|
||||
<build engine="html" enabled="true" output="api">
|
||||
<file extension="html" />
|
||||
</build>
|
||||
</generator>
|
||||
</project>
|
||||
</phpdox>
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated by PHP Project Wizard (PPW) 1.1.0-dev on Sat Mar 12 12:47:10 CET 2011 -->
|
||||
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://phpunit.de/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/3.7/phpunit.xsd"
|
||||
bootstrap="PHPUnit/Autoload.php"
|
||||
backupGlobals="false"
|
||||
verbose="true">
|
||||
|
|
|
@ -165,6 +165,9 @@ class ChainRouter implements RouterInterface, RequestMatcherInterface, WarmableI
|
|||
// the request/url match logic is the same as in Symfony/Component/HttpKernel/EventListener/RouterListener.php
|
||||
// matching requests is more powerful than matching URLs only, so try that first
|
||||
if ($router instanceof RequestMatcherInterface) {
|
||||
if (null === $request) {
|
||||
$request = Request::create($url);
|
||||
}
|
||||
return $router->matchRequest($request);
|
||||
}
|
||||
// every router implements the match method
|
||||
|
|
|
@ -33,7 +33,7 @@ interface RouteObjectInterface
|
|||
|
||||
/**
|
||||
* Field name for an explicit template to be used with this route.
|
||||
* i.e. SymfonyCmfContentBundle:StaticContent:index.html.twig
|
||||
* i.e. CmfContentBundle:StaticContent:index.html.twig
|
||||
*/
|
||||
const TEMPLATE_NAME = '_template';
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class FieldByClassEnhancerTest extends CmfUnitTestCase
|
|||
$this->document = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\RouteObject');
|
||||
|
||||
$mapping = array('Symfony\\Cmf\\Component\\Routing\\Tests\\Enhancer\\RouteObject'
|
||||
=> 'symfony_cmf_content.controller:indexAction');
|
||||
=> 'cmf_content.controller:indexAction');
|
||||
|
||||
$this->mapper = new FieldByClassEnhancer('_content', '_controller', $mapping);
|
||||
|
||||
|
@ -34,7 +34,7 @@ class FieldByClassEnhancerTest extends CmfUnitTestCase
|
|||
$defaults = array('_content' => $this->document);
|
||||
$expected = array(
|
||||
'_content' => $this->document,
|
||||
'_controller' => 'symfony_cmf_content.controller:indexAction',
|
||||
'_controller' => 'cmf_content.controller:indexAction',
|
||||
);
|
||||
$this->assertEquals($expected, $this->mapper->enhance($defaults, $this->request));
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class FieldMapEnhancerTest extends CmfUnitTestCase
|
|||
public function setUp()
|
||||
{
|
||||
$this->request = Request::create('/test');
|
||||
$mapping = array('static_pages' => 'symfony_cmf_content.controller:indexAction');
|
||||
$mapping = array('static_pages' => 'cmf_content.controller:indexAction');
|
||||
|
||||
$this->enhancer = new FieldMapEnhancer('type', '_controller', $mapping);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class FieldMapEnhancerTest extends CmfUnitTestCase
|
|||
$defaults = array('type' => 'static_pages');
|
||||
$expected = array(
|
||||
'type' => 'static_pages',
|
||||
'_controller' => 'symfony_cmf_content.controller:indexAction',
|
||||
'_controller' => 'cmf_content.controller:indexAction',
|
||||
);
|
||||
$this->assertEquals($expected, $this->enhancer->enhance($defaults, $this->request));
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ class FieldPresenceEnhancerTest extends CmfUnitTestCase
|
|||
|
||||
public function setUp()
|
||||
{
|
||||
$this->mapper = new FieldPresenceEnhancer('_template', '_controller', 'symfony_cmf_content.controller:indexAction');
|
||||
$this->mapper = new FieldPresenceEnhancer('_template', '_controller', 'cmf_content.controller:indexAction');
|
||||
|
||||
$this->request = Request::create('/test');
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class FieldPresenceEnhancerTest extends CmfUnitTestCase
|
|||
$defaults = array('_template' => 'Bundle:Topic:template.html.twig');
|
||||
$expected = array(
|
||||
'_template' => 'Bundle:Topic:template.html.twig',
|
||||
'_controller' => 'symfony_cmf_content.controller:indexAction',
|
||||
'_controller' => 'cmf_content.controller:indexAction',
|
||||
);
|
||||
$this->assertEquals($expected, $this->mapper->enhance($defaults, $this->request));
|
||||
}
|
||||
|
|
|
@ -24,11 +24,6 @@ class UrlMatcherTest extends CmfUnitTestCase
|
|||
|
||||
public function setUp()
|
||||
{
|
||||
$reflection = new \ReflectionClass('Symfony\\Component\\Routing\\Matcher\\UrlMatcher');
|
||||
if (! $reflection->hasMethod('getAttributes')) {
|
||||
$this->markTestSkipped('This only works with symfony 2.2');
|
||||
}
|
||||
|
||||
$this->routeDocument = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'getRouteKey', 'compile'));
|
||||
$this->routeCompiled = $this->buildMock('Symfony\\Component\\Routing\\CompiledRoute');
|
||||
|
||||
|
|
|
@ -235,6 +235,39 @@ class ChainRouterTest extends CmfUnitTestCase
|
|||
$this->assertEquals(array('test'), $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call match on ChainRouter that has RequestMatcher in the chain.
|
||||
*/
|
||||
public function testMatchWithRequestMatchers()
|
||||
{
|
||||
$url = '/test';
|
||||
$request = Request::create('/test');
|
||||
|
||||
list($low) = $this->createRouterMocks();
|
||||
|
||||
$high = $this->getMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RequestMatcher');
|
||||
|
||||
$high
|
||||
->expects($this->once())
|
||||
->method('matchRequest')
|
||||
->with($request)
|
||||
->will($this->throwException(new \Symfony\Component\Routing\Exception\ResourceNotFoundException))
|
||||
;
|
||||
$low
|
||||
->expects($this->once())
|
||||
->method('match')
|
||||
->with($url)
|
||||
->will($this->returnValue(array('test')))
|
||||
;
|
||||
|
||||
$this->router->add($low, 10);
|
||||
$this->router->add($high, 20);
|
||||
|
||||
$result = $this->router->match($url);
|
||||
$this->assertEquals(array('test'), $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If there is a method not allowed but another router matches, that one is used
|
||||
*/
|
||||
|
|
|
@ -120,7 +120,7 @@ class ContentAwareGeneratorTest extends CmfUnitTestCase
|
|||
$this->assertEquals('result_url', $this->generator->generate($route_en, array('_locale' => 'de')));
|
||||
}
|
||||
|
||||
public function testGenerateRouteMultilangNomatch()
|
||||
public function testGenerateRouteMultilangLocaleNomatch()
|
||||
{
|
||||
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile', 'getRouteContent'));
|
||||
$route_en->setLocale('en');
|
||||
|
@ -228,6 +228,28 @@ class ContentAwareGeneratorTest extends CmfUnitTestCase
|
|||
$this->assertEquals('result_url', $this->generator->generate($this->contentDocument, array('_locale' => 'de')));
|
||||
}
|
||||
|
||||
public function testGenerateDocumentMultilangLocaleNomatch()
|
||||
{
|
||||
$route_en = $this->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array('getDefaults', 'compile'));
|
||||
$route_en->setLocale('en');
|
||||
$route_de = $this->routeDocument;
|
||||
$route_de->setLocale('de');
|
||||
|
||||
$this->contentDocument->expects($this->once())
|
||||
->method('getRoutes')
|
||||
->will($this->returnValue(array($route_en, $route_de)))
|
||||
;
|
||||
$route_en->expects($this->once())
|
||||
->method('compile')
|
||||
->will($this->returnValue($this->routeCompiled))
|
||||
;
|
||||
$route_de->expects($this->never())
|
||||
->method('compile')
|
||||
;
|
||||
|
||||
$this->assertEquals('result_url', $this->generator->generate($this->contentDocument, array('_locale' => 'fr')));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Symfony\Component\Routing\Exception\RouteNotFoundException
|
||||
*/
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue