Skip to content
Commits on Source (38)
......@@ -4,7 +4,6 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "7d101b08e5ae002d827cd42ae9a4e344",
"content-hash": "60f7057617c6d995bf9946d0b12f0b5d",
"packages": [
{
......@@ -48,7 +47,7 @@
"cors",
"stack"
],
"time": "2016-08-01 12:05:04"
"time": "2016-08-01T12:05:04+00:00"
},
{
"name": "composer/installers",
......@@ -143,7 +142,7 @@
"zend",
"zikula"
],
"time": "2015-02-18 17:17:01"
"time": "2015-02-18T17:17:01+00:00"
},
{
"name": "composer/semver",
......@@ -204,7 +203,7 @@
"validation",
"versioning"
],
"time": "2015-09-21 09:42:36"
"time": "2015-09-21T09:42:36+00:00"
},
{
"name": "doctrine/annotations",
......@@ -272,7 +271,7 @@
"docblock",
"parser"
],
"time": "2015-08-31 12:32:49"
"time": "2015-08-31T12:32:49+00:00"
},
{
"name": "doctrine/cache",
......@@ -342,7 +341,7 @@
"cache",
"caching"
],
"time": "2015-08-31 12:36:41"
"time": "2015-08-31T12:36:41+00:00"
},
{
"name": "doctrine/collections",
......@@ -408,7 +407,7 @@
"collections",
"iterator"
],
"time": "2015-04-14 22:21:58"
"time": "2015-04-14T22:21:58+00:00"
},
{
"name": "doctrine/common",
......@@ -481,7 +480,7 @@
"persistence",
"spl"
],
"time": "2015-08-31 13:00:22"
"time": "2015-08-31T13:00:22+00:00"
},
{
"name": "doctrine/inflector",
......@@ -548,7 +547,7 @@
"singularize",
"string"
],
"time": "2014-12-20 21:24:13"
"time": "2014-12-20T21:24:13+00:00"
},
{
"name": "doctrine/lexer",
......@@ -602,7 +601,7 @@
"lexer",
"parser"
],
"time": "2014-09-09 13:34:57"
"time": "2014-09-09T13:34:57+00:00"
},
{
"name": "easyrdf/easyrdf",
......@@ -664,7 +663,7 @@
"rdfa",
"sparql"
],
"time": "2015-02-27 09:45:49"
"time": "2015-02-27T09:45:49+00:00"
},
{
"name": "egulias/email-validator",
......@@ -717,7 +716,7 @@
"validation",
"validator"
],
"time": "2015-06-22 21:07:51"
"time": "2015-06-22T21:07:51+00:00"
},
{
"name": "guzzlehttp/guzzle",
......@@ -779,7 +778,7 @@
"rest",
"web service"
],
"time": "2016-07-15 17:22:37"
"time": "2016-07-15T17:22:37+00:00"
},
{
"name": "guzzlehttp/promises",
......@@ -830,7 +829,7 @@
"keywords": [
"promise"
],
"time": "2016-05-18 16:56:05"
"time": "2016-05-18T16:56:05+00:00"
},
{
"name": "guzzlehttp/psr7",
......@@ -888,7 +887,7 @@
"stream",
"uri"
],
"time": "2016-06-24 23:00:38"
"time": "2016-06-24T23:00:38+00:00"
},
{
"name": "ircmaxell/password-compat",
......@@ -930,7 +929,7 @@
"hashing",
"password"
],
"time": "2014-11-20 16:49:30"
"time": "2014-11-20T16:49:30+00:00"
},
{
"name": "masterminds/html5",
......@@ -995,7 +994,7 @@
"serializer",
"xml"
],
"time": "2016-05-10 14:11:45"
"time": "2016-05-10T14:11:45+00:00"
},
{
"name": "paragonie/random_compat",
......@@ -1043,7 +1042,7 @@
"pseudorandom",
"random"
],
"time": "2015-12-01 02:52:15"
"time": "2015-12-01T02:52:15+00:00"
},
{
"name": "psr/http-message",
......@@ -1092,7 +1091,7 @@
"request",
"response"
],
"time": "2015-05-04 20:22:00"
"time": "2015-05-04T20:22:00+00:00"
},
{
"name": "psr/log",
......@@ -1130,7 +1129,7 @@
"psr",
"psr-3"
],
"time": "2012-12-21 11:40:51"
"time": "2012-12-21T11:40:51+00:00"
},
{
"name": "stack/builder",
......@@ -1179,7 +1178,7 @@
"keywords": [
"stack"
],
"time": "2016-06-02 06:58:42"
"time": "2016-06-02T06:58:42+00:00"
},
{
"name": "symfony-cmf/routing",
......@@ -1238,7 +1237,7 @@
"database",
"routing"
],
"time": "2016-03-31 09:11:39"
"time": "2016-03-31T09:11:39+00:00"
},
{
"name": "symfony/class-loader",
......@@ -1291,7 +1290,7 @@
],
"description": "Symfony ClassLoader Component",
"homepage": "https://symfony.com",
"time": "2017-01-10 14:03:07"
"time": "2017-01-10T14:03:07+00:00"
},
{
"name": "symfony/console",
......@@ -1352,7 +1351,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2017-01-08 20:43:03"
"time": "2017-01-08T20:43:03+00:00"
},
{
"name": "symfony/debug",
......@@ -1409,7 +1408,7 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/dependency-injection",
......@@ -1472,7 +1471,7 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
"time": "2017-01-10 14:27:01"
"time": "2017-01-10T14:27:01+00:00"
},
{
"name": "symfony/event-dispatcher",
......@@ -1532,7 +1531,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/http-foundation",
......@@ -1587,7 +1586,7 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
"time": "2017-01-08 20:43:03"
"time": "2017-01-08T20:43:03+00:00"
},
{
"name": "symfony/http-kernel",
......@@ -1669,7 +1668,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2017-01-12 20:27:24"
"time": "2017-01-12T20:27:24+00:00"
},
{
"name": "symfony/polyfill-apcu",
......@@ -1722,7 +1721,7 @@
"portable",
"shim"
],
"time": "2016-11-14 01:06:16"
"time": "2016-11-14T01:06:16+00:00"
},
{
"name": "symfony/polyfill-iconv",
......@@ -1781,7 +1780,7 @@
"portable",
"shim"
],
"time": "2016-11-14 01:06:16"
"time": "2016-11-14T01:06:16+00:00"
},
{
"name": "symfony/polyfill-mbstring",
......@@ -1840,7 +1839,7 @@
"portable",
"shim"
],
"time": "2016-11-14 01:06:16"
"time": "2016-11-14T01:06:16+00:00"
},
{
"name": "symfony/polyfill-php54",
......@@ -1898,7 +1897,7 @@
"portable",
"shim"
],
"time": "2016-11-14 01:06:16"
"time": "2016-11-14T01:06:16+00:00"
},
{
"name": "symfony/polyfill-php55",
......@@ -1954,7 +1953,7 @@
"portable",
"shim"
],
"time": "2016-11-14 01:06:16"
"time": "2016-11-14T01:06:16+00:00"
},
{
"name": "symfony/process",
......@@ -2003,7 +2002,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/psr-http-message-bridge",
......@@ -2057,7 +2056,7 @@
"http-message",
"psr-7"
],
"time": "2015-05-29 17:57:12"
"time": "2015-05-29T17:57:12+00:00"
},
{
"name": "symfony/routing",
......@@ -2132,7 +2131,7 @@
"uri",
"url"
],
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/serializer",
......@@ -2196,7 +2195,7 @@
],
"description": "Symfony Serializer Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/translation",
......@@ -2260,7 +2259,7 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/validator",
......@@ -2333,7 +2332,7 @@
],
"description": "Symfony Validator Component",
"homepage": "https://symfony.com",
"time": "2017-01-12 19:24:25"
"time": "2017-01-12T19:24:25+00:00"
},
{
"name": "symfony/yaml",
......@@ -2382,7 +2381,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-01-03 13:49:52"
"time": "2017-01-03T13:49:52+00:00"
},
{
"name": "twig/twig",
......@@ -2443,7 +2442,7 @@
"keywords": [
"templating"
],
"time": "2016-01-25 21:22:18"
"time": "2016-01-25T21:22:18+00:00"
},
{
"name": "wikimedia/composer-merge-plugin",
......@@ -2492,7 +2491,7 @@
}
],
"description": "Composer plugin to merge multiple composer.json files",
"time": "2016-03-08 17:11:37"
"time": "2016-03-08T17:11:37+00:00"
},
{
"name": "zendframework/zend-diactoros",
......@@ -2542,7 +2541,7 @@
"psr",
"psr-7"
],
"time": "2015-08-10 20:04:20"
"time": "2015-08-10T20:04:20+00:00"
},
{
"name": "zendframework/zend-escaper",
......@@ -2586,7 +2585,7 @@
"escaper",
"zf2"
],
"time": "2015-06-03 14:05:37"
"time": "2015-06-03T14:05:37+00:00"
},
{
"name": "zendframework/zend-feed",
......@@ -2645,7 +2644,7 @@
"feed",
"zf2"
],
"time": "2015-08-04 21:39:18"
"time": "2015-08-04T21:39:18+00:00"
},
{
"name": "zendframework/zend-hydrator",
......@@ -2701,7 +2700,7 @@
"hydrator",
"zf2"
],
"time": "2015-09-17 14:06:43"
"time": "2015-09-17T14:06:43+00:00"
},
{
"name": "zendframework/zend-stdlib",
......@@ -2759,7 +2758,7 @@
"stdlib",
"zf2"
],
"time": "2015-09-25 04:06:33"
"time": "2015-09-25T04:06:33+00:00"
}
],
"packages-dev": [
......@@ -2819,7 +2818,7 @@
"testing",
"web"
],
"time": "2016-03-05 08:26:18"
"time": "2016-03-05T08:26:18+00:00"
},
{
"name": "behat/mink-browserkit-driver",
......@@ -2875,7 +2874,7 @@
"browser",
"testing"
],
"time": "2016-03-05 08:59:47"
"time": "2016-03-05T08:59:47+00:00"
},
{
"name": "behat/mink-goutte-driver",
......@@ -2930,7 +2929,7 @@
"headless",
"testing"
],
"time": "2016-03-05 09:04:22"
"time": "2016-03-05T09:04:22+00:00"
},
{
"name": "doctrine/instantiator",
......@@ -2984,7 +2983,7 @@
"constructor",
"instantiate"
],
"time": "2015-06-14 21:17:01"
"time": "2015-06-14T21:17:01+00:00"
},
{
"name": "fabpot/goutte",
......@@ -3033,7 +3032,7 @@
"keywords": [
"scraper"
],
"time": "2015-11-05 12:58:44"
"time": "2015-11-05T12:58:44+00:00"
},
{
"name": "jcalderonzumba/gastonjs",
......@@ -3090,7 +3089,7 @@
"headless",
"phantomjs"
],
"time": "2016-01-18 09:21:03"
"time": "2016-01-18T09:21:03+00:00"
},
{
"name": "jcalderonzumba/mink-phantomjs-driver",
......@@ -3151,7 +3150,7 @@
"phantomjs",
"testing"
],
"time": "2015-12-04 13:55:02"
"time": "2015-12-04T13:55:02+00:00"
},
{
"name": "mikey179/vfsStream",
......@@ -3197,7 +3196,7 @@
],
"description": "Virtual file system to mock the real file system in unit tests.",
"homepage": "http://vfs.bovigo.org/",
"time": "2015-10-06 16:59:57"
"time": "2015-10-06T16:59:57+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
......@@ -3246,7 +3245,7 @@
"email": "mike.vanriel@naenius.com"
}
],
"time": "2015-02-03 12:10:50"
"time": "2015-02-03T12:10:50+00:00"
},
{
"name": "phpspec/prophecy",
......@@ -3306,7 +3305,7 @@
"spy",
"stub"
],
"time": "2015-08-13 10:07:40"
"time": "2015-08-13T10:07:40+00:00"
},
{
"name": "phpunit/php-code-coverage",
......@@ -3368,7 +3367,7 @@
"testing",
"xunit"
],
"time": "2015-10-06 15:47:00"
"time": "2015-10-06T15:47:00+00:00"
},
{
"name": "phpunit/php-file-iterator",
......@@ -3415,7 +3414,7 @@
"filesystem",
"iterator"
],
"time": "2015-06-21 13:08:43"
"time": "2015-06-21T13:08:43+00:00"
},
{
"name": "phpunit/php-text-template",
......@@ -3456,7 +3455,7 @@
"keywords": [
"template"
],
"time": "2015-06-21 13:50:34"
"time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
......@@ -3497,7 +3496,7 @@
"keywords": [
"timer"
],
"time": "2015-06-21 08:01:12"
"time": "2015-06-21T08:01:12+00:00"
},
{
"name": "phpunit/php-token-stream",
......@@ -3546,20 +3545,20 @@
"keywords": [
"tokenizer"
],
"time": "2015-09-15 10:49:45"
"time": "2015-09-15T10:49:45+00:00"
},
{
"name": "phpunit/phpunit",
"version": "4.8.27",
"version": "4.8.28",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90"
"reference": "558a3a0d28b4cb7e4a593a4fbd2220e787076225"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90",
"reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/558a3a0d28b4cb7e4a593a4fbd2220e787076225",
"reference": "558a3a0d28b4cb7e4a593a4fbd2220e787076225",
"shasum": ""
},
"require": {
......@@ -3618,7 +3617,7 @@
"testing",
"xunit"
],
"time": "2016-07-21 06:48:14"
"time": "2016-11-14T06:25:28+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
......@@ -3674,7 +3673,7 @@
"mock",
"xunit"
],
"time": "2015-10-02 06:51:40"
"time": "2015-10-02T06:51:40+00:00"
},
{
"name": "sebastian/comparator",
......@@ -3738,7 +3737,7 @@
"compare",
"equality"
],
"time": "2015-07-26 15:48:44"
"time": "2015-07-26T15:48:44+00:00"
},
{
"name": "sebastian/diff",
......@@ -3790,7 +3789,7 @@
"keywords": [
"diff"
],
"time": "2015-02-22 15:13:53"
"time": "2015-02-22T15:13:53+00:00"
},
{
"name": "sebastian/environment",
......@@ -3840,7 +3839,7 @@
"environment",
"hhvm"
],
"time": "2015-08-03 06:14:51"
"time": "2015-08-03T06:14:51+00:00"
},
{
"name": "sebastian/exporter",
......@@ -3906,7 +3905,7 @@
"export",
"exporter"
],
"time": "2015-06-21 07:55:53"
"time": "2015-06-21T07:55:53+00:00"
},
{
"name": "sebastian/global-state",
......@@ -3957,7 +3956,7 @@
"keywords": [
"global state"
],
"time": "2014-10-06 09:23:50"
"time": "2014-10-06T09:23:50+00:00"
},
{
"name": "sebastian/recursion-context",
......@@ -4010,7 +4009,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2015-06-21 08:04:50"
"time": "2015-06-21T08:04:50+00:00"
},
{
"name": "sebastian/version",
......@@ -4045,7 +4044,7 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-06-21 13:59:46"
"time": "2015-06-21T13:59:46+00:00"
},
{
"name": "symfony/browser-kit",
......@@ -4102,7 +4101,7 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/css-selector",
......@@ -4155,7 +4154,7 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
},
{
"name": "symfony/dom-crawler",
......@@ -4211,7 +4210,7 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2017-01-02 20:30:24"
"time": "2017-01-02T20:30:24+00:00"
}
],
"aliases": [],
......
Drupal 8.2.8, 2017-04-19
------------------------
- Fixed security issues. See SA-CORE-2017-002.
Drupal 8.2.7, 2017-03-15
------------------------
- Fixed security issues. See SA-CORE-2017-001.
Drupal 8.2.3, 2016-11-16
------------------------
- Fixed security issues. See SA-CORE-2016-005.
......
......@@ -40,7 +40,7 @@
"jcalderonzumba/gastonjs": "~1.0.2",
"jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
"mikey179/vfsStream": "~1.2",
"phpunit/phpunit": "~4.8",
"phpunit/phpunit": ">=4.8.28 <5",
"symfony/css-selector": "~2.8"
},
"replace": {
......
......@@ -20,6 +20,7 @@
use Drupal\Core\Site\Settings;
use Drupal\Core\StringTranslation\Translator\FileTranslation;
use Drupal\Core\StackMiddleware\ReverseProxyMiddleware;
use Drupal\Core\StreamWrapper\PublicStream;
use Drupal\Core\Extension\ExtensionDiscovery;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\Url;
......@@ -1036,6 +1037,21 @@ function install_base_system(&$install_state) {
// Install system.module.
drupal_install_system($install_state);
// Prevent the installer from using the system temporary directory after the
// system module has been installed.
if (drupal_valid_test_ua()) {
// While the temporary directory could be preset/enforced in settings.php
// like the public files directory, some tests expect it to be configurable
// in the UI. If declared in settings.php, they would no longer be
// configurable. The temporary directory needs to match what is set in each
// test types ::prepareEnvironment() step.
$temporary_directory = dirname(PublicStream::basePath()) . '/temp';
file_prepare_directory($temporary_directory, FILE_MODIFY_PERMISSIONS | FILE_CREATE_DIRECTORY);
\Drupal::configFactory()->getEditable('system.file')
->set('path.temporary', $temporary_directory)
->save();
}
// Call file_ensure_htaccess() to ensure that all of Drupal's standard
// directories (e.g., the public files directory and config directory) have
// appropriate .htaccess files. These directories will have already been
......
......@@ -81,7 +81,7 @@ class Drupal {
/**
* The current system version.
*/
const VERSION = '8.2.6-dev';
const VERSION = '8.2.8-dev';
/**
* Core API compatibility.
......
......@@ -297,7 +297,7 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
$dependency_manager = $this->getConfigDependencyManager();
$dependents = $this->findConfigEntityDependentsAsEntities($type, $names, $dependency_manager);
$original_dependencies = $dependents;
$delete_uuids = $update_uuids = [];
$delete_uuids = [];
$return = [
'update' => [],
......@@ -305,6 +305,13 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
'unchanged' => [],
];
// Create a map of UUIDs to $original_dependencies key so that we can remove
// fixed dependencies.
$uuid_map = [];
foreach ($original_dependencies as $key => $entity) {
$uuid_map[$entity->uuid()] = $key;
}
// Try to fix any dependencies and find out what will happen to the
// dependency graph. Entities are processed in the order of most dependent
// first. For example, this ensures that Menu UI third party dependencies on
......@@ -340,8 +347,9 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
}
}
if ($fixed) {
// Remove the fixed dependency from the list of original dependencies.
unset($original_dependencies[$uuid_map[$dependent->uuid()]]);
$return['update'][] = $dependent;
$update_uuids[] = $dependent->uuid();
}
}
// If the entity cannot be fixed then it has to be deleted.
......@@ -354,8 +362,8 @@ public function getConfigEntitiesToChangeOnDependencyRemoval($type, array $names
}
// Use the lists of UUIDs to filter the original list to work out which
// configuration entities are unchanged.
$return['unchanged'] = array_filter($original_dependencies, function ($dependent) use ($delete_uuids, $update_uuids) {
return !(in_array($dependent->uuid(), $delete_uuids) || in_array($dependent->uuid(), $update_uuids));
$return['unchanged'] = array_filter($original_dependencies, function ($dependent) use ($delete_uuids) {
return !(in_array($dependent->uuid(), $delete_uuids));
});
return $return;
......
......@@ -1031,15 +1031,17 @@ protected function initializeSettings(Request $request) {
$prefix = Settings::getApcuPrefix('class_loader', $this->root);
$apc_loader = new ApcClassLoader($prefix, $this->classLoader);
$this->classLoader->unregister();
$apc_loader->register();
$old_loader = $this->classLoader;
$this->classLoader = $apc_loader;
// The optimized classloader might be persistent and store cache misses.
// For example, once a cache miss is stored in APCu clearing it on a
// specific web-head will not clear any other web-heads. Therefore
// fallback to the composer class loader that only statically caches
// misses.
$old_loader->register();
$old_loader = $this->classLoader;
$this->classLoader = $apc_loader;
// Our class loaders are preprended to ensure they come first like the
// class loader they are replacing.
$old_loader->register(TRUE);
$apc_loader->register(TRUE);
}
}
......
......@@ -303,6 +303,19 @@ public function fieldAccess($operation, FieldDefinitionInterface $field_definiti
// Get the default access restriction that lives within this field.
$default = $items ? $items->defaultAccess($operation, $account) : AccessResult::allowed();
// Explicitly disallow changing the entity ID and entity UUID.
if ($operation === 'edit') {
if ($field_definition->getName() === $this->entityType->getKey('id')) {
return $return_as_object ? AccessResult::forbidden('The entity ID cannot be changed') : FALSE;
}
elseif ($field_definition->getName() === $this->entityType->getKey('uuid')) {
// UUIDs can be set when creating an entity.
if ($items && ($entity = $items->getEntity()) && !$entity->isNew()) {
return $return_as_object ? AccessResult::forbidden('The entity UUID cannot be changed')->addCacheableDependency($entity) : FALSE;
}
}
}
// Get the default access restriction as specified by the access control
// handler.
$entity_default = $this->checkFieldAccess($operation, $field_definition, $account, $items);
......
......@@ -52,21 +52,8 @@ public function __construct($text, Url $url) {
* @param array $route_parameters
* (optional) An associative array of parameter names and values.
* @param array $options
* (optional) An associative array of additional options, with the following
* elements:
* - 'query': An array of query key/value-pairs (without any URL-encoding)
* to append to the URL. Merged with the parameters array.
* - 'fragment': A fragment identifier (named anchor) to append to the URL.
* Do not include the leading '#' character.
* - 'absolute': Defaults to FALSE. Whether to force the output to be an
* absolute link (beginning with http:). Useful for links that will be
* displayed outside the site, such as in an RSS feed.
* - 'language': An optional language object used to look up the alias
* for the URL. If $options['language'] is omitted, it defaults to the
* current language for the language type LanguageInterface::TYPE_URL.
* - 'https': Whether this URL should point to a secure location. If not
* defined, the current scheme is used, so the user stays on HTTP or HTTPS
* respectively. TRUE enforces HTTPS and FALSE enforces HTTP.
* The options parameter takes exactly the same structure.
* See \Drupal\Core\Url::fromUri() for details.
*
* @return static
*/
......
......@@ -157,4 +157,11 @@ protected function getPluralIndex() {
return -1;
}
/**
* {@inheritdoc}
*/
public function __sleep() {
return array_merge(parent::__sleep(), array('count'));
}
}
......@@ -100,11 +100,12 @@
$(window)
.on('resize.dialogResize scroll.dialogResize', eventData, autoResize)
.trigger('resize.dialogResize');
$(document).on('drupalViewportOffsetChange', eventData, autoResize);
$(document).on('drupalViewportOffsetChange.dialogResize', eventData, autoResize);
}
},
'dialog:beforeclose': function (event, dialog, $element) {
$(window).off('.dialogResize');
$(document).off('.dialogResize');
}
});
......
......@@ -37,3 +37,24 @@ function aggregator_update_8001() {
/**
* @} End of "addtogroup updates-8.0.0-rc".
*/
/**
* @addtogroup updates-8.2.x
* @{
*/
/**
* Make the 'Source feed' field for aggregator items required.
*/
function aggregator_update_8200() {
// aggregator_update_8001() did not update the last installed field storage
// definition for the aggregator item's 'Source feed' field.
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
$field_definition = $definition_update_manager->getFieldStorageDefinition('fid', 'aggregator_item');
$field_definition->setRequired(TRUE);
$definition_update_manager->updateFieldStorageDefinition($field_definition);
}
/**
* @} End of "addtogroup updates-8.2.x".
*/
<?php
namespace Drupal\aggregator\Tests\Update;
use Drupal\system\Tests\Update\UpdatePathTestBase;
/**
* Tests that node settings are properly updated during database updates.
*
* @group aggregator
*/
class AggregatorUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
];
}
/**
* Tests that the 'Source feed' field is required.
*
* @see aggregator_update_8200()
*/
public function testSourceFeedRequired() {
// Check that the 'fid' field is not required prior to the update.
$field_definition = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('fid', 'aggregator_item');
$this->assertFalse($field_definition->isRequired());
// Run updates.
$this->runUpdates();
// Check that the 'fid' field is now required.
$field_definition = \Drupal::entityDefinitionUpdateManager()->getFieldStorageDefinition('fid', 'aggregator_item');
$this->assertTrue($field_definition->isRequired());
}
}
......@@ -22,7 +22,7 @@ class BasicAuthTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('basic_auth', 'router_test', 'locale');
public static $modules = array('basic_auth', 'router_test', 'locale', 'basic_auth_test');
/**
* Test http basic authentication.
......@@ -175,4 +175,25 @@ function testUnauthorizedErrorMessage() {
$this->assertText('Access denied', "A user friendly access denied message is displayed");
}
/**
* Tests if the controller is called before authentication.
*
* @see https://www.drupal.org/node/2817727
*/
public function testControllerNotCalledBeforeAuth() {
$this->drupalGet('/basic_auth_test/state/modify');
$this->assertResponse(401);
$this->drupalGet('/basic_auth_test/state/read');
$this->assertResponse(200);
$this->assertRaw('nope');
$account = $this->drupalCreateUser();
$this->basicAuthGet('/basic_auth_test/state/modify', $account->getUsername(), $account->pass_raw);
$this->assertResponse(200);
$this->assertRaw('Done');
$this->drupalGet('/basic_auth_test/state/read');
$this->assertResponse(200);
$this->assertRaw('yep');
}
}
name: 'HTTP Basic Authentication test'
type: module
description: 'Support module for HTTP Basic Authentication testing.'
package: Testing
version: VERSION
core: 8.x
basic_auth_test.state.modify:
path: '/basic_auth_test/state/modify'
defaults:
_controller: '\Drupal\basic_auth_test\BasicAuthTestController::modifyState'
options:
_auth:
- basic_auth
requirements:
_user_is_logged_in: 'TRUE'
basic_auth_test.state.read:
path: '/basic_auth_test/state/read'
defaults:
_controller: '\Drupal\basic_auth_test\BasicAuthTestController::readState'
requirements:
_access: 'TRUE'
<?php
namespace Drupal\basic_auth_test;
class BasicAuthTestController {
/**
* @see \Drupal\basic_auth\Tests\Authentication\BasicAuthTest::testControllerNotCalledBeforeAuth()
*/
public function modifyState() {
\Drupal::state()->set('basic_auth_test.state.controller_executed', TRUE);
return ['#markup' => 'Done'];
}
/**
* @see \Drupal\basic_auth\Tests\Authentication\BasicAuthTest::testControllerNotCalledBeforeAuth()
*/
public function readState() {
// Mark this page as being uncacheable.
\Drupal::service('page_cache_kill_switch')->trigger();
return [
'#markup' => \Drupal::state()->get('basic_auth_test.state.controller_executed') ? 'yep' : 'nope',
'#cache' => [
'max-age' => 0,
],
];
}
}
......@@ -33,6 +33,12 @@ config_test.dynamic.*.*:
type: config_test_dynamic
label: 'Config test dynamic settings'
config_test.dynamic.*.third_party.node:
type: mapping
mapping:
foo:
type: string
config_test.query.*:
type: config_entity
mapping:
......
......@@ -136,6 +136,10 @@ public function onDependencyRemoval(array $dependencies) {
}
}
}
// If any of the dependencies removed still exists, return FALSE.
if (array_intersect_key(array_flip($this->dependencies['enforced']['config']), $dependencies['config'])) {
return FALSE;
}
return $changed;
}
......
......@@ -12,3 +12,4 @@ process:
destination:
plugin: config
config_name: system.maintenance
translations: true