Index: composer.lock
===================================================================
--- composer.lock
+++ composer.lock
@@ -5,32 +5,80 @@
"This file is @generated automatically"
],
"hash": "d1845e3801289eda5979369163949615",
+ "content-hash": "81305601848f7209a89f924bc3c3d214",
"packages": [
{
+ "name": "psr/log",
+ "version": "1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2016-10-10 12:19:37"
+ },
+ {
"name": "stecman/symfony-console-completion",
- "version": "0.5.1",
+ "version": "0.7.0",
"source": {
"type": "git",
"url": "https://github.com/stecman/symfony-console-completion.git",
- "reference": "1a9fc7ab4820cd1aabbdc584c6b25d221e7b6cb5"
+ "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/1a9fc7ab4820cd1aabbdc584c6b25d221e7b6cb5",
- "reference": "1a9fc7ab4820cd1aabbdc584c6b25d221e7b6cb5",
+ "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/5461d43e53092b3d3b9dbd9d999f2054730f4bbb",
+ "reference": "5461d43e53092b3d3b9dbd9d999f2054730f4bbb",
"shasum": ""
},
"require": {
"php": ">=5.3.2",
- "symfony/console": "~2.2"
+ "symfony/console": "~2.3 || ~3.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.1"
+ "phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.5.x-dev"
+ "dev-master": "0.6.x-dev"
}
},
"autoload": {
@@ -49,31 +97,31 @@
}
],
"description": "Automatic BASH completion for Symfony Console Component based applications.",
- "time": "2015-05-07 12:21:50"
+ "time": "2016-02-24 05:08:54"
},
{
"name": "symfony/console",
- "version": "v2.6.7",
- "target-dir": "Symfony/Component/Console",
+ "version": "v2.8.15",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Console.git",
- "reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272"
+ "url": "https://github.com/symfony/console.git",
+ "reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Console/zipball/ebc5679854aa24ed7d65062e9e3ab0b18a917272",
- "reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272",
+ "url": "https://api.github.com/repos/symfony/console/zipball/d5643cd095e5e37d31e004bb2606b5dd7e96602f",
+ "reference": "d5643cd095e5e37d31e004bb2606b5dd7e96602f",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.9",
+ "symfony/debug": "~2.7,>=2.7.2|~3.0.0",
+ "symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/event-dispatcher": "~2.1",
- "symfony/phpunit-bridge": "~2.7",
- "symfony/process": "~2.1"
+ "symfony/event-dispatcher": "~2.1|~3.0.0",
+ "symfony/process": "~2.1|~3.0.0"
},
"suggest": {
"psr/log": "For using the console logger",
@@ -83,13 +131,16 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev"
+ "dev-master": "2.8-dev"
}
},
"autoload": {
- "psr-0": {
+ "psr-4": {
"Symfony\\Component\\Console\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -107,39 +158,155 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2015-05-02 15:18:45"
+ "time": "2016-12-06 11:59:35"
},
{
- "name": "symfony/process",
- "version": "v2.7.4",
+ "name": "symfony/debug",
+ "version": "v2.8.15",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Process.git",
- "reference": "f7b3f73f70a7f8f49a1c838dc3debbf054732d8e"
+ "url": "https://github.com/symfony/debug.git",
+ "reference": "62a68f640456f6761d752c62d81631428ef0d8a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Process/zipball/f7b3f73f70a7f8f49a1c838dc3debbf054732d8e",
- "reference": "f7b3f73f70a7f8f49a1c838dc3debbf054732d8e",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/62a68f640456f6761d752c62d81631428ef0d8a1",
+ "reference": "62a68f640456f6761d752c62d81631428ef0d8a1",
"shasum": ""
},
"require": {
- "php": ">=5.3.9"
+ "php": ">=5.3.9",
+ "psr/log": "~1.0"
+ },
+ "conflict": {
+ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
- "symfony/phpunit-bridge": "~2.7"
+ "symfony/class-loader": "~2.2|~3.0.0",
+ "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.7-dev"
+ "dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\Process\\": ""
+ "Symfony\\Component\\Debug\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Debug Component",
+ "homepage": "https://symfony.com",
+ "time": "2016-11-15 12:53:17"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
+ "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2016-11-14 01:06:16"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v2.8.15",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "1a1bd056395540d0bc549d39818316513565d278"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/1a1bd056395540d0bc549d39818316513565d278",
+ "reference": "1a1bd056395540d0bc549d39818316513565d278",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.9"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.8-dev"
}
},
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
@@ -156,7 +323,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2015-08-27 06:45:45"
+ "time": "2016-11-24 00:43:03"
}
],
"packages-dev": [
@@ -166,12 +333,12 @@
"source": {
"type": "git",
"url": "https://github.com/aik099/CodingStandard.git",
- "reference": "987a6781521c9293b3e36ff3877cdff63010b291"
+ "reference": "48291176d85999764d6a4505b7e7b9990cec4d7b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aik099/CodingStandard/zipball/b2d0a7b7e4b69f8a7024c462d511c5a09f46ccb6",
- "reference": "987a6781521c9293b3e36ff3877cdff63010b291",
+ "url": "https://api.github.com/repos/aik099/CodingStandard/zipball/48291176d85999764d6a4505b7e7b9990cec4d7b",
+ "reference": "48291176d85999764d6a4505b7e7b9990cec4d7b",
"shasum": ""
},
"require-dev": {
@@ -198,29 +365,28 @@
"PHP_CodeSniffer",
"codesniffer"
],
- "time": "2015-05-17 06:49:37"
+ "time": "2016-12-04 18:35:03"
},
{
"name": "aik099/phpunit-mink",
- "version": "v2.1.0",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/minkphp/phpunit-mink.git",
- "reference": "62889c5b065d69b695c87df6218b22147d78b147"
+ "reference": "68b94432ac12ad4f714ef540037396aeb369e230"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/minkphp/phpunit-mink/zipball/62889c5b065d69b695c87df6218b22147d78b147",
- "reference": "62889c5b065d69b695c87df6218b22147d78b147",
+ "url": "https://api.github.com/repos/minkphp/phpunit-mink/zipball/68b94432ac12ad4f714ef540037396aeb369e230",
+ "reference": "68b94432ac12ad4f714ef540037396aeb369e230",
"shasum": ""
},
"require": {
"behat/mink": "~1.6@dev",
"behat/mink-selenium2-driver": "~1.2",
"php": ">=5.3.2",
- "phpunit/phpunit": ">=3.7.8",
- "pimple/pimple": "~2.0|~3.0",
- "symfony/event-dispatcher": "~2.4"
+ "phpunit/phpunit": "~4|~5",
+ "symfony/event-dispatcher": "~2.4|~3.0"
},
"require-dev": {
"aik099/coding-standard": "dev-master",
@@ -229,12 +395,13 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.1.x-dev"
}
},
"autoload": {
- "psr-0": {
- "aik099\\": "./library/"
+ "psr-4": {
+ "aik099\\PHPUnit\\": "library/aik099/PHPUnit",
+ "PimpleCopy\\Pimple\\": "library/PimpleCopy/Pimple"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -258,25 +425,28 @@
"selenium",
"tests"
],
- "time": "2015-05-06 13:33:55"
+ "time": "2016-06-26 09:07:47"
},
{
"name": "behat/mink",
- "version": "v1.6.1",
+ "version": "v1.7.1",
"source": {
"type": "git",
"url": "https://github.com/minkphp/Mink.git",
- "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a"
+ "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/minkphp/Mink/zipball/8b68523a339ec991bcd638b39dc8f04f808da88a",
- "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a",
+ "url": "https://api.github.com/repos/minkphp/Mink/zipball/e6930b9c74693dff7f4e58577e1b1743399f3ff9",
+ "reference": "e6930b9c74693dff7f4e58577e1b1743399f3ff9",
"shasum": ""
},
"require": {
"php": ">=5.3.1",
- "symfony/css-selector": "~2.0"
+ "symfony/css-selector": "~2.1|~3.0"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7|~3.0"
},
"suggest": {
"behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)",
@@ -287,7 +457,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.7.x-dev"
}
},
"autoload": {
@@ -313,36 +483,39 @@
"testing",
"web"
],
- "time": "2015-02-04 17:02:06"
+ "time": "2016-03-05 08:26:18"
},
{
"name": "behat/mink-selenium2-driver",
- "version": "v1.2.0",
+ "version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/minkphp/MinkSelenium2Driver.git",
- "reference": "8018fee80bf6573f909ece3e0dfc07d0eb352210"
+ "reference": "473a9f3ebe0c134ee1e623ce8a9c852832020288"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/minkphp/MinkSelenium2Driver/zipball/8018fee80bf6573f909ece3e0dfc07d0eb352210",
- "reference": "8018fee80bf6573f909ece3e0dfc07d0eb352210",
+ "url": "https://api.github.com/repos/minkphp/MinkSelenium2Driver/zipball/473a9f3ebe0c134ee1e623ce8a9c852832020288",
+ "reference": "473a9f3ebe0c134ee1e623ce8a9c852832020288",
"shasum": ""
},
"require": {
- "behat/mink": "~1.6@dev",
+ "behat/mink": "~1.7@dev",
"instaclick/php-webdriver": "~1.1",
"php": ">=5.3.1"
},
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
+ },
"type": "mink-driver",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "1.3.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Behat\\Mink\\Driver": "src/"
+ "psr-4": {
+ "Behat\\Mink\\Driver\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -371,20 +544,20 @@
"testing",
"webdriver"
],
- "time": "2014-09-29 13:12:12"
+ "time": "2016-03-05 09:10:18"
},
{
"name": "doctrine/instantiator",
- "version": "1.0.4",
+ "version": "1.0.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119"
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119",
- "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
"shasum": ""
},
"require": {
@@ -395,7 +568,7 @@
"ext-pdo": "*",
"ext-phar": "*",
"phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "2.0.*@ALPHA"
+ "squizlabs/php_codesniffer": "~2.0"
},
"type": "library",
"extra": {
@@ -404,8 +577,8 @@
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Instantiator\\": "src"
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -425,7 +598,7 @@
"constructor",
"instantiate"
],
- "time": "2014-10-13 12:58:55"
+ "time": "2015-06-14 21:17:01"
},
{
"name": "hamcrest/hamcrest-php",
@@ -474,16 +647,16 @@
},
{
"name": "instaclick/php-webdriver",
- "version": "1.4.2",
+ "version": "1.4.3",
"source": {
"type": "git",
"url": "https://github.com/instaclick/php-webdriver.git",
- "reference": "6aa16bbc02a5897200ab70316e0d2a01664afc51"
+ "reference": "0c20707dcf30a32728fd6bdeeab996c887fdb2fb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/6aa16bbc02a5897200ab70316e0d2a01664afc51",
- "reference": "6aa16bbc02a5897200ab70316e0d2a01664afc51",
+ "url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/0c20707dcf30a32728fd6bdeeab996c887fdb2fb",
+ "reference": "0c20707dcf30a32728fd6bdeeab996c887fdb2fb",
"shasum": ""
},
"require": {
@@ -528,20 +701,20 @@
"webdriver",
"webtest"
],
- "time": "2015-04-05 19:52:55"
+ "time": "2015-06-15 20:19:33"
},
{
"name": "mindplay/annotations",
- "version": "1.2.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/php-annotations/php-annotations.git",
- "reference": "3e6d5ea14fcc032e18dd0f81b014aa7ca47a1881"
+ "reference": "a5830fb63f822cb72c4bf6172955fd05986557c6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-annotations/php-annotations/zipball/3e6d5ea14fcc032e18dd0f81b014aa7ca47a1881",
- "reference": "3e6d5ea14fcc032e18dd0f81b014aa7ca47a1881",
+ "url": "https://api.github.com/repos/php-annotations/php-annotations/zipball/a5830fb63f822cb72c4bf6172955fd05986557c6",
+ "reference": "a5830fb63f822cb72c4bf6172955fd05986557c6",
"shasum": ""
},
"require": {
@@ -578,20 +751,20 @@
"annotations",
"framework"
],
- "time": "2015-04-15 12:54:35"
+ "time": "2016-02-14 20:09:40"
},
{
"name": "mockery/mockery",
- "version": "0.9.4",
+ "version": "0.9.7",
"source": {
"type": "git",
"url": "https://github.com/padraic/mockery.git",
- "reference": "70bba85e4aabc9449626651f48b9018ede04f86b"
+ "reference": "4de7969f4664da3cef1ccd83866c9f59378c3371"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/padraic/mockery/zipball/70bba85e4aabc9449626651f48b9018ede04f86b",
- "reference": "70bba85e4aabc9449626651f48b9018ede04f86b",
+ "url": "https://api.github.com/repos/padraic/mockery/zipball/4de7969f4664da3cef1ccd83866c9f59378c3371",
+ "reference": "4de7969f4664da3cef1ccd83866c9f59378c3371",
"shasum": ""
},
"require": {
@@ -643,20 +816,20 @@
"test double",
"testing"
],
- "time": "2015-04-02 19:54:00"
+ "time": "2016-12-19 14:50:55"
},
{
"name": "nikic/php-parser",
- "version": "v1.3.0",
+ "version": "v1.4.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "dff239267fd1befa1cd40430c9ed12591aa720ca"
+ "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dff239267fd1befa1cd40430c9ed12591aa720ca",
- "reference": "dff239267fd1befa1cd40430c9ed12591aa720ca",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51",
+ "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51",
"shasum": ""
},
"require": {
@@ -666,7 +839,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
@@ -688,7 +861,7 @@
"parser",
"php"
],
- "time": "2015-05-02 15:40:40"
+ "time": "2015-09-19 14:15:08"
},
{
"name": "phpdocumentor/reflection-docblock",
@@ -741,30 +914,33 @@
},
{
"name": "phpspec/prophecy",
- "version": "v1.4.1",
+ "version": "v1.6.2",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373"
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373",
- "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
- "phpdocumentor/reflection-docblock": "~2.0",
- "sebastian/comparator": "~1.1"
+ "php": "^5.3|^7.0",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+ "sebastian/comparator": "^1.1",
+ "sebastian/recursion-context": "^1.0|^2.0"
},
"require-dev": {
- "phpspec/phpspec": "~2.0"
+ "phpspec/phpspec": "^2.0",
+ "phpunit/phpunit": "^4.8 || ^5.6.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "1.6.x-dev"
}
},
"autoload": {
@@ -797,20 +973,20 @@
"spy",
"stub"
],
- "time": "2015-04-27 22:15:08"
+ "time": "2016-11-21 14:58:47"
},
{
"name": "phpunit/php-code-coverage",
- "version": "2.0.16",
+ "version": "2.2.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "934fd03eb6840508231a7f73eb8940cf32c3b66c"
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/934fd03eb6840508231a7f73eb8940cf32c3b66c",
- "reference": "934fd03eb6840508231a7f73eb8940cf32c3b66c",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979",
+ "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979",
"shasum": ""
},
"require": {
@@ -818,7 +994,7 @@
"phpunit/php-file-iterator": "~1.3",
"phpunit/php-text-template": "~1.2",
"phpunit/php-token-stream": "~1.3",
- "sebastian/environment": "~1.0",
+ "sebastian/environment": "^1.3.2",
"sebastian/version": "~1.0"
},
"require-dev": {
@@ -833,7 +1009,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.2.x-dev"
}
},
"autoload": {
@@ -859,20 +1035,20 @@
"testing",
"xunit"
],
- "time": "2015-04-11 04:35:00"
+ "time": "2015-10-06 15:47:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.0",
+ "version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb"
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb",
- "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"shasum": ""
},
"require": {
@@ -906,20 +1082,20 @@
"filesystem",
"iterator"
],
- "time": "2015-04-02 05:19:05"
+ "time": "2016-10-03 07:40:28"
},
{
"name": "phpunit/php-text-template",
- "version": "1.2.0",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
"shasum": ""
},
"require": {
@@ -928,20 +1104,17 @@
"type": "library",
"autoload": {
"classmap": [
- "Text/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -950,35 +1123,35 @@
"keywords": [
"template"
],
- "time": "2014-01-30 17:20:04"
+ "time": "2015-06-21 13:50:34"
},
{
"name": "phpunit/php-timer",
- "version": "1.0.5",
+ "version": "1.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
+ "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260",
+ "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
+ "require-dev": {
+ "phpunit/phpunit": "~4|~5"
+ },
"type": "library",
"autoload": {
"classmap": [
- "PHP/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -994,20 +1167,20 @@
"keywords": [
"timer"
],
- "time": "2013-08-02 07:42:54"
+ "time": "2016-05-12 18:03:57"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.1",
+ "version": "1.4.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "eab81d02569310739373308137284e0158424330"
+ "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/eab81d02569310739373308137284e0158424330",
- "reference": "eab81d02569310739373308137284e0158424330",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b",
+ "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b",
"shasum": ""
},
"require": {
@@ -1043,20 +1216,20 @@
"keywords": [
"tokenizer"
],
- "time": "2015-04-08 04:46:07"
+ "time": "2016-11-15 14:06:22"
},
{
"name": "phpunit/phpunit",
- "version": "4.6.6",
+ "version": "4.8.31",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "3afe303d873a4d64c62ef84de491b97b006fbdac"
+ "reference": "98b2b39a520766bec663ff5b7ff1b729db9dbfe3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3afe303d873a4d64c62ef84de491b97b006fbdac",
- "reference": "3afe303d873a4d64c62ef84de491b97b006fbdac",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/98b2b39a520766bec663ff5b7ff1b729db9dbfe3",
+ "reference": "98b2b39a520766bec663ff5b7ff1b729db9dbfe3",
"shasum": ""
},
"require": {
@@ -1066,15 +1239,15 @@
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.3.3",
- "phpspec/prophecy": "~1.3,>=1.3.1",
- "phpunit/php-code-coverage": "~2.0,>=2.0.11",
+ "phpspec/prophecy": "^1.3.1",
+ "phpunit/php-code-coverage": "~2.1",
"phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "~1.0",
+ "phpunit/php-timer": "^1.0.6",
"phpunit/phpunit-mock-objects": "~2.3",
- "sebastian/comparator": "~1.1",
+ "sebastian/comparator": "~1.2.2",
"sebastian/diff": "~1.2",
- "sebastian/environment": "~1.2",
+ "sebastian/environment": "~1.3",
"sebastian/exporter": "~1.2",
"sebastian/global-state": "~1.0",
"sebastian/version": "~1.0",
@@ -1089,7 +1262,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.6.x-dev"
+ "dev-master": "4.8.x-dev"
}
},
"autoload": {
@@ -1115,26 +1288,27 @@
"testing",
"xunit"
],
- "time": "2015-04-29 15:18:52"
+ "time": "2016-12-09 02:45:31"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "2.3.1",
+ "version": "2.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "74ffb87f527f24616f72460e54b595f508dccb5c"
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c",
- "reference": "74ffb87f527f24616f72460e54b595f508dccb5c",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "~1.0,>=1.0.2",
+ "doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3",
- "phpunit/php-text-template": "~1.2"
+ "phpunit/php-text-template": "~1.2",
+ "sebastian/exporter": "~1.2"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
@@ -1170,20 +1344,20 @@
"mock",
"xunit"
],
- "time": "2015-04-02 05:36:41"
+ "time": "2015-10-02 06:51:40"
},
{
"name": "pimple/pimple",
- "version": "v3.0.0",
+ "version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
- "reference": "876bf0899d01feacd2a2e83f04641e51350099ef"
+ "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/silexphp/Pimple/zipball/876bf0899d01feacd2a2e83f04641e51350099ef",
- "reference": "876bf0899d01feacd2a2e83f04641e51350099ef",
+ "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a",
+ "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a",
"shasum": ""
},
"require": {
@@ -1210,49 +1384,50 @@
"email": "fabien@symfony.com"
}
],
- "description": "Pimple is a simple Dependency Injection Container for PHP 5.3",
+ "description": "Pimple, a simple Dependency Injection Container",
"homepage": "http://pimple.sensiolabs.org",
"keywords": [
"container",
"dependency injection"
],
- "time": "2014-07-24 09:48:15"
+ "time": "2015-09-11 15:10:35"
},
{
"name": "qa-tools/qa-tools",
- "version": "v1.0.1",
+ "version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/qa-tools/qa-tools.git",
- "reference": "5456f64af5b94c5655f21a592b8817690c2096c7"
+ "reference": "505b14a7766daa718cad21bdb7bcb404cabaa1fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/qa-tools/qa-tools/zipball/5456f64af5b94c5655f21a592b8817690c2096c7",
- "reference": "5456f64af5b94c5655f21a592b8817690c2096c7",
+ "url": "https://api.github.com/repos/qa-tools/qa-tools/zipball/505b14a7766daa718cad21bdb7bcb404cabaa1fc",
+ "reference": "505b14a7766daa718cad21bdb7bcb404cabaa1fc",
"shasum": ""
},
"require": {
"behat/mink": "~1.6",
- "mindplay/annotations": "~1.2@dev",
- "php": ">=5.3.2"
+ "mindplay/annotations": "~1.2",
+ "php": ">=5.3.2",
+ "pimple/pimple": "^2.0|^3.0"
},
"replace": {
"aik099/qa-tools": "self.version"
},
"require-dev": {
"aik099/coding-standard": "dev-master",
- "behat/mink-selenium2-driver": "~1.2@dev",
- "brianium/paratest": "~0.7",
- "mockery/mockery": "~0.9"
+ "behat/mink-selenium2-driver": "~1.2",
+ "mockery/mockery": "~0.9",
+ "symfony/phpunit-bridge": "^3.1"
},
"suggest": {
- "aik099/phpunit-mink": "Allows to use PageObject inside PHPUnit tests and remotely collect code coverage information"
+ "qa-tools/phpunit-extension": "PHPUnit extension for QA-Tools"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
@@ -1289,26 +1464,26 @@
"phpunit",
"tests"
],
- "time": "2014-09-26 15:15:51"
+ "time": "2016-07-06 11:31:04"
},
{
"name": "sebastian/comparator",
- "version": "1.1.1",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "1dd8869519a225f7f2b9eb663e225298fade819e"
+ "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e",
- "reference": "1dd8869519a225f7f2b9eb663e225298fade819e",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
+ "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2"
+ "sebastian/exporter": "~1.2 || ~2.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
@@ -1316,7 +1491,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
@@ -1353,32 +1528,32 @@
"compare",
"equality"
],
- "time": "2015-01-29 16:28:08"
+ "time": "2016-11-19 09:18:40"
},
{
"name": "sebastian/diff",
- "version": "1.3.0",
+ "version": "1.4.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
- "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e",
+ "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "~4.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
@@ -1401,31 +1576,31 @@
}
],
"description": "Diff implementation",
- "homepage": "http://www.github.com/sebastianbergmann/diff",
+ "homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff"
],
- "time": "2015-02-22 15:13:53"
+ "time": "2015-12-08 07:14:41"
},
{
"name": "sebastian/environment",
- "version": "1.2.2",
+ "version": "1.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e"
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e",
- "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea",
+ "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^4.8 || ^5.0"
},
"type": "library",
"extra": {
@@ -1455,20 +1630,20 @@
"environment",
"hhvm"
],
- "time": "2015-01-01 10:01:08"
+ "time": "2016-08-18 05:49:44"
},
{
"name": "sebastian/exporter",
- "version": "1.2.0",
+ "version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "84839970d05254c73cde183a721c7af13aede943"
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943",
- "reference": "84839970d05254c73cde183a721c7af13aede943",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4",
+ "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4",
"shasum": ""
},
"require": {
@@ -1476,12 +1651,13 @@
"sebastian/recursion-context": "~1.0"
},
"require-dev": {
+ "ext-mbstring": "*",
"phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "1.3.x-dev"
}
},
"autoload": {
@@ -1521,20 +1697,20 @@
"export",
"exporter"
],
- "time": "2015-01-27 07:23:06"
+ "time": "2016-06-17 09:04:28"
},
{
"name": "sebastian/global-state",
- "version": "1.0.0",
+ "version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01"
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
- "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
"shasum": ""
},
"require": {
@@ -1572,20 +1748,20 @@
"keywords": [
"global state"
],
- "time": "2014-10-06 09:23:50"
+ "time": "2015-10-12 03:26:01"
},
{
"name": "sebastian/recursion-context",
- "version": "1.0.0",
+ "version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "3989662bbb30a29d20d9faa04a846af79b276252"
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252",
- "reference": "3989662bbb30a29d20d9faa04a846af79b276252",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791",
+ "reference": "913401df809e99e4f47b27cdd781f4a258d58791",
"shasum": ""
},
"require": {
@@ -1625,20 +1801,20 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2015-01-24 09:48:32"
+ "time": "2015-11-11 19:50:13"
},
{
"name": "sebastian/version",
- "version": "1.0.5",
+ "version": "1.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4"
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4",
- "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
"shasum": ""
},
"type": "library",
@@ -1660,39 +1836,38 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
- "time": "2015-02-24 06:35:25"
+ "time": "2015-06-21 13:59:46"
},
{
"name": "symfony/css-selector",
- "version": "v2.6.7",
- "target-dir": "Symfony/Component/CssSelector",
+ "version": "v2.8.15",
"source": {
"type": "git",
- "url": "https://github.com/symfony/CssSelector.git",
- "reference": "189cf0f7f56d7c4be3b778df15a7f16a29f3680d"
+ "url": "https://github.com/symfony/css-selector.git",
+ "reference": "981abbbd6ba49af338a98490cbe29e7f39ca9fa9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/CssSelector/zipball/189cf0f7f56d7c4be3b778df15a7f16a29f3680d",
- "reference": "189cf0f7f56d7c4be3b778df15a7f16a29f3680d",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/981abbbd6ba49af338a98490cbe29e7f39ca9fa9",
+ "reference": "981abbbd6ba49af338a98490cbe29e7f39ca9fa9",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "~2.7"
+ "php": ">=5.3.9"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev"
+ "dev-master": "2.8-dev"
}
},
"autoload": {
- "psr-0": {
+ "psr-4": {
"Symfony\\Component\\CssSelector\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1714,33 +1889,31 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2015-05-02 15:18:45"
+ "time": "2016-11-03 07:52:58"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.6.7",
- "target-dir": "Symfony/Component/EventDispatcher",
+ "version": "v2.8.15",
"source": {
"type": "git",
- "url": "https://github.com/symfony/EventDispatcher.git",
- "reference": "672593bc4b0043a0acf91903bb75a1c82d8f2e02"
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/672593bc4b0043a0acf91903bb75a1c82d8f2e02",
- "reference": "672593bc4b0043a0acf91903bb75a1c82d8f2e02",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/25c576abd4e0f212e678fe8b2bd9a9a98c7ea934",
+ "reference": "25c576abd4e0f212e678fe8b2bd9a9a98c7ea934",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.9"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~2.0,>=2.0.5",
- "symfony/dependency-injection": "~2.6",
- "symfony/expression-language": "~2.6",
- "symfony/phpunit-bridge": "~2.7",
- "symfony/stopwatch": "~2.3"
+ "symfony/config": "~2.0,>=2.0.5|~3.0.0",
+ "symfony/dependency-injection": "~2.6|~3.0.0",
+ "symfony/expression-language": "~2.6|~3.0.0",
+ "symfony/stopwatch": "~2.3|~3.0.0"
},
"suggest": {
"symfony/dependency-injection": "",
@@ -1749,13 +1922,16 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev"
+ "dev-master": "2.8-dev"
}
},
"autoload": {
- "psr-0": {
+ "psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1773,39 +1949,38 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2015-05-02 15:18:45"
+ "time": "2016-10-13 01:43:15"
},
{
"name": "symfony/yaml",
- "version": "v2.6.7",
- "target-dir": "Symfony/Component/Yaml",
+ "version": "v2.8.15",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Yaml.git",
- "reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2"
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/f157ab074e453ecd4c0fa775f721f6e67a99d9e2",
- "reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/befb26a3713c97af90d25dd12e75621ef14d91ff",
+ "reference": "befb26a3713c97af90d25dd12e75621ef14d91ff",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
- },
- "require-dev": {
- "symfony/phpunit-bridge": "~2.7"
+ "php": ">=5.3.9"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev"
+ "dev-master": "2.8-dev"
}
},
"autoload": {
- "psr-0": {
+ "psr-4": {
"Symfony\\Component\\Yaml\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1823,14 +1998,13 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2015-05-02 15:18:45"
+ "time": "2016-11-14 16:15:57"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
- "aik099/coding-standard": 20,
- "mindplay/annotations": 20
+ "aik099/coding-standard": 20
},
"prefer-stable": false,
"prefer-lowest": false,
Index: core/install/cache/class_structure.php
===================================================================
--- core/install/cache/class_structure.php
+++ core/install/cache/class_structure.php
@@ -36,6 +36,7 @@
'ConfigurationItem' => '/core/units/configuration/configuration.php',
'ConfigurationTagProcessor' => '/core/units/configuration/configuration_tag_processor.php',
'ConfigurationValidator' => '/core/units/configuration/configuration_validator.php',
+ 'ConsoleApplication' => '/core/kernel/console_application.php',
'ContentEventHandler' => '/core/units/content/content_eh.php',
'ContentTagProcessor' => '/core/units/content/content_tp.php',
'CoreUpgrades' => '/core/install/upgrades.php',
@@ -548,6 +549,13 @@
0 => 'kValidator',
),
),
+ 'ConsoleApplication' => array(
+ 'type' => 1,
+ 'modifiers' => 0,
+ 'extends' => array(
+ 0 => 'kApplication',
+ ),
+ ),
'ContentEventHandler' => array(
'type' => 1,
'modifiers' => 0,
Index: core/kernel/application.php
===================================================================
--- core/kernel/application.php
+++ core/kernel/application.php
@@ -216,6 +216,15 @@
public $siteDomain = null;
/**
+ * Web Request, that is being processed currently.
+ *
+ * Will be null, when no request is being processed (e.g. application is used from CLI).
+ *
+ * @var \Symfony\Component\HttpFoundation\Request
+ */
+ public $request;
+
+ /**
* Prevent kApplication class to be created directly, only via Instance method
*
* @access private
@@ -256,7 +265,14 @@
static $instance = false;
if ( !$instance ) {
- $class = defined('APPLICATION_CLASS') ? APPLICATION_CLASS : 'kApplication';
+ $class = APPLICATION_CLASS;
+
+ // FIXME: Handle case, when custom application class is specified.
+ if ( PHP_SAPI === 'cli' ) {
+ kUtil::includeOnce(__DIR__ . '/console_application.php');
+ $class = 'ConsoleApplication';
+ }
+
$instance = new $class();
}
@@ -279,6 +295,11 @@
return false;
}
+ // FIXME: Assign Symfony Request object provided from outside.
+ if ( PHP_SAPI !== 'cli' ) {
+ $this->request = true;
+ }
+
if ( preg_match('/utf-8/i', CHARSET) ) {
setlocale(LC_ALL, 'en_US.UTF-8');
mb_internal_encoding('UTF-8');
@@ -323,7 +344,46 @@
define('MOD_REWRITE', $this->ConfigValue('UseModRewrite') && !$this->isAdmin ? 1 : 0);
- // start processing request
+ $this->initBeforeOnAfterConfigRead();
+
+ $site_timezone = $this->ConfigValue('Config_Site_Time');
+
+ if ( $site_timezone ) {
+ date_default_timezone_set($site_timezone);
+ }
+
+ // Must be called before AfterConfigRead, because current user should be available there.
+ $this->ValidateLogin();
+
+ $this->UnitConfigReader->AfterConfigRead();
+
+ if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
+ $this->Debugger->appendTimestamp('Processed AfterConfigRead');
+ }
+
+ $this->initAfterOnAfterConfigRead();
+
+ if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
+ $this->Debugger->profileFinish('kernel4_startup');
+ }
+
+ $this->InitDone = true;
+
+ if ( PHP_SAPI !== 'cli' && !$this->isAdmin ) {
+ $this->HandleEvent(new kEvent('adm:OnStartup'));
+ }
+
+ return true;
+ }
+
+ /**
+ * Handles initialization part before "OnAfterConfigRead" events are called.
+ *
+ * @return void
+ */
+ protected function initBeforeOnAfterConfigRead()
+ {
+ // Start processing request.
$this->HttpQuery = $this->recallObject('kHTTPQuery');
$this->HttpQuery->process();
@@ -345,24 +405,18 @@
$this->cacheManager->LoadApplicationCache();
- $site_timezone = $this->ConfigValue('Config_Site_Time');
-
- if ( $site_timezone ) {
- date_default_timezone_set($site_timezone);
- }
-
if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('Loaded cache and phrases');
}
+ }
- $this->ValidateLogin(); // must be called before AfterConfigRead, because current user should be available there
-
- $this->UnitConfigReader->AfterConfigRead();
-
- if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
- $this->Debugger->appendTimestamp('Processed AfterConfigRead');
- }
-
+ /**
+ * Handles initialization part after "OnAfterConfigRead" events are called.
+ *
+ * @return void
+ */
+ protected function initAfterOnAfterConfigRead()
+ {
if ( $this->GetVar('m_cat_id') === false ) {
$this->SetVar('m_cat_id', 0);
}
@@ -376,18 +430,16 @@
if ( $visit_id !== false ) {
$this->SetVar('visits_id', $visit_id);
}
+ }
- if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
- $this->Debugger->profileFinish('kernel4_startup');
- }
-
- $this->InitDone = true;
-
- if ( PHP_SAPI !== 'cli' && !$this->isAdmin ) {
- $this->HandleEvent(new kEvent('adm:OnStartup'));
- }
-
- return true;
+ /**
+ * Detects if this is a web request.
+ *
+ * @return boolean
+ */
+ public function isWebRequest()
+ {
+ return isset($this->request);
}
/**
@@ -2472,7 +2524,7 @@
array_unshift($prefixes, $current_prefix);
}
- if ( $real_top ) {
+ if ( $real_top || !$this->isWebRequest() ) {
return $current_prefix;
}
@@ -2553,6 +2605,22 @@
}
/**
+ * Determines if access permissions should not be checked.
+ *
+ * @param integer|null $user_id User ID.
+ *
+ * @return boolean
+ */
+ public function permissionCheckingDisabled($user_id = null)
+ {
+ if ( !isset($user_id) ) {
+ $user_id = $this->RecallVar('user_id');
+ }
+
+ return $user_id == USER_ROOT;
+ }
+
+ /**
* Check current user permissions based on it's group permissions in specified category
*
* @param string $name permission name
Index: core/kernel/console_application.php
===================================================================
--- /dev/null
+++ core/kernel/console_application.php
@@ -0,0 +1,550 @@
+_queryStorage = $this->makeClass('Params');
+ $this->_sessionStorage = $this->makeClass('Params');
+
+ $this->SetVar('passed', 'm');
+ $this->SetVar('all_passed', 'm');
+ $this->SetVar('m_cat_page', 1);
+ $this->SetVar('m_opener', 's');
+
+ $this->StoreVar('user_id', USER_CLI);
+
+ $this->VerifyThemeId();
+ $this->VerifyLanguageId();
+ }
+
+ /**
+ * Returns site domain field. When none of site domains are found false is returned.
+ *
+ * @param string $field Field name.
+ * @param boolean $formatted Value should be formatted.
+ * @param string $format Format to be used.
+ *
+ * @return mixed
+ * @todo Move into separate module.
+ */
+ public function siteDomainField($field, $formatted = false, $format = null)
+ {
+ if ( !$this->isWebRequest() ) {
+ return false;
+ }
+
+ return parent::siteDomainField($field, $formatted, $format);
+ }
+
+ /**
+ * Returns current session id (SID)
+ *
+ * @return integer
+ */
+ public function GetSID()
+ {
+ // Used mostly for creating temp tables, that needs to be different in different process runs.
+ if ( !$this->isWebRequest() ) {
+ return 'cli' . getmypid();
+ }
+
+ return parent::GetSID();
+ }
+
+ /**
+ * Destroys current session
+ *
+ * @return void
+ * @throws LogicException When used during CLI request.
+ * @see UserHelper::logoutUser()
+ */
+ public function DestroySession()
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ parent::DestroySession();
+ }
+
+ /**
+ * Returns variable passed to the script as GET/POST/COOKIE
+ *
+ * @param string $name Name of variable to retrieve.
+ * @param mixed $default Default value returned in case if variable not present.
+ *
+ * @return mixed
+ */
+ public function GetVar($name, $default = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ return $this->_queryStorage->Get($name, $default);
+ }
+
+ return parent::GetVar($name, $default);
+ }
+
+ /**
+ * Removes forceful escaping done to the variable upon Front-End submission.
+ *
+ * @param string|array $value Value.
+ *
+ * @return string|array
+ * @throws LogicException When used during CLI request.
+ * @see kHttpQuery::StripSlashes
+ * @todo Temporary method for marking problematic places to take care of, when forceful escaping will be removed.
+ */
+ public function unescapeRequestVariable($value)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ return parent::unescapeRequestVariable($value);
+ }
+
+ /**
+ * Returns variable passed to the script as $type
+ *
+ * @param string $name Name of variable to retrieve.
+ * @param string $type Get/Post/Cookie.
+ * @param mixed $default Default value returned in case if variable not present.
+ *
+ * @return mixed
+ * @throws LogicException When used during CLI request.
+ */
+ public function GetVarDirect($name, $type, $default = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ return parent::GetVarDirect($name, $type, $default);
+ }
+
+ /**
+ * Returns ALL variables passed to the script as GET/POST/COOKIE
+ *
+ * @return array
+ * @throws LogicException When used during CLI request.
+ *
+ * @deprecated
+ */
+ public function GetVars()
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ return parent::GetVars();
+ }
+
+ /**
+ * Set the variable 'as it was passed to the script through GET/POST/COOKIE'
+ *
+ * This could be useful to set the variable when you know that
+ * other objects would relay on variable passed from GET/POST/COOKIE
+ * or you could use SetVar() / GetVar() pairs to pass the values between different objects.
+ *
+ * @param string $var Variable name to set.
+ * @param mixed $val Variable value.
+ *
+ * @return void
+ */
+ public function SetVar($var, $val)
+ {
+ if ( !$this->isWebRequest() ) {
+ $this->_queryStorage->Set($var, $val);
+
+ return;
+ }
+
+ parent::SetVar($var, $val);
+ }
+
+ /**
+ * Deletes kHTTPQuery variable
+ *
+ * @param string $var Variable name.
+ *
+ * @return void
+ * @todo Think about method name.
+ */
+ public function DeleteVar($var)
+ {
+ if ( !$this->isWebRequest() ) {
+ $this->_queryStorage->Remove($var);
+
+ return;
+ }
+
+ parent::DeleteVar($var);
+ }
+
+ /**
+ * Deletes Session variable
+ *
+ * @param string $var Variable name.
+ *
+ * @return void
+ */
+ public function RemoveVar($var)
+ {
+ if ( !$this->isWebRequest() ) {
+ $this->_sessionStorage->Remove($var);
+
+ return;
+ }
+
+ parent::RemoveVar($var);
+ }
+
+ /**
+ * Removes variable from persistent session
+ *
+ * @param string $var Variable name.
+ *
+ * @return void
+ * @throws LogicException When used during CLI request.
+ */
+ public function RemovePersistentVar($var)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ parent::RemovePersistentVar($var);
+ }
+
+ /**
+ * Restores Session variable to it's db version
+ *
+ * @param string $var Variable name.
+ *
+ * @return void
+ * @throws LogicException When used during CLI request.
+ */
+ public function RestoreVar($var)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ parent::RestoreVar($var);
+ }
+
+ /**
+ * Returns session variable value
+ *
+ * Return value of $var variable stored in Session. An optional default value could be passed as second parameter.
+ *
+ * @param string $var Variable name.
+ * @param mixed $default Default value to return if no $var variable found in session.
+ *
+ * @return mixed
+ * @see Session::RecallVar()
+ */
+ public function RecallVar($var, $default = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ return $this->_sessionStorage->Get($var, $default);
+ }
+
+ return parent::RecallVar($var, $default);
+ }
+
+ /**
+ * Returns variable value from persistent session
+ *
+ * @param string $var Variable name.
+ * @param mixed $default Default value to return if no $var variable found in persistent session.
+ *
+ * @return mixed
+ * @throws LogicException When used during CLI request.
+ * @see Session::RecallPersistentVar()
+ */
+ public function RecallPersistentVar($var, $default = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ return parent::RecallPersistentVar($var, $default);
+ }
+
+ /**
+ * Stores variable $val in session under name $var
+ * Use this method to store variable in session. Later this variable could be recalled.
+ *
+ * @param string $var Variable name.
+ * @param mixed $val Variable value.
+ * @param boolean $optional Is value optional.
+ *
+ * @return void
+ * @see kApplication::RecallVar()
+ */
+ public function StoreVar($var, $val, $optional = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ $this->_sessionStorage->Set($var, $val);
+
+ return;
+ }
+
+ parent::StoreVar($var, $val, $optional);
+ }
+
+ /**
+ * Stores variable to persistent session
+ *
+ * @param string $var Variable name.
+ * @param mixed $val Variable value.
+ * @param boolean $optional Is value optional.
+ *
+ * @return void
+ * @throws LogicException When used during CLI request.
+ */
+ public function StorePersistentVar($var, $val, $optional = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ parent::StorePersistentVar($var, $val, $optional);
+ }
+
+ /**
+ * Stores default value for session variable
+ *
+ * @param string $var Variable name.
+ * @param string $val Variable value.
+ * @param boolean $optional Is value optional.
+ *
+ * @return void
+ * @throws LogicException When used during CLI request.
+ * @see Session::RecallVar()
+ * @see Session::StoreVar()
+ */
+ public function StoreVarDefault($var, $val, $optional = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ parent::StoreVarDefault($var, $val, $optional);
+ }
+
+ /**
+ * Links HTTP Query variable with session variable
+ *
+ * If variable $var is passed in HTTP Query it is stored in session for later use. If it's not passed it's
+ * recalled from session. This method could be used for making sure that GetVar will return query or session
+ * value for given variable, when query variable should overwrite session (and be stored there for later use).
+ * This could be used for passing item's ID into popup with multiple tab -
+ * in popup script you just need to call LinkVar('id', 'current_id') before first use of GetVar('id').
+ * After that you can be sure that GetVar('id') will return passed id or id passed earlier and stored in session
+ *
+ * @param string $var HTTP Query (GPC) variable name.
+ * @param mixed $ses_var Session variable name.
+ * @param mixed $default Default variable value.
+ * @param boolean $optional Is value optional.
+ *
+ * @return void
+ * @throws LogicException When used during CLI request.
+ */
+ public function LinkVar($var, $ses_var = null, $default = '', $optional = false)
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ parent::LinkVar($var, $ses_var, $default, $optional);
+ }
+
+ /**
+ * Returns variable from HTTP Query, or from session if not passed in HTTP Query
+ * The same as LinkVar, but also returns the variable value taken from HTTP Query if passed, or
+ * from session if not passed. Returns the default value if variable does not exist in session
+ * and was not passed in HTTP Query
+ *
+ * @param string $var HTTP Query (GPC) variable name.
+ * @param mixed $ses_var Session variable name.
+ * @param mixed $default Default variable value.
+ *
+ * @return mixed
+ * @throws LogicException When used during CLI request.
+ * @see LinkVar
+ */
+ public function GetLinkedVar($var, $ses_var = null, $default = '')
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ return parent::GetLinkedVar($var, $ses_var, $default);
+ }
+
+ /**
+ * Checks if user is logged in, and creates
+ * user object if so. User object can be recalled
+ * later using "u.current" prefix_special. Also you may
+ * get user id by getting "u.current_id" variable.
+ *
+ * @return void
+ */
+ protected function ValidateLogin()
+ {
+ if ( $this->isWebRequest() ) {
+ parent::ValidateLogin();
+ }
+
+ // Do nothing for CLI requests.
+ }
+
+ /**
+ * Loads current user persistent session data
+ *
+ * @return void
+ * @throws LogicException When used during CLI request.
+ */
+ public function LoadPersistentVars()
+ {
+ if ( !$this->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
+ parent::LoadPersistentVars();
+ }
+
+ /**
+ * Allows to check if user in this session is logged in or not
+ *
+ * @return boolean
+ */
+ public function LoggedIn()
+ {
+ if ( !$this->isWebRequest() ) {
+ return false;
+ }
+
+ return parent::LoggedIn();
+ }
+
+ /**
+ * Determines if access permissions should not be checked.
+ *
+ * @param integer|null $user_id User ID.
+ *
+ * @return boolean
+ */
+ public function permissionCheckingDisabled($user_id = null)
+ {
+ // Any user in CLI mode is allowed to do anything.
+ if ( !$this->isWebRequest() ) {
+ return true;
+ }
+
+ return parent::permissionCheckingDisabled($user_id);
+ }
+
+ /**
+ * Returns Window ID of passed prefix main prefix (in edit mode)
+ *
+ * @param string $prefix Prefix.
+ *
+ * @return integer
+ */
+ public function GetTopmostWid($prefix)
+ {
+ // No editing popups in CLI.
+ if ( !$this->isWebRequest() ) {
+ return '';
+ }
+
+ return parent::GetTopmostWid($prefix);
+ }
+
+ /**
+ * Checks, that given prefix is in temp mode
+ *
+ * @param string $prefix Prefix.
+ * @param string $special Special.
+ *
+ * @return boolean
+ */
+ public function IsTempMode($prefix, $special = '')
+ {
+ if ( !$this->isWebRequest() ) {
+ return false;
+ }
+
+ return parent::IsTempMode($prefix, $special);
+ }
+
+ /**
+ * Returns the client IP address.
+ *
+ * @return string The client IP address
+ */
+ public function getClientIp()
+ {
+ if ( !$this->isWebRequest() ) {
+ return '';
+ }
+
+ return parent::getClientIp();
+ }
+
+}
Index: core/kernel/db/cat_event_handler.php
===================================================================
--- core/kernel/db/cat_event_handler.php
+++ core/kernel/db/cat_event_handler.php
@@ -690,8 +690,8 @@
return;
}
- if ( $this->Application->RecallVar('user_id') == USER_ROOT ) {
- // for "root" CATEGORY.VIEW permission is checked for items lists too
+ if ( $this->Application->permissionCheckingDisabled() ) {
+ // For "root" CATEGORY.VIEW permission is checked for items lists too.
$view_perm = 1;
}
else {
@@ -1875,7 +1875,13 @@
// get PerPage (forced -> session -> config -> 10)
$object->SetPerPage($this->getPerPage($event));
- // main lists on Front-End have special get parameter for page
+ if ( !$this->Application->isWebRequest() ) {
+ $object->SetPage(1);
+
+ return;
+ }
+
+ // Main lists on Front-End have special get parameter for page.
$page = $object->isMainList() ? $this->Application->GetVar('page') : false;
if ( !$page ) {
@@ -2761,8 +2767,13 @@
}
}
else {
- $sorting_settings = $this->getListSetting($event, 'Sortings');
- $sort_by = trim(getArrayValue($sorting_settings, 'Sort1') . ',' . getArrayValue($sorting_settings, 'Sort1_Dir'), ',');
+ if ( $this->Application->isWebRequest() ) {
+ $sorting_settings = $this->getListSetting($event, 'Sortings');
+ $sort_by = trim(getArrayValue($sorting_settings, 'Sort1') . ',' . getArrayValue($sorting_settings, 'Sort1_Dir'), ',');
+ }
+ else {
+ $sort_by = '';
+ }
if ( !$sort_by ) {
$event->setEventParam('sort_by', 'Relevance,desc|' . $default_sorting);
@@ -2870,14 +2881,16 @@
$config->addGrids($grid_data, $process_grid . 'ShowAll');
}
- // add options for CategoryId field (quick way to select item's primary category)
- $category_helper = $this->Application->recallObject('CategoryHelper');
- /* @var $category_helper CategoryHelper */
-
- $virtual_fields = $config->getVirtualFields();
- $virtual_fields['CategoryId']['default'] = (int)$this->Application->GetVar('m_cat_id');
- $virtual_fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions();
- $config->setVirtualFields($virtual_fields);
+ if ( $this->Application->isWebRequest() ) {
+ // Add options for CategoryId field (quick way to select item's primary category).
+ $category_helper = $this->Application->recallObject('CategoryHelper');
+ /* @var $category_helper CategoryHelper */
+
+ $virtual_fields = $config->getVirtualFields();
+ $virtual_fields['CategoryId']['default'] = (int)$this->Application->GetVar('m_cat_id');
+ $virtual_fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions();
+ $config->setVirtualFields($virtual_fields);
+ }
}
/**
Index: core/kernel/db/cat_tag_processor.php
===================================================================
--- core/kernel/db/cat_tag_processor.php
+++ core/kernel/db/cat_tag_processor.php
@@ -949,7 +949,7 @@
*/
function AllowedCategoriesJSON($params)
{
- if ( $this->Application->RecallVar('user_id') == USER_ROOT ) {
+ if ( $this->Application->permissionCheckingDisabled() ) {
$categories = true;
}
else {
Index: core/kernel/db/db_event_handler.php
===================================================================
--- core/kernel/db/db_event_handler.php
+++ core/kernel/db/db_event_handler.php
@@ -236,6 +236,12 @@
return $main_object->GetDBField($event->getUnitConfig()->getIDField());
}
+ if ( !$this->Application->isWebRequest() ) {
+ throw new LogicException(
+ 'The "' . $event->getPrefixSpecial() . '" object can\'t be auto-loaded from CLI request.'
+ );
+ }
+
// 1. get id from post (used in admin)
$ret = $this->Application->GetVar($event->getPrefixSpecial(true) . '_id');
if ( ($ret !== false) && ($ret != '') ) {
@@ -290,6 +296,10 @@
*/
protected function StoreSelectedIDs(kEvent $event, $direct_ids = NULL)
{
+ if ( !$this->Application->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
$wid = $this->Application->GetTopmostWid($event->Prefix);
$session_name = rtrim($event->getPrefixSpecial() . '_selected_ids_' . $wid, '_');
@@ -362,6 +372,10 @@
*/
protected function getSelectedIDs(kEvent $event, $from_session = false)
{
+ if ( !$this->Application->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
if ( $from_session ) {
$wid = $this->Application->GetTopmostWid($event->Prefix);
$var_name = rtrim($event->getPrefixSpecial() . '_selected_ids_' . $wid, '_');
@@ -420,6 +434,10 @@
*/
protected function clearSelectedIDs(kEvent $event)
{
+ if ( !$this->Application->isWebRequest() ) {
+ throw new LogicException('Web Request related method "' . __METHOD__ . '" was called from CLI mode.');
+ }
+
$prefix_special = $event->getPrefixSpecial();
$ids = implode(',', $this->getSelectedIDs($event, true));
@@ -450,10 +468,13 @@
if ( $event->getEventParam('form_name') !== false ) {
$form_name = $event->getEventParam('form_name');
}
- else {
- $request_forms = $this->Application->GetVar('forms', Array ());
+ elseif ( $this->Application->isWebRequest() ) {
+ $request_forms = $this->Application->GetVar('forms', array());
$form_name = (string)getArrayValue($request_forms, $object->getPrefixSpecial());
}
+ else {
+ $form_name = null;
+ }
$object->Configure($event->getEventParam('populate_ml_fields') || $event->getUnitConfig()->getPopulateMlFields(), $form_name);
$this->PrepareObject($object, $event);
@@ -473,8 +494,18 @@
$this->Application->setEvent($event->getPrefixSpecial(), '');
- $save_event = $this->UseTempTables($event) && $this->Application->GetTopmostPrefix($event->Prefix) == $event->Prefix ? 'OnSave' : 'OnUpdate';
- $this->Application->SetVar($event->getPrefixSpecial() . '_SaveEvent', $save_event);
+ if ( $this->Application->isWebRequest() ) {
+ if ( $this->UseTempTables($event)
+ && $this->Application->GetTopmostPrefix($event->Prefix) == $event->Prefix
+ ) {
+ $save_event = 'OnSave';
+ }
+ else {
+ $save_event = 'OnUpdate';
+ }
+
+ $this->Application->SetVar($event->getPrefixSpecial() . '_SaveEvent', $save_event);
+ }
}
/**
@@ -558,19 +589,19 @@
$event->setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true));
$status_checked = false;
- if ( $user_id == USER_ROOT || $this->CheckPermission($event) ) {
- // don't autoload item, when user doesn't have view permission
+ if ( $this->Application->permissionCheckingDisabled($user_id) || $this->CheckPermission($event) ) {
+ // Don't autoload item, when user doesn't have view permission.
$this->LoadItem($event);
$status_checked = true;
$editing_mode = defined('EDITING_MODE') ? EDITING_MODE : false;
$id_from_request = $event->getEventParam(kEvent::FLAG_ID_FROM_REQUEST);
- if ( $user_id != USER_ROOT
+ if ( !$this->Application->permissionCheckingDisabled($user_id)
&& !$this->Application->isAdmin
&& !($editing_mode || ($id_from_request ? $this->checkItemStatus($event) : true))
) {
- // non-root user AND on front-end AND (not editing mode || incorrect status)
+ // Permissions are being checked AND on Front-End AND (not editing mode || incorrect status).
$perm_status = false;
}
}
@@ -655,7 +686,8 @@
$object->setParentEvent($parent_event);
}
- $object->BuildTables($event->Prefix, $this->getSelectedIDs($event));
+ $ids = $this->Application->isWebRequest() ? $this->getSelectedIDs($event) : array();
+ $object->BuildTables($event->Prefix, $ids);
}
/**
@@ -743,8 +775,11 @@
$object->linkToParent($this->getMainSpecial($event));
}
- $this->AddFilters($event);
- $this->SetCustomQuery($event); // new!, use this for dynamic queries based on specials for ex.
+ if ( $this->Application->isWebRequest() ) {
+ $this->AddFilters($event);
+ }
+
+ $this->SetCustomQuery($event); // New!, use this for dynamic queries based on specials for ex.
$this->SetPagination($event);
$this->SetSorting($event);
@@ -895,7 +930,13 @@
// get PerPage (forced -> session -> config -> 10)
$object->SetPerPage($this->getPerPage($event));
- // main lists on Front-End have special get parameter for page
+ if ( !$this->Application->isWebRequest() ) {
+ $object->SetPage(1);
+
+ return;
+ }
+
+ // Main lists on Front-End have special get parameter for page.
$page = $object->isMainList() ? $this->Application->GetVar('page') : false;
if ( !$page ) {
@@ -972,33 +1013,35 @@
return $per_page;
}
- if ( !$per_page && $object->isMainList() ) {
- // main lists on Front-End have special get parameter for per-page
- $per_page = $this->Application->GetVar('per_page');
- }
+ if ( $this->Application->isWebRequest() ) {
+ if ( !$per_page && $object->isMainList() ) {
+ // Main lists on Front-End have special get parameter for per-page.
+ $per_page = $this->Application->GetVar('per_page');
+ }
- if ( !$per_page ) {
- // per-page is given in "env" variable for given prefix
- $per_page = $this->Application->GetVar($event->getPrefixSpecial() . '_PerPage');
- }
+ if ( !$per_page ) {
+ // Per-page is given in "env" variable for given prefix.
+ $per_page = $this->Application->GetVar($event->getPrefixSpecial() . '_PerPage');
+ }
- if ( !$per_page && $event->Special ) {
- // when not part of env, then variables like "prefix.special_PerPage" are
- // replaced (by PHP) with "prefix_special_PerPage", so check for that too
- $per_page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_PerPage');
- }
+ if ( !$per_page && $event->Special ) {
+ // When not part of env, then variables like "prefix.special_PerPage" are
+ // replaced (by PHP) with "prefix_special_PerPage", so check for that too.
+ $per_page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_PerPage');
+ }
- if ( !$object->isMainList() ) {
- // per-page given in env and not in main list
- $view_name = $this->Application->RecallVar($event->getPrefixSpecial() . '_current_view');
+ if ( !$object->isMainList() ) {
+ // Per-page given in env and not in main list.
+ $view_name = $this->Application->RecallVar($event->getPrefixSpecial() . '_current_view');
- if ( $per_page ) {
- // per-page found in request -> store in session and persistent session
- $this->setListSetting($event, 'PerPage', $per_page);
- }
- else {
- // per-page not found in request -> get from pesistent session (or session)
- $per_page = $this->getListSetting($event, 'PerPage');
+ if ( $per_page ) {
+ // Per-page found in request -> store in session and persistent session.
+ $this->setListSetting($event, 'PerPage', $per_page);
+ }
+ else {
+ // Per-page not found in request -> get from pesistent session (or session).
+ $per_page = $this->getListSetting($event, 'PerPage');
+ }
}
}
@@ -1035,41 +1078,44 @@
$object = $event->getObject();
/* @var $object kDBList */
- if ( $object->isMainList() ) {
- $sort_by = $this->Application->GetVar('sort_by');
- $cur_sort1 = $cur_sort1_dir = $cur_sort2 = $cur_sort2_dir = false;
+ $cur_sort1 = $cur_sort1_dir = $cur_sort2 = $cur_sort2_dir = false;
- if ( $sort_by ) {
- $sortings = explode('|', $sort_by);
- list ($cur_sort1, $cur_sort1_dir) = explode(',', $sortings[0]);
+ if ( $this->Application->isWebRequest() ) {
+ if ( $object->isMainList() ) {
+ $sort_by = $this->Application->GetVar('sort_by');
+
+ if ( $sort_by ) {
+ $sortings = explode('|', $sort_by);
+ list ($cur_sort1, $cur_sort1_dir) = explode(',', $sortings[0]);
- if ( isset($sortings[1]) ) {
- list ($cur_sort2, $cur_sort2_dir) = explode(',', $sortings[1]);
+ if ( isset($sortings[1]) ) {
+ list ($cur_sort2, $cur_sort2_dir) = explode(',', $sortings[1]);
+ }
}
}
- }
- else {
- $sorting_settings = $this->getListSetting($event, 'Sortings');
+ else {
+ $sorting_settings = $this->getListSetting($event, 'Sortings');
- $cur_sort1 = getArrayValue($sorting_settings, 'Sort1');
- $cur_sort1_dir = getArrayValue($sorting_settings, 'Sort1_Dir');
- $cur_sort2 = getArrayValue($sorting_settings, 'Sort2');
- $cur_sort2_dir = getArrayValue($sorting_settings, 'Sort2_Dir');
- }
+ $cur_sort1 = getArrayValue($sorting_settings, 'Sort1');
+ $cur_sort1_dir = getArrayValue($sorting_settings, 'Sort1_Dir');
+ $cur_sort2 = getArrayValue($sorting_settings, 'Sort2');
+ $cur_sort2_dir = getArrayValue($sorting_settings, 'Sort2_Dir');
+ }
- $tag_sort_by = $event->getEventParam('sort_by');
+ $tag_sort_by = $event->getEventParam('sort_by');
- if ( $tag_sort_by ) {
- if ( $tag_sort_by == 'random' ) {
- $object->AddOrderField('RAND()', '');
- }
- else {
- // multiple sortings could be specified at once
- $tag_sort_by = explode('|', $tag_sort_by);
+ if ( $tag_sort_by ) {
+ if ( $tag_sort_by == 'random' ) {
+ $object->AddOrderField('RAND()', '');
+ }
+ else {
+ // Multiple sortings could be specified at once.
+ $tag_sort_by = explode('|', $tag_sort_by);
- foreach ($tag_sort_by as $sorting_element) {
- list ($by, $dir) = explode(',', $sorting_element);
- $object->AddOrderField($by, $dir);
+ foreach ( $tag_sort_by as $sorting_element ) {
+ list ($by, $dir) = explode(',', $sorting_element);
+ $object->AddOrderField($by, $dir);
+ }
}
}
}
@@ -1900,6 +1946,11 @@
*/
public function SaveLoggedChanges($changes_var_name, $save = true)
{
+ // Nothing needs to be saved > exit immediately.
+ if ( !$save ) {
+ return;
+ }
+
// 1. get changes, that were made
$changes = $this->Application->RecallVar($changes_var_name);
$changes = $changes ? unserialize($changes) : Array ();
Index: core/kernel/db/db_tag_processor.php
===================================================================
--- core/kernel/db/db_tag_processor.php
+++ core/kernel/db/db_tag_processor.php
@@ -484,8 +484,12 @@
$block_empty_cell_params['name'] = $this->SelectParam($params, 'empty_cell_render_as,block_empty_cell,empty_cell_block');
$i = 0;
+ $is_web_request = $this->Application->isWebRequest();
+
+ if ( $is_web_request ) {
+ $backup_id = $this->Application->GetVar($this->Prefix . '_id');
+ }
- $backup_id = $this->Application->GetVar($this->Prefix . '_id');
$displayed = Array ();
$column_number = 1;
@@ -493,9 +497,13 @@
$limit = isset($params['limit']) ? $params['limit'] : false;
- while (!$list->EOL() && (!$limit || $i<$limit)) {
- $this->Application->SetVar($this->getPrefixSpecial() . '_id', $list->GetDBField($id_field)); // for edit/delete links using GET
- $this->Application->SetVar($this->Prefix . '_id', $list->GetDBField($id_field));
+ while ( !$list->EOL() && (!$limit || $i < $limit) ) {
+ if ( $is_web_request ) {
+ // For edit/delete links using GET.
+ $this->Application->SetVar($this->getPrefixSpecial() . '_id', $list->GetDBField($id_field));
+ $this->Application->SetVar($this->Prefix . '_id', $list->GetDBField($id_field));
+ }
+
$block_params['is_last'] = ($i == $list->GetSelectedCount() - 1);
$block_params['last_row'] = ($i + (($i + 1) % $columns) >= $list->GetSelectedCount() - 1);
$block_params['not_last'] = !$block_params['is_last']; // for front-end
@@ -573,19 +581,22 @@
$i++;
}
- $cur_displayed = $this->Application->GetVar($this->Prefix . '_displayed_ids');
- if ( !$cur_displayed ) {
- $cur_displayed = Array ();
- }
- else {
- $cur_displayed = explode(',', $cur_displayed);
- }
+ if ( $is_web_request ) {
+ $cur_displayed = $this->Application->GetVar($this->Prefix . '_displayed_ids');
+
+ if ( !$cur_displayed ) {
+ $cur_displayed = array();
+ }
+ else {
+ $cur_displayed = explode(',', $cur_displayed);
+ }
- $displayed = array_unique(array_merge($displayed, $cur_displayed));
- $this->Application->SetVar($this->Prefix . '_displayed_ids', implode(',', $displayed));
+ $displayed = array_unique(array_merge($displayed, $cur_displayed));
+ $this->Application->SetVar($this->Prefix . '_displayed_ids', implode(',', $displayed));
- $this->Application->SetVar($this->Prefix . '_id', $backup_id);
- $this->Application->SetVar($this->getPrefixSpecial() . '_id', '');
+ $this->Application->SetVar($this->Prefix . '_id', $backup_id);
+ $this->Application->SetVar($this->getPrefixSpecial() . '_id', '');
+ }
if ( isset($params['more_link_render_as']) ) {
$block_params = $params;
Index: core/kernel/db/dbitem.php
===================================================================
--- core/kernel/db/dbitem.php
+++ core/kernel/db/dbitem.php
@@ -570,6 +570,10 @@
*/
public function getPendingActions($id = null)
{
+ if ( !$this->Application->isWebRequest() ) {
+ return array();
+ }
+
if ( !isset($id) ) {
$id = $this->GetID();
}
@@ -603,6 +607,10 @@
*/
public function setPendingActions($new_pending_actions = null, $id = null)
{
+ if ( !$this->Application->isWebRequest() ) {
+ return;
+ }
+
if ( !isset($new_pending_actions) ) {
$new_pending_actions = Array ();
}
@@ -1190,6 +1198,10 @@
*/
public function setModifiedFlag($mode = null)
{
+ if ( !$this->Application->isWebRequest() ) {
+ return;
+ }
+
$main_prefix = $this->Application->GetTopmostPrefix($this->Prefix);
$this->Application->StoreVar($main_prefix . '_modified', '1', true); // true for optional
@@ -1214,6 +1226,10 @@
*/
public function ShouldLogChanges($log_changes = null)
{
+ if ( !$this->Application->isWebRequest() ) {
+ return false;
+ }
+
$config = $this->getUnitConfig();
if ( !isset($log_changes) ) {
Index: core/kernel/kbase.php
===================================================================
--- core/kernel/kbase.php
+++ core/kernel/kbase.php
@@ -694,7 +694,7 @@
$allowed_modifiers[] = 'upload_dir';
}
- if ( !isset($field_modifiers) ) {
+ if ( !isset($field_modifiers) && $this->Application->isWebRequest() ) {
$field_modifiers = $this->Application->GetVar('field_modifiers');
if ( !$field_modifiers ) {
Index: core/kernel/managers/cache_manager.php
===================================================================
--- core/kernel/managers/cache_manager.php
+++ core/kernel/managers/cache_manager.php
@@ -341,7 +341,12 @@
$this->getToCache()
);
- $cache_rebuild_by = SERVER_NAME . ' (' . $this->Application->getClientIp() . ') - ' . date('d/m/Y H:i:s');
+ if ( $this->Application->isWebRequest() ) {
+ $cache_rebuild_by = SERVER_NAME . ' (' . $this->Application->getClientIp() . ') - ' . date('d/m/Y H:i:s');
+ }
+ else {
+ $cache_rebuild_by = 'CLI - ' . date('d/m/Y H:i:s');
+ }
if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) {
$this->Application->setCache('master:configs_parsed', serialize($cache));
Index: core/kernel/managers/hook_manager.php
===================================================================
--- core/kernel/managers/hook_manager.php
+++ core/kernel/managers/hook_manager.php
@@ -139,6 +139,8 @@
return ;
}
+ $is_web_request = $this->Application->isWebRequest();
+
foreach ($hooks as $hook) {
if ($hook['DoSpecial'] == '*') {
// use same special as master event
@@ -147,7 +149,7 @@
$prefix_special = rtrim($hook['DoPrefix'].'_'.$hook['DoSpecial'], '_');
- if ( $hook['Conditional'] && !$this->Application->GetVar($prefix_special) ) {
+ if ( $hook['Conditional'] && $is_web_request && !$this->Application->GetVar($prefix_special) ) {
continue;
}
@@ -182,4 +184,4 @@
return $hooks[ strtolower($event_key.'.'.$event->Name) ];
}
-}
\ No newline at end of file
+}
Index: core/kernel/managers/request_manager.php
===================================================================
--- core/kernel/managers/request_manager.php
+++ core/kernel/managers/request_manager.php
@@ -150,7 +150,7 @@
$event_handler = $this->Application->recallObject($event->Prefix . '_EventHandler');
/* @var $event_handler kEventHandler */
- if ( ($this->Application->RecallVar('user_id') == USER_ROOT) || $event_handler->CheckPermission($event) ) {
+ if ( $this->Application->permissionCheckingDisabled() || $event_handler->CheckPermission($event) ) {
$this->Application->HandleEvent($event);
$this->Application->notifyEventSubscribers($event);
}
@@ -475,4 +475,4 @@
$opener_stack->push($template, $params, $index_file);
$opener_stack->save();
}
-}
\ No newline at end of file
+}
Index: core/kernel/managers/scheduled_task_manager.php
===================================================================
--- core/kernel/managers/scheduled_task_manager.php
+++ core/kernel/managers/scheduled_task_manager.php
@@ -116,8 +116,12 @@
$events_source = $this->getAll();
- $user_id = $this->Application->RecallVar('user_id');
- $this->Application->StoreVar('user_id', USER_ROOT, true); // to prevent permission checking inside events, true for optional storage
+ if ( $this->Application->isWebRequest() ) {
+ $user_id = $this->Application->RecallVar('user_id');
+
+ // To prevent permission checking inside events, true for optional storage.
+ $this->Application->StoreVar('user_id', USER_ROOT, true);
+ }
$site_helper = $this->Application->recallObject('SiteHelper');
/* @var $site_helper SiteHelper */
@@ -148,7 +152,9 @@
$this->run($event_data);
}
- $this->Application->StoreVar('user_id', $user_id, $user_id == USER_GUEST);
+ if ( $this->Application->isWebRequest() ) {
+ $this->Application->StoreVar('user_id', $user_id, $user_id == USER_GUEST);
+ }
}
/**
Index: core/kernel/managers/url_manager.php
===================================================================
--- core/kernel/managers/url_manager.php
+++ core/kernel/managers/url_manager.php
@@ -130,8 +130,9 @@
unset($params['_auto_prefix_']); // this is parser-related param, do not need to pass it here
}
- $ssl = isset($params['__SSL__']) ? $params['__SSL__'] : NULL;
- if ( $ssl !== NULL ) {
+ $ssl = isset($params['__SSL__']) ? $params['__SSL__'] : null;
+
+ if ( $ssl !== null && $this->Application->isWebRequest() ) {
$session = $this->Application->recallObject('Session');
/* @var $session Session */
@@ -199,10 +200,12 @@
// append pass through variables to each link to be build
$params = array_merge($this->getPassThroughVariables($params), $params);
- $session = $this->Application->recallObject('Session');
+ if ( $this->Application->isWebRequest() ) {
+ $session = $this->Application->recallObject('Session');
- if ( $session->NeedQueryString() && !$force_no_sid ) {
- $params['sid'] = $this->Application->GetSID();
+ if ( $session->NeedQueryString() && !$force_no_sid ) {
+ $params['sid'] = $this->Application->GetSID();
+ }
}
if ( $force_rewrite || ($this->Application->RewriteURLs($ssl) && $rewrite) ) {
Index: core/kernel/processors/main_processor.php
===================================================================
--- core/kernel/processors/main_processor.php
+++ core/kernel/processors/main_processor.php
@@ -20,6 +20,10 @@
{
parent::__construct();
+ if ( !$this->Application->isWebRequest() ) {
+ return;
+ }
+
$actions = $this->Application->recallObject('kActions');
/* @var $actions Params */
@@ -1304,4 +1308,16 @@
return false;
}
+ /**
+ * Determines if this is the Web Request.
+ *
+ * @param array $params Tag params.
+ *
+ * @return string
+ */
+ protected function IsWebRequest(array $params)
+ {
+ return $this->Application->isWebRequest();
+ }
+
}
Index: core/kernel/session/session.php
===================================================================
--- core/kernel/session/session.php
+++ core/kernel/session/session.php
@@ -248,10 +248,6 @@
{
parent::Init($prefix, $special);
- if ( php_sapi_name() == 'cli' ) {
- $this->SetMode(self::smGET_ONLY);
- }
-
$this->CheckIfCookiesAreOn();
$this->Checkers = Array();
Index: core/kernel/startup.php
===================================================================
--- core/kernel/startup.php
+++ core/kernel/startup.php
@@ -203,3 +203,4 @@
// system users
define('USER_ROOT', -1);
define('USER_GUEST', -2);
+ define('USER_CLI', -3);
Index: core/kernel/utility/email.php
===================================================================
--- core/kernel/utility/email.php
+++ core/kernel/utility/email.php
@@ -790,9 +790,8 @@
$language_id = $restore ? $prev_language_id : $this->params['language_id'];
$this->Application->SetVar('m_lang', $language_id);
- $language = $this->Application->recallObject('lang.current');
- /* @var $language LanguagesItem */
-
+ /** @var LanguagesItem $language */
+ $language = $this->Application->recallObject('lang.current', null, array('skip_autoload' => true));
$language->Load($language_id);
$this->Application->Phrases->LanguageId = $language_id;
Index: core/kernel/utility/formatters/multilang_formatter.php
===================================================================
--- core/kernel/utility/formatters/multilang_formatter.php
+++ core/kernel/utility/formatters/multilang_formatter.php
@@ -251,7 +251,14 @@
$lang = $this->Application->GetVar('m_lang');
$def_lang = $this->Application->GetDefaultLanguageId();
- if ( !$this->Application->GetVar('allow_translation') && ($lang != $def_lang) && $object->isRequired($field) ) {
+ if ( $this->Application->isWebRequest() ) {
+ $allow_translation = $this->Application->GetVar('allow_translation');
+ }
+ else {
+ $allow_translation = false;
+ }
+
+ if ( !$allow_translation && ($lang != $def_lang) && $object->isRequired($field) ) {
$def_lang_field = 'l' . $def_lang . '_' . $master_field;
if ( !$object->ValidateRequired($def_lang_field, $options) ) {
@@ -313,4 +320,4 @@
return $value;
}
-}
\ No newline at end of file
+}
Index: core/kernel/utility/logger.php
===================================================================
--- core/kernel/utility/logger.php
+++ core/kernel/utility/logger.php
@@ -120,14 +120,9 @@
const LI_ADMIN = 2;
/**
- * Log interface: Cron (Front)
+ * Log interface: CLI
*/
- const LI_CRON_FRONT = 3;
-
- /**
- * Log interface: Cron (Admin)
- */
- const LI_CRON_ADMIN = 4;
+ const LI_CLI = 3;
/**
* Log interface: API
@@ -316,16 +311,20 @@
'LogNotificationStatus' => self::LNS_DISABLED,
);
- if ( $this->Application->isAdmin ) {
- $this->_logRecord['LogInterface'] = defined('CRON') && CRON ? self::LI_CRON_ADMIN : self::LI_ADMIN;
+ if ( $this->Application->isWebRequest() ) {
+ $this->_logRecord['LogInterface'] = $this->Application->isAdmin ? self::LI_ADMIN : self::LI_FRONT;
}
else {
- $this->_logRecord['LogInterface'] = defined('CRON') && CRON ? self::LI_CRON_FRONT : self::LI_FRONT;
+ $this->_logRecord['LogInterface'] = self::LI_CLI;
}
if ( $this->Application->InitDone ) {
$this->_logRecord['LogUserId'] = $this->Application->RecallVar('user_id');
- $this->_logRecord['LogSessionKey'] = $this->Application->GetSID();
+
+ if ( $this->Application->isWebRequest() ) {
+ $this->_logRecord['LogSessionKey'] = $this->Application->GetSID();
+ }
+
$this->_logRecord['IpAddress'] = $this->Application->getClientIp();
}
Index: core/units/admin/admin_events_handler.php
===================================================================
--- core/units/admin/admin_events_handler.php
+++ core/units/admin/admin_events_handler.php
@@ -196,7 +196,7 @@
$this->Application->DeleteUnitCache();
- if ( $this->Application->GetVar('validate_configs') ) {
+ if ( $this->Application->isWebRequest() && $this->Application->GetVar('validate_configs') ) {
$event->SetRedirectParam('validate_configs', 1);
}
Index: core/units/categories/categories_event_handler.php
===================================================================
--- core/units/categories/categories_event_handler.php
+++ core/units/categories/categories_event_handler.php
@@ -565,8 +565,8 @@
return;
}
- if ( $this->Application->RecallVar('user_id') == USER_ROOT ) {
- // for "root" CATEGORY.VIEW permission is checked for items lists too
+ if ( $this->Application->permissionCheckingDisabled() ) {
+ // For "root" CATEGORY.VIEW permission is checked for items lists too.
$view_perm = 1;
}
else {
@@ -1555,7 +1555,7 @@
{
parent::SetPagination($event);
- if ( !$this->Application->isAdmin ) {
+ if ( !$this->Application->isAdmin && $this->Application->isWebRequest() ) {
$page_var = $event->getEventParam('page_var');
if ( $page_var !== false ) {
@@ -1681,8 +1681,13 @@
}
}
else {
- $sorting_settings = $this->getListSetting($event, 'Sortings');
- $sort_by = trim(getArrayValue($sorting_settings, 'Sort1') . ',' . getArrayValue($sorting_settings, 'Sort1_Dir'), ',');
+ if ( $this->Application->isWebRequest() ) {
+ $sorting_settings = $this->getListSetting($event, 'Sortings');
+ $sort_by = trim(getArrayValue($sorting_settings, 'Sort1') . ',' . getArrayValue($sorting_settings, 'Sort1_Dir'), ',');
+ }
+ else {
+ $sort_by = '';
+ }
if ( !$sort_by ) {
$event->setEventParam('sort_by', 'Relevance,desc|' . $default_sorting);
@@ -2207,25 +2212,33 @@
$config->addSectionAdjustments($section_adjustments);
- // prepare structure dropdown
- $category_helper = $this->Application->recallObject('CategoryHelper');
- /* @var $category_helper CategoryHelper */
+ if ( $this->Application->isWebRequest() ) {
+ $category_helper = $this->Application->recallObject('CategoryHelper');
+ /* @var $category_helper CategoryHelper */
- $fields = $config->getFields();
+ $fields = $config->getFields();
- $fields['ParentId']['default'] = (int)$this->Application->GetVar('m_cat_id');
- $fields['ParentId']['options'] = $category_helper->getStructureTreeAsOptions();
+ // Prepare structure dropdown.
+ $fields['ParentId']['default'] = (int)$this->Application->GetVar('m_cat_id');
+ $fields['ParentId']['options'] = $category_helper->getStructureTreeAsOptions();
- // limit design list by theme
- $theme_id = $this->_getCurrentThemeId();
- $design_sql = $fields['Template']['options_sql'];
- $design_sql = str_replace('(tf.FilePath = "/designs")', '(' . implode(' OR ', $this->getDesignFolders()) . ')' . ' AND (t.ThemeId = ' . $theme_id . ')', $design_sql);
- $fields['Template']['options_sql'] = $design_sql;
+ // Limit design list by theme.
+ $theme_id = $this->_getCurrentThemeId();
+ $design_sql = $fields['Template']['options_sql'];
+ $design_sql = str_replace(
+ '(tf.FilePath = "/designs")',
+ '(' . implode(' OR ', $this->getDesignFolders()) . ') AND (t.ThemeId = ' . $theme_id . ')',
+ $design_sql
+ );
+ $fields['Template']['options_sql'] = $design_sql;
- // adds "Inherit From Parent" option to "Template" field
- $fields['Template']['options'] = Array (CATEGORY_TEMPLATE_INHERIT => $this->Application->Phrase('la_opt_InheritFromParent'));
+ // Adds "Inherit From Parent" option to "Template" field.
+ $fields['Template']['options'] = array(
+ CATEGORY_TEMPLATE_INHERIT => $this->Application->Phrase('la_opt_InheritFromParent'),
+ );
- $config->setFields($fields);
+ $config->setFields($fields);
+ }
if ($this->Application->isAdmin) {
// don't sort by Front-End sorting fields
Index: core/units/categories/categories_tag_processor.php
===================================================================
--- core/units/categories/categories_tag_processor.php
+++ core/units/categories/categories_tag_processor.php
@@ -2239,7 +2239,7 @@
*/
function AllowedCategoriesJSON($params)
{
- if ($this->Application->RecallVar('user_id') == USER_ROOT) {
+ if ( $this->Application->permissionCheckingDisabled() ) {
$categories = true;
}
else {
Index: core/units/email_templates/email_template_eh.php
===================================================================
--- core/units/email_templates/email_template_eh.php
+++ core/units/email_templates/email_template_eh.php
@@ -243,7 +243,7 @@
$ml_helper->replaceMLCalculatedFields($event);
- if ( $this->Application->GetVar('regional') ) {
+ if ( $this->Application->isWebRequest() && $this->Application->GetVar('regional') ) {
$config->setPopulateMlFields(true);
}
}
Index: core/units/forms/form_submissions/form_submissions_eh.php
===================================================================
--- core/units/forms/form_submissions/form_submissions_eh.php
+++ core/units/forms/form_submissions/form_submissions_eh.php
@@ -83,6 +83,10 @@
protected function OnBuildFormFields(kEvent $event)
{
+ if ( !$this->Application->isWebRequest() ) {
+ return;
+ }
+
$form_id = $this->Application->GetVar('form_id');
if ( !$form_id ) {
Index: core/units/helpers/file_helper.php
===================================================================
--- core/units/helpers/file_helper.php
+++ core/units/helpers/file_helper.php
@@ -139,8 +139,14 @@
*/
public function createItemFiles($prefix, $is_image = false)
{
- $items_info = $this->Application->GetVar($prefix);
- if ($items_info) {
+ if ( $this->Application->isWebRequest() ) {
+ $items_info = $this->Application->GetVar($prefix);
+ }
+ else {
+ $items_info = false;
+ }
+
+ if ( $items_info ) {
list (, $fields_values) = each($items_info);
$this->createUploadFields($prefix, $fields_values, $is_image);
}
Index: core/units/helpers/permissions_helper.php
===================================================================
--- core/units/helpers/permissions_helper.php
+++ core/units/helpers/permissions_helper.php
@@ -584,8 +584,7 @@
{
$user_id = (int)$user_id;
- if ( $user_id == USER_ROOT ) {
- // "root" is allowed anywhere
+ if ( $this->Application->permissionCheckingDisabled($user_id) ) {
return substr($name, -5) == '.deny' || $name == 'SYSTEM_ACCESS.READONLY' ? 0 : 1;
}
@@ -844,4 +843,4 @@
return 0;
}
- }
\ No newline at end of file
+ }
Index: core/units/helpers/upload_helper.php
===================================================================
--- core/units/helpers/upload_helper.php
+++ core/units/helpers/upload_helper.php
@@ -140,7 +140,7 @@
$admin_session = $this->Application->recallObject('Session.admin');
/* @var $admin_session Session */
- if ( $admin_session->RecallVar('user_id') == USER_ROOT ) {
+ if ( $this->Application->permissionCheckingDisabled($admin_session->RecallVar('user_id')) ) {
return true;
}
Index: core/units/logs/system_logs/system_logs_config.php
===================================================================
--- core/units/logs/system_logs/system_logs_config.php
+++ core/units/logs/system_logs/system_logs_config.php
@@ -144,8 +144,7 @@
'formatter' => 'kOptionsFormatter', 'options' => Array (
kLogger::LI_FRONT => 'Front',
kLogger::LI_ADMIN => 'Admin',
- kLogger::LI_CRON_FRONT => 'Cron (Front)',
- kLogger::LI_CRON_ADMIN => 'Cron (Admin)',
+ kLogger::LI_CLI => 'CLI',
kLogger::LI_API => 'API',
),
'not_null' => 1, 'default' => 0
@@ -202,4 +201,4 @@
),
),
),
-);
\ No newline at end of file
+);
Index: core/units/modules/modules_event_handler.php
===================================================================
--- core/units/modules/modules_event_handler.php
+++ core/units/modules/modules_event_handler.php
@@ -151,7 +151,7 @@
$new_modules = $modules_helper->getModules(kModulesHelper::NOT_INSTALLED);
- if ( !$new_modules || $this->Application->RecallVar('user_id') != USER_ROOT ) {
+ if ( !$new_modules || !$this->Application->permissionCheckingDisabled() ) {
return;
}
Index: core/units/modules/modules_tag_processor.php
===================================================================
--- core/units/modules/modules_tag_processor.php
+++ core/units/modules/modules_tag_processor.php
@@ -23,7 +23,7 @@
function _hasPrivileges()
{
- return $this->Application->RecallVar('user_id') == USER_ROOT;
+ return $this->Application->permissionCheckingDisabled();
}
function AlreadyInstalled($params)
Index: core/units/phrases/phrases_event_handler.php
===================================================================
--- core/units/phrases/phrases_event_handler.php
+++ core/units/phrases/phrases_event_handler.php
@@ -487,7 +487,7 @@
$ml_helper->replaceMLCalculatedFields($event);
- if ( $this->Application->GetVar('regional') ) {
+ if ( $this->Application->isWebRequest() && $this->Application->GetVar('regional') ) {
$event->getUnitConfig()->setPopulateMlFields(true);
}
}
Index: core/units/scheduled_tasks/scheduled_task_eh.php
===================================================================
--- core/units/scheduled_tasks/scheduled_task_eh.php
+++ core/units/scheduled_tasks/scheduled_task_eh.php
@@ -270,10 +270,11 @@
$config->setFields($fields);
}
- $cron_helper = $this->Application->recallObject('kCronHelper');
- /* @var $cron_helper kCronHelper */
-
- $cron_helper->initUnit($event->Prefix, 'RunSchedule');
-
+ if ( $this->Application->isWebRequest() ) {
+ /** @var kCronHelper $cron_helper */
+ $cron_helper = $this->Application->recallObject('kCronHelper');
+ $cron_helper->initUnit($event->Prefix, 'RunSchedule');
+ }
}
+
}
Index: in-portal
===================================================================
--- in-portal
+++ in-portal
@@ -20,7 +20,7 @@
$start = microtime(true);
-define('CRON', 1);
+define('CRON', 1); // Means 'used in CLI' (name kept for BC reasons).
define('INDEX_FILE', 'index.php');
define('DBG_SKIP_REPORTING', 1);
$_SERVER['REQUEST_URI'] = 'CRON';
@@ -31,11 +31,6 @@
$application =& kApplication::Instance();
$application->Init();
-
-// Assume user with all privileges, because nobody is doing authentication from CLI.
-$application->StoreVar('user_id', USER_ROOT, true);
-
$application->getConsoleApplication()->run();
-$application->Done();
$end = microtime(true);
Index: modules/custom/install.php
===================================================================
--- modules/custom/install.php
+++ modules/custom/install.php
@@ -27,7 +27,7 @@
$application =& kApplication::Instance();
$application->Init();
-if ( $application->RecallVar('user_id') != USER_ROOT ) {
+if ( !$application->permissionCheckingDisabled() ) {
die('restricted access!');
}
Index: modules/in-bulletin/install.php
===================================================================
--- modules/in-bulletin/install.php
+++ modules/in-bulletin/install.php
@@ -39,7 +39,7 @@
$application =& kApplication::Instance();
$application->Init();
-if ( $application->RecallVar('user_id') != USER_ROOT ) {
+if ( !$application->permissionCheckingDisabled() ) {
die('restricted access!');
}
Index: modules/in-commerce/install.php
===================================================================
--- modules/in-commerce/install.php
+++ modules/in-commerce/install.php
@@ -38,7 +38,7 @@
$application =& kApplication::Instance();
$application->Init();
-if ( $application->RecallVar('user_id') != USER_ROOT ) {
+if ( !$application->permissionCheckingDisabled() ) {
die('restricted access!');
}
Index: modules/in-commerce/units/addresses/addresses_event_handler.php
===================================================================
--- modules/in-commerce/units/addresses/addresses_event_handler.php
+++ modules/in-commerce/units/addresses/addresses_event_handler.php
@@ -102,8 +102,8 @@
$object = $event->getObject();
/* @var $object kDBItem */
- if ( !$object->isLoaded() || !$this->checkItemStatus($event) ) {
- // not trivially loaded object OR not current user address
+ if ( !$object->isLoaded() || ($this->Application->isWebRequest() && !$this->checkItemStatus($event)) ) {
+ // Not trivially loaded object OR not current user address.
$event->status = kEvent::erPERM_FAIL;
return ;
}
@@ -398,8 +398,8 @@
$object = $event->getObject();
/* @var $object kDBItem */
- if ( !$object->isLoaded() || !$this->checkItemStatus($event) ) {
- // not trivially loaded object OR not current user address
+ if ( !$object->isLoaded() || ($this->Application->isWebRequest() && !$this->checkItemStatus($event)) ) {
+ // Not trivially loaded object OR not current user address.
$event->status = kEvent::erPERM_FAIL;
return;
}
@@ -455,4 +455,4 @@
)
));
}
- }
\ No newline at end of file
+ }
Index: modules/in-commerce/units/orders/orders_event_handler.php
===================================================================
--- modules/in-commerce/units/orders/orders_event_handler.php
+++ modules/in-commerce/units/orders/orders_event_handler.php
@@ -3793,7 +3793,7 @@
$fields['BillingCountry']['default'] = $site_helper->getDefaultCountry('Billing');
$fields['ShippingCountry']['default'] = $site_helper->getDefaultCountry('Shipping');
- if (!$this->Application->isAdminUser) {
+ if ( !$this->Application->isAdminUser && $this->Application->isWebRequest() ) {
$user_groups = explode(',', $this->Application->RecallVar('UserGroups'));
$default_group = $this->Application->ConfigValue('User_LoggedInGroup');
if (!in_array($default_group, $user_groups)){
Index: modules/in-commerce/units/reports/reports_event_handler.php
===================================================================
--- modules/in-commerce/units/reports/reports_event_handler.php
+++ modules/in-commerce/units/reports/reports_event_handler.php
@@ -334,6 +334,10 @@
function OnUpdateConfig(kEvent $event)
{
+ if ( !$this->Application->isWebRequest() ) {
+ return;
+ }
+
$report = $this->Application->RecallVar('report_options');
if ( !$report ) {
Index: modules/in-link/install.php
===================================================================
--- modules/in-link/install.php
+++ modules/in-link/install.php
@@ -39,7 +39,7 @@
$application =& kApplication::Instance();
$application->Init();
-if ( $application->RecallVar('user_id') != USER_ROOT ) {
+if ( !$application->permissionCheckingDisabled() ) {
die('restricted access!');
}
Index: modules/in-link/units/link_validation/link_validation_eh.php
===================================================================
--- modules/in-link/units/link_validation/link_validation_eh.php
+++ modules/in-link/units/link_validation/link_validation_eh.php
@@ -494,8 +494,8 @@
*/
function OnPrepareLinkEditing($event)
{
- // hook to OnAfterConfigRead instead of OnEdit, because fake ids should be available in CheckPermission
- if ( $this->Application->GetVar('l_event') != 'OnEdit' ) {
+ // Hook to OnAfterConfigRead instead of OnEdit, because fake ids should be available in CheckPermission.
+ if ( !$this->Application->isWebRequest() || $this->Application->GetVar('l_event') != 'OnEdit' ) {
return;
}
Index: modules/in-news/install.php
===================================================================
--- modules/in-news/install.php
+++ modules/in-news/install.php
@@ -39,7 +39,7 @@
$application =& kApplication::Instance();
$application->Init();
-if ( $application->RecallVar('user_id') != USER_ROOT ) {
+if ( !$application->permissionCheckingDisabled() ) {
die('restricted access!');
}