reverted: --- b/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php +++ a/core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php @@ -54,20 +54,20 @@ * @see http://www.postgresql.org/docs/9.4/static/sql-keywords-appendix.html */ protected $postgresqlReservedKeyWords = ['all', 'analyse', 'analyze', 'and', + 'any', 'array', 'as', 'asc', 'asymmetric', 'authorization', 'binary', 'both', + 'case', 'cast', 'check', 'collate', 'collation', 'column', 'concurrently', + 'constraint', 'create', 'cross', 'current_catalog', 'current_date', + 'current_role', 'current_schema', 'current_time', 'current_timestamp', + 'current_user', 'default', 'deferrable', 'desc', 'distinct', 'do', 'else', + 'end', 'except', 'false', 'fetch', 'for', 'foreign', 'freeze', 'from', 'full', + 'grant', 'group', 'having', 'ilike', 'in', 'initially', 'inner', 'intersect', + 'into', 'is', 'isnull', 'join', 'lateral', 'leading', 'left', 'like', 'limit', + 'localtime', 'localtimestamp', 'natural', 'not', 'notnull', 'null', 'offset', + 'on', 'only', 'or', 'order', 'outer', 'over', 'overlaps', 'placing', + 'primary', 'references', 'returning', 'right', 'select', 'session_user', + 'similar', 'some', 'symmetric', 'table', 'then', 'to', 'trailing', 'true', + 'union', 'unique', 'user', 'using', 'variadic', 'verbose', 'when', 'where', + 'window', 'with']; - 'any', 'array', 'as', 'asc', 'asymmetric', 'authorization', 'binary', 'both', - 'case', 'cast', 'check', 'collate', 'collation', 'column', 'concurrently', - 'constraint', 'create', 'cross', 'current_catalog', 'current_date', - 'current_role', 'current_schema', 'current_time', 'current_timestamp', - 'current_user', 'default', 'deferrable', 'desc', 'distinct', 'do', 'else', - 'end', 'except', 'false', 'fetch', 'for', 'foreign', 'freeze', 'from', 'full', - 'grant', 'group', 'having', 'ilike', 'in', 'initially', 'inner', 'intersect', - 'into', 'is', 'isnull', 'join', 'lateral', 'leading', 'left', 'like', 'limit', - 'localtime', 'localtimestamp', 'natural', 'not', 'notnull', 'null', 'offset', - 'on', 'only', 'or', 'order', 'outer', 'over', 'overlaps', 'placing', - 'primary', 'references', 'returning', 'right', 'select', 'session_user', - 'similar', 'some', 'symmetric', 'table', 'then', 'to', 'trailing', 'true', - 'union', 'unique', 'user', 'using', 'variadic', 'verbose', 'when', 'where', - 'window', 'with']; /** * Constructs a connection object. reverted: --- b/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php +++ a/core/lib/Drupal/Core/Entity/EntityPublishedTrait.php @@ -32,13 +32,11 @@ throw new UnsupportedEntityTypeDefinitionException('The entity type ' . $entity_type->id() . ' does not have a "published" entity key.'); } + return [$entity_type->getKey('published') => BaseFieldDefinition::create('boolean') + ->setLabel(new TranslatableMarkup('Published')) + ->setRevisionable(TRUE) + ->setTranslatable(TRUE) + ->setDefaultValue(TRUE)]; - return [ - $entity_type->getKey('published') => BaseFieldDefinition::create('boolean') - ->setLabel(new TranslatableMarkup('Published')) - ->setRevisionable(TRUE) - ->setTranslatable(TRUE) - ->setDefaultValue(TRUE) - ]; } /** reverted: --- b/core/modules/big_pipe/src/Tests/BigPipeTest.php +++ a/core/modules/big_pipe/src/Tests/BigPipeTest.php @@ -398,9 +398,9 @@ array_unshift($expected_stream_order, BigPipe::START_SIGNAL); array_push($expected_stream_order, BigPipe::STOP_SIGNAL); $actual_stream_order = $placeholder_replacement_positions + [ + $start_signal_position => BigPipe::START_SIGNAL, + $stop_signal_position => BigPipe::STOP_SIGNAL, + ]; - $start_signal_position => BigPipe::START_SIGNAL, - $stop_signal_position => BigPipe::STOP_SIGNAL, - ]; ksort($actual_stream_order, SORT_NUMERIC); $this->assertEqual($expected_stream_order, array_values($actual_stream_order)); } reverted: --- b/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php +++ a/core/modules/ckeditor/tests/src/Functional/CKEditorLoadingTest.php @@ -138,7 +138,7 @@ 'editorSettings' => $this->castSafeStrings($ckeditor_plugin->getJSSettings($editor)), 'editorSupportsContentFiltering' => TRUE, 'isXssSafe' => FALSE, + ]]]; - ]]]; $this->assertTrue($editor_settings_present, "Text Editor module's JavaScript settings are on the page."); $this->assertIdentical($expected, $this->castSafeStrings($settings['editor']), "Text Editor module's JavaScript settings on the page are correct."); $this->assertTrue($editor_js_present, 'Text Editor JavaScript is present.'); reverted: --- b/core/modules/comment/src/Tests/CommentBlockTest.php +++ a/core/modules/comment/src/Tests/CommentBlockTest.php @@ -30,7 +30,7 @@ 'access comments', 'access content', 'administer blocks', + ]); - ]); } /** diff -u b/core/modules/comment/src/Tests/CommentTestBase.php b/core/modules/comment/src/Tests/CommentTestBase.php --- b/core/modules/comment/src/Tests/CommentTestBase.php +++ b/core/modules/comment/src/Tests/CommentTestBase.php @@ -69,14 +69,14 @@ // permission is granted. 'access user profiles', 'access content', - ]); + ]); $this->webUser = $this->drupalCreateUser([ 'access comments', 'post comments', // permission is granted. 'access user profiles', 'access content', - ]); + ]); $this->webUser = $this->drupalCreateUser([ 'access comments', 'post comments', diff -u b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php --- b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php +++ b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php @@ -205,9 +205,9 @@ 'type' => 'daterange_default', 'label' => 'hidden', 'settings' => [ - 'format_type' => 'long', - 'separator' => 'THESEPARATOR', - ] + $this->defaultSettings, + 'format_type' => 'long', + 'separator' => 'THESEPARATOR', + ] + $this->defaultSettings, ]; entity_get_display($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full') @@ -217,9 +217,9 @@ 'type' => 'daterange_default', 'label' => 'hidden', 'settings' => [ - 'format_type' => 'long', - 'separator' => 'THESEPARATOR', - ] + $this->defaultSettings, + 'format_type' => 'long', + 'separator' => 'THESEPARATOR', + ] + $this->defaultSettings, ]; entity_get_display($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full') reverted: --- b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php +++ a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php @@ -101,44 +101,44 @@ 'label' => 'Body', 'widget' => [ + 'type' => 'text_textarea_with_summary', + 'settings' => - 'type' => 'text_textarea_with_summary', - 'settings' => [ + 'rows' => 20, + 'summary_rows' => 5, + ], + 'weight' => -4, + 'module' => 'text', + ], - 'rows' => 20, - 'summary_rows' => 5, - ], - 'weight' => -4, - 'module' => 'text', - ], 'settings' => [ + 'display_summary' => TRUE, + 'text_processing' => 1, + 'user_register_form' => FALSE, + ], - 'display_summary' => TRUE, - 'text_processing' => 1, - 'user_register_form' => FALSE, - ], 'display' => [ + 'default' => - 'default' => [ + 'label' => 'hidden', + 'type' => 'text_default', + 'settings' => - 'label' => 'hidden', - 'type' => 'text_default', - 'settings' => [ ], + 'module' => 'text', + 'weight' => 0, + ], + 'teaser' => - 'module' => 'text', - 'weight' => 0, - ], - 'teaser' => [ + 'label' => 'hidden', + 'type' => 'text_summary_or_trimmed', - 'label' => 'hidden', - 'type' => 'text_summary_or_trimmed', // settings is always expected to be an array. Making it NULL // causes a fatal. + 'settings' => NULL, + 'module' => 'text', + 'weight' => 0, + ], + ], - 'settings' => NULL, - 'module' => 'text', - 'weight' => 0, - ], - ], 'required' => FALSE, 'description' => '', ]), reverted: --- b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php +++ a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php @@ -334,8 +334,7 @@
aaa\nbbb\n\nccc
aaa\nbbb\n\nccc +" => [ -" => - [ "" => TRUE, "" => TRUE, "
aaa\nbbb\n\nccc
" => TRUE, @@ -567,16 +566,14 @@ // HTTP URLs. ' http://example.com or www.example.com +' => [ -' => - [ 'http://example.com' => TRUE, 'www.example.com' => TRUE, ], // MAILTO URLs. ' person@example.com or mailto:person2@example.com or ' . $email_with_plus_sign . ' or ' . $long_email . ' but not ' . $too_long_email . ' +' => [ -' => - [ 'person@example.com' => TRUE, 'mailto:person2@example.com' => TRUE, '' . $long_email . '' => TRUE, @@ -592,8 +589,7 @@ ftp://user:pass@ftp.example.com/~home/dir1 sftp://user@nonstandardport:222/dir ssh://192.168.0.100/srv/git/drupal.git +' => [ -' => - [ 'http://trailingslash.com/' => TRUE, 'www.trailingslash.com/' => TRUE, 'http://host.com/some/path?query=foo&bar[baz]=beer#fragment' => TRUE, @@ -613,8 +609,7 @@ http://例え.テスト/ http://dréißig-bücher.de/ http://méxico-mañana.es/ +' => [ -' => - [ 'http://пример.испытание/' => TRUE, 'http://مثال.إختبار/' => TRUE, 'http://例子.測試/' => TRUE, @@ -627,8 +622,7 @@ ' http://ampersand.com/?a=1&b=2 http://encoded.com/?a=1&b=2 +' => [ -' => - [ 'http://ampersand.com/?a=1&b=2' => TRUE, 'http://encoded.com/?a=1&b=2' => TRUE, ], @@ -636,8 +630,7 @@ ' www.ex.ex or www.example.example or www.toolongdomainexampledomainexampledomainexampledomainexampledomain or me@me.tv +' => [ -' => - [ 'www.ex.ex' => TRUE, 'www.example.example' => TRUE, 'http://www.toolong' => FALSE, @@ -657,8 +650,7 @@ webcal://calendar, rtsp://127.0.0.1, not foo://disallowed.com. +' => [ -' => - [ 'href="https://example.com"' => TRUE, 'href="ftp://ftp.example.com"' => TRUE, 'href="news://example.net"' => TRUE, @@ -688,8 +680,7 @@ Absolute URL with square brackets in the URL as well as surrounded brackets [https://www.drupal.org/?class[]=1] Absolute URL with quotes "https://www.drupal.org/sample" +' => [ -' => - [ 'period www.partial.com.' => TRUE, 'comma person@example.com,' => TRUE, 'question http://www.absolute.com?' => TRUE, @@ -703,8 +694,7 @@ ], ' (www.parenthesis.com/dir?a=1&b=2#a) +' => [ -' => - [ '(www.parenthesis.com/dir?a=1&b=2#a)' => TRUE, ], ]; @@ -717,8 +707,7 @@

An anchor.

+' => [ -' => - [ '

' => TRUE, '

' => TRUE, 'href="http://www.namespace.com"' => FALSE, @@ -728,8 +717,7 @@ ' Not www.relative.com or www.absolute.com but http://www.strong.net or www.emphasis.info +' => [ -' => - [ 'www.relative.com' => TRUE, 'href="http://www.relative.com"' => FALSE, 'www.absolute.com' => TRUE, @@ -738,8 +726,7 @@ ], ' Test using www.example.com the code tag. +' => [ -' => - [ 'href' => FALSE, 'http' => FALSE, ], @@ -750,8 +737,7 @@ Outro. +' => [ -' => - [ 'href="http://www.example.com"' => TRUE, 'href="mailto:person@example.com"' => TRUE, 'href="http://origin.example.com"' => TRUE, @@ -762,8 +748,7 @@ ], ' Unknown tag containing x and www.example.com? And a tag beginning with p and containing www.example.pooh with p? +' => [ -' => - [ 'href="http://www.example.com"' => TRUE, 'href="http://www.example.pooh"' => TRUE, ], @@ -771,8 +756,7 @@

Test <br/>: This is a www.example17.com example with various http://www.example18.com tags. *
It is important www.example19.com to *
test different URLs and http://www.example20.com in the same paragraph. *
HTML www.example21.com soup by person@example22.com can litererally http://www.example23.com contain *img* anything. Just a www.example24.com with http://www.example25.com thrown in. www.example26.com from person@example27.com with extra http://www.example28.com. +' => [ -' => - [ 'href="http://www.example17.com"' => TRUE, 'href="http://www.example18.com"' => TRUE, 'href="http://www.example19.com"' => TRUE, @@ -797,8 +781,7 @@ var exampleurl = "http://example.net"; //--> +' => [ -' => - [ 'href="http://www.example.com"' => FALSE, 'href="http://example.net"' => FALSE, ], @@ -806,27 +789,23 @@ +' => [ -' => - [ 'href' => FALSE, ], ' +' => [ -' => - [ 'href' => FALSE, ], ' +' => [ -' => - [ 'href' => FALSE, ], ' +' => [ -' => - [ 'href' => FALSE, ], ' @@ -837,8 +816,7 @@

Check www.example.net
Some text around http://www.example.info by person@example.info?
+' => [ -' => - [ 'href="http://www.example.com"' => TRUE, 'href="http://example.com"' => TRUE, 'href="mailto:person@example.com"' => TRUE, @@ -852,8 +830,7 @@
  • http://listitem.com
  • www.class.listitem.com
  • +' => [ -' => - [ '
    www.div.com
    ' => TRUE, '
  • http://listitem.com
  • ' => TRUE, '
  • www.class.listitem.com
  • ' => TRUE, reverted: --- b/core/modules/node/src/Tests/NodeRevisionsTest.php +++ a/core/modules/node/src/Tests/NodeRevisionsTest.php @@ -170,7 +170,7 @@ $this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionid() . "/revert", [], t('Revert')); $this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.', ['@type' => 'Basic page', '%title' => $nodes[1]->label(), + '%revision-date' => format_date($nodes[1]->getRevisionCreationTime())]), 'Revision reverted.'); - '%revision-date' => format_date($nodes[1]->getRevisionCreationTime())]), 'Revision reverted.'); $node_storage->resetCache([$node->id()]); $reverted_node = $node_storage->load($node->id()); $this->assertTrue(($nodes[1]->body->value == $reverted_node->body->value), 'Node reverted correctly.'); @@ -193,7 +193,7 @@ $this->drupalPostForm("node/" . $node->id() . "/revisions/" . $nodes[1]->getRevisionId() . "/delete", [], t('Delete')); $this->assertRaw(t('Revision from %revision-date of @type %title has been deleted.', ['%revision-date' => format_date($nodes[1]->getRevisionCreationTime()), + '@type' => 'Basic page', '%title' => $nodes[1]->label()]), 'Revision deleted.'); - '@type' => 'Basic page', '%title' => $nodes[1]->label()]), 'Revision deleted.'); $this->assertTrue(db_query('SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid and vid = :vid', [':nid' => $node->id(), ':vid' => $nodes[1]->getRevisionId()])->fetchField() == 0, 'Revision not found.'); $this->assertTrue(db_query('SELECT COUNT(vid) FROM {node_field_revision} WHERE nid = :nid and vid = :vid', [':nid' => $node->id(), ':vid' => $nodes[1]->getRevisionId()])->fetchField() == 0, 'Field revision not found.'); reverted: --- b/core/modules/system/src/Tests/Ajax/DialogTest.php +++ a/core/modules/system/src/Tests/Ajax/DialogTest.php @@ -110,8 +110,8 @@ // dialog options are sent. $ajax_result = $this->drupalPostAjaxForm('ajax-test/dialog', [ // We have to mock a form element to make drupalPost submit from a link. + 'textfield' => 'test', + ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ - 'textfield' => 'test', - ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ 'submit' => [ 'dialogOptions[target]' => 'ajax-test-dialog-wrapper-1', ] @@ -123,8 +123,8 @@ // dialog options are sent. $ajax_result = $this->drupalPostAjaxForm('ajax-test/dialog', [ // We have to mock a form element to make drupalPost submit from a link. + 'textfield' => 'test', + ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ - 'textfield' => 'test', - ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ // Don't send a target. 'submit' => [] ]); @@ -176,9 +176,9 @@ 'callback' => '::preview', 'event' => 'click', 'url' => Url::fromRoute('ajax_test.dialog_form', [], ['query' => [ + MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_modal', + FormBuilderInterface::AJAX_FORM_REQUEST => TRUE, + ]])->toString(), - MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_modal', - FormBuilderInterface::AJAX_FORM_REQUEST => TRUE, - ]])->toString(), 'dialogType' => 'ajax', 'submit' => [ '_triggering_element_name' => 'op', reverted: --- b/core/modules/system/src/Tests/Form/FormTest.php +++ a/core/modules/system/src/Tests/Form/FormTest.php @@ -378,27 +378,27 @@ // Posting without any values should throw validation errors. $this->drupalPostForm(NULL, [], 'Submit'); $no_errors = [ + 'select', + 'select_required', + 'select_optional', + 'empty_value', + 'empty_value_one', + 'no_default_optional', + 'no_default_empty_option_optional', + 'no_default_empty_value_optional', + 'multiple', + 'multiple_no_default', - 'select', - 'select_required', - 'select_optional', - 'empty_value', - 'empty_value_one', - 'no_default_optional', - 'no_default_empty_option_optional', - 'no_default_empty_value_optional', - 'multiple', - 'multiple_no_default', ]; foreach ($no_errors as $key) { $this->assertNoText(t('@name field is required.', ['@name' => $form[$key]['#title']])); } $expected_errors = [ + 'no_default', + 'no_default_empty_option', + 'no_default_empty_value', + 'no_default_empty_value_one', + 'multiple_no_default_required', - 'no_default', - 'no_default_empty_option', - 'no_default_empty_value', - 'no_default_empty_value_one', - 'multiple_no_default_required', ]; foreach ($expected_errors as $key) { $this->assertText(t('@name field is required.', ['@name' => $form[$key]['#title']])); reverted: --- b/core/modules/system/src/Tests/Update/UpdateScriptTest.php +++ a/core/modules/system/src/Tests/Update/UpdateScriptTest.php @@ -239,9 +239,9 @@ // Add some custom languages. foreach (['aa', 'bb'] as $language_code) { ConfigurableLanguage::create([ + 'id' => $language_code, + 'label' => $this->randomMachineName(), + ])->save(); - 'id' => $language_code, - 'label' => $this->randomMachineName(), - ])->save(); } $config = \Drupal::service('config.factory')->getEditable('language.negotiation'); diff -u b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php --- b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php @@ -1022,7 +1022,7 @@ 'entity_type' => isset($data['table']['entity type']) ? $data['table']['entity type'] : NULL, 'entity_field' => isset($data[$column]['entity field']) ? $data[$column]['entity field'] : NULL, 'plugin_id' => $data[$column]['sort']['id'], - ]; + ]; } } @@ -1038,7 +1038,7 @@ 'entity_type' => isset($data['table']['entity type']) ? $data['table']['entity type'] : NULL, 'entity_field' => isset($data[$column]['entity field']) ? $data[$column]['entity field'] : NULL, 'plugin_id' => $data[$column]['sort']['id'], - ]; + ]; } } reverted: --- b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php +++ a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php @@ -70,8 +70,8 @@ // Create third node now that the admin overview has been rendered. $node_3 = $this->drupalCreateNode([ + 'type' => 'page', + 'title' => 'The third node'] - 'type' => 'page', - 'title' => 'The third node'] ); // Now click 'Apply to selected items' and assert the second node is diff -u b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php --- b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php +++ b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php @@ -398,7 +398,7 @@ ->method('getDefinition') ->willReturnMap([ ['user', TRUE, static::userEntityInfo()], - ] + ] ); $user_id_field_storage_definition = $this->getMock('Drupal\Core\Field\FieldStorageDefinitionInterface'); $user_id_field_storage_definition->expects($this->any()) @@ -406,7 +406,7 @@ ->method('getDefinition') ->willReturnMap([ ['user', TRUE, static::userEntityInfo()], - ] + ] ); $user_id_field_storage_definition = $this->getMock('Drupal\Core\Field\FieldStorageDefinitionInterface'); $user_id_field_storage_definition->expects($this->any()) diff -u b/core/phpcs.xml.dist b/core/phpcs.xml.dist --- b/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -61,12 +61,6 @@ - - - - - - @@ -78,6 +72,12 @@ + + + + + +