Merge branch 'develop' into feature/introduce-user-groups

This commit is contained in:
Flavio Copes
2015-11-24 21:00:08 +01:00
4 changed files with 67 additions and 57 deletions

View File

@@ -1,4 +1,4 @@
# v1.0.0-refactor
# v1.0.0-rc.6
## XX/XX/2015
1. [](#new)
@@ -6,11 +6,8 @@
* Data objects: Allow function call chaining
* Data objects: Lazy load blueprints only if needed
* Refactor Config classes
# v1.0.0-rc.6
## XX/XX/2015
1. [](#bugfix)
* Automatically create unique security salt for each configuration
2. [](#bugfix)
* Fixed help output for `bin/plugin`
# v1.0.0-rc.5

View File

@@ -21,15 +21,9 @@
"mrclay/minify": "~2.2",
"donatj/phpuseragentparser": "~0.3",
"pimple/pimple": "~3.0",
"rockettheme/toolbox": "dev-develop",
"rockettheme/toolbox": "~1.2",
"maximebf/debugbar": "~1.10"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/rockettheme/toolbox"
}
],
"autoload": {
"psr-4": {
"Grav\\": "system/src/Grav"

92
composer.lock generated
View File

@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "3633e92a6e340a26229689d9b74031c2",
"content-hash": "9c314f997d29d7a78d3cf14f5976e6df",
"hash": "b1323e540382de7390663756b3a87de7",
"content-hash": "158cd4e3e1a40d5d1db9e3f29c24d83a",
"packages": [
{
"name": "doctrine/cache",
@@ -169,16 +169,16 @@
},
{
"name": "erusev/parsedown-extra",
"version": "0.7.0",
"version": "0.7.1",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown-extra.git",
"reference": "11a44e076d02ffcc4021713398a60cd73f78b6f5"
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/11a44e076d02ffcc4021713398a60cd73f78b6f5",
"reference": "11a44e076d02ffcc4021713398a60cd73f78b6f5",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c",
"shasum": ""
},
"require": {
@@ -209,7 +209,7 @@
"parsedown",
"parser"
],
"time": "2015-01-25 14:52:34"
"time": "2015-11-01 10:19:22"
},
{
"name": "filp/whoops",
@@ -666,16 +666,16 @@
},
{
"name": "rockettheme/toolbox",
"version": "dev-develop",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/rockettheme/toolbox.git",
"reference": "defdf78a4c2f537067c6548c99560b78ed92745d"
"reference": "0c7a3b4b6e4d73be8512e89f7acde6899334b7f2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rockettheme/toolbox/zipball/defdf78a4c2f537067c6548c99560b78ed92745d",
"reference": "defdf78a4c2f537067c6548c99560b78ed92745d",
"url": "https://api.github.com/repos/rockettheme/toolbox/zipball/0c7a3b4b6e4d73be8512e89f7acde6899334b7f2",
"reference": "0c7a3b4b6e4d73be8512e89f7acde6899334b7f2",
"shasum": ""
},
"require": {
@@ -701,6 +701,7 @@
"RocketTheme\\Toolbox\\StreamWrapper\\": "StreamWrapper/src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -710,24 +711,20 @@
"php",
"rockettheme"
],
"support": {
"source": "https://github.com/rockettheme/toolbox/tree/develop",
"issues": "https://github.com/rockettheme/toolbox/issues"
},
"time": "2015-11-19 15:03:27"
"time": "2015-11-24 17:04:24"
},
{
"name": "symfony/console",
"version": "v2.7.6",
"version": "v2.7.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "5efd632294c8320ea52492db22292ff853a43766"
"reference": "16bb1cb86df43c90931df65f529e7ebd79636750"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/5efd632294c8320ea52492db22292ff853a43766",
"reference": "5efd632294c8320ea52492db22292ff853a43766",
"url": "https://api.github.com/repos/symfony/console/zipball/16bb1cb86df43c90931df65f529e7ebd79636750",
"reference": "16bb1cb86df43c90931df65f529e7ebd79636750",
"shasum": ""
},
"require": {
@@ -752,7 +749,10 @@
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -770,20 +770,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2015-10-20 14:38:46"
"time": "2015-11-18 09:54:26"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.7.6",
"version": "v2.7.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8"
"reference": "7e2f9c31645680026c2372edf66f863fc7757af5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87a5db5ea887763fa3a31a5471b512ff1596d9b8",
"reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7e2f9c31645680026c2372edf66f863fc7757af5",
"reference": "7e2f9c31645680026c2372edf66f863fc7757af5",
"shasum": ""
},
"require": {
@@ -809,7 +809,10 @@
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -827,20 +830,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2015-10-11 09:39:48"
"time": "2015-10-30 20:10:21"
},
{
"name": "symfony/var-dumper",
"version": "v2.7.6",
"version": "v2.7.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "eb033050050916b6bfa51be71009ef67b16046c9"
"reference": "72bcb27411780eaee9469729aace73c0d46fb2b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/eb033050050916b6bfa51be71009ef67b16046c9",
"reference": "eb033050050916b6bfa51be71009ef67b16046c9",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/72bcb27411780eaee9469729aace73c0d46fb2b8",
"reference": "72bcb27411780eaee9469729aace73c0d46fb2b8",
"shasum": ""
},
"require": {
@@ -861,7 +864,10 @@
],
"psr-4": {
"Symfony\\Component\\VarDumper\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -883,20 +889,20 @@
"debug",
"dump"
],
"time": "2015-10-25 17:17:38"
"time": "2015-11-18 13:41:01"
},
{
"name": "symfony/yaml",
"version": "v2.7.6",
"version": "v2.7.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "eca9019c88fbe250164affd107bc8057771f3f4d"
"reference": "4cfcd7a9fceba662b3c036b7d9a91f6197af046c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d",
"reference": "eca9019c88fbe250164affd107bc8057771f3f4d",
"url": "https://api.github.com/repos/symfony/yaml/zipball/4cfcd7a9fceba662b3c036b7d9a91f6197af046c",
"reference": "4cfcd7a9fceba662b3c036b7d9a91f6197af046c",
"shasum": ""
},
"require": {
@@ -911,7 +917,10 @@
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
}
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -929,7 +938,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2015-10-11 09:39:48"
"time": "2015-11-18 13:41:01"
},
{
"name": "twig/twig",
@@ -997,8 +1006,7 @@
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"filp/whoops": 20,
"rockettheme/toolbox": 20
"filp/whoops": 20
},
"prefer-stable": false,
"prefer-lowest": false,

View File

@@ -3,6 +3,8 @@ namespace Grav\Common\Config;
use Grav\Common\File\CompiledYamlFile;
use Grav\Common\Data\Data;
use Grav\Common\Utils;
use RocketTheme\Toolbox\File\YamlFile;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
/**
@@ -165,7 +167,7 @@ class Setup extends Data
}
// Make sure we have valid setup.
$this->check();
$this->check($locator);
return $this;
}
@@ -214,9 +216,10 @@ class Setup extends Data
}
/**
* @param UniformResourceLocator $locator
* @throws \InvalidArgumentException
*/
protected function check()
protected function check(UniformResourceLocator $locator)
{
$streams = isset($this->items['streams']['schemes']) ? $this->items['streams']['schemes'] : null;
if (!is_array($streams)) {
@@ -228,5 +231,13 @@ class Setup extends Data
sprintf('Configuration is missing keys %s from streams.schemes!', implode(', ', $diff))
);
}
// Create security.yaml if it doesn't exist.
$filename = $locator->findResource('config://security.yaml', true, true);
$file = YamlFile::instance($filename);
if (!$file->exists()) {
$file->save(['salt' => Utils::generateRandomString(14)]);
$file->free();
}
}
}