Problem/Motivation

In this issue #2664466: url_alias table is only used by a core service but it depends on system install we are removing url_alias from the views, this make fail tests in contrib modules like #2670258-3: Add an interface for continuous translators and #2666052: Aliases created with "Not applicable" language instead of "None".
So we should add a BC layer to add support for both cases.

Proposed resolution

Remaining tasks

We can remove it when 8.1.x is released.

User interface changes

API changes

Data model changes

Comments

edurenye created an issue. See original summary.

edurenye’s picture

Status: Active » Needs review
StatusFileSize
new972 bytes

Added the BC layer.

berdir’s picture

The problem is that it's quite annoying for modules to support both 8.0.x and 8.1.x in tests. They have to dynamically check that and add the table or not.

We can add other such tables like router, key_value and so on as needed.

dawehner’s picture

+++ b/core/modules/simpletest/src/KernelTestBase.php
@@ -429,8 +429,17 @@ protected function installSchema($module, $tables) {
+    // BC layer to avoid some contrib tests to fail.
+    // @see https://www.drupal.org/node/2670360
     $tables = (array) $tables;
+    $skip_tables = [
+      'url_alias',
+    ];
     foreach ($tables as $table) {
+      if (in_array($table, $skip_tables) && $module == 'system') {
+        continue;
+      }
       $schema = drupal_get_module_schema($module, $table);
       if (empty($schema)) {

What about adding all the tables we will do lazy in the future, and then do the skipping farther below on the function, so we basically skip the exception instead?

edurenye’s picture

Done, also created a follow up to remove #2670454: Deprecate individual schema install of system module in KernelTestBase it and a @todo.

Thanks for changing the status there I forgot it :)

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Looks perfect for me

juampynr’s picture

Issue summary: View changes

  • catch committed 4a6c6d8 on 8.1.x
    Issue #2670360 by edurenye: Add BC layer in installSchema to support...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x, thanks!

dawehner’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.