diff --git a/core/includes/common.inc b/core/includes/common.inc
index eabc080..d628b28 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -5915,7 +5915,7 @@ function element_set_attributes(array &$element, array $map) {
  * - name: The real name of the theme for display purposes.
  * - description: Brief description.
  * - screenshot: Path to screenshot relative to the theme's .info.yml file.
- * - engine: Theme engine; typically phptemplate.
+ * - engine: Theme engine; typically twig.
  * - base theme: Name of a base theme, if applicable.
  * - regions: Listed regions.
  * - features: Features available.
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 721453a..b9438fb 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -267,11 +267,9 @@ function _drupal_theme_initialize($theme, $base_theme = array(), $registry_callb
       include_once DRUPAL_ROOT . '/' . $theme->owner;
     }
   }
-  // Load twig as secondary always available engine.
-  // @todo Make twig the default engine and remove this. This is required
-  // because (by design) the theme system doesn't allow modules to register more
-  // than one type of extension. We need a temporary backwards compatibility
-  // layer to allow us to perform core-wide .tpl.php to .html.twig conversion.
+
+  // Always include Twig so that PHPTemplate themes do not have to convert all
+  // core and contrib templates in order to use the PHPTemplate engine.
   include_once DRUPAL_ROOT . '/core/themes/engines/twig/twig.engine';
 
   if (isset($registry_callback)) {
@@ -512,28 +510,6 @@ function _theme_process_registry(&$cache, $name, $type, $theme, $path) {
         if (!isset($info['path'])) {
           $result[$hook]['template'] = $path . '/templates/' . $info['template'];
         }
-        if ($type == 'module' || $type == 'theme_engine') {
-          // Add two render engines for modules and theme engines.
-          // @todo Remove and make twig the default engine.
-          $render_engines = array(
-            '.html.twig' => 'twig',
-            '.tpl.php' => 'phptemplate'
-          );
-
-          // Find the best engine for this template.
-          foreach ($render_engines as $extension => $engine) {
-            // Render the output using the template file.
-            $template_file = $result[$hook]['template'] . $extension;
-            if (isset($info['path'])) {
-              $template_file = $info['path'] . '/' . $template_file;
-            }
-            if (file_exists($template_file)) {
-              $result[$hook]['template_file'] = $template_file;
-              $result[$hook]['engine'] = $engine;
-              break;
-            }
-          }
-        }
       }
 
       // Allow variable processors for all theming hooks, whether the hook is
@@ -665,12 +641,6 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) {
     _theme_process_registry($cache, $theme_engine, 'theme_engine', $theme->name, dirname($theme->filename));
   }
 
-  if ($theme_engine == 'phptemplate') {
-    // Check for Twig templates if this is a PHPTemplate theme.
-    // @todo Remove this once all core themes are converted to Twig.
-    _theme_process_registry($cache, 'twig', 'theme_engine', $theme->name, dirname($theme->filename));
-  }
-
   // Finally, hooks provided by the theme itself.
   _theme_process_registry($cache, $theme->name, 'theme', $theme->name, dirname($theme->filename));
 
@@ -846,7 +816,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) {
  * theme_HOOK() (e.g., theme_taxonomy_term()) or via a template file named
  * according to the value of the 'template' key registered with the theme hook
  * (see hook_theme() for details). Default templates are implemented with the
- * PHPTemplate rendering engine and are named the same as the theme hook, with
+ * Twig rendering engine and are named the same as the theme hook, with
  * underscores changed to hyphens, so for the 'taxonomy_term' theme hook, the
  * default template is 'taxonomy-term.tpl.php'.
  *
@@ -858,9 +828,9 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) {
  * default implementation of the 'menu_tree' theme hook by implementing a
  * bartik_menu_tree() function), or by adding a template file within its folder
  * structure that follows the template naming structure used by the theme's
- * rendering engine (for example, since the Bartik theme uses the PHPTemplate
- * rendering engine, it overrides the default implementation of the 'page' theme
- * hook by containing a 'page.tpl.php' file within its folder structure).
+ * rendering engine (for example, since the Bartik theme uses the Twig rendering
+ * engine, it overrides the default implementation of the 'page' theme hook by
+ * containing a 'page.html.twig' file within its folder structure).
  *
  * If the implementation is a template file, several functions are called
  * before the template file is invoked, to modify the $variables array. These
@@ -1122,9 +1092,8 @@ function theme($hook, $variables = array()) {
     }
   }
   else {
-    // Default render function and extension.
-    $render_function = 'theme_render_template';
-    $extension = '.tpl.php';
+    $render_function = 'twig_render_template';
+    $extension = '.html.twig';
 
     // The theme engine may use a different extension and a different renderer.
     global $theme_engine;
@@ -1138,13 +1107,6 @@ function theme($hook, $variables = array()) {
           $extension = $extension_function();
         }
       }
-      // @todo Change this 'if' back to 'elseif' once Twig conversion is
-      // complete. Normally only modules have this key set.
-      if (isset($info['engine'])) {
-        if (function_exists($info['engine'] . '_render_template')) {
-          $render_function = $info['engine'] . '_render_template';
-        }
-      }
     }
 
     // In some cases, a template implementation may not have had
@@ -1182,12 +1144,6 @@ function theme($hook, $variables = array()) {
     if (isset($info['path'])) {
       $template_file = $info['path'] . '/' . $template_file;
     }
-
-    // Modules can override this.
-    if (isset($info['template_file'])) {
-      $template_file = $info['template_file'];
-    }
-
     $output = $render_function($template_file, $variables);
   }
 
@@ -1527,31 +1483,6 @@ function theme_settings_convert_to_config(array $theme_settings, Config $config)
 }
 
 /**
- * Renders a system default template, which is essentially a PHP template.
- *
- * @param $template_file
- *   The filename of the template to render.
- * @param $variables
- *   A keyed array of variables that will appear in the output.
- *
- * @return
- *   The output generated by the template.
- */
-function theme_render_template($template_file, $variables) {
-  // Extract the variables to a local namespace
-  extract($variables, EXTR_SKIP);
-
-  // Start output buffering
-  ob_start();
-
-  // Include the template file
-  include DRUPAL_ROOT . '/' . $template_file;
-
-  // End buffering and return its contents
-  return ob_get_clean();
-}
-
-/**
  * Enables a given list of themes.
  *
  * @param $theme_list
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
index 664a73b..a773922 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
@@ -154,10 +154,10 @@ function testListThemes() {
     $this->assertIdentical($themes['test_basetheme']->sub_themes, $sub_theme_list, 'Base theme\'s object includes list of subthemes.');
     $this->assertIdentical($themes['test_subtheme']->base_themes, $base_theme_list, 'Subtheme\'s object includes list of base themes.');
     // Check for theme engine in subtheme.
-    $this->assertIdentical($themes['test_subtheme']->engine, 'phptemplate', 'Subtheme\'s object includes the theme engine.');
+    $this->assertIdentical($themes['test_subtheme']->engine, 'twig', 'Subtheme\'s object includes the theme engine.');
     // Check for theme engine prefix.
-    $this->assertIdentical($themes['test_basetheme']->prefix, 'phptemplate', 'Base theme\'s object includes the theme engine prefix.');
-    $this->assertIdentical($themes['test_subtheme']->prefix, 'phptemplate', 'Subtheme\'s object includes the theme engine prefix.');
+    $this->assertIdentical($themes['test_basetheme']->prefix, 'twig', 'Base theme\'s object includes the theme engine prefix.');
+    $this->assertIdentical($themes['test_subtheme']->prefix, 'twig', 'Subtheme\'s object includes the theme engine prefix.');
   }
 
   /**
@@ -232,7 +232,7 @@ public function testFindThemeTemplates() {
       _theme_process_registry($cache, $module, 'module', $module, drupal_get_path('module', $module));
     }
 
-    $templates = drupal_find_theme_templates($cache, '.tpl.php', drupal_get_path('theme', 'test_theme'));
-    $this->assertEqual($templates['node__1']['template'], 'node--1', 'Template node--1.tpl.php was found in test_theme.');
+    $templates = drupal_find_theme_templates($cache, '.html.twig', drupal_get_path('theme', 'test_theme'));
+    $this->assertEqual($templates['node__1']['template'], 'node--1', 'Template node--1.html.twig was found in test_theme.');
   }
 }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestPhpTemplate.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestPhpTemplate.php
new file mode 100644
index 0000000..ff3fd03
--- /dev/null
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestPhpTemplate.php
@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\system\Tests\Theme\ThemeTestPhpTemplate.
+ */
+
+namespace Drupal\system\Tests\Theme;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests theme functions and templates with the PHPTemplate engine.
+ */
+class ThemeTestPhpTemplate extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('theme_test');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'PHPTemplate Engine',
+      'description' => 'Test theme functions with PHPTemplate.',
+      'group' => 'Theme',
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+    theme_enable(array('test_theme_phptemplate'));
+  }
+
+  /**
+   * Ensures a theme's template is overrideable based on the 'template' filename.
+   */
+  function testTemplateOverride() {
+    config('system.theme')
+      ->set('default', 'test_theme_phptemplate')
+      ->save();
+    $this->drupalGet('theme-test/template-test');
+    $this->assertText('Success: Template overridden.', t('Template overridden by defined \'template\' filename.'));
+  }
+
+}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php
index 5ac99e0..7860511 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php
@@ -24,50 +24,14 @@ class ThemeTestTwig extends WebTestBase {
   public static function getInfo() {
     return array(
       'name' => 'Twig Engine',
-      'description' => 'Test theme functions with twig.',
+      'description' => 'Test Twig-specific theme functionality.',
       'group' => 'Theme',
     );
   }
 
   function setUp() {
     parent::setUp();
-    theme_enable(array('test_theme_twig'));
-  }
-
-  /**
-   * Ensures a themes template is overrideable based on the 'template' filename.
-   */
-  function testTemplateOverride() {
-    config('system.theme')
-      ->set('default', 'test_theme_twig')
-      ->save();
-    $this->drupalGet('theme-test/template-test');
-    $this->assertText('Success: Template overridden.', t('Template overridden by defined \'template\' filename.'));
-  }
-
-  /**
-   * Tests drupal_find_theme_templates
-   */
-  function testFindThemeTemplates() {
-
-    $cache = array();
-
-    // Prime the theme cache
-    foreach (module_implements('theme') as $module) {
-      _theme_process_registry($cache, $module, 'module', $module, drupal_get_path('module', $module));
-    }
-
-    // Check for correct content
-    // @todo Remove this tests once double engine code is removed
-
-    $this->assertEqual($cache['node']['template_file'], 'core/modules/node/templates/node.html.twig', 'Node is using node.html.twig as template file');
-    $this->assertEqual($cache['node']['engine'], 'twig', 'Node is using twig engine');
-
-    $this->assertEqual($cache['theme_test_template_test']['template_file'], 'core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php', 'theme_test is using theme_test.template_test.tpl.php as template file');
-    $this->assertEqual($cache['theme_test_template_test']['engine'], 'phptemplate', 'theme_test is using phptemplate as engine.');
-
-    $templates = drupal_find_theme_templates($cache, '.html.twig', drupal_get_path('theme', 'test_theme_twig'));
-    $this->assertEqual($templates['node__1']['template'], 'node--1', 'Template node--1.html.twig was found in test_theme_twig.');
+    theme_enable(array('test_theme'));
   }
 
   /**
@@ -75,7 +39,7 @@ function testFindThemeTemplates() {
    */
   function testTwigVariableDataTypes() {
     config('system.theme')
-      ->set('default', 'test_theme_twig')
+      ->set('default', 'test_theme')
       ->save();
     $this->drupalGet('twig-theme-test/php-variables');
     foreach (_test_theme_twig_php_values() as $type => $value) {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php
index 0bcd1a6..38e183b 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigDebugMarkupTest.php
@@ -34,8 +34,8 @@ public static function getInfo() {
    */
   function testTwigDebugMarkup() {
     $extension = twig_extension();
-    theme_enable(array('test_theme_twig'));
-    config('system.theme')->set('default', 'test_theme_twig')->save();
+    theme_enable(array('test_theme'));
+    config('system.theme')->set('default', 'test_theme')->save();
     // Enable debug, rebuild the service container, and clear all caches.
     $this->settingsSet('twig_debug', TRUE);
     $this->rebuildContainer();
@@ -47,7 +47,7 @@ function testTwigDebugMarkup() {
       _theme_process_registry($cache, $module, 'module', $module, drupal_get_path('module', $module));
     }
     // Create array of Twig templates.
-    $templates = drupal_find_theme_templates($cache, $extension, drupal_get_path('theme', 'test_theme_twig'));
+    $templates = drupal_find_theme_templates($cache, $extension, drupal_get_path('theme', 'test_theme'));
     $templates += drupal_find_theme_templates($cache, $extension, drupal_get_path('module', 'node'));
 
     // Create a node and test different features of the debug markup.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php
index 2e84924..f50f110 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TwigSettingsTest.php
@@ -77,9 +77,9 @@ function testTwigDebugOverride() {
    */
   function testTwigCacheOverride() {
     $extension = twig_extension();
-    theme_enable(array('test_theme_twig'));
+    theme_enable(array('test_theme'));
     config('system.theme')
-      ->set('default', 'test_theme_twig')
+      ->set('default', 'test_theme')
       ->save();
 
     $cache = array();
@@ -89,7 +89,7 @@ function testTwigCacheOverride() {
     }
 
     // Load array of Twig templates.
-    $templates = drupal_find_theme_templates($cache, $extension, drupal_get_path('theme', 'test_theme_twig'));
+    $templates = drupal_find_theme_templates($cache, $extension, drupal_get_path('theme', 'test_theme'));
 
     // Get the template filename and the cache filename for
     // theme_test.template_test.html.twig.
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index aa79df9..7bb1ff4 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -1589,8 +1589,8 @@ function hook_permission() {
  *   - template: If specified, this theme implementation is a template, and
  *     this is the template file without an extension. Do not put .tpl.php on
  *     this file; that extension will be added automatically by the default
- *     rendering engine (which is PHPTemplate). If 'path', above, is specified,
- *     the template should also be in this path.
+ *     rendering engine (which is Twig). If 'path' above is specified, the
+ *     template should also be in this path.
  *   - function: If specified, this will be the function name to invoke for
  *     this implementation. If neither 'template' nor 'function' is specified,
  *     a default function name will be assumed. For example, if a module
@@ -1611,8 +1611,8 @@ function hook_permission() {
  *   - preprocess functions: A list of functions used to preprocess this data.
  *     Ordinarily this won't be used; it's automatically filled in. By default,
  *     for a module this will be filled in as template_preprocess_HOOK. For
- *     a theme this will be filled in as phptemplate_preprocess and
- *     phptemplate_preprocess_HOOK as well as themename_preprocess and
+ *     a theme this will be filled in as twig_preprocess and
+ *     twig_preprocess_HOOK as well as themename_preprocess and
  *     themename_preprocess_HOOK.
  *   - override preprocess functions: Set to TRUE when a theme does NOT want
  *     the standard preprocess functions to run. This can be used to give a
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 0d472e5..0d84d12 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -3006,7 +3006,7 @@ function _system_rebuild_theme_data() {
 
   // Set defaults for theme info.
   $defaults = array(
-    'engine' => 'phptemplate',
+    'engine' => 'twig',
     'regions' => array(
       'sidebar_first' => 'Left sidebar',
       'sidebar_second' => 'Right sidebar',
diff --git a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig
new file mode 100644
index 0000000..cde8faa
--- /dev/null
+++ b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.html.twig
@@ -0,0 +1,2 @@
+<!-- Output for Theme API test -->
+Fail: Template not overridden.
diff --git a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php b/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php
deleted file mode 100644
index cde8faa..0000000
--- a/core/modules/system/tests/modules/theme_test/templates/theme_test.template_test.tpl.php
+++ /dev/null
@@ -1,2 +0,0 @@
-<!-- Output for Theme API test -->
-Fail: Template not overridden.
diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module
index d610a19..4204077 100644
--- a/core/modules/system/tests/modules/theme_test/theme_test.module
+++ b/core/modules/system/tests/modules/theme_test/theme_test.module
@@ -30,7 +30,7 @@ function theme_test_system_theme_info() {
   $themes['test_theme'] = drupal_get_path('module', 'system') . '/tests/themes/test_theme/test_theme.info.yml';
   $themes['test_basetheme'] = drupal_get_path('module', 'system') . '/tests/themes/test_basetheme/test_basetheme.info.yml';
   $themes['test_subtheme'] = drupal_get_path('module', 'system') . '/tests/themes/test_subtheme/test_subtheme.info.yml';
-  $themes['test_theme_twig'] = drupal_get_path('module', 'system') . '/tests/themes/test_theme_twig/test_theme_twig.info.yml';
+  $themes['test_theme_phptemplate'] = drupal_get_path('module', 'system') . '/tests/themes/test_theme_phptemplate/test_theme_phptemplate.info.yml';
   return $themes;
 }
 
diff --git a/core/modules/system/tests/themes/test_theme/node--1.html.twig b/core/modules/system/tests/themes/test_theme/node--1.html.twig
new file mode 100644
index 0000000..046c02e
--- /dev/null
+++ b/core/modules/system/tests/themes/test_theme/node--1.html.twig
@@ -0,0 +1,4 @@
+{#
+  // node--1.html.twig - Dummy file for finding the template
+#}
+Node Content Dummy
diff --git a/core/modules/system/tests/themes/test_theme/node--1.tpl.php b/core/modules/system/tests/themes/test_theme/node--1.tpl.php
deleted file mode 100644
index 81974ce..0000000
--- a/core/modules/system/tests/themes/test_theme/node--1.tpl.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-  // node--1.tpl.php - Dummy file for finding the template
-?>
-Node Content Dummy
diff --git a/core/modules/system/tests/themes/test_theme/test_theme.theme b/core/modules/system/tests/themes/test_theme/test_theme.theme
index 8275818..62b5abf 100644
--- a/core/modules/system/tests/themes/test_theme/test_theme.theme
+++ b/core/modules/system/tests/themes/test_theme/test_theme.theme
@@ -1,6 +1,18 @@
 <?php
 
 /**
+ * @file
+ * Theme to help test the Twig engine.
+ */
+
+/**
+ * Implements THEME_preprocess_twig_theme_test_php_variables().
+ */
+function test_theme_preprocess_twig_theme_test_php_variables(&$variables) {
+  $variables['php_values'] = _test_theme_twig_php_values();
+}
+
+/**
  * Tests a theme overriding a suggestion of a base theme hook.
  */
 function test_theme_theme_test__suggestion($variables) {
diff --git a/core/modules/system/tests/themes/test_theme/theme_test.template_test.html.twig b/core/modules/system/tests/themes/test_theme/theme_test.template_test.html.twig
new file mode 100644
index 0000000..6cda319
--- /dev/null
+++ b/core/modules/system/tests/themes/test_theme/theme_test.template_test.html.twig
@@ -0,0 +1,2 @@
+{# Output for Theme API test #}
+Success: Template overridden.
diff --git a/core/modules/system/tests/themes/test_theme/theme_test.template_test.tpl.php b/core/modules/system/tests/themes/test_theme/theme_test.template_test.tpl.php
deleted file mode 100644
index d4409bf..0000000
--- a/core/modules/system/tests/themes/test_theme/theme_test.template_test.tpl.php
+++ /dev/null
@@ -1,2 +0,0 @@
-<!-- Output for Theme API test -->
-Success: Template overridden.
diff --git a/core/modules/system/tests/themes/test_theme_phptemplate/node--1.tpl.php b/core/modules/system/tests/themes/test_theme_phptemplate/node--1.tpl.php
new file mode 100644
index 0000000..81974ce
--- /dev/null
+++ b/core/modules/system/tests/themes/test_theme_phptemplate/node--1.tpl.php
@@ -0,0 +1,4 @@
+<?php
+  // node--1.tpl.php - Dummy file for finding the template
+?>
+Node Content Dummy
diff --git a/core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.info.yml b/core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.info.yml
new file mode 100644
index 0000000..fa975b9
--- /dev/null
+++ b/core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.info.yml
@@ -0,0 +1,6 @@
+name: 'Test theme PHPTemplate'
+type: theme
+description: 'Theme for testing the theme system with the PHPTemplate engine'
+core: 8.x
+engine: phptemplate
+hidden: true
diff --git a/core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.theme b/core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.theme
new file mode 100644
index 0000000..b3d9bbc
--- /dev/null
+++ b/core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.theme
@@ -0,0 +1 @@
+<?php
diff --git a/core/modules/system/tests/themes/test_theme_phptemplate/theme_test.template_test.tpl.php b/core/modules/system/tests/themes/test_theme_phptemplate/theme_test.template_test.tpl.php
new file mode 100644
index 0000000..ada11e7
--- /dev/null
+++ b/core/modules/system/tests/themes/test_theme_phptemplate/theme_test.template_test.tpl.php
@@ -0,0 +1,2 @@
+<!-- Output for Theme API test -->
+<?php print 'Success: Template overridden.'; ?>
diff --git a/core/modules/system/tests/themes/test_theme_twig/node--1.html.twig b/core/modules/system/tests/themes/test_theme_twig/node--1.html.twig
deleted file mode 100644
index 046c02e..0000000
--- a/core/modules/system/tests/themes/test_theme_twig/node--1.html.twig
+++ /dev/null
@@ -1,4 +0,0 @@
-{#
-  // node--1.html.twig - Dummy file for finding the template
-#}
-Node Content Dummy
diff --git a/core/modules/system/tests/themes/test_theme_twig/template.php b/core/modules/system/tests/themes/test_theme_twig/template.php
deleted file mode 100644
index a4abe2d..0000000
--- a/core/modules/system/tests/themes/test_theme_twig/template.php
+++ /dev/null
@@ -1,2 +0,0 @@
-<?php
-
diff --git a/core/modules/system/tests/themes/test_theme_twig/test_theme_twig.info.yml b/core/modules/system/tests/themes/test_theme_twig/test_theme_twig.info.yml
deleted file mode 100644
index 2c4cf83..0000000
--- a/core/modules/system/tests/themes/test_theme_twig/test_theme_twig.info.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-name: 'Test theme for Twig'
-type: theme
-description: 'Theme for testing the theme system with twig engine'
-engine: twig
-core: 8.x
-hidden: true
diff --git a/core/modules/system/tests/themes/test_theme_twig/test_theme_twig.theme b/core/modules/system/tests/themes/test_theme_twig/test_theme_twig.theme
deleted file mode 100644
index 43aac12..0000000
--- a/core/modules/system/tests/themes/test_theme_twig/test_theme_twig.theme
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * @file
- * Theme to help test the Twig engine.
- */
-
-/**
- * Implements THEME_preprocess_twig_theme_test_php_variables().
- */
-function test_theme_twig_preprocess_twig_theme_test_php_variables(&$variables) {
-  $variables['php_values'] = _test_theme_twig_php_values();
-}
diff --git a/core/modules/system/tests/themes/test_theme_twig/theme_test.template_test.html.twig b/core/modules/system/tests/themes/test_theme_twig/theme_test.template_test.html.twig
deleted file mode 100644
index 6cda319..0000000
--- a/core/modules/system/tests/themes/test_theme_twig/theme_test.template_test.html.twig
+++ /dev/null
@@ -1,2 +0,0 @@
-{# Output for Theme API test #}
-Success: Template overridden.
diff --git a/core/modules/system/theme.api.php b/core/modules/system/theme.api.php
index 399aca8..85f21d1 100644
--- a/core/modules/system/theme.api.php
+++ b/core/modules/system/theme.api.php
@@ -39,12 +39,8 @@
  * default implementations of theme hooks are named theme_HOOK. Default
  * template implementations are stored in the module directory.
  *
- * Drupal's default template renderer is a simple PHP parsing engine that
- * includes the template and stores the output. Drupal's theme engines
- * can provide alternate template engines, such as XTemplate, Smarty and
- * PHPTal. The most common template engine is PHPTemplate (included with
- * Drupal and implemented in phptemplate.engine, which uses Drupal's default
- * template renderer.
+ * Drupal's default template renderer is Twig. Drupal's theme engines can
+ * provide alternate template engines, such as XTemplate, Smarty and PHPTal.
  *
  * In order to create theme-specific implementations of these hooks, themes can
  * implement their own version of theme hooks, either as functions or templates.
@@ -53,10 +49,9 @@
  * its own version of hook_theme() to tell Drupal what it is implementing;
  * themes utilizing an engine will have their well-named theming functions
  * automatically registered for them. While this can vary based upon the theme
- * engine, the standard set by phptemplate is that theme functions should be
- * named THEMENAME_HOOK. For example, for Drupal's default theme (Bartik) to
- * implement the 'table' hook, the phptemplate.engine would find
- * bartik_table().
+ * engine, the standard is that theme functions should be named THEMENAME_HOOK.
+ * For example, for Drupal's default theme (Bartik) to implement the 'table'
+ * hook, the theme function should be called bartik_table().
  *
  * The theme system is described and defined in theme.inc.
  *
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index d527836..1850a32 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -1777,7 +1777,7 @@ public function buildOptionsForm(&$form, &$form_state) {
 
         // If there's a theme engine involved, we also need to know its extension
         // so we can give the proper filename.
-        $this->theme_extension = '.tpl.php';
+        $this->theme_extension = '.html.twig';
         if (isset($theme_engine)) {
           $extension_function = $theme_engine . '_extension';
           if (function_exists($extension_function)) {
diff --git a/core/themes/engines/phptemplate/phptemplate.engine b/core/themes/engines/phptemplate/phptemplate.engine
index 88c09c7..718d460 100644
--- a/core/themes/engines/phptemplate/phptemplate.engine
+++ b/core/themes/engines/phptemplate/phptemplate.engine
@@ -23,3 +23,35 @@ function phptemplate_theme($existing, $type, $theme, $path) {
   $templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
   return $templates;
 }
+
+/**
+ * Implements hook_extension().
+ */
+function phptemplate_extension() {
+  return '.tpl.php';
+}
+
+/**
+ * Renders a system default template, which is essentially a PHP template.
+ *
+ * @param $template_file
+ *   The filename of the template to render.
+ * @param $variables
+ *   A keyed array of variables that will appear in the output.
+ *
+ * @return
+ *   The output generated by the template.
+ */
+function phptemplate_render_template($template_file, $variables) {
+  // Extract the variables to a local namespace
+  extract($variables, EXTR_SKIP);
+
+  // Start output buffering
+  ob_start();
+
+  // Include the template file
+  include DRUPAL_ROOT . '/' . $template_file;
+
+  // End buffering and return its contents
+  return ob_get_clean();
+}
diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine
index 1ba60a5..b541cdc 100644
--- a/core/themes/engines/twig/twig.engine
+++ b/core/themes/engines/twig/twig.engine
@@ -10,7 +10,9 @@
  * Implements hook_theme().
  */
 function twig_theme($existing, $type, $theme, $path) {
-  return drupal_find_theme_templates($existing, '.html.twig', $path);
+  $templates = drupal_find_theme_functions($existing, array($theme));
+  $templates += drupal_find_theme_templates($existing, '.html.twig', $path);
+  return $templates;
 }
 
 /**
