Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\early_rendering_controller_test\AttachmentsTestDomainObject.
|
||||
* Contains \Drupal\early_rendering_controller_test\CacheableTestDomainObject.
|
||||
*/
|
||||
|
||||
namespace Drupal\early_rendering_controller_test;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
services:
|
||||
http_middleware.monkeys:
|
||||
class: Drupal\error_service_test\MonkeysInTheControlRoom
|
||||
arguments: ['@settings']
|
||||
tags:
|
||||
- { name: http_middleware, priority: 400 }
|
||||
# Set up a service with a missing class dependency.
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace Drupal\error_service_test;
|
||||
|
||||
use Drupal\Core\Site\Settings;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
|
@ -29,8 +30,9 @@ class MonkeysInTheControlRoom implements HttpKernelInterface {
|
|||
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $app
|
||||
* The wrapper HTTP kernel.
|
||||
*/
|
||||
public function __construct(HttpKernelInterface $app) {
|
||||
public function __construct(HttpKernelInterface $app, Settings $settings) {
|
||||
$this->app = $app;
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +63,20 @@ class MonkeysInTheControlRoom implements HttpKernelInterface {
|
|||
throw new \Exception('Deforestation');
|
||||
}
|
||||
|
||||
return $this->app->handle($request, $type, $catch);
|
||||
if ($this->settings->get('teapots', FALSE) && class_exists('\TypeError')) {
|
||||
try {
|
||||
$return = $this->app->handle($request, $type, $catch);
|
||||
}
|
||||
catch (\TypeError $e) {
|
||||
header('HTTP/1.1 418 I\'m a teapot');
|
||||
print('Oh oh, flying teapots');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$return = $this->app->handle($request, $type, $catch);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\form_test\Form\FormTestGroupContainerForm.
|
||||
* Contains \Drupal\form_test\Form\FormTestDetailsForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\form_test\Form;
|
||||
|
|
|
@ -36,7 +36,7 @@ class TestLazyPluginCollection extends LazyPluginCollection {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements \Drupal\Component\Plugin\LazyPluginCollection::initializePlugin().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function initializePlugin($instance_id) {
|
||||
$this->pluginInstances[$instance_id] = $this->manager->createInstance($instance_id, array());
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\render_attached_test\Controller\TestController.
|
||||
* Contains \Drupal\render_attached_test\Controller\RenderAttachedTestController.
|
||||
*/
|
||||
|
||||
namespace Drupal\render_attached_test\Controller;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\render_attached_test\Plugin\Block\DrupalProcessAttachedBlock.
|
||||
* Contains \Drupal\render_attached_test\Plugin\Block\AttachedRenderingBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\render_attached_test\Plugin\Block;
|
||||
|
|
|
@ -69,7 +69,7 @@ class TestClass implements EventSubscriberInterface, DestructableInterface, Cont
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements \Drupal\Core\DestructableInterface::destruct().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function destruct() {
|
||||
$this->state->set('service_provider_test.destructed', TRUE);
|
||||
|
|
|
@ -13,19 +13,19 @@ use Drupal\file\FileUsage\FileUsageBase;
|
|||
class TestFileUsage extends FileUsageBase {
|
||||
|
||||
/**
|
||||
* Implements Drupal\file\FileUsage\FileUsageInterface::add().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function add(FileInterface $file, $module, $type, $id, $count = 1) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements Drupal\file\FileUsage\FileUsageInterface::delete().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete(FileInterface $file, $module, $type = NULL, $id = NULL, $count = 1) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements Drupal\file\FileUsage\FileUsageInterface::listUsage().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function listUsage(FileInterface $file) {
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
class PathProcessor implements InboundPathProcessorInterface {
|
||||
|
||||
/**
|
||||
* Implements Drupal\Core\PathProcessor\InboundPathProcessorInterface::processInbound().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function processInbound($path, Request $request) {
|
||||
if (preg_match('!^/user/([^/]+)(/.*)?!', $path, $matches)) {
|
||||
|
|
|
@ -19,7 +19,7 @@ use Drupal\user\Entity\User;
|
|||
class PathProcessorTest implements InboundPathProcessorInterface, OutboundPathProcessorInterface {
|
||||
|
||||
/**
|
||||
* Implements Drupal\Core\PathProcessor\InboundPathProcessorInterface::processInbound().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function processInbound($path, Request $request) {
|
||||
// Rewrite user/username to user/uid.
|
||||
|
@ -40,7 +40,7 @@ class PathProcessorTest implements InboundPathProcessorInterface, OutboundPathPr
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements Drupal\Core\PathProcessor\OutboundPathProcessorInterface::processOutbound().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function processOutbound($path, &$options = array(), Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
|
||||
// Rewrite user/uid to user/username.
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Minimal template to ensure chained property access works with white-listing.
|
||||
*/
|
||||
#}
|
||||
<article{{ attributes }}>
|
||||
|
||||
<div>
|
||||
{{ node.field_term.entity.label }}
|
||||
</div>
|
||||
|
||||
</article>
|
|
@ -29,8 +29,13 @@ function test_theme_element_info_alter(&$info) {
|
|||
}
|
||||
}
|
||||
|
||||
function test_theme_library_info_alter(&$libraries) {
|
||||
$libraries['kitten']['js'][] = 'kittens.js';
|
||||
/**
|
||||
* Implements hook_library_info_alter().
|
||||
*/
|
||||
function test_theme_library_info_alter(&$libraries, $extension) {
|
||||
if ($extension === 'test_theme') {
|
||||
$libraries['kitten']['js']['kittens.js'] = [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue