updated core to 8.6.1 via composer
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Drupal\datetime\Plugin\Field\FieldFormatter;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Component\Render\FormattableMarkup;
|
||||
use Drupal\Core\Cache\CacheableMetadata;
|
||||
use Drupal\Core\Datetime\DateFormatterInterface;
|
||||
use Drupal\Core\Datetime\DrupalDateTime;
|
||||
@@ -182,13 +182,13 @@ class DateTimeTimeAgoFormatter extends FormatterBase implements ContainerFactory
|
||||
if ($this->request->server->get('REQUEST_TIME') > $timestamp) {
|
||||
$result = $this->dateFormatter->formatTimeDiffSince($timestamp, $options);
|
||||
$build = [
|
||||
'#markup' => SafeMarkup::format($this->getSetting('past_format'), ['@interval' => $result->getString()]),
|
||||
'#markup' => new FormattableMarkup($this->getSetting('past_format'), ['@interval' => $result->getString()]),
|
||||
];
|
||||
}
|
||||
else {
|
||||
$result = $this->dateFormatter->formatTimeDiffUntil($timestamp, $options);
|
||||
$build = [
|
||||
'#markup' => SafeMarkup::format($this->getSetting('future_format'), ['@interval' => $result->getString()]),
|
||||
'#markup' => new FormattableMarkup($this->getSetting('future_format'), ['@interval' => $result->getString()]),
|
||||
];
|
||||
}
|
||||
CacheableMetadata::createFromObject($result)->applyTo($build);
|
||||
|
||||
@@ -51,9 +51,9 @@ class DateTimeFieldItemList extends FieldItemList {
|
||||
'#states' => [
|
||||
'visible' => [
|
||||
':input[id="edit-default-value-input-default-date-type"]' => ['value' => static::DEFAULT_VALUE_CUSTOM],
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $element;
|
||||
@@ -112,7 +112,7 @@ class DateTimeFieldItemList extends FieldItemList {
|
||||
[
|
||||
'value' => $value,
|
||||
'date' => $date,
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
return $default_value;
|
||||
|
||||
@@ -44,7 +44,7 @@ class DateField extends FieldPluginBase {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
|
||||
public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
|
||||
switch ($data['type']) {
|
||||
case 'date':
|
||||
$from_format = 'Y-m-d\TH:i:s';
|
||||
|
||||
@@ -40,7 +40,7 @@ class DateField extends FieldPluginBase {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
|
||||
public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
|
||||
switch ($data['type']) {
|
||||
case 'date':
|
||||
$from_format = 'Y-m-d\TH:i:s';
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Drupal\datetime\Tests;
|
||||
|
||||
@trigger_error('\Drupal\datetime\Tests\DateTestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Use \Drupal\Tests\BrowserTestBase instead. See https://www.drupal.org/node/2780063.', E_USER_DEPRECATED);
|
||||
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
use Drupal\Core\Entity\Entity\EntityFormDisplay;
|
||||
use Drupal\Core\Entity\Entity\EntityViewDisplay;
|
||||
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItem;
|
||||
@@ -111,7 +110,7 @@ abstract class DateTestBase extends WebTestBase {
|
||||
* Creates a date test field.
|
||||
*/
|
||||
protected function createField() {
|
||||
$field_name = Unicode::strtolower($this->randomMachineName());
|
||||
$field_name = mb_strtolower($this->randomMachineName());
|
||||
$type = $this->getTestFieldType();
|
||||
$widget_type = $formatter_type = $type . '_default';
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ abstract class DateTimeHandlerTestBase extends HandlerTestBase {
|
||||
// Add a date field to page nodes.
|
||||
$node_type = NodeType::create([
|
||||
'type' => 'page',
|
||||
'name' => 'page'
|
||||
'name' => 'page',
|
||||
]);
|
||||
$node_type->save();
|
||||
$fieldStorage = FieldStorageConfig::create([
|
||||
|
||||
Reference in New Issue
Block a user