Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
BIN
core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_post_update_resource_granularity.php
vendored
Normal file
BIN
core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_post_update_resource_granularity.php
vendored
Normal file
Binary file not shown.
69
core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php
vendored
Normal file
69
core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
|
||||
* upgrade path of rest_update_8201().
|
||||
*/
|
||||
|
||||
use Drupal\Core\Database\Database;
|
||||
|
||||
$connection = Database::getConnection();
|
||||
|
||||
// Set the schema version.
|
||||
$connection->insert('key_value')
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'rest',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'serialization',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'basic_auth',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->execute();
|
||||
|
||||
// Update core.extension.
|
||||
$extensions = $connection->select('config')
|
||||
->fields('config', ['data'])
|
||||
->condition('collection', '')
|
||||
->condition('name', 'core.extension')
|
||||
->execute()
|
||||
->fetchField();
|
||||
$extensions = unserialize($extensions);
|
||||
$extensions['module']['basic_auth'] = 8000;
|
||||
$extensions['module']['rest'] = 8000;
|
||||
$extensions['module']['serialization'] = 8000;
|
||||
$connection->update('config')
|
||||
->fields([
|
||||
'data' => serialize($extensions),
|
||||
])
|
||||
->condition('collection', '')
|
||||
->condition('name', 'core.extension')
|
||||
->execute();
|
||||
|
||||
// Install the rest configuration.
|
||||
$config = [
|
||||
'resources' => [
|
||||
'entity:node' => [
|
||||
'GET' => [
|
||||
'supported_formats' => ['json'],
|
||||
'supported_auth' => ['basic_auth'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'link_domain' => '~',
|
||||
];
|
||||
$data = $connection->insert('config')
|
||||
->fields([
|
||||
'name' => 'rest.settings',
|
||||
'data' => serialize($config),
|
||||
'collection' => ''
|
||||
])
|
||||
->execute();
|
63
core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php
vendored
Normal file
63
core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
|
||||
* upgrade path of rest_update_8203().
|
||||
*/
|
||||
|
||||
use Drupal\Core\Database\Database;
|
||||
|
||||
$connection = Database::getConnection();
|
||||
|
||||
// Set the schema version.
|
||||
$connection->insert('key_value')
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'rest',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'serialization',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->execute();
|
||||
|
||||
// Update core.extension.
|
||||
$extensions = $connection->select('config')
|
||||
->fields('config', ['data'])
|
||||
->condition('collection', '')
|
||||
->condition('name', 'core.extension')
|
||||
->execute()
|
||||
->fetchField();
|
||||
$extensions = unserialize($extensions);
|
||||
$extensions['module']['rest'] = 8000;
|
||||
$extensions['module']['serialization'] = 8000;
|
||||
$connection->update('config')
|
||||
->fields([
|
||||
'data' => serialize($extensions),
|
||||
])
|
||||
->condition('collection', '')
|
||||
->condition('name', 'core.extension')
|
||||
->execute();
|
||||
|
||||
// Install the rest configuration.
|
||||
$config = [
|
||||
'resources' => [
|
||||
'entity:node' => [
|
||||
'GET' => [
|
||||
'supported_formats' => ['json'],
|
||||
'supported_auth' => ['basic_auth'],
|
||||
],
|
||||
],
|
||||
],
|
||||
'link_domain' => '~',
|
||||
];
|
||||
$data = $connection->insert('config')
|
||||
->fields([
|
||||
'name' => 'rest.settings',
|
||||
'data' => serialize($config),
|
||||
'collection' => ''
|
||||
])
|
||||
->execute();
|
75
core/modules/rest/tests/fixtures/update/rest-export-with-authentication.php
vendored
Normal file
75
core/modules/rest/tests/fixtures/update/rest-export-with-authentication.php
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Test fixture for \Drupal\rest\Tests\Update\RestExportAuthUpdateTest.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Database\Database;
|
||||
use Drupal\Core\Serialization\Yaml;
|
||||
|
||||
$connection = Database::getConnection();
|
||||
$config = $connection;
|
||||
|
||||
// Set the schema version.
|
||||
$connection->insert('key_value')
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'rest',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'serialization',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->fields([
|
||||
'collection' => 'system.schema',
|
||||
'name' => 'basic_auth',
|
||||
'value' => 'i:8000;',
|
||||
])
|
||||
->execute();
|
||||
|
||||
// Update core.extension.
|
||||
$extensions = $connection->select('config')
|
||||
->fields('config', ['data'])
|
||||
->condition('collection', '')
|
||||
->condition('name', 'core.extension')
|
||||
->execute()
|
||||
->fetchField();
|
||||
$extensions = unserialize($extensions);
|
||||
$extensions['module']['rest'] = 0;
|
||||
$extensions['module']['serialization'] = 0;
|
||||
$extensions['module']['basic_auth'] = 0;
|
||||
$connection->update('config')
|
||||
->fields([
|
||||
'data' => serialize($extensions),
|
||||
])
|
||||
->condition('collection', '')
|
||||
->condition('name', 'core.extension')
|
||||
->execute();
|
||||
|
||||
$config = [
|
||||
'link_domain' => '~',
|
||||
];
|
||||
$data = $connection->insert('config')
|
||||
->fields([
|
||||
'name' => 'rest.settings',
|
||||
'data' => serialize($config),
|
||||
'collection' => '',
|
||||
])
|
||||
->execute();
|
||||
|
||||
$connection->insert('config')
|
||||
->fields([
|
||||
'name' => 'views.view.rest_export_with_authorization',
|
||||
])
|
||||
->execute();
|
||||
|
||||
$connection->merge('config')
|
||||
->condition('name', 'views.view.rest_export_with_authorization')
|
||||
->condition('collection', '')
|
||||
->fields([
|
||||
'data' => serialize(Yaml::decode(file_get_contents('core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization.yml'))),
|
||||
])
|
||||
->execute();
|
32
core/modules/rest/tests/fixtures/update/rest.resource.entity.comment_2721595.yml
vendored
Normal file
32
core/modules/rest/tests/fixtures/update/rest.resource.entity.comment_2721595.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
id: entity.comment
|
||||
plugin_id: 'entity:comment'
|
||||
granularity: method
|
||||
configuration:
|
||||
GET:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
# This resource has a method-specific format.
|
||||
# @see \Drupal\rest\Tests\Update\ResourceGranularityUpdateTest
|
||||
- xml
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
POST:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
PATCH:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
DELETE:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
- basic_auth
|
||||
- hal
|
29
core/modules/rest/tests/fixtures/update/rest.resource.entity.node_2721595.yml
vendored
Normal file
29
core/modules/rest/tests/fixtures/update/rest.resource.entity.node_2721595.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
id: entity.node
|
||||
plugin_id: 'entity:node'
|
||||
granularity: method
|
||||
configuration:
|
||||
GET:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
POST:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
PATCH:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
DELETE:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
- basic_auth
|
||||
- hal
|
32
core/modules/rest/tests/fixtures/update/rest.resource.entity.user_2721595.yml
vendored
Normal file
32
core/modules/rest/tests/fixtures/update/rest.resource.entity.user_2721595.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
id: entity.user
|
||||
plugin_id: 'entity:user'
|
||||
granularity: method
|
||||
configuration:
|
||||
GET:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
# This resource has a method-specific authentication.
|
||||
# @see \Drupal\rest\Tests\Update\ResourceGranularityUpdateTest
|
||||
- oauth
|
||||
POST:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
PATCH:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
DELETE:
|
||||
supported_formats:
|
||||
- hal_json
|
||||
supported_auth:
|
||||
- basic_auth
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
- basic_auth
|
||||
- hal
|
Reference in a new issue