--- 3261245-17.patch 2022-03-11 15:12:49.000000000 -0300 +++ 3261245-21.patch 2022-04-19 17:17:13.980038364 -0300 @@ -156,7 +156,7 @@ $entity_types = \Drupal::entityTypeManager()->getDefinitions(); diff --git a/core/modules/views/src/ViewsConfigUpdater.php b/core/modules/views/src/ViewsConfigUpdater.php -index dfb89e338a..edb73c0a73 100644 +index 2ddb741c0a..3b6aa27fc4 100644 --- a/core/modules/views/src/ViewsConfigUpdater.php +++ b/core/modules/views/src/ViewsConfigUpdater.php @@ -2,14 +2,10 @@ @@ -193,7 +193,7 @@ if ($this->processSortFieldIdentifierUpdateHandler($handler, $handler_type)) { $changed = TRUE; } -@@ -186,300 +173,6 @@ protected function processDisplayHandlers(ViewEntityInterface $view, $return_on_ +@@ -189,300 +176,6 @@ protected function processDisplayHandlers(ViewEntityInterface $view, $return_on_ return $changed; } @@ -1004,15 +1004,18 @@ - tags: { } diff --git a/core/modules/views/tests/fixtures/update/views.view.test_user_multi_value.yml b/core/modules/views/tests/fixtures/update/views.view.test_user_multi_value.yml deleted file mode 100644 -index 42a7392742..0000000000 +index c03623cd4d..0000000000 --- a/core/modules/views/tests/fixtures/update/views.view.test_user_multi_value.yml +++ /dev/null -@@ -1,240 +0,0 @@ +@@ -1,308 +0,0 @@ -uuid: 001475a0-daec-4e8a-8ca7-97b0d24100a6 -langcode: en -status: true -dependencies: +- config: +- - field.storage.user.user_picture - module: +- - image - - user -id: test_user_multi_value -label: test_user_multi_value @@ -1152,6 +1155,70 @@ - entity_type: user - entity_field: roles - plugin_id: field +- user_picture: +- id: user_picture +- table: user__user_picture +- field: user_picture +- relationship: none +- group_type: group +- admin_label: '' +- label: '' +- exclude: false +- alter: +- alter_text: false +- text: '' +- make_link: false +- path: '' +- absolute: false +- external: false +- replace_spaces: false +- path_case: none +- trim_whitespace: false +- alt: '' +- rel: '' +- link_class: '' +- prefix: '' +- suffix: '' +- target: '' +- nl2br: false +- max_length: 0 +- word_boundary: true +- ellipsis: true +- more_link: false +- more_link_text: '' +- more_link_path: '' +- strip_tags: false +- trim: false +- preserve_tags: '' +- html: false +- element_type: '' +- element_class: '' +- element_label_type: '' +- element_label_class: '' +- element_label_colon: false +- element_wrapper_type: '' +- element_wrapper_class: '' +- element_default_classes: true +- empty: '' +- hide_empty: false +- empty_zero: false +- hide_alter_empty: true +- click_sort_column: target_id +- type: image +- settings: +- image_style: '' +- image_link: '' +- group_column: '' +- group_columns: { } +- group_rows: true +- delta_limit: 0 +- delta_offset: 0 +- delta_reversed: false +- delta_first_last: false +- multi_type: separator +- separator: ', ' +- field_api_classes: false +- plugin_id: field - filters: - roles: - id: roles @@ -1247,28 +1314,26 @@ - - url - - url.query_args - - user.permissions -- tags: { } +- tags: +- - 'config:field.storage.user.user_picture' diff --git a/core/modules/views/tests/src/Kernel/ViewsConfigUpdaterTest.php b/core/modules/views/tests/src/Kernel/ViewsConfigUpdaterTest.php -deleted file mode 100644 -index 2c4b507eac..0000000000 +index b6f14ccc78..2430646af3 100644 --- a/core/modules/views/tests/src/Kernel/ViewsConfigUpdaterTest.php -+++ /dev/null -@@ -1,143 +0,0 @@ --configUpdater = $this->container - ->get('class_resolver') - ->getInstanceFromDefinition(ViewsConfigUpdater::class); -- } - -- /** -- * Loads a test view. -- * -- * @param string $view_id -- * The view config ID. -- * -- * @return \Drupal\views\ViewEntityInterface -- * A view entity object. -- */ -- protected function loadTestView($view_id) { -- // We just instantiate the test view from the raw configuration, as it may -- // not be possible to save it, due to its faulty schema. -- $config_dir = $this->getModulePath('views') . '/tests/fixtures/update'; -- $file_storage = new FileStorage($config_dir); -- $values = $file_storage->read($view_id); -- /** @var \Drupal\views\ViewEntityInterface $test_view */ -- $test_view = $this->container -- ->get('entity_type.manager') -- ->getStorage('view') -- ->create($values); -- return $test_view; +- FieldStorageConfig::create([ +- 'field_name' => 'user_picture', +- 'entity_type' => 'user', +- 'type' => 'image', +- ])->save(); +- FieldConfig::create([ +- 'entity_type' => 'user', +- 'field_name' => 'user_picture', +- 'file_directory' => 'pictures/[date:custom:Y]-[date:custom:m]', +- 'bundle' => 'user', +- ])->save(); - } - + /** + * Loads a test view. + * +@@ -78,94 +35,4 @@ protected function loadTestView($view_id) { + return $test_view; + } + - /** - * @covers ::needsEntityLinkUrlUpdate - */ @@ -1356,6 +1422,15 @@ - } - - /** +- * @covers ::needsImageLazyLoadFieldUpdate +- */ +- public function testNeedsImageLazyLoadFieldUpdate() { +- $test_view = $this->loadTestView('views.view.test_user_multi_value'); +- $needs_update = $this->configUpdater->needsImageLazyLoadFieldUpdate($test_view); +- $this->assertTrue($needs_update); +- } +- +- /** - * @covers ::needsMultivalueBaseFieldUpdate - */ - public function testNeedsFieldNamesForMultivalueBaseFieldsUpdate() { @@ -1396,7 +1471,7 @@ - // @todo Improve this in https://www.drupal.org/node/3121008. - } - --} + } diff --git a/core/modules/views/tests/src/Kernel/ViewsLegacyTest.php b/core/modules/views/tests/src/Kernel/ViewsLegacyTest.php deleted file mode 100644 index a9b14e2d18..0000000000 @@ -1445,7 +1520,7 @@ - -} diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php -index c22ca7d82c..412cd9e6e8 100644 +index 48b42b0c2b..1182f9e436 100644 --- a/core/modules/views_ui/src/ViewEditForm.php +++ b/core/modules/views_ui/src/ViewEditForm.php @@ -75,15 +75,11 @@ class ViewEditForm extends ViewFormBase {