diff --git a/.htaccess b/.htaccess
index 7db5d3e..fc8df20 100644
--- a/.htaccess
+++ b/.htaccess
@@ -3,7 +3,7 @@
 #
 
 # Protect files and directories from prying eyes.
-<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
+<FilesMatch "\.(make|po|sh|.*sql|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
   <IfModule mod_authz_core.c>
     Require all denied
   </IfModule>
diff --git a/core/authorize.php b/core/authorize.php
index dbab02f..da8515f 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -81,8 +81,8 @@ function authorize_access_allowed() {
 $response = new Response();
 if (authorize_access_allowed()) {
   // Load both the Form API and Batch API.
-  require_once __DIR__ . '/includes/form.inc';
-  require_once __DIR__ . '/includes/batch.inc';
+  require_once __DIR__ . '/includes/form.inc.php';
+  require_once __DIR__ . '/includes/batch.inc.php';
 
   if (isset($_SESSION['authorize_page_title'])) {
     $page_title = $_SESSION['authorize_page_title'];
diff --git a/core/includes/batch.inc b/core/includes/batch.inc.php
similarity index 100%
rename from core/includes/batch.inc
rename to core/includes/batch.inc.php
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc.php
similarity index 99%
rename from core/includes/bootstrap.inc
rename to core/includes/bootstrap.inc.php
index fee191a..47a31bf 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc.php
@@ -689,7 +689,7 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) {
  * In order to bootstrap Drupal from another PHP script, you can use this code:
  * @code
  *   require_once '/path/to/drupal/core/vendor/autoload.php';
- *   require_once '/path/to/drupal/core/includes/bootstrap.inc';
+ *   require_once '/path/to/drupal/core/includes/bootstrap.inc.php';
  *   drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  * @endcode
  *
@@ -770,7 +770,7 @@ function drupal_get_user_timezone() {
  *   occurred.
  */
 function _drupal_error_handler($error_level, $message, $filename, $line, $context) {
-  require_once __DIR__ . '/errors.inc';
+  require_once __DIR__ . '/errors.inc.php';
   _drupal_error_handler_real($error_level, $message, $filename, $line, $context);
 }
 
@@ -785,7 +785,7 @@ function _drupal_error_handler($error_level, $message, $filename, $line, $contex
  *   The exception object that was thrown.
  */
 function _drupal_exception_handler($exception) {
-  require_once __DIR__ . '/errors.inc';
+  require_once __DIR__ . '/errors.inc.php';
 
   try {
     // Log the message to the watchdog and return an error page to the user.
@@ -913,7 +913,7 @@ function drupal_generate_test_ua($prefix) {
  * @see _drupal_maintenance_theme()
  */
 function drupal_maintenance_theme() {
-  require_once __DIR__ . '/theme.maintenance.inc';
+  require_once __DIR__ . '/theme.maintenance.inc.php';
   _drupal_maintenance_theme();
 }
 
@@ -1298,7 +1298,7 @@ function _drupal_shutdown_function() {
     if (!function_exists('fastcgi_finish_request')) {
       // If we are displaying errors, then do so with no possibility of a
       // further uncaught exception being thrown.
-      require_once __DIR__ . '/errors.inc';
+      require_once __DIR__ . '/errors.inc.php';
       if (error_displayable()) {
         print '<h1>Uncaught exception thrown in shutdown function.</h1>';
         print '<p>' . Error::renderExceptionSafe($exception) . '</p><hr />';
diff --git a/core/includes/common.inc b/core/includes/common.inc.php
similarity index 99%
rename from core/includes/common.inc
rename to core/includes/common.inc.php
index f96c3aa..27a8f3d 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc.php
@@ -5,7 +5,7 @@
  * Common functions that many Drupal modules will need to reference.
  *
  * The functions that are critical and need to be available even when serving
- * a cached page are instead located in bootstrap.inc.
+ * a cached page are instead located in bootstrap.inc.php.
  */
 
 use Drupal\Component\Serialization\Json;
diff --git a/core/includes/database.inc b/core/includes/database.inc.php
similarity index 100%
rename from core/includes/database.inc
rename to core/includes/database.inc.php
diff --git a/core/includes/entity.inc b/core/includes/entity.inc.php
similarity index 100%
rename from core/includes/entity.inc
rename to core/includes/entity.inc.php
diff --git a/core/includes/errors.inc b/core/includes/errors.inc.php
similarity index 100%
rename from core/includes/errors.inc
rename to core/includes/errors.inc.php
diff --git a/core/includes/file.inc b/core/includes/file.inc.php
similarity index 100%
rename from core/includes/file.inc
rename to core/includes/file.inc.php
diff --git a/core/includes/form.inc b/core/includes/form.inc.php
similarity index 99%
rename from core/includes/form.inc
rename to core/includes/form.inc.php
index 694fb41..f853a5a 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc.php
@@ -838,7 +838,7 @@ function batch_process($redirect = NULL, Url $url = NULL, $redirect_callback = N
     else {
       // Non-progressive execution: bypass the whole progressbar workflow
       // and execute the batch in one pass.
-      require_once __DIR__ . '/batch.inc';
+      require_once __DIR__ . '/batch.inc.php';
       _batch_process();
     }
   }
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc.php
similarity index 99%
rename from core/includes/install.core.inc
rename to core/includes/install.core.inc.php
index 91cee77..25d81ea 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc.php
@@ -296,7 +296,7 @@ function install_begin_request($class_loader, &$install_state) {
   }
 
   // Allow command line scripts to override server variables used by Drupal.
-  require_once __DIR__ . '/bootstrap.inc';
+  require_once __DIR__ . '/bootstrap.inc.php';
 
   // If the hash salt leaks, it becomes possible to forge a valid testing user
   // agent, install a new copy of Drupal, and take over the original site.
@@ -313,19 +313,19 @@ function install_begin_request($class_loader, &$install_state) {
 
   // Ensure that procedural dependencies are loaded as early as possible,
   // since the error/exception handlers depend on them.
-  require_once __DIR__ . '/../modules/system/system.install';
-  require_once __DIR__ . '/common.inc';
-  require_once __DIR__ . '/file.inc';
-  require_once __DIR__ . '/install.inc';
-  require_once __DIR__ . '/schema.inc';
-  require_once __DIR__ . '/path.inc';
-  require_once __DIR__ . '/database.inc';
-  require_once __DIR__ . '/form.inc';
-  require_once __DIR__ . '/batch.inc';
+  require_once __DIR__ . '/../modules/system/system.install.php';
+  require_once __DIR__ . '/common.inc.php';
+  require_once __DIR__ . '/file.inc.php';
+  require_once __DIR__ . '/install.inc.php';
+  require_once __DIR__ . '/schema.inc.php';
+  require_once __DIR__ . '/path.inc.php';
+  require_once __DIR__ . '/database.inc.php';
+  require_once __DIR__ . '/form.inc.php';
+  require_once __DIR__ . '/batch.inc.php';
 
   // Load module basics (needed for hook invokes).
-  include_once __DIR__ . '/module.inc';
-  require_once __DIR__ . '/entity.inc';
+  include_once __DIR__ . '/module.inc.php';
+  require_once __DIR__ . '/entity.inc.php';
 
   // Create a minimal mocked container to support calls to t() in the pre-kernel
   // base system verification code paths below. The strings are not actually
@@ -760,7 +760,7 @@ function install_tasks($install_state) {
     // Load the profile install file, because it is not always loaded when
     // hook_install_tasks() is invoked (e.g. batch processing).
     $profile = $install_state['parameters']['profile'];
-    $profile_install_file = $install_state['profiles'][$profile]->getPath() . '/' . $profile . '.install';
+    $profile_install_file = $install_state['profiles'][$profile]->getPath() . '/' . $profile . '.install.php';
     if (file_exists($profile_install_file)) {
       include_once \Drupal::root() . '/' . $profile_install_file;
     }
diff --git a/core/includes/install.inc b/core/includes/install.inc.php
similarity index 100%
rename from core/includes/install.inc
rename to core/includes/install.inc.php
diff --git a/core/includes/menu.inc b/core/includes/menu.inc.php
similarity index 100%
rename from core/includes/menu.inc
rename to core/includes/menu.inc.php
diff --git a/core/includes/module.inc b/core/includes/module.inc.php
similarity index 95%
rename from core/includes/module.inc
rename to core/includes/module.inc.php
index 642c32c..d0d30fb 100644
--- a/core/includes/module.inc
+++ b/core/includes/module.inc.php
@@ -92,14 +92,14 @@ function system_register($type, $name, $uri) {
  * Loads a module's installation hooks.
  *
  * @param $module
- *   The name of the module (without the .module extension).
+ *   The name of the module (without the .module.php extension).
  *
  * @return
  *   The name of the module's install file, if successful; FALSE otherwise.
  */
 function module_load_install($module) {
   // Make sure the installation API is available
-  include_once __DIR__ . '/install.inc';
+  include_once __DIR__ . '/install.inc.php';
 
   return module_load_include('install', $module);
 }
@@ -109,9 +109,9 @@ function module_load_install($module) {
  *
  * Examples:
  * @code
- *   // Load node.admin.inc from the node module.
+ *   // Load node.admin.inc.php from the node module.
  *   module_load_include('inc', 'node', 'node.admin');
- *   // Load content_types.inc from the node module.
+ *   // Load content_types.inc.php from the node module.
  *   module_load_include('inc', 'node', 'content_types');
  * @endcode
  *
@@ -121,12 +121,12 @@ function module_load_install($module) {
  * instead.
  *
  * @param $type
- *   The include file's type (file extension).
+ *   The include file's type (file extension omitting .php).
  * @param $module
  *   The module to which the include file belongs.
  * @param $name
  *   (optional) The base file name (without the $type extension). If omitted,
- *   $module is used; i.e., resulting in "$module.$type" by default.
+ *   $module is used; i.e., resulting in "$module.$type.php" by default.
  *
  * @return
  *   The name of the included file, if successful; FALSE otherwise.
@@ -142,7 +142,7 @@ function module_load_include($type, $module, $name = NULL) {
   }
 
   if (function_exists('drupal_get_path')) {
-    $file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$name.$type";
+    $file = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$name.$type.php";
     if (is_file($file)) {
       require_once $file;
       return $file;
diff --git a/core/includes/pager.inc b/core/includes/pager.inc.php
similarity index 100%
rename from core/includes/pager.inc
rename to core/includes/pager.inc.php
diff --git a/core/includes/path.inc b/core/includes/path.inc.php
similarity index 100%
rename from core/includes/path.inc
rename to core/includes/path.inc.php
diff --git a/core/includes/schema.inc b/core/includes/schema.inc.php
similarity index 99%
rename from core/includes/schema.inc
rename to core/includes/schema.inc.php
index 4722cf8..a6cb777 100644
--- a/core/includes/schema.inc
+++ b/core/includes/schema.inc.php
@@ -70,7 +70,7 @@ function drupal_get_complete_schema($rebuild = FALSE) {
       // Load the .install files to get hook_schema.
       \Drupal::moduleHandler()->loadAllIncludes('install');
 
-      require_once __DIR__ . '/common.inc';
+      require_once __DIR__ . '/common.inc.php';
       // Invoke hook_schema for all modules.
       foreach (\Drupal::moduleHandler()->getImplementations('schema') as $module) {
         // Cast the result of hook_schema() to an array, as a NULL return value
diff --git a/core/includes/tablesort.inc b/core/includes/tablesort.inc.php
similarity index 100%
rename from core/includes/tablesort.inc
rename to core/includes/tablesort.inc.php
diff --git a/core/includes/theme.inc b/core/includes/theme.inc.php
similarity index 100%
rename from core/includes/theme.inc
rename to core/includes/theme.inc.php
diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc.php
similarity index 94%
rename from core/includes/theme.maintenance.inc
rename to core/includes/theme.maintenance.inc.php
index aca0a53..076c0cf 100644
--- a/core/includes/theme.maintenance.inc
+++ b/core/includes/theme.maintenance.inc.php
@@ -23,13 +23,13 @@ function _drupal_maintenance_theme() {
     return;
   }
 
-  require_once __DIR__ . '/path.inc';
-  require_once __DIR__ . '/theme.inc';
-  require_once __DIR__ . '/common.inc';
-  require_once __DIR__ . '/unicode.inc';
-  require_once __DIR__ . '/file.inc';
-  require_once __DIR__ . '/module.inc';
-  require_once __DIR__ . '/database.inc';
+  require_once __DIR__ . '/path.inc.php';
+  require_once __DIR__ . '/theme.inc.php';
+  require_once __DIR__ . '/common.inc.php';
+  require_once __DIR__ . '/unicode.inc.php';
+  require_once __DIR__ . '/file.inc.php';
+  require_once __DIR__ . '/module.inc.php';
+  require_once __DIR__ . '/database.inc.php';
   Unicode::check();
 
   // Install and update pages are treated differently to prevent theming overrides.
diff --git a/core/includes/unicode.inc b/core/includes/unicode.inc.php
similarity index 100%
rename from core/includes/unicode.inc
rename to core/includes/unicode.inc.php
diff --git a/core/includes/update.inc b/core/includes/update.inc.php
similarity index 99%
rename from core/includes/update.inc
rename to core/includes/update.inc.php
index 10d8c51..93227a1 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc.php
@@ -145,7 +145,7 @@ function update_set_schema($module, $schema_version) {
   \Drupal::keyValue('system.schema')->set($module, $schema_version);
   // system_list_reset() is in module.inc but that would only be available
   // once the variable bootstrap is done.
-  require_once __DIR__ . '/module.inc';
+  require_once __DIR__ . '/module.inc.php';
   system_list_reset();
 }
 
diff --git a/core/includes/utility.inc b/core/includes/utility.inc.php
similarity index 100%
rename from core/includes/utility.inc
rename to core/includes/utility.inc.php
diff --git a/core/install.php b/core/install.php
index 3493d4a..baa41c2 100644
--- a/core/install.php
+++ b/core/install.php
@@ -28,5 +28,5 @@
 
 // Start the installer.
 $class_loader = require_once __DIR__ . '/vendor/autoload.php';
-require_once __DIR__ . '/includes/install.core.inc';
+require_once __DIR__ . '/includes/install.core.inc.php';
 install_drupal($class_loader);
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 0e679fd..092c2ae 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -215,7 +215,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
   public static function createFromRequest(Request $request, $class_loader, $environment, $allow_dumping = TRUE) {
     // Include our bootstrap file.
     $core_root = dirname(dirname(dirname(__DIR__)));
-    require_once $core_root . '/includes/bootstrap.inc';
+    require_once $core_root . '/includes/bootstrap.inc.php';
 
     $kernel = new static($environment, $class_loader, $allow_dumping);
 
@@ -433,20 +433,20 @@ public function getContainer() {
    * {@inheritdoc}
    */
   public function loadLegacyIncludes() {
-    require_once $this->root . '/core/includes/common.inc';
-    require_once $this->root . '/core/includes/database.inc';
-    require_once $this->root . '/core/includes/path.inc';
-    require_once $this->root . '/core/includes/module.inc';
-    require_once $this->root . '/core/includes/theme.inc';
-    require_once $this->root . '/core/includes/pager.inc';
-    require_once $this->root . '/core/includes/menu.inc';
-    require_once $this->root . '/core/includes/tablesort.inc';
-    require_once $this->root . '/core/includes/file.inc';
-    require_once $this->root . '/core/includes/unicode.inc';
-    require_once $this->root . '/core/includes/form.inc';
-    require_once $this->root . '/core/includes/errors.inc';
-    require_once $this->root . '/core/includes/schema.inc';
-    require_once $this->root . '/core/includes/entity.inc';
+    require_once $this->root . '/core/includes/common.inc.php';
+    require_once $this->root . '/core/includes/database.inc.php';
+    require_once $this->root . '/core/includes/path.inc.php';
+    require_once $this->root . '/core/includes/module.inc.php';
+    require_once $this->root . '/core/includes/theme.inc.php';
+    require_once $this->root . '/core/includes/pager.inc.php';
+    require_once $this->root . '/core/includes/menu.inc.php';
+    require_once $this->root . '/core/includes/tablesort.inc.php';
+    require_once $this->root . '/core/includes/file.inc.php';
+    require_once $this->root . '/core/includes/unicode.inc.php';
+    require_once $this->root . '/core/includes/form.inc.php';
+    require_once $this->root . '/core/includes/errors.inc.php';
+    require_once $this->root . '/core/includes/schema.inc.php';
+    require_once $this->root . '/core/includes/entity.inc.php';
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
index 4681977..c0828bb 100644
--- a/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
+++ b/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
@@ -422,13 +422,13 @@ protected function scanDirectory($dir, $include_tests) {
       $pathname = $dir_prefix . $fileinfo->getSubPathname();
 
       // Determine whether the extension has a main extension file.
-      // For theme engines, the file extension is .engine.
+      // For theme engines, the file extension is .engine.php.
       if ($type == 'theme_engine') {
-        $filename = $name . '.engine';
+        $filename = $name . '.engine.php';
       }
       // For profiles/modules/themes, it is the extension type.
       else {
-        $filename = $name . '.' . $type;
+        $filename = $name . '.' . $type . '.php';
       }
       if (!file_exists(dirname($pathname) . '/' . $filename)) {
         $filename = NULL;
diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php
index c1eee71..22df6ee 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandler.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php
@@ -211,7 +211,7 @@ public function addProfile($name, $path) {
    */
   protected function add($type, $name, $path) {
     $pathname = "$path/$name.info.yml";
-    $filename = file_exists($this->root . "/$path/$name.$type") ? "$name.$type" : NULL;
+    $filename = file_exists($this->root . "/$path/$name.$type.php") ? "$name.$type.php" : NULL;
     $this->moduleList[$name] = new Extension($this->root, $type, $pathname, $filename);
     $this->resetImplementations();
   }
@@ -261,12 +261,12 @@ public function loadAllIncludes($type, $name = NULL) {
   public function loadInclude($module, $type, $name = NULL) {
     if ($type == 'install') {
       // Make sure the installation API is available
-      include_once $this->root . '/core/includes/install.inc';
+      include_once $this->root . '/core/includes/install.inc.php';
     }
 
     $name = $name ?: $module;
     if (isset($this->moduleList[$module])) {
-      $file = $this->root . '/' . $this->moduleList[$module]->getPath() . "/$name.$type";
+      $file = $this->root . '/' . $this->moduleList[$module]->getPath() . "/$name.$type.php";
       if (is_file($file)) {
         require_once $file;
         return $file;
diff --git a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
index 9d12df6..164f010 100644
--- a/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
+++ b/core/lib/Drupal/Core/Extension/ModuleHandlerInterface.php
@@ -134,10 +134,10 @@ public function moduleExists($module);
    * Loads an include file for each enabled module.
    *
    * @param string $type
-   *   The include file's type (file extension).
+   *   The include file's type (file extension omitting .php).
    * @param string $name
    *   (optional) The base file name (without the $type extension). If omitted,
-   *   each module's name is used; i.e., "$module.$type" by default.
+   *   each module's name is used; i.e., "$module.$type.php" by default.
    */
   public function loadAllIncludes($type, $name = NULL);
 
@@ -146,19 +146,19 @@ public function loadAllIncludes($type, $name = NULL);
    *
    * Examples:
    * @code
-   *   // Load node.admin.inc from the node module.
+   *   // Load node.admin.inc.php from the node module.
    *   $this->loadInclude('node', 'inc', 'node.admin');
-   *   // Load content_types.inc from the node module.
+   *   // Load content_types.inc.php from the node module.
    *   $this->loadInclude('node', 'inc', ''content_types');
    * @endcode
    *
    * @param string $module
    *   The module to which the include file belongs.
    * @param string $type
-   *   The include file's type (file extension).
+   *   The include file's type (file extension omitting .php).
    * @param string $name
    *   (optional) The base file name (without the $type extension). If omitted,
-   *   $module is used; i.e., resulting in "$module.$type" by default.
+   *   $module is used; i.e., resulting in "$module.$type.php" by default.
    *
    * @return string|false
    *   The name of the included file, if successful; FALSE otherwise.
@@ -202,7 +202,7 @@ public function resetImplementations();
    * Returns whether a given module implements a given hook.
    *
    * @param string $module
-   *   The name of the module (without the .module extension).
+   *   The name of the module (without the .module.php extension).
    * @param string $hook
    *   The name of the hook (e.g. "help" or "menu").
    *
@@ -216,7 +216,7 @@ public function implementsHook($module, $hook);
    * Invokes a hook in a particular module.
    *
    * @param string $module
-   *   The name of the module (without the .module extension).
+   *   The name of the module (without the .module.php extension).
    * @param string $hook
    *   The name of the hook to invoke.
    * @param ...
diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
index dba7a94..8e91e55 100644
--- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php
+++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php
@@ -131,7 +131,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) {
     }
 
     // Required for module installation checks.
-    include_once $this->root . '/core/includes/install.inc';
+    include_once $this->root . '/core/includes/install.inc.php';
 
     /** @var \Drupal\Core\Config\ConfigInstaller $config_installer */
     $config_installer = \Drupal::service('config.installer');
@@ -189,7 +189,7 @@ public function install(array $module_list, $enable_dependencies = TRUE) {
           else {
             $module_path = drupal_get_path('module', $name);
             $pathname = "$module_path/$name.info.yml";
-            $filename = file_exists($module_path . "/$name.module") ? "$name.module" : NULL;
+            $filename = file_exists($module_path . "/$name.module.php") ? "$name.module.php" : NULL;
             $module_filenames[$name] = new Extension($this->root, 'module', $pathname, $filename);
           }
         }
diff --git a/core/lib/Drupal/Core/Form/FormCache.php b/core/lib/Drupal/Core/Form/FormCache.php
index ea38fd2..a10bf36 100644
--- a/core/lib/Drupal/Core/Form/FormCache.php
+++ b/core/lib/Drupal/Core/Form/FormCache.php
@@ -169,8 +169,8 @@ protected function loadCachedFormState($form_build_id, FormStateInterface $form_
           $file += array('type' => 'inc', 'name' => $file['module']);
           $this->moduleHandler->loadInclude($file['module'], $file['type'], $file['name']);
         }
-        elseif (file_exists($file)) {
-          require_once $this->root . '/' . $file;
+        elseif (file_exists($file . '.php')) {
+          require_once $this->root . '/' . $file . '.php';
         }
       }
       // Retrieve the list of previously known safe strings and store it for
diff --git a/core/lib/Drupal/Core/Session/SessionHandler.php b/core/lib/Drupal/Core/Session/SessionHandler.php
index f46794f..62324ca 100644
--- a/core/lib/Drupal/Core/Session/SessionHandler.php
+++ b/core/lib/Drupal/Core/Session/SessionHandler.php
@@ -133,7 +133,7 @@ public function write($sid, $value) {
       return TRUE;
     }
     catch (\Exception $exception) {
-      require_once DRUPAL_ROOT . '/core/includes/errors.inc';
+      require_once DRUPAL_ROOT . '/core/includes/errors.inc.php';
       // If we are displaying errors, then do so with no possibility of a
       // further uncaught exception being thrown.
       if (error_displayable()) {
diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
index e09d9f6..04b6b6f 100644
--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
@@ -45,7 +45,7 @@ public function __construct($root, \Twig_LoaderInterface $loader = NULL, $option
 
     // Ensure that twig.engine is loaded, given that it is needed to render a
     // template because functions like twig_drupal_escape_filter are called.
-    require_once $root . '/core/themes/engines/twig/twig.engine';
+    require_once $root . '/core/themes/engines/twig/twig.engine.php';
 
     $this->templateClasses = array();
 
diff --git a/core/lib/Drupal/Core/Test/TestKernel.php b/core/lib/Drupal/Core/Test/TestKernel.php
index bff37e6..0de57f6 100644
--- a/core/lib/Drupal/Core/Test/TestKernel.php
+++ b/core/lib/Drupal/Core/Test/TestKernel.php
@@ -20,7 +20,7 @@ class TestKernel extends DrupalKernel {
    */
   public static function createFromRequest(Request $request, $class_loader, $environment, $allow_dumping = TRUE) {
     // Include our bootstrap file.
-    require_once __DIR__ . '/../../../../includes/bootstrap.inc';
+    require_once __DIR__ . '/../../../../includes/bootstrap.inc.php';
 
     // Exit if we should be in a test environment but aren't.
     if (!drupal_valid_test_ua()) {
diff --git a/core/lib/Drupal/Core/Test/TestRunnerKernel.php b/core/lib/Drupal/Core/Test/TestRunnerKernel.php
index fa9fd51..3e7ff14 100644
--- a/core/lib/Drupal/Core/Test/TestRunnerKernel.php
+++ b/core/lib/Drupal/Core/Test/TestRunnerKernel.php
@@ -42,8 +42,8 @@ public function __construct($environment, $class_loader) {
       'simpletest' => 0,
     );
     $this->moduleData = array(
-      'system' => new Extension(DRUPAL_ROOT, 'module', 'core/modules/system/system.info.yml', 'system.module'),
-      'simpletest' => new Extension(DRUPAL_ROOT, 'module', 'core/modules/simpletest/simpletest.info.yml', 'simpletest.module'),
+      'system' => new Extension(DRUPAL_ROOT, 'module', 'core/modules/system/system.info.yml', 'system.module.php'),
+      'simpletest' => new Extension(DRUPAL_ROOT, 'module', 'core/modules/simpletest/simpletest.info.yml', 'simpletest.module.php'),
     );
   }
 
@@ -80,7 +80,7 @@ public function boot() {
     $this->getContainer()->get('stream_wrapper_manager')->register();
 
     // Create the build/artifacts directory if necessary.
-    include_once DRUPAL_ROOT . '/core/includes/file.inc';
+    include_once DRUPAL_ROOT . '/core/includes/file.inc.php';
     if (!is_dir('public://simpletest')) {
       mkdir('public://simpletest', 0777, TRUE);
     }
diff --git a/core/lib/Drupal/Core/Theme/ThemeInitialization.php b/core/lib/Drupal/Core/Theme/ThemeInitialization.php
index 0dbd0c6..c9b0093 100644
--- a/core/lib/Drupal/Core/Theme/ThemeInitialization.php
+++ b/core/lib/Drupal/Core/Theme/ThemeInitialization.php
@@ -139,7 +139,7 @@ public function loadActiveTheme(ActiveTheme $active_theme) {
     }
 
     // Always include Twig as the default theme engine.
-    include_once $this->root . '/core/themes/engines/twig/twig.engine';
+    include_once $this->root . '/core/themes/engines/twig/twig.engine.php';
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Theme/ThemeManager.php b/core/lib/Drupal/Core/Theme/ThemeManager.php
index a100374..ef1af0e 100644
--- a/core/lib/Drupal/Core/Theme/ThemeManager.php
+++ b/core/lib/Drupal/Core/Theme/ThemeManager.php
@@ -261,7 +261,7 @@ protected function theme($hook, $variables = array()) {
     // elsewhere.
     if (!empty($info['includes'])) {
       foreach ($info['includes'] as $include_file) {
-        include_once $this->root . '/' . $include_file;
+        include_once $this->root . '/' . $include_file . '.php';
       }
     }
 
@@ -273,7 +273,7 @@ protected function theme($hook, $variables = array()) {
       // preprocessors might reside there.
       if (!empty($base_hook_info['includes'])) {
         foreach ($base_hook_info['includes'] as $include_file) {
-          include_once $this->root . '/' . $include_file;
+          include_once $this->root . '/' . $include_file . '.php';
         }
       }
       // Replace the preprocess functions with those from the base hook.
diff --git a/core/lib/Drupal/Core/Updater/Module.php b/core/lib/Drupal/Core/Updater/Module.php
index 06e1c1e..a2db728 100644
--- a/core/lib/Drupal/Core/Updater/Module.php
+++ b/core/lib/Drupal/Core/Updater/Module.php
@@ -51,7 +51,7 @@ public function isInstalled() {
    * Implements Drupal\Core\Updater\UpdaterInterface::canUpdateDirectory().
    */
   public static function canUpdateDirectory($directory) {
-    if (file_scan_directory($directory, '/.*\.module$/')) {
+    if (file_scan_directory($directory, '/.*\.module\.php$/')) {
       return TRUE;
     }
     return FALSE;
@@ -75,8 +75,8 @@ public static function canUpdate($project_name) {
    * @return array
    */
   public function getSchemaUpdates() {
-    require_once DRUPAL_ROOT . '/core/includes/install.inc';
-    require_once DRUPAL_ROOT . '/core/includes/update.inc';
+    require_once DRUPAL_ROOT . '/core/includes/install.inc.php';
+    require_once DRUPAL_ROOT . '/core/includes/update.inc.php';
 
     if (!self::canUpdate($this->name)) {
       return array();
diff --git a/core/lib/Drupal/Core/Updater/Theme.php b/core/lib/Drupal/Core/Updater/Theme.php
index b379325..4c97694 100644
--- a/core/lib/Drupal/Core/Updater/Theme.php
+++ b/core/lib/Drupal/Core/Updater/Theme.php
@@ -52,7 +52,7 @@ public function isInstalled() {
    */
   static function canUpdateDirectory($directory) {
     // This is a lousy test, but don't know how else to confirm it is a theme.
-    if (file_scan_directory($directory, '/.*\.module$/')) {
+    if (file_scan_directory($directory, '/.*\.module\.php$/')) {
       return FALSE;
     }
     return TRUE;
diff --git a/core/modules/action/action.module b/core/modules/action/action.module.php
similarity index 100%
rename from core/modules/action/action.module
rename to core/modules/action/action.module.php
diff --git a/core/modules/action/action.views_execution.inc b/core/modules/action/action.views_execution.inc.php
similarity index 100%
rename from core/modules/action/action.views_execution.inc
rename to core/modules/action/action.views_execution.inc.php
diff --git a/core/modules/aggregator/aggregator.install b/core/modules/aggregator/aggregator.install.php
similarity index 100%
rename from core/modules/aggregator/aggregator.install
rename to core/modules/aggregator/aggregator.install.php
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module.php
similarity index 100%
rename from core/modules/aggregator/aggregator.module
rename to core/modules/aggregator/aggregator.module.php
diff --git a/core/modules/aggregator/aggregator.theme.inc b/core/modules/aggregator/aggregator.theme.inc.php
similarity index 100%
rename from core/modules/aggregator/aggregator.theme.inc
rename to core/modules/aggregator/aggregator.theme.inc.php
diff --git a/core/modules/ban/ban.install b/core/modules/ban/ban.install.php
similarity index 100%
rename from core/modules/ban/ban.install
rename to core/modules/ban/ban.install.php
diff --git a/core/modules/ban/ban.module b/core/modules/ban/ban.module.php
similarity index 100%
rename from core/modules/ban/ban.module
rename to core/modules/ban/ban.module.php
diff --git a/core/modules/basic_auth/basic_auth.module b/core/modules/basic_auth/basic_auth.module.php
similarity index 100%
rename from core/modules/basic_auth/basic_auth.module
rename to core/modules/basic_auth/basic_auth.module.php
diff --git a/core/modules/block/block.module b/core/modules/block/block.module.php
similarity index 100%
rename from core/modules/block/block.module
rename to core/modules/block/block.module.php
diff --git a/core/modules/block/tests/modules/block_test/block_test.module b/core/modules/block/tests/modules/block_test/block_test.module.php
similarity index 100%
rename from core/modules/block/tests/modules/block_test/block_test.module
rename to core/modules/block/tests/modules/block_test/block_test.module.php
diff --git a/core/modules/block_content/block_content.module b/core/modules/block_content/block_content.module.php
similarity index 100%
rename from core/modules/block_content/block_content.module
rename to core/modules/block_content/block_content.module.php
diff --git a/core/modules/block_content/block_content.pages.inc b/core/modules/block_content/block_content.pages.inc.php
similarity index 100%
rename from core/modules/block_content/block_content.pages.inc
rename to core/modules/block_content/block_content.pages.inc.php
diff --git a/core/modules/block_content/tests/modules/block_content_test/block_content_test.module b/core/modules/block_content/tests/modules/block_content_test/block_content_test.module.php
similarity index 100%
rename from core/modules/block_content/tests/modules/block_content_test/block_content_test.module
rename to core/modules/block_content/tests/modules/block_content_test/block_content_test.module.php
diff --git a/core/modules/book/book.install b/core/modules/book/book.install.php
similarity index 100%
rename from core/modules/book/book.install
rename to core/modules/book/book.install.php
diff --git a/core/modules/book/book.module b/core/modules/book/book.module.php
similarity index 100%
rename from core/modules/book/book.module
rename to core/modules/book/book.module.php
diff --git a/core/modules/breakpoint/breakpoint.module b/core/modules/breakpoint/breakpoint.module.php
similarity index 100%
rename from core/modules/breakpoint/breakpoint.module
rename to core/modules/breakpoint/breakpoint.module.php
diff --git a/core/modules/ckeditor/ckeditor.admin.inc b/core/modules/ckeditor/ckeditor.admin.inc.php
similarity index 100%
rename from core/modules/ckeditor/ckeditor.admin.inc
rename to core/modules/ckeditor/ckeditor.admin.inc.php
diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module.php
similarity index 100%
rename from core/modules/ckeditor/ckeditor.module
rename to core/modules/ckeditor/ckeditor.module.php
diff --git a/core/modules/ckeditor/tests/modules/ckeditor_test.module b/core/modules/ckeditor/tests/modules/ckeditor_test.module.php
similarity index 100%
rename from core/modules/ckeditor/tests/modules/ckeditor_test.module
rename to core/modules/ckeditor/tests/modules/ckeditor_test.module.php
diff --git a/core/modules/color/color.install b/core/modules/color/color.install.php
similarity index 100%
rename from core/modules/color/color.install
rename to core/modules/color/color.install.php
diff --git a/core/modules/color/color.module b/core/modules/color/color.module.php
similarity index 99%
rename from core/modules/color/color.module
rename to core/modules/color/color.module.php
index fe7c40b..c3562da 100644
--- a/core/modules/color/color.module
+++ b/core/modules/color/color.module.php
@@ -131,7 +131,7 @@ function color_get_info($theme) {
   }
 
   $path = drupal_get_path('theme', $theme);
-  $file = \Drupal::root() . '/' . $path . '/color/color.inc';
+  $file = \Drupal::root() . '/' . $path . '/color/color.inc.php';
   if ($path && file_exists($file)) {
     include $file;
     // Add in default values.
diff --git a/core/modules/color/tests/modules/color_test/color_test.module b/core/modules/color/tests/modules/color_test/color_test.module.php
similarity index 100%
rename from core/modules/color/tests/modules/color_test/color_test.module
rename to core/modules/color/tests/modules/color_test/color_test.module.php
diff --git a/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc b/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc.php
similarity index 100%
rename from core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc
rename to core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc.php
diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install.php
similarity index 100%
rename from core/modules/comment/comment.install
rename to core/modules/comment/comment.install.php
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module.php
similarity index 100%
rename from core/modules/comment/comment.module
rename to core/modules/comment/comment.module.php
diff --git a/core/modules/comment/comment.tokens.inc b/core/modules/comment/comment.tokens.inc.php
similarity index 100%
rename from core/modules/comment/comment.tokens.inc
rename to core/modules/comment/comment.tokens.inc.php
diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc.php
similarity index 100%
rename from core/modules/comment/comment.views.inc
rename to core/modules/comment/comment.views.inc.php
diff --git a/core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module b/core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module.php
similarity index 100%
rename from core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module
rename to core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module.php
diff --git a/core/modules/comment/tests/modules/comment_test/comment_test.module b/core/modules/comment/tests/modules/comment_test/comment_test.module.php
similarity index 100%
rename from core/modules/comment/tests/modules/comment_test/comment_test.module
rename to core/modules/comment/tests/modules/comment_test/comment_test.module.php
diff --git a/core/modules/config/config.module b/core/modules/config/config.module.php
similarity index 100%
rename from core/modules/config/config.module
rename to core/modules/config/config.module.php
diff --git a/core/modules/config/tests/config_entity_static_cache_test/config_entity_static_cache_test.module b/core/modules/config/tests/config_entity_static_cache_test/config_entity_static_cache_test.module.php
similarity index 100%
rename from core/modules/config/tests/config_entity_static_cache_test/config_entity_static_cache_test.module
rename to core/modules/config/tests/config_entity_static_cache_test/config_entity_static_cache_test.module.php
diff --git a/core/modules/config/tests/config_export_test/config_export_test.module b/core/modules/config/tests/config_export_test/config_export_test.module.php
similarity index 100%
rename from core/modules/config/tests/config_export_test/config_export_test.module
rename to core/modules/config/tests/config_export_test/config_export_test.module.php
diff --git a/core/modules/config/tests/config_import_test/config_import_test.module b/core/modules/config/tests/config_import_test/config_import_test.module.php
similarity index 100%
rename from core/modules/config/tests/config_import_test/config_import_test.module
rename to core/modules/config/tests/config_import_test/config_import_test.module.php
diff --git a/core/modules/config/tests/config_schema_test/config_schema_test.module b/core/modules/config/tests/config_schema_test/config_schema_test.module.php
similarity index 100%
rename from core/modules/config/tests/config_schema_test/config_schema_test.module
rename to core/modules/config/tests/config_schema_test/config_schema_test.module.php
diff --git a/core/modules/config/tests/config_test/config_test.hooks.inc b/core/modules/config/tests/config_test/config_test.hooks.inc.php
similarity index 100%
rename from core/modules/config/tests/config_test/config_test.hooks.inc
rename to core/modules/config/tests/config_test/config_test.hooks.inc.php
diff --git a/core/modules/config/tests/config_test/config_test.module b/core/modules/config/tests/config_test/config_test.module.php
similarity index 96%
rename from core/modules/config/tests/config_test/config_test.module
rename to core/modules/config/tests/config_test/config_test.module.php
index d7742d0..0bba887 100644
--- a/core/modules/config/tests/config_test/config_test.module
+++ b/core/modules/config/tests/config_test/config_test.module.php
@@ -8,7 +8,7 @@
 use Drupal\config_test\Entity\ConfigTest;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 
-require_once dirname(__FILE__) . '/config_test.hooks.inc';
+require_once dirname(__FILE__) . '/config_test.hooks.inc.php';
 
 /**
  * Loads a ConfigTest object.
diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module.php
similarity index 100%
rename from core/modules/config_translation/config_translation.module
rename to core/modules/config_translation/config_translation.module.php
diff --git a/core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module b/core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module.php
similarity index 100%
rename from core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module
rename to core/modules/config_translation/tests/modules/config_translation_test/config_translation_test.module.php
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module.php
similarity index 100%
rename from core/modules/contact/contact.module
rename to core/modules/contact/contact.module.php
diff --git a/core/modules/contact/contact.views.inc b/core/modules/contact/contact.views.inc.php
similarity index 100%
rename from core/modules/contact/contact.views.inc
rename to core/modules/contact/contact.views.inc.php
diff --git a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install.php
similarity index 100%
rename from core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install
rename to core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install.php
diff --git a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module.php
similarity index 100%
rename from core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module
rename to core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module.php
diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc.php
similarity index 100%
rename from core/modules/content_translation/content_translation.admin.inc
rename to core/modules/content_translation/content_translation.admin.inc.php
diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install.php
similarity index 100%
rename from core/modules/content_translation/content_translation.install
rename to core/modules/content_translation/content_translation.install.php
diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module.php
similarity index 100%
rename from core/modules/content_translation/content_translation.module
rename to core/modules/content_translation/content_translation.module.php
diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module.php
similarity index 100%
rename from core/modules/contextual/contextual.module
rename to core/modules/contextual/contextual.module.php
diff --git a/core/modules/contextual/contextual.views.inc b/core/modules/contextual/contextual.views.inc.php
similarity index 100%
rename from core/modules/contextual/contextual.views.inc
rename to core/modules/contextual/contextual.views.inc.php
diff --git a/core/modules/datetime/datetime.module b/core/modules/datetime/datetime.module.php
similarity index 100%
rename from core/modules/datetime/datetime.module
rename to core/modules/datetime/datetime.module.php
diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc.php
similarity index 100%
rename from core/modules/dblog/dblog.admin.inc
rename to core/modules/dblog/dblog.admin.inc.php
diff --git a/core/modules/dblog/dblog.install b/core/modules/dblog/dblog.install.php
similarity index 100%
rename from core/modules/dblog/dblog.install
rename to core/modules/dblog/dblog.install.php
diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module.php
similarity index 100%
rename from core/modules/dblog/dblog.module
rename to core/modules/dblog/dblog.module.php
diff --git a/core/modules/dblog/dblog.views.inc b/core/modules/dblog/dblog.views.inc.php
similarity index 100%
rename from core/modules/dblog/dblog.views.inc
rename to core/modules/dblog/dblog.views.inc.php
diff --git a/core/modules/editor/editor.admin.inc b/core/modules/editor/editor.admin.inc.php
similarity index 100%
rename from core/modules/editor/editor.admin.inc
rename to core/modules/editor/editor.admin.inc.php
diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module.php
similarity index 100%
rename from core/modules/editor/editor.module
rename to core/modules/editor/editor.module.php
diff --git a/core/modules/editor/tests/modules/editor_test.module b/core/modules/editor/tests/modules/editor_test.module.php
similarity index 100%
rename from core/modules/editor/tests/modules/editor_test.module
rename to core/modules/editor/tests/modules/editor_test.module.php
diff --git a/core/modules/entity_reference/entity_reference.module b/core/modules/entity_reference/entity_reference.module.php
similarity index 100%
rename from core/modules/entity_reference/entity_reference.module
rename to core/modules/entity_reference/entity_reference.module.php
diff --git a/core/modules/entity_reference/entity_reference.views.inc b/core/modules/entity_reference/entity_reference.views.inc.php
similarity index 100%
rename from core/modules/entity_reference/entity_reference.views.inc
rename to core/modules/entity_reference/entity_reference.views.inc.php
diff --git a/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.module b/core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.module.php
similarity index 100%
rename from core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.module
rename to core/modules/entity_reference/tests/modules/entity_reference_test/entity_reference_test.module.php
diff --git a/core/modules/field/field.module b/core/modules/field/field.module.php
similarity index 99%
rename from core/modules/field/field.module
rename to core/modules/field/field.module.php
index 3e9c9e0..d0fbea6 100644
--- a/core/modules/field/field.module
+++ b/core/modules/field/field.module.php
@@ -19,7 +19,7 @@
  * mechanism for auto-loading core APIs, so we have to load them on
  * every page request.
  */
-require_once __DIR__ . '/field.purge.inc';
+require_once __DIR__ . '/field.purge.inc.php';
 
 /**
  * @defgroup field Field API
diff --git a/core/modules/field/field.purge.inc b/core/modules/field/field.purge.inc.php
similarity index 100%
rename from core/modules/field/field.purge.inc
rename to core/modules/field/field.purge.inc.php
diff --git a/core/modules/field/tests/modules/field_test/field_test.entity.inc b/core/modules/field/tests/modules/field_test/field_test.entity.inc.php
similarity index 100%
rename from core/modules/field/tests/modules/field_test/field_test.entity.inc
rename to core/modules/field/tests/modules/field_test/field_test.entity.inc.php
diff --git a/core/modules/field/tests/modules/field_test/field_test.field.inc b/core/modules/field/tests/modules/field_test/field_test.field.inc.php
similarity index 100%
rename from core/modules/field/tests/modules/field_test/field_test.field.inc
rename to core/modules/field/tests/modules/field_test/field_test.field.inc.php
diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module.php
similarity index 98%
rename from core/modules/field/tests/modules/field_test/field_test.module
rename to core/modules/field/tests/modules/field_test/field_test.module.php
index bf608d8..d2200c5 100644
--- a/core/modules/field/tests/modules/field_test/field_test.module
+++ b/core/modules/field/tests/modules/field_test/field_test.module.php
@@ -17,8 +17,8 @@
  * test helper functions
  */
 
-require_once __DIR__ . '/field_test.entity.inc';
-require_once __DIR__ . '/field_test.field.inc';
+require_once __DIR__ . '/field_test.entity.inc.php';
+require_once __DIR__ . '/field_test.field.inc.php';
 
 /**
  * Store and retrieve keyed data for later verification by unit tests.
diff --git a/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module b/core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module.php
similarity index 100%
rename from core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module
rename to core/modules/field/tests/modules/field_third_party_test/field_third_party_test.module.php
diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module.php
similarity index 100%
rename from core/modules/field_ui/field_ui.module
rename to core/modules/field_ui/field_ui.module.php
diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc.php
similarity index 100%
rename from core/modules/file/file.field.inc
rename to core/modules/file/file.field.inc.php
diff --git a/core/modules/file/file.install b/core/modules/file/file.install.php
similarity index 100%
rename from core/modules/file/file.install
rename to core/modules/file/file.install.php
diff --git a/core/modules/file/file.module b/core/modules/file/file.module.php
similarity index 99%
rename from core/modules/file/file.module
rename to core/modules/file/file.module.php
index 0bc0584..85a9cd2 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module.php
@@ -21,7 +21,7 @@
 use Drupal\file\FileUsage\FileUsageInterface;
 
 // Load all Field module hooks for File.
-require_once __DIR__ . '/file.field.inc';
+require_once __DIR__ . '/file.field.inc.php';
 
 /**
  * Implements hook_help().
diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc.php
similarity index 100%
rename from core/modules/file/file.views.inc
rename to core/modules/file/file.views.inc.php
diff --git a/core/modules/file/tests/file_test/file_test.module b/core/modules/file/tests/file_test/file_test.module.php
similarity index 100%
rename from core/modules/file/tests/file_test/file_test.module
rename to core/modules/file/tests/file_test/file_test.module.php
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module.php
similarity index 100%
rename from core/modules/filter/filter.module
rename to core/modules/filter/filter.module.php
diff --git a/core/modules/filter/tests/filter_test/filter_test.module b/core/modules/filter/tests/filter_test/filter_test.module.php
similarity index 100%
rename from core/modules/filter/tests/filter_test/filter_test.module
rename to core/modules/filter/tests/filter_test/filter_test.module.php
diff --git a/core/modules/forum/forum.install b/core/modules/forum/forum.install.php
similarity index 100%
rename from core/modules/forum/forum.install
rename to core/modules/forum/forum.install.php
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module.php
similarity index 100%
rename from core/modules/forum/forum.module
rename to core/modules/forum/forum.module.php
diff --git a/core/modules/forum/forum.views.inc b/core/modules/forum/forum.views.inc.php
similarity index 100%
rename from core/modules/forum/forum.views.inc
rename to core/modules/forum/forum.views.inc.php
diff --git a/core/modules/hal/hal.module b/core/modules/hal/hal.module.php
similarity index 100%
rename from core/modules/hal/hal.module
rename to core/modules/hal/hal.module.php
diff --git a/core/modules/help/help.module b/core/modules/help/help.module.php
similarity index 100%
rename from core/modules/help/help.module
rename to core/modules/help/help.module.php
diff --git a/core/modules/history/history.install b/core/modules/history/history.install.php
similarity index 100%
rename from core/modules/history/history.install
rename to core/modules/history/history.install.php
diff --git a/core/modules/history/history.module b/core/modules/history/history.module.php
similarity index 100%
rename from core/modules/history/history.module
rename to core/modules/history/history.module.php
diff --git a/core/modules/history/history.views.inc b/core/modules/history/history.views.inc.php
similarity index 100%
rename from core/modules/history/history.views.inc
rename to core/modules/history/history.views.inc.php
diff --git a/core/modules/image/image.admin.inc b/core/modules/image/image.admin.inc.php
similarity index 100%
rename from core/modules/image/image.admin.inc
rename to core/modules/image/image.admin.inc.php
diff --git a/core/modules/image/image.field.inc b/core/modules/image/image.field.inc.php
similarity index 100%
rename from core/modules/image/image.field.inc
rename to core/modules/image/image.field.inc.php
diff --git a/core/modules/image/image.install b/core/modules/image/image.install.php
similarity index 100%
rename from core/modules/image/image.install
rename to core/modules/image/image.install.php
diff --git a/core/modules/image/image.module b/core/modules/image/image.module.php
similarity index 99%
rename from core/modules/image/image.module
rename to core/modules/image/image.module.php
index cc326b3..1433eb1 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module.php
@@ -43,7 +43,7 @@
 define('IMAGE_DERIVATIVE_TOKEN', 'itok');
 
 // Load all Field module hooks for Image.
-require_once __DIR__ . '/image.field.inc';
+require_once __DIR__ . '/image.field.inc.php';
 
 /**
  * Implements hook_help().
diff --git a/core/modules/image/image.views.inc b/core/modules/image/image.views.inc.php
similarity index 100%
rename from core/modules/image/image.views.inc
rename to core/modules/image/image.views.inc.php
diff --git a/core/modules/image/tests/modules/image_module_test/image_module_test.module b/core/modules/image/tests/modules/image_module_test/image_module_test.module.php
similarity index 100%
rename from core/modules/image/tests/modules/image_module_test/image_module_test.module
rename to core/modules/image/tests/modules/image_module_test/image_module_test.module.php
diff --git a/core/modules/language/language.admin.inc b/core/modules/language/language.admin.inc.php
similarity index 100%
rename from core/modules/language/language.admin.inc
rename to core/modules/language/language.admin.inc.php
diff --git a/core/modules/language/language.module b/core/modules/language/language.module.php
similarity index 100%
rename from core/modules/language/language.module
rename to core/modules/language/language.module.php
diff --git a/core/modules/language/tests/language_test/language_test.module b/core/modules/language/tests/language_test/language_test.module.php
similarity index 100%
rename from core/modules/language/tests/language_test/language_test.module
rename to core/modules/language/tests/language_test/language_test.module.php
diff --git a/core/modules/link/link.module b/core/modules/link/link.module.php
similarity index 100%
rename from core/modules/link/link.module
rename to core/modules/link/link.module.php
diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc.php
similarity index 99%
rename from core/modules/locale/locale.batch.inc
rename to core/modules/locale/locale.batch.inc.php
index 9e528d7..075b5f1 100644
--- a/core/modules/locale/locale.batch.inc
+++ b/core/modules/locale/locale.batch.inc.php
@@ -12,7 +12,7 @@
  */
 // @todo Combine functions differently in files to avoid unnecessary includes.
 // Follow-up issue http://drupal.org/node/1834298
-require_once __DIR__ . '/locale.translation.inc';
+require_once __DIR__ . '/locale.translation.inc.php';
 
 /**
  * Implements callback_batch_operation().
diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc.php
similarity index 100%
rename from core/modules/locale/locale.bulk.inc
rename to core/modules/locale/locale.bulk.inc.php
diff --git a/core/modules/locale/locale.compare.inc b/core/modules/locale/locale.compare.inc.php
similarity index 99%
rename from core/modules/locale/locale.compare.inc
rename to core/modules/locale/locale.compare.inc.php
index e131d99..471ed34 100644
--- a/core/modules/locale/locale.compare.inc
+++ b/core/modules/locale/locale.compare.inc.php
@@ -13,7 +13,7 @@
  */
 // @todo Combine functions differently in files to avoid unnecessary includes.
 // Follow-up issue http://drupal.org/node/1834298
-require_once __DIR__ . '/locale.translation.inc';
+require_once __DIR__ . '/locale.translation.inc.php';
 
 /**
  * Clear the project data table.
diff --git a/core/modules/locale/locale.fetch.inc b/core/modules/locale/locale.fetch.inc.php
similarity index 98%
rename from core/modules/locale/locale.fetch.inc
rename to core/modules/locale/locale.fetch.inc.php
index 9568691..99e9e68 100644
--- a/core/modules/locale/locale.fetch.inc
+++ b/core/modules/locale/locale.fetch.inc.php
@@ -10,7 +10,7 @@
  */
 // @todo Combine functions differently in files to avoid unnecessary includes.
 // Follow-up issue http://drupal.org/node/1834298
-require_once __DIR__ . '/locale.translation.inc';
+require_once __DIR__ . '/locale.translation.inc.php';
 
 /**
  * Builds a batch to check, download and import project translations.
diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install.php
similarity index 100%
rename from core/modules/locale/locale.install
rename to core/modules/locale/locale.install.php
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module.php
similarity index 100%
rename from core/modules/locale/locale.module
rename to core/modules/locale/locale.module.php
diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc.php
similarity index 100%
rename from core/modules/locale/locale.pages.inc
rename to core/modules/locale/locale.pages.inc.php
diff --git a/core/modules/locale/locale.translation.inc b/core/modules/locale/locale.translation.inc.php
similarity index 100%
rename from core/modules/locale/locale.translation.inc
rename to core/modules/locale/locale.translation.inc.php
diff --git a/core/modules/locale/tests/modules/locale_test/locale_test.install b/core/modules/locale/tests/modules/locale_test/locale_test.install.php
similarity index 100%
rename from core/modules/locale/tests/modules/locale_test/locale_test.install
rename to core/modules/locale/tests/modules/locale_test/locale_test.install.php
diff --git a/core/modules/locale/tests/modules/locale_test/locale_test.module b/core/modules/locale/tests/modules/locale_test/locale_test.module.php
similarity index 100%
rename from core/modules/locale/tests/modules/locale_test/locale_test.module
rename to core/modules/locale/tests/modules/locale_test/locale_test.module.php
diff --git a/core/modules/locale/tests/modules/locale_test_not_development_release/locale_test_not_development_release.module b/core/modules/locale/tests/modules/locale_test_not_development_release/locale_test_not_development_release.module.php
similarity index 100%
rename from core/modules/locale/tests/modules/locale_test_not_development_release/locale_test_not_development_release.module
rename to core/modules/locale/tests/modules/locale_test_not_development_release/locale_test_not_development_release.module.php
diff --git a/core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module b/core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module.php
similarity index 100%
rename from core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module
rename to core/modules/locale/tests/modules/locale_test_translate/locale_test_translate.module.php
diff --git a/core/modules/menu_link_content/menu_link_content.install b/core/modules/menu_link_content/menu_link_content.install.php
similarity index 100%
rename from core/modules/menu_link_content/menu_link_content.install
rename to core/modules/menu_link_content/menu_link_content.install.php
diff --git a/core/modules/menu_link_content/menu_link_content.module b/core/modules/menu_link_content/menu_link_content.module.php
similarity index 100%
rename from core/modules/menu_link_content/menu_link_content.module
rename to core/modules/menu_link_content/menu_link_content.module.php
diff --git a/core/modules/menu_ui/menu_ui.install b/core/modules/menu_ui/menu_ui.install.php
similarity index 100%
rename from core/modules/menu_ui/menu_ui.install
rename to core/modules/menu_ui/menu_ui.install.php
diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module.php
similarity index 100%
rename from core/modules/menu_ui/menu_ui.module
rename to core/modules/menu_ui/menu_ui.module.php
diff --git a/core/modules/migrate_drupal/migrate_drupal.module b/core/modules/migrate_drupal/migrate_drupal.module.php
similarity index 100%
rename from core/modules/migrate_drupal/migrate_drupal.module
rename to core/modules/migrate_drupal/migrate_drupal.module.php
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc.php
similarity index 100%
rename from core/modules/node/node.admin.inc
rename to core/modules/node/node.admin.inc.php
diff --git a/core/modules/node/node.install b/core/modules/node/node.install.php
similarity index 100%
rename from core/modules/node/node.install
rename to core/modules/node/node.install.php
diff --git a/core/modules/node/node.module b/core/modules/node/node.module.php
similarity index 100%
rename from core/modules/node/node.module
rename to core/modules/node/node.module.php
diff --git a/core/modules/node/node.pages.inc b/core/modules/node/node.pages.inc.php
similarity index 100%
rename from core/modules/node/node.pages.inc
rename to core/modules/node/node.pages.inc.php
diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc.php
similarity index 100%
rename from core/modules/node/node.tokens.inc
rename to core/modules/node/node.tokens.inc.php
diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc.php
similarity index 100%
rename from core/modules/node/node.views.inc
rename to core/modules/node/node.views.inc.php
diff --git a/core/modules/node/node.views_execution.inc b/core/modules/node/node.views_execution.inc.php
similarity index 100%
rename from core/modules/node/node.views_execution.inc
rename to core/modules/node/node.views_execution.inc.php
diff --git a/core/modules/node/tests/modules/node_access_test/node_access_test.module b/core/modules/node/tests/modules/node_access_test/node_access_test.module.php
similarity index 100%
rename from core/modules/node/tests/modules/node_access_test/node_access_test.module
rename to core/modules/node/tests/modules/node_access_test/node_access_test.module.php
diff --git a/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module b/core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module.php
similarity index 100%
rename from core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module
rename to core/modules/node/tests/modules/node_access_test_language/node_access_test_language.module.php
diff --git a/core/modules/node/tests/modules/node_test/node_test.module b/core/modules/node/tests/modules/node_test/node_test.module.php
similarity index 100%
rename from core/modules/node/tests/modules/node_test/node_test.module
rename to core/modules/node/tests/modules/node_test/node_test.module.php
diff --git a/core/modules/node/tests/modules/node_test_exception/node_test_exception.module b/core/modules/node/tests/modules/node_test_exception/node_test_exception.module.php
similarity index 100%
rename from core/modules/node/tests/modules/node_test_exception/node_test_exception.module
rename to core/modules/node/tests/modules/node_test_exception/node_test_exception.module.php
diff --git a/core/modules/options/options.module b/core/modules/options/options.module.php
similarity index 100%
rename from core/modules/options/options.module
rename to core/modules/options/options.module.php
diff --git a/core/modules/options/options.views.inc b/core/modules/options/options.views.inc.php
similarity index 100%
rename from core/modules/options/options.views.inc
rename to core/modules/options/options.views.inc.php
diff --git a/core/modules/options/tests/options_test/options_test.module b/core/modules/options/tests/options_test/options_test.module.php
similarity index 100%
rename from core/modules/options/tests/options_test/options_test.module
rename to core/modules/options/tests/options_test/options_test.module.php
diff --git a/core/modules/path/path.module b/core/modules/path/path.module.php
similarity index 100%
rename from core/modules/path/path.module
rename to core/modules/path/path.module.php
diff --git a/core/modules/quickedit/quickedit.module b/core/modules/quickedit/quickedit.module.php
similarity index 100%
rename from core/modules/quickedit/quickedit.module
rename to core/modules/quickedit/quickedit.module.php
diff --git a/core/modules/quickedit/tests/modules/quickedit_test.module b/core/modules/quickedit/tests/modules/quickedit_test.module.php
similarity index 100%
rename from core/modules/quickedit/tests/modules/quickedit_test.module
rename to core/modules/quickedit/tests/modules/quickedit_test.module.php
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module.php
similarity index 100%
rename from core/modules/rdf/rdf.module
rename to core/modules/rdf/rdf.module.php
diff --git a/core/modules/rdf/tests/rdf_conflicting_namespaces/rdf_conflicting_namespaces.module b/core/modules/rdf/tests/rdf_conflicting_namespaces/rdf_conflicting_namespaces.module.php
similarity index 100%
rename from core/modules/rdf/tests/rdf_conflicting_namespaces/rdf_conflicting_namespaces.module
rename to core/modules/rdf/tests/rdf_conflicting_namespaces/rdf_conflicting_namespaces.module.php
diff --git a/core/modules/rdf/tests/rdf_test_namespaces/rdf_test_namespaces.module b/core/modules/rdf/tests/rdf_test_namespaces/rdf_test_namespaces.module.php
similarity index 100%
rename from core/modules/rdf/tests/rdf_test_namespaces/rdf_test_namespaces.module
rename to core/modules/rdf/tests/rdf_test_namespaces/rdf_test_namespaces.module.php
diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module.php
similarity index 100%
rename from core/modules/responsive_image/responsive_image.module
rename to core/modules/responsive_image/responsive_image.module.php
diff --git a/core/modules/rest/rest.module b/core/modules/rest/rest.module.php
similarity index 100%
rename from core/modules/rest/rest.module
rename to core/modules/rest/rest.module.php
diff --git a/core/modules/search/search.install b/core/modules/search/search.install.php
similarity index 100%
rename from core/modules/search/search.install
rename to core/modules/search/search.install.php
diff --git a/core/modules/search/search.module b/core/modules/search/search.module.php
similarity index 100%
rename from core/modules/search/search.module
rename to core/modules/search/search.module.php
diff --git a/core/modules/search/search.pages.inc b/core/modules/search/search.pages.inc.php
similarity index 100%
rename from core/modules/search/search.pages.inc
rename to core/modules/search/search.pages.inc.php
diff --git a/core/modules/search/tests/modules/search_embedded_form/search_embedded_form.module b/core/modules/search/tests/modules/search_embedded_form/search_embedded_form.module.php
similarity index 100%
rename from core/modules/search/tests/modules/search_embedded_form/search_embedded_form.module
rename to core/modules/search/tests/modules/search_embedded_form/search_embedded_form.module.php
diff --git a/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module b/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module.php
similarity index 100%
rename from core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module
rename to core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module.php
diff --git a/core/modules/search/tests/modules/search_query_alter/search_query_alter.module b/core/modules/search/tests/modules/search_query_alter/search_query_alter.module.php
similarity index 100%
rename from core/modules/search/tests/modules/search_query_alter/search_query_alter.module
rename to core/modules/search/tests/modules/search_query_alter/search_query_alter.module.php
diff --git a/core/modules/serialization/serialization.module b/core/modules/serialization/serialization.module.php
similarity index 100%
rename from core/modules/serialization/serialization.module
rename to core/modules/serialization/serialization.module.php
diff --git a/core/modules/serialization/tests/modules/entity_serialization_test/entity_serialization_test.module b/core/modules/serialization/tests/modules/entity_serialization_test/entity_serialization_test.module.php
similarity index 100%
rename from core/modules/serialization/tests/modules/entity_serialization_test/entity_serialization_test.module
rename to core/modules/serialization/tests/modules/entity_serialization_test/entity_serialization_test.module.php
diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install.php
similarity index 100%
rename from core/modules/shortcut/shortcut.install
rename to core/modules/shortcut/shortcut.install.php
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module.php
similarity index 100%
rename from core/modules/shortcut/shortcut.module
rename to core/modules/shortcut/shortcut.module.php
diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install.php
similarity index 100%
rename from core/modules/simpletest/simpletest.install
rename to core/modules/simpletest/simpletest.install.php
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module.php
similarity index 100%
rename from core/modules/simpletest/simpletest.module
rename to core/modules/simpletest/simpletest.module.php
diff --git a/core/modules/simpletest/src/KernelTestBase.php b/core/modules/simpletest/src/KernelTestBase.php
index 188af9c..5ba62b3 100644
--- a/core/modules/simpletest/src/KernelTestBase.php
+++ b/core/modules/simpletest/src/KernelTestBase.php
@@ -115,7 +115,7 @@ protected function beforePrepareEnvironment() {
    */
   protected function prepareConfigDirectories() {
     $this->configDirectories = array();
-    include_once DRUPAL_ROOT . '/core/includes/install.inc';
+    include_once DRUPAL_ROOT . '/core/includes/install.inc.php';
     foreach (array(CONFIG_ACTIVE_DIRECTORY, CONFIG_STAGING_DIRECTORY) as $type) {
       // Assign the relative path to the global variable.
       $path = $this->siteDirectory . '/config_' . $type;
diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php
index f71e323..236aa44 100644
--- a/core/modules/simpletest/src/TestBase.php
+++ b/core/modules/simpletest/src/TestBase.php
@@ -145,7 +145,7 @@
    * The original configuration directories.
    *
    * An array of paths keyed by the CONFIG_*_DIRECTORY constants defined by
-   * core/includes/bootstrap.inc.
+   * core/includes/bootstrap.inc.php.
    *
    * @var array
    */
@@ -1334,7 +1334,7 @@ private function restoreEnvironment() {
    */
   public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
     if ($severity & error_reporting()) {
-      require_once DRUPAL_ROOT . '/core/includes/errors.inc';
+      require_once DRUPAL_ROOT . '/core/includes/errors.inc.php';
       $error_map = array(
         E_STRICT => 'Run-time notice',
         E_WARNING => 'Warning',
@@ -1369,7 +1369,7 @@ public function errorHandler($severity, $message, $file = NULL, $line = NULL) {
    * @see set_exception_handler
    */
   protected function exceptionHandler($exception) {
-    require_once DRUPAL_ROOT . '/core/includes/errors.inc';
+    require_once DRUPAL_ROOT . '/core/includes/errors.inc.php';
     $backtrace = $exception->getTrace();
     $verbose_backtrace = $backtrace;
     // Push on top of the backtrace the call that generated the exception.
diff --git a/core/modules/simpletest/src/TestDiscovery.php b/core/modules/simpletest/src/TestDiscovery.php
index a6c0e62..eb290cc 100644
--- a/core/modules/simpletest/src/TestDiscovery.php
+++ b/core/modules/simpletest/src/TestDiscovery.php
@@ -162,6 +162,10 @@ public function getTestClasses($extension = NULL) {
         // skip it. Most likely it is an abstract class, trait or test fixture.
         continue;
       }
+      catch (\ReflectionException $e) {
+        // Not a valid class, probably a fixture or test file.
+        continue;
+      }
       // Skip this test class if it requires unavailable modules.
       // @todo PHPUnit skips tests with unmet requirements when executing a test
       //   (instead of excluding them upfront). Refactor test runner to follow
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 30a7971..452d62c 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -857,7 +857,7 @@ protected function setUp() {
     Settings::initialize(DRUPAL_ROOT, $this->siteDirectory, $class_loader);
 
     // Execute the non-interactive installer.
-    require_once DRUPAL_ROOT . '/core/includes/install.core.inc';
+    require_once DRUPAL_ROOT . '/core/includes/install.core.inc.php';
     install_drupal($class_loader, $parameters);
 
     // Import new settings.php written by the installer.
@@ -1004,7 +1004,7 @@ protected function installParameters() {
     );
 
     // If we only have one db driver available, we cannot set the driver.
-    include_once DRUPAL_ROOT . '/core/includes/install.inc';
+    include_once DRUPAL_ROOT . '/core/includes/install.inc.php';
     if (count($this->getDatabaseTypes()) == 1) {
       unset($parameters['forms']['install_settings_form']['driver']);
     }
@@ -1036,7 +1036,7 @@ protected function getDatabaseTypes() {
    * @see drupal_rewrite_settings()
    */
   protected function writeSettings(array $settings) {
-    include_once DRUPAL_ROOT . '/core/includes/install.inc';
+    include_once DRUPAL_ROOT . '/core/includes/install.inc.php';
     $filename = $this->siteDirectory . '/settings.php';
     // system_requirements() removes write permissions from settings.php
     // whenever it is invoked.
diff --git a/core/modules/simpletest/tests/src/Unit/PhpUnitErrorTest.php b/core/modules/simpletest/tests/src/Unit/PhpUnitErrorTest.php
index 0a82609..87f4b75 100644
--- a/core/modules/simpletest/tests/src/Unit/PhpUnitErrorTest.php
+++ b/core/modules/simpletest/tests/src/Unit/PhpUnitErrorTest.php
@@ -17,7 +17,7 @@ class PhpUnitErrorTest extends UnitTestCase {
    * @covers ::simpletest_phpunit_xml_to_rows
    */
   public function testPhpUnitXmlParsing() {
-    require_once __DIR__ . '/../../../simpletest.module';
+    require_once __DIR__ . '/../../../simpletest.module.php';
 
     $phpunit_error_xml = __DIR__ . '/../../fixtures/phpunit_error.xml';
 
diff --git a/core/modules/statistics/statistics.install b/core/modules/statistics/statistics.install.php
similarity index 100%
rename from core/modules/statistics/statistics.install
rename to core/modules/statistics/statistics.install.php
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module.php
similarity index 100%
rename from core/modules/statistics/statistics.module
rename to core/modules/statistics/statistics.module.php
diff --git a/core/modules/statistics/statistics.tokens.inc b/core/modules/statistics/statistics.tokens.inc.php
similarity index 100%
rename from core/modules/statistics/statistics.tokens.inc
rename to core/modules/statistics/statistics.tokens.inc.php
diff --git a/core/modules/statistics/statistics.views.inc b/core/modules/statistics/statistics.views.inc.php
similarity index 100%
rename from core/modules/statistics/statistics.views.inc
rename to core/modules/statistics/statistics.views.inc.php
diff --git a/core/modules/syslog/syslog.install b/core/modules/syslog/syslog.install.php
similarity index 100%
rename from core/modules/syslog/syslog.install
rename to core/modules/syslog/syslog.install.php
diff --git a/core/modules/syslog/syslog.module b/core/modules/syslog/syslog.module.php
similarity index 100%
rename from core/modules/syslog/syslog.module
rename to core/modules/syslog/syslog.module.php
diff --git a/core/modules/system/module.api.php b/core/modules/system/module.api.php
index 75bc64d..17eda3a 100644
--- a/core/modules/system/module.api.php
+++ b/core/modules/system/module.api.php
@@ -17,9 +17,9 @@
  *
  * Normally hooks do not need to be explicitly defined. However, by declaring a
  * hook explicitly, a module may define a "group" for it. Modules that implement
- * a hook may then place their implementation in either $module.module or in
- * $module.$group.inc. If the hook is located in $module.$group.inc, then that
- * file will be automatically loaded when needed.
+ * a hook may then place their implementation in either $module.module.php or in
+ * $module.$group.inc.php. If the hook is located in $module.$group.inc.php,
+ * then that file will be automatically loaded when needed.
  * In general, hooks that are rarely invoked and/or are very large should be
  * placed in a separate include file, while hooks that are very short or very
  * frequently called should be left in the main module file so that they are
@@ -29,7 +29,7 @@
  *   An associative array whose keys are hook names and whose values are an
  *   associative array containing:
  *   - group: A string defining the group to which the hook belongs. The module
- *     system will determine whether a file with the name $module.$group.inc
+ *     system will determine whether a file with the name $module.$group.inc.php
  *     exists, and automatically load it when required.
  *
  * See system_hook_info() for all hook groups defined by Drupal core.
diff --git a/core/modules/system/src/Controller/BatchController.php b/core/modules/system/src/Controller/BatchController.php
index 9a0e8f0..54a24aa 100644
--- a/core/modules/system/src/Controller/BatchController.php
+++ b/core/modules/system/src/Controller/BatchController.php
@@ -56,7 +56,7 @@ public static function create(ContainerInterface $container) {
    * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
    */
   public function batchPage(Request $request) {
-    require_once $this->root . '/core/includes/batch.inc';
+    require_once $this->root . '/core/includes/batch.inc.php';
     $output = _batch_page($request);
 
     if ($output === FALSE) {
diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php
index ba5d75c..dfe11a8 100644
--- a/core/modules/system/src/Controller/DbUpdateController.php
+++ b/core/modules/system/src/Controller/DbUpdateController.php
@@ -145,8 +145,8 @@ public static function create(ContainerInterface $container) {
    *   A response object object.
    */
   public function handle($op, Request $request) {
-    require_once $this->root . '/core/includes/install.inc';
-    require_once $this->root . '/core/includes/update.inc';
+    require_once $this->root . '/core/includes/install.inc.php';
+    require_once $this->root . '/core/includes/update.inc.php';
 
     drupal_load_updates();
     update_fix_compatibility();
@@ -186,7 +186,7 @@ public function handle($op, Request $request) {
 
         // Regular batch ops : defer to batch processing API.
         default:
-          require_once $this->root . '/core/includes/batch.inc';
+          require_once $this->root . '/core/includes/batch.inc.php';
           $regions['sidebar_first'] = $this->updateTasksList('run');
           $output = _batch_page($request);
           break;
diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php
index 2e80482..9a0b1e4 100644
--- a/core/modules/system/src/Form/ModulesListForm.php
+++ b/core/modules/system/src/Form/ModulesListForm.php
@@ -167,10 +167,10 @@ public function getFormId() {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    require_once DRUPAL_ROOT . '/core/includes/install.inc';
+    require_once DRUPAL_ROOT . '/core/includes/install.inc.php';
     $distribution = String::checkPlain(drupal_install_profile_distribution_name());
 
-    // Include system.admin.inc so we can use the sort callbacks.
+    // Include system.admin.inc.php so we can use the sort callbacks.
     $this->moduleHandler->loadInclude('system', 'inc', 'system.admin');
 
     $form['filters'] = array(
@@ -473,7 +473,7 @@ protected function buildModuleList(FormStateInterface $form_state) {
     }
 
     // Make sure the install API is available.
-    include_once DRUPAL_ROOT . '/core/includes/install.inc';
+    include_once DRUPAL_ROOT . '/core/includes/install.inc.php';
 
     // Invoke hook_requirements('install'). If failures are detected, make
     // sure the dependent modules aren't installed either.
diff --git a/core/modules/system/src/Form/ModulesUninstallForm.php b/core/modules/system/src/Form/ModulesUninstallForm.php
index 153e2ca..c81ee85 100644
--- a/core/modules/system/src/Form/ModulesUninstallForm.php
+++ b/core/modules/system/src/Form/ModulesUninstallForm.php
@@ -79,7 +79,7 @@ public function getFormId() {
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
     // Make sure the install API is available.
-    include_once DRUPAL_ROOT . '/core/includes/install.inc';
+    include_once DRUPAL_ROOT . '/core/includes/install.inc.php';
 
     // Get a list of all available modules.
     $modules = system_rebuild_module_data();
diff --git a/core/modules/system/src/SystemManager.php b/core/modules/system/src/SystemManager.php
index 11c3efc..2d5a14e 100644
--- a/core/modules/system/src/SystemManager.php
+++ b/core/modules/system/src/SystemManager.php
@@ -111,7 +111,7 @@ public function checkRequirements() {
    */
   public function listRequirements() {
     // Load .install files
-    include_once DRUPAL_ROOT . '/core/includes/install.inc';
+    include_once DRUPAL_ROOT . '/core/includes/install.inc.php';
     drupal_load_updates();
 
     // Check run-time requirements and status information.
diff --git a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php
index 130ffd2..82ae382 100644
--- a/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php
+++ b/core/modules/system/src/Tests/Extension/ModuleHandlerTest.php
@@ -67,8 +67,8 @@ function testModuleList() {
 
     // Test the fixed list feature.
     $fixed_list = array(
-      'system' => 'core/modules/system/system.module',
-      'menu' => 'core/modules/menu/menu.module',
+      'system' => 'core/modules/system/system.module.php',
+      'menu' => 'core/modules/menu/menu.module.php',
     );
     $this->moduleHandler()->setModuleList($fixed_list);
     $new_module_list = array_combine(array_keys($fixed_list), array_keys($fixed_list));
diff --git a/core/modules/system/src/Tests/Installer/InstallerTest.php b/core/modules/system/src/Tests/Installer/InstallerTest.php
index b17e3e7..299c595 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTest.php
+++ b/core/modules/system/src/Tests/Installer/InstallerTest.php
@@ -26,7 +26,7 @@ public function testInstaller() {
     $this->assertText($this->rootUser->getUsername());
 
     // Verify that the confirmation message appears.
-    require_once \Drupal::root() . '/core/includes/install.inc';
+    require_once \Drupal::root() . '/core/includes/install.inc.php';
     $this->assertRaw(t('Congratulations, you installed @drupal!', array(
       '@drupal' => drupal_install_profile_distribution_name(),
     )));
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationVersionUnitTest.php b/core/modules/system/src/Tests/Installer/InstallerTranslationVersionUnitTest.php
index dd4948f..ffdde2c 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationVersionUnitTest.php
+++ b/core/modules/system/src/Tests/Installer/InstallerTranslationVersionUnitTest.php
@@ -19,7 +19,7 @@ class InstallerTranslationVersionUnitTest extends KernelTestBase {
 
   protected function setUp() {
     parent::setUp();
-    require_once \Drupal::root() . '/core/includes/install.core.inc';
+    require_once \Drupal::root() . '/core/includes/install.core.inc.php';
   }
 
   /**
diff --git a/core/modules/system/src/Tests/System/SettingsRewriteTest.php b/core/modules/system/src/Tests/System/SettingsRewriteTest.php
index 70b4043..43cfc51 100644
--- a/core/modules/system/src/Tests/System/SettingsRewriteTest.php
+++ b/core/modules/system/src/Tests/System/SettingsRewriteTest.php
@@ -20,7 +20,7 @@ class SettingsRewriteTest extends KernelTestBase {
    * Tests the drupal_rewrite_settings() function.
    */
   function testDrupalRewriteSettings() {
-    include_once \Drupal::root() . '/core/includes/install.inc';
+    include_once \Drupal::root() . '/core/includes/install.inc.php';
     $tests = array(
       array(
         'original' => '$no_index_value_scalar = TRUE;',
diff --git a/core/modules/system/src/Tests/Update/CompatibilityFixTest.php b/core/modules/system/src/Tests/Update/CompatibilityFixTest.php
index bfa752f..d8c01aa 100644
--- a/core/modules/system/src/Tests/Update/CompatibilityFixTest.php
+++ b/core/modules/system/src/Tests/Update/CompatibilityFixTest.php
@@ -18,7 +18,7 @@ class CompatibilityFixTest extends KernelTestBase {
 
   protected function setUp() {
     parent::setUp();
-    require_once \Drupal::root() . '/core/includes/update.inc';
+    require_once \Drupal::root() . '/core/includes/update.inc.php';
   }
 
   function testFixCompatibility() {
diff --git a/core/modules/system/src/Tests/Update/DependencyHookInvocationTest.php b/core/modules/system/src/Tests/Update/DependencyHookInvocationTest.php
index 1dd0bef..abbf982 100644
--- a/core/modules/system/src/Tests/Update/DependencyHookInvocationTest.php
+++ b/core/modules/system/src/Tests/Update/DependencyHookInvocationTest.php
@@ -26,7 +26,7 @@ class DependencyHookInvocationTest extends WebTestBase {
 
   protected function setUp() {
     parent::setUp();
-    require_once \Drupal::root() . '/core/includes/update.inc';
+    require_once \Drupal::root() . '/core/includes/update.inc.php';
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Update/DependencyMissingTest.php b/core/modules/system/src/Tests/Update/DependencyMissingTest.php
index 70cd56b..4717838 100644
--- a/core/modules/system/src/Tests/Update/DependencyMissingTest.php
+++ b/core/modules/system/src/Tests/Update/DependencyMissingTest.php
@@ -27,7 +27,7 @@ protected function setUp() {
     // Only install update_test_2.module, even though its updates have a
     // dependency on update_test_3.module.
     parent::setUp();
-    require_once \Drupal::root() . '/core/includes/update.inc';
+    require_once \Drupal::root() . '/core/includes/update.inc.php';
   }
 
   function testMissingUpdate() {
diff --git a/core/modules/system/src/Tests/Update/DependencyOrderingTest.php b/core/modules/system/src/Tests/Update/DependencyOrderingTest.php
index 1360c6d..2876060 100644
--- a/core/modules/system/src/Tests/Update/DependencyOrderingTest.php
+++ b/core/modules/system/src/Tests/Update/DependencyOrderingTest.php
@@ -25,7 +25,7 @@ class DependencyOrderingTest extends WebTestBase {
 
   protected function setUp() {
     parent::setUp();
-    require_once \Drupal::root() . '/core/includes/update.inc';
+    require_once \Drupal::root() . '/core/includes/update.inc.php';
   }
 
   /**
diff --git a/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php b/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php
index 228d62c..f7d938b 100644
--- a/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php
+++ b/core/modules/system/src/Tests/Update/InvalidUpdateHookTest.php
@@ -41,7 +41,7 @@ class InvalidUpdateHookTest extends WebTestBase {
 
   protected function setUp() {
     parent::setUp();
-    require_once \Drupal::root() . '/core/includes/update.inc';
+    require_once \Drupal::root() . '/core/includes/update.inc.php';
 
     $this->update_url = $GLOBALS['base_url'] . '/update.php';
     $this->update_user = $this->drupalCreateUser(array('administer software updates'));
diff --git a/core/modules/system/src/Tests/Update/UpdatesWith7xTest.php b/core/modules/system/src/Tests/Update/UpdatesWith7xTest.php
index 09daad3..96559e7 100644
--- a/core/modules/system/src/Tests/Update/UpdatesWith7xTest.php
+++ b/core/modules/system/src/Tests/Update/UpdatesWith7xTest.php
@@ -36,7 +36,7 @@ class UpdatesWith7xTest extends WebTestBase {
 
   protected function setUp() {
     parent::setUp();
-    require_once \Drupal::root() . '/core/includes/update.inc';
+    require_once \Drupal::root() . '/core/includes/update.inc.php';
     $this->update_url = $GLOBALS['base_url'] . '/update.php';
     $this->update_user = $this->drupalCreateUser(array('administer software updates'));
   }
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc.php
similarity index 100%
rename from core/modules/system/system.admin.inc
rename to core/modules/system/system.admin.inc.php
diff --git a/core/modules/system/system.install b/core/modules/system/system.install.php
similarity index 99%
rename from core/modules/system/system.install
rename to core/modules/system/system.install.php
index 4a8683e..7c2169f 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install.php
@@ -560,7 +560,7 @@ function system_requirements($phase) {
   }
 
   // Test Unicode library
-  include_once DRUPAL_ROOT . '/core/includes/unicode.inc';
+  include_once DRUPAL_ROOT . '/core/includes/unicode.inc.php';
   $requirements = array_merge($requirements, unicode_requirements());
 
   if ($phase == 'runtime') {
diff --git a/core/modules/system/system.module b/core/modules/system/system.module.php
similarity index 100%
rename from core/modules/system/system.module
rename to core/modules/system/system.module.php
diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc.php
similarity index 100%
rename from core/modules/system/system.tokens.inc
rename to core/modules/system/system.tokens.inc.php
diff --git a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
rename to core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module.php
diff --git a/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc b/core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc.php
similarity index 100%
rename from core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc
rename to core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc.php
diff --git a/core/modules/system/tests/modules/batch_test/batch_test.module b/core/modules/system/tests/modules/batch_test/batch_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/batch_test/batch_test.module
rename to core/modules/system/tests/modules/batch_test/batch_test.module.php
diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/common_test/common_test.module
rename to core/modules/system/tests/modules/common_test/common_test.module.php
diff --git a/core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module b/core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module.php
similarity index 100%
rename from core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module
rename to core/modules/system/tests/modules/common_test_cron_helper/common_test_cron_helper.module.php
diff --git a/core/modules/system/tests/modules/database_test/database_test.install b/core/modules/system/tests/modules/database_test/database_test.install.php
similarity index 100%
rename from core/modules/system/tests/modules/database_test/database_test.install
rename to core/modules/system/tests/modules/database_test/database_test.install.php
diff --git a/core/modules/system/tests/modules/database_test/database_test.module b/core/modules/system/tests/modules/database_test/database_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/database_test/database_test.module
rename to core/modules/system/tests/modules/database_test/database_test.module.php
diff --git a/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module b/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module
rename to core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module.php
diff --git a/core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module b/core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module
rename to core/modules/system/tests/modules/entity_schema_test/entity_schema_test.module.php
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.install b/core/modules/system/tests/modules/entity_test/entity_test.install.php
similarity index 100%
rename from core/modules/system/tests/modules/entity_test/entity_test.install
rename to core/modules/system/tests/modules/entity_test/entity_test.install.php
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/entity_test/entity_test.module
rename to core/modules/system/tests/modules/entity_test/entity_test.module.php
diff --git a/core/modules/system/tests/modules/entity_test_extra/entity_test_extra.module b/core/modules/system/tests/modules/entity_test_extra/entity_test_extra.module.php
similarity index 100%
rename from core/modules/system/tests/modules/entity_test_extra/entity_test_extra.module
rename to core/modules/system/tests/modules/entity_test_extra/entity_test_extra.module.php
diff --git a/core/modules/system/tests/modules/form_test/form_test.module b/core/modules/system/tests/modules/form_test/form_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/form_test/form_test.module
rename to core/modules/system/tests/modules/form_test/form_test.module.php
diff --git a/core/modules/system/tests/modules/keyvalue_test/keyvalue_test.module b/core/modules/system/tests/modules/keyvalue_test/keyvalue_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/keyvalue_test/keyvalue_test.module
rename to core/modules/system/tests/modules/keyvalue_test/keyvalue_test.module.php
diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/menu_test/menu_test.module
rename to core/modules/system/tests/modules/menu_test/menu_test.module.php
diff --git a/core/modules/system/tests/modules/module_test/module_test.file.inc b/core/modules/system/tests/modules/module_test/module_test.file.inc.php
similarity index 100%
rename from core/modules/system/tests/modules/module_test/module_test.file.inc
rename to core/modules/system/tests/modules/module_test/module_test.file.inc.php
diff --git a/core/modules/system/tests/modules/module_test/module_test.implementations.inc b/core/modules/system/tests/modules/module_test/module_test.implementations.inc.php
similarity index 100%
rename from core/modules/system/tests/modules/module_test/module_test.implementations.inc
rename to core/modules/system/tests/modules/module_test/module_test.implementations.inc.php
diff --git a/core/modules/system/tests/modules/module_test/module_test.install b/core/modules/system/tests/modules/module_test/module_test.install.php
similarity index 100%
rename from core/modules/system/tests/modules/module_test/module_test.install
rename to core/modules/system/tests/modules/module_test/module_test.install.php
diff --git a/core/modules/system/tests/modules/module_test/module_test.module b/core/modules/system/tests/modules/module_test/module_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/module_test/module_test.module
rename to core/modules/system/tests/modules/module_test/module_test.module.php
diff --git a/core/modules/system/tests/modules/path_test/path_test.module b/core/modules/system/tests/modules/path_test/path_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/path_test/path_test.module
rename to core/modules/system/tests/modules/path_test/path_test.module.php
diff --git a/core/modules/system/tests/modules/plugin_test/plugin_test.module b/core/modules/system/tests/modules/plugin_test/plugin_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/plugin_test/plugin_test.module
rename to core/modules/system/tests/modules/plugin_test/plugin_test.module.php
diff --git a/core/modules/system/tests/modules/requirements1_test/requirements1_test.install b/core/modules/system/tests/modules/requirements1_test/requirements1_test.install.php
similarity index 100%
rename from core/modules/system/tests/modules/requirements1_test/requirements1_test.install
rename to core/modules/system/tests/modules/requirements1_test/requirements1_test.install.php
diff --git a/core/modules/system/tests/modules/session_test/session_test.module b/core/modules/system/tests/modules/session_test/session_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/session_test/session_test.module
rename to core/modules/system/tests/modules/session_test/session_test.module.php
diff --git a/core/modules/system/tests/modules/system_module_test/system_module_test.module b/core/modules/system/tests/modules/system_module_test/system_module_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/system_module_test/system_module_test.module
rename to core/modules/system/tests/modules/system_module_test/system_module_test.module.php
diff --git a/core/modules/system/tests/modules/system_test/system_test.module b/core/modules/system/tests/modules/system_test/system_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/system_test/system_test.module
rename to core/modules/system/tests/modules/system_test/system_test.module.php
diff --git a/core/modules/system/tests/modules/test_page_test/test_page_test.module b/core/modules/system/tests/modules/test_page_test/test_page_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/test_page_test/test_page_test.module
rename to core/modules/system/tests/modules/test_page_test/test_page_test.module.php
diff --git a/core/modules/system/tests/modules/theme_page_test/theme_page_test.module b/core/modules/system/tests/modules/theme_page_test/theme_page_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/theme_page_test/theme_page_test.module
rename to core/modules/system/tests/modules/theme_page_test/theme_page_test.module.php
diff --git a/core/modules/system/tests/modules/theme_region_test/theme_region_test.module b/core/modules/system/tests/modules/theme_region_test/theme_region_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/theme_region_test/theme_region_test.module
rename to core/modules/system/tests/modules/theme_region_test/theme_region_test.module.php
diff --git a/core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.inc b/core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.inc.php
similarity index 100%
rename from core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.inc
rename to core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.inc.php
diff --git a/core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module b/core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module
rename to core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module.php
diff --git a/core/modules/system/tests/modules/theme_test/theme_test.inc b/core/modules/system/tests/modules/theme_test/theme_test.inc.php
similarity index 100%
rename from core/modules/system/tests/modules/theme_test/theme_test.inc
rename to core/modules/system/tests/modules/theme_test/theme_test.inc.php
diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/theme_test/theme_test.module
rename to core/modules/system/tests/modules/theme_test/theme_test.module.php
diff --git a/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.module b/core/modules/system/tests/modules/twig_extension_test/twig_extension_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/twig_extension_test/twig_extension_test.module
rename to core/modules/system/tests/modules/twig_extension_test/twig_extension_test.module.php
diff --git a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module
rename to core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module.php
diff --git a/core/modules/system/tests/modules/update_script_test/update_script_test.install b/core/modules/system/tests/modules/update_script_test/update_script_test.install.php
similarity index 100%
rename from core/modules/system/tests/modules/update_script_test/update_script_test.install
rename to core/modules/system/tests/modules/update_script_test/update_script_test.install.php
diff --git a/core/modules/system/tests/modules/update_script_test/update_script_test.module b/core/modules/system/tests/modules/update_script_test/update_script_test.module.php
similarity index 100%
rename from core/modules/system/tests/modules/update_script_test/update_script_test.module
rename to core/modules/system/tests/modules/update_script_test/update_script_test.module.php
diff --git a/core/modules/system/tests/modules/update_test_0/update_test_0.install b/core/modules/system/tests/modules/update_test_0/update_test_0.install.php
similarity index 100%
rename from core/modules/system/tests/modules/update_test_0/update_test_0.install
rename to core/modules/system/tests/modules/update_test_0/update_test_0.install.php
diff --git a/core/modules/system/tests/modules/update_test_1/update_test_1.install b/core/modules/system/tests/modules/update_test_1/update_test_1.install.php
similarity index 100%
rename from core/modules/system/tests/modules/update_test_1/update_test_1.install
rename to core/modules/system/tests/modules/update_test_1/update_test_1.install.php
diff --git a/core/modules/system/tests/modules/update_test_2/update_test_2.install b/core/modules/system/tests/modules/update_test_2/update_test_2.install.php
similarity index 100%
rename from core/modules/system/tests/modules/update_test_2/update_test_2.install
rename to core/modules/system/tests/modules/update_test_2/update_test_2.install.php
diff --git a/core/modules/system/tests/modules/update_test_3/update_test_3.install b/core/modules/system/tests/modules/update_test_3/update_test_3.install.php
similarity index 100%
rename from core/modules/system/tests/modules/update_test_3/update_test_3.install
rename to core/modules/system/tests/modules/update_test_3/update_test_3.install.php
diff --git a/core/modules/system/tests/modules/update_test_invalid_hook/update_test_invalid_hook.install b/core/modules/system/tests/modules/update_test_invalid_hook/update_test_invalid_hook.install.php
similarity index 100%
rename from core/modules/system/tests/modules/update_test_invalid_hook/update_test_invalid_hook.install
rename to core/modules/system/tests/modules/update_test_invalid_hook/update_test_invalid_hook.install.php
diff --git a/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install b/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install.php
similarity index 100%
rename from core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install
rename to core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install.php
diff --git a/core/modules/system/tests/modules/url_alter_test/url_alter_test.install b/core/modules/system/tests/modules/url_alter_test/url_alter_test.install.php
similarity index 100%
rename from core/modules/system/tests/modules/url_alter_test/url_alter_test.install
rename to core/modules/system/tests/modules/url_alter_test/url_alter_test.install.php
diff --git a/core/modules/system/tests/themes/test_basetheme/test_basetheme.theme b/core/modules/system/tests/themes/test_basetheme/test_basetheme.theme.php
similarity index 100%
rename from core/modules/system/tests/themes/test_basetheme/test_basetheme.theme
rename to core/modules/system/tests/themes/test_basetheme/test_basetheme.theme.php
diff --git a/core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.theme b/core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.theme.php
similarity index 100%
rename from core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.theme
rename to core/modules/system/tests/themes/test_subsubtheme/test_subsubtheme.theme.php
diff --git a/core/modules/system/tests/themes/test_subtheme/test_subtheme.theme b/core/modules/system/tests/themes/test_subtheme/test_subtheme.theme.php
similarity index 100%
rename from core/modules/system/tests/themes/test_subtheme/test_subtheme.theme
rename to core/modules/system/tests/themes/test_subtheme/test_subtheme.theme.php
diff --git a/core/modules/system/tests/themes/test_theme/test_theme.theme b/core/modules/system/tests/themes/test_theme/test_theme.theme.php
similarity index 100%
rename from core/modules/system/tests/themes/test_theme/test_theme.theme
rename to core/modules/system/tests/themes/test_theme/test_theme.theme.php
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.php
similarity index 100%
rename from core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.theme
rename to core/modules/system/tests/themes/test_theme_phptemplate/test_theme_phptemplate.theme.php
diff --git a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
index 4e3a9f0..1839e30 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
@@ -199,7 +199,7 @@ function testUninstallReinstall() {
     // installed for testing below.
     $this->vocabulary->unsetThirdPartySetting('taxonomy_crud', 'foo');
 
-    require_once \Drupal::root() . '/core/includes/install.inc';
+    require_once \Drupal::root() . '/core/includes/install.inc.php';
     $this->container->get('module_installer')->uninstall(array('taxonomy'));
     $this->container->get('module_installer')->install(array('taxonomy'));
 
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module.php
similarity index 100%
rename from core/modules/taxonomy/taxonomy.module
rename to core/modules/taxonomy/taxonomy.module.php
diff --git a/core/modules/taxonomy/taxonomy.tokens.inc b/core/modules/taxonomy/taxonomy.tokens.inc.php
similarity index 100%
rename from core/modules/taxonomy/taxonomy.tokens.inc
rename to core/modules/taxonomy/taxonomy.tokens.inc.php
diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc.php
similarity index 100%
rename from core/modules/taxonomy/taxonomy.views.inc
rename to core/modules/taxonomy/taxonomy.views.inc.php
diff --git a/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module b/core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module.php
similarity index 100%
rename from core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module
rename to core/modules/taxonomy/tests/modules/taxonomy_crud/taxonomy_crud.module.php
diff --git a/core/modules/telephone/telephone.module b/core/modules/telephone/telephone.module.php
similarity index 100%
rename from core/modules/telephone/telephone.module
rename to core/modules/telephone/telephone.module.php
diff --git a/core/modules/text/text.module b/core/modules/text/text.module.php
similarity index 100%
rename from core/modules/text/text.module
rename to core/modules/text/text.module.php
diff --git a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module.php
similarity index 100%
rename from core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module
rename to core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module.php
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module.php
similarity index 100%
rename from core/modules/toolbar/toolbar.module
rename to core/modules/toolbar/toolbar.module.php
diff --git a/core/modules/tour/tests/tour_test/tour_test.module b/core/modules/tour/tests/tour_test/tour_test.module.php
similarity index 100%
rename from core/modules/tour/tests/tour_test/tour_test.module
rename to core/modules/tour/tests/tour_test/tour_test.module.php
diff --git a/core/modules/tour/tour.module b/core/modules/tour/tour.module.php
similarity index 100%
rename from core/modules/tour/tour.module
rename to core/modules/tour/tour.module.php
diff --git a/core/modules/tracker/tracker.install b/core/modules/tracker/tracker.install.php
similarity index 100%
rename from core/modules/tracker/tracker.install
rename to core/modules/tracker/tracker.install.php
diff --git a/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module.php
similarity index 100%
rename from core/modules/tracker/tracker.module
rename to core/modules/tracker/tracker.module.php
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc.php
similarity index 100%
rename from core/modules/tracker/tracker.pages.inc
rename to core/modules/tracker/tracker.pages.inc.php
diff --git a/core/modules/tracker/tracker.views.inc b/core/modules/tracker/tracker.views.inc.php
similarity index 100%
rename from core/modules/tracker/tracker.views.inc
rename to core/modules/tracker/tracker.views.inc.php
diff --git a/core/modules/update/tests/aaa_update_test.tar.gz b/core/modules/update/tests/aaa_update_test.tar.gz
index 478f038..fbb4108 100644
--- a/core/modules/update/tests/aaa_update_test.tar.gz
+++ b/core/modules/update/tests/aaa_update_test.tar.gz
@@ -1,2 +1,13 @@
-^0tQ aaa_update_test.tar.gz Ak0+r<6u&l;KQlש 94	i_ֳJ,6dTʉ^"2S"RDlLWx9O=ҽ{שMܣ_$\Ks׺2|0NO켋}xՔqmXiڹ.ئoѹƇ$_4oH9=K};捧lY.hصO~mTK%R\eEQPU9?<=cl42>/KNXU
-'Ab              ھsM (  
\ No newline at end of file
+aaa_update_test/                                                                                    0000755 0001750 0001750 00000000000 12466404656 013234  5                                                                                                    ustar   paris                           paris                                                                                                                                                                                                                  aaa_update_test/aaa_update_test.module.php                                                          0000644 0001750 0001750 00000000103 11545366603 020342  0                                                                                                    ustar   paris                           paris                                                                                                                                                                                                                  <?php
+
+/**
+ * @file
+ * Dummy module for testing Update status.
+ */
+                                                                                                                                                                                                                                                                                                                                                                                                                                                             aaa_update_test/aaa_update_test.info.yml                                                            0000644 0001750 0001750 00000000206 12135030101 017777  0                                                                                                    ustar   paris                           paris                                                                                                                                                                                                                  name: 'AAA Update test'
+type: module
+description: 'Support module for update module testing.'
+package: Testing
+core: 8.x
+hidden: true
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
\ No newline at end of file
diff --git a/core/modules/update/tests/modules/update_test/update_test.module b/core/modules/update/tests/modules/update_test/update_test.module.php
similarity index 100%
rename from core/modules/update/tests/modules/update_test/update_test.module
rename to core/modules/update/tests/modules/update_test/update_test.module.php
diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc.php
similarity index 100%
rename from core/modules/update/update.authorize.inc
rename to core/modules/update/update.authorize.inc.php
diff --git a/core/modules/update/update.compare.inc b/core/modules/update/update.compare.inc.php
similarity index 100%
rename from core/modules/update/update.compare.inc
rename to core/modules/update/update.compare.inc.php
diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc.php
similarity index 100%
rename from core/modules/update/update.fetch.inc
rename to core/modules/update/update.fetch.inc.php
diff --git a/core/modules/update/update.install b/core/modules/update/update.install.php
similarity index 100%
rename from core/modules/update/update.install
rename to core/modules/update/update.install.php
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc.php
similarity index 100%
rename from core/modules/update/update.manager.inc
rename to core/modules/update/update.manager.inc.php
diff --git a/core/modules/update/update.module b/core/modules/update/update.module.php
similarity index 99%
rename from core/modules/update/update.module
rename to core/modules/update/update.module.php
index e3eba3f..99dad70 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module.php
@@ -617,9 +617,9 @@ function update_verify_update_archive($project, $archive_file, $directory) {
   if (
     file_exists("$directory/$project/index.php")
     && file_exists("$directory/$project/core/install.php")
-    && file_exists("$directory/$project/core/includes/bootstrap.inc")
-    && file_exists("$directory/$project/core/modules/node/node.module")
-    && file_exists("$directory/$project/core/modules/system/system.module")
+    && file_exists("$directory/$project/core/includes/bootstrap.inc.php")
+    && file_exists("$directory/$project/core/modules/node/node.module.php")
+    && file_exists("$directory/$project/core/modules/system/system.module.php")
   ) {
     return array(
       'no-core' => t('Automatic updating of Drupal core is not supported. See the <a href="@upgrade-guide">upgrade guide</a> for information on how to update Drupal core manually.', array('@upgrade-guide' => 'http://drupal.org/upgrade')),
diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc.php
similarity index 100%
rename from core/modules/update/update.report.inc
rename to core/modules/update/update.report.inc.php
diff --git a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
index 679eec0..e6f3af5 100644
--- a/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
+++ b/core/modules/user/src/Tests/UserAccountFormFieldsTest.php
@@ -29,8 +29,8 @@ class UserAccountFormFieldsTest extends KernelTestBase {
    * Tests the root user account form section in the "Configure site" form.
    */
   function testInstallConfigureForm() {
-    require_once \Drupal::root() . '/core/includes/install.core.inc';
-    require_once \Drupal::root() . '/core/includes/install.inc';
+    require_once \Drupal::root() . '/core/includes/install.core.inc.php';
+    require_once \Drupal::root() . '/core/includes/install.inc.php';
     $install_state = install_state_defaults();
     $form_state = new FormState();
     $form_state->addBuildInfo('args', [&$install_state]);
diff --git a/core/modules/user/tests/modules/user_access_test/user_access_test.module b/core/modules/user/tests/modules/user_access_test/user_access_test.module.php
similarity index 100%
rename from core/modules/user/tests/modules/user_access_test/user_access_test.module
rename to core/modules/user/tests/modules/user_access_test/user_access_test.module.php
diff --git a/core/modules/user/tests/modules/user_form_test/user_form_test.module b/core/modules/user/tests/modules/user_form_test/user_form_test.module.php
similarity index 100%
rename from core/modules/user/tests/modules/user_form_test/user_form_test.module
rename to core/modules/user/tests/modules/user_form_test/user_form_test.module.php
diff --git a/core/modules/user/user.install b/core/modules/user/user.install.php
similarity index 100%
rename from core/modules/user/user.install
rename to core/modules/user/user.install.php
diff --git a/core/modules/user/user.module b/core/modules/user/user.module.php
similarity index 100%
rename from core/modules/user/user.module
rename to core/modules/user/user.module.php
diff --git a/core/modules/user/user.tokens.inc b/core/modules/user/user.tokens.inc.php
similarity index 100%
rename from core/modules/user/user.tokens.inc
rename to core/modules/user/user.tokens.inc.php
diff --git a/core/modules/user/user.views.inc b/core/modules/user/user.views.inc.php
similarity index 100%
rename from core/modules/user/user.views.inc
rename to core/modules/user/user.views.inc.php
diff --git a/core/modules/user/user.views_execution.inc b/core/modules/user/user.views_execution.inc.php
similarity index 100%
rename from core/modules/user/user.views_execution.inc
rename to core/modules/user/user.views_execution.inc.php
diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.install b/core/modules/views/tests/modules/views_test_data/views_test_data.install.php
similarity index 100%
rename from core/modules/views/tests/modules/views_test_data/views_test_data.install
rename to core/modules/views/tests/modules/views_test_data/views_test_data.install.php
diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.module b/core/modules/views/tests/modules/views_test_data/views_test_data.module.php
similarity index 100%
rename from core/modules/views/tests/modules/views_test_data/views_test_data.module
rename to core/modules/views/tests/modules/views_test_data/views_test_data.module.php
diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.views.inc b/core/modules/views/tests/modules/views_test_data/views_test_data.views.inc.php
similarity index 100%
rename from core/modules/views/tests/modules/views_test_data/views_test_data.views.inc
rename to core/modules/views/tests/modules/views_test_data/views_test_data.views.inc.php
diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc b/core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc.php
similarity index 100%
rename from core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc
rename to core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc.php
diff --git a/core/modules/views/tests/modules/views_test_language/views_test_language.views.inc b/core/modules/views/tests/modules/views_test_language/views_test_language.views.inc.php
similarity index 100%
rename from core/modules/views/tests/modules/views_test_language/views_test_language.views.inc
rename to core/modules/views/tests/modules/views_test_language/views_test_language.views.inc.php
diff --git a/core/modules/views/views.install b/core/modules/views/views.install.php
similarity index 100%
rename from core/modules/views/views.install
rename to core/modules/views/views.install.php
diff --git a/core/modules/views/views.module b/core/modules/views/views.module.php
similarity index 99%
rename from core/modules/views/views.module
rename to core/modules/views/views.module.php
index d8516be..1b66056 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module.php
@@ -180,7 +180,7 @@ function views_theme($existing, $type, $theme, $path) {
       // Whenever we have a theme file, we include it directly so we can
       // auto-detect the theme function.
       if (isset($def['theme_file'])) {
-        $include = \Drupal::root() . '/' . $module_dir. '/' . $def['theme_file'];
+        $include = \Drupal::root() . '/' . $module_dir. '/' . $def['theme_file'] . '.php';
         if (is_file($include)) {
           require_once $include;
         }
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc.php
similarity index 100%
rename from core/modules/views/views.theme.inc
rename to core/modules/views/views.theme.inc.php
diff --git a/core/modules/views/views.tokens.inc b/core/modules/views/views.tokens.inc.php
similarity index 100%
rename from core/modules/views/views.tokens.inc
rename to core/modules/views/views.tokens.inc.php
diff --git a/core/modules/views/views.views.inc b/core/modules/views/views.views.inc.php
similarity index 100%
rename from core/modules/views/views.views.inc
rename to core/modules/views/views.views.inc.php
diff --git a/core/modules/views/views.views_execution.inc b/core/modules/views/views.views_execution.inc.php
similarity index 100%
rename from core/modules/views/views.views_execution.inc
rename to core/modules/views/views.views_execution.inc.php
diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc.php
similarity index 100%
rename from core/modules/views_ui/admin.inc
rename to core/modules/views_ui/admin.inc.php
diff --git a/core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.module b/core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.module.php
similarity index 100%
rename from core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.module
rename to core/modules/views_ui/tests/modules/views_ui_test/views_ui_test.module.php
diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module.php
similarity index 100%
rename from core/modules/views_ui/views_ui.module
rename to core/modules/views_ui/views_ui.module.php
diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc.php
similarity index 100%
rename from core/modules/views_ui/views_ui.theme.inc
rename to core/modules/views_ui/views_ui.theme.inc.php
diff --git a/core/profiles/minimal/minimal.install b/core/profiles/minimal/minimal.install.php
similarity index 100%
rename from core/profiles/minimal/minimal.install
rename to core/profiles/minimal/minimal.install.php
diff --git a/core/profiles/minimal/minimal.profile b/core/profiles/minimal/minimal.profile.php
similarity index 100%
rename from core/profiles/minimal/minimal.profile
rename to core/profiles/minimal/minimal.profile.php
diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install.php
similarity index 100%
rename from core/profiles/standard/standard.install
rename to core/profiles/standard/standard.install.php
diff --git a/core/profiles/standard/standard.profile b/core/profiles/standard/standard.profile.php
similarity index 100%
rename from core/profiles/standard/standard.profile
rename to core/profiles/standard/standard.profile.php
diff --git a/core/rebuild.php b/core/rebuild.php
index 7ca8af7..ad460bb 100644
--- a/core/rebuild.php
+++ b/core/rebuild.php
@@ -21,11 +21,11 @@
 chdir('..');
 
 $autoloader = require_once __DIR__ . '/vendor/autoload.php';
-require_once __DIR__ . '/includes/utility.inc';
+require_once __DIR__ . '/includes/utility.inc.php';
 
 $request = Request::createFromGlobals();
 // Manually resemble early bootstrap of DrupalKernel::boot().
-require_once __DIR__ . '/includes/bootstrap.inc';
+require_once __DIR__ . '/includes/bootstrap.inc.php';
 DrupalKernel::bootEnvironment();
 
 try {
diff --git a/core/scripts/rebuild_token_calculator.sh b/core/scripts/rebuild_token_calculator.sh
index 87c3069..18ae788 100755
--- a/core/scripts/rebuild_token_calculator.sh
+++ b/core/scripts/rebuild_token_calculator.sh
@@ -16,7 +16,7 @@
 }
 
 require __DIR__ . '/../vendor/autoload.php';
-require_once __DIR__ . '/../includes/bootstrap.inc';
+require_once __DIR__ . '/../includes/bootstrap.inc.php';
 
 $request = Request::createFromGlobals();
 Settings::initialize(DrupalKernel::findSitePath($request));
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 7bf821c..67e5a47 100644
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -488,7 +488,7 @@ function simpletest_script_setup_database($new = FALSE) {
     exit(1);
   }
   if ($new && $sqlite) {
-    require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'simpletest') . '/simpletest.install';
+    require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'simpletest') . '/simpletest.install.php';
     foreach (simpletest_schema() as $name => $table_spec) {
       if ($schema->tableExists($name)) {
         $schema->dropTable($name);
diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
index 1a52527..6a04012 100644
--- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
@@ -44,7 +44,7 @@ protected function setUp() {
       'module_handler_test' => array(
         'type' => 'module',
         'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml',
-        'filename' => 'module_handler_test.module',
+        'filename' => 'module_handler_test.module.php',
       )
     ), $this->cacheBackend);
   }
@@ -136,7 +136,7 @@ public function testIsLoaded() {
    */
   public function testGetModuleList() {
     $this->assertEquals($this->moduleHandler->getModuleList(), array(
-      'module_handler_test' => new Extension($this->root, 'module', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'module_handler_test.module'),
+      'module_handler_test' => new Extension($this->root, 'module', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'module_handler_test.module.php'),
     ));
   }
 
@@ -146,7 +146,7 @@ public function testGetModuleList() {
    * @covers ::getModule
    */
   public function testGetModuleWithExistingModule() {
-    $this->assertEquals($this->moduleHandler->getModule('module_handler_test'), new Extension($this->root, 'module', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'module_handler_test.module'));
+    $this->assertEquals($this->moduleHandler->getModule('module_handler_test'), new Extension($this->root, 'module', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'module_handler_test.module.php'));
   }
 
   /**
@@ -268,7 +268,7 @@ public function testLoadAllIncludes() {
    */
   public function testLoadInclude() {
     // Include exists.
-    $this->assertEquals(__DIR__ . '/modules/module_handler_test/hook_include.inc', $this->moduleHandler->loadInclude('module_handler_test', 'inc', 'hook_include'));
+    $this->assertEquals(__DIR__ . '/modules/module_handler_test/hook_include.inc.php', $this->moduleHandler->loadInclude('module_handler_test', 'inc', 'hook_include'));
     $this->assertTrue(function_exists('module_handler_test_hook_include'));
     // Include doesn't exist.
     $this->assertFalse($this->moduleHandler->loadInclude('module_handler_test', 'install'));
diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc.php
similarity index 100%
rename from core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc
rename to core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc.php
diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.module b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.module.php
similarity index 100%
rename from core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.module
rename to core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.module.php
diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc.php
similarity index 100%
rename from core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc
rename to core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.hook.inc.php
diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.module b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.module.php
similarity index 100%
rename from core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.module
rename to core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added/module_handler_test_added.module.php
diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module.php
similarity index 100%
rename from core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module
rename to core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1/module_handler_test_all1.module.php
diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module.php
similarity index 100%
rename from core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module
rename to core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2/module_handler_test_all2.module.php
diff --git a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
index 315c74f..572d8f4 100644
--- a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php
@@ -94,7 +94,7 @@ public function testGetRegistryForModule() {
     $this->registry->setBaseThemes(array());
 
     // Include the module so that hook_theme can be called.
-    include_once $this->root . '/core/modules/system/tests/modules/theme_test/theme_test.module';
+    include_once $this->root . '/core/modules/system/tests/modules/theme_test/theme_test.module.php';
     $this->moduleHandler->expects($this->once())
       ->method('getImplementations')
       ->with('theme')
diff --git a/core/tests/Drupal/Tests/Core/Theme/TwigEngineTest.php b/core/tests/Drupal/Tests/Core/Theme/TwigEngineTest.php
index baf45c1..d32e2d5 100644
--- a/core/tests/Drupal/Tests/Core/Theme/TwigEngineTest.php
+++ b/core/tests/Drupal/Tests/Core/Theme/TwigEngineTest.php
@@ -31,7 +31,7 @@ protected function setUp() {
 
     // Ensure that twig.engine is loaded, it is needed to access
     // twig_drupal_escape_filter().
-    require_once $this->root . '/core/themes/engines/twig/twig.engine';
+    require_once $this->root . '/core/themes/engines/twig/twig.engine.php';
 
     $this->twigEnvironment = $this->getMock('\Twig_Environment');
   }
diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme.php
similarity index 100%
rename from core/themes/bartik/bartik.theme
rename to core/themes/bartik/bartik.theme.php
diff --git a/core/themes/bartik/color/color.inc b/core/themes/bartik/color/color.inc.php
similarity index 100%
rename from core/themes/bartik/color/color.inc
rename to core/themes/bartik/color/color.inc.php
diff --git a/core/themes/engines/phptemplate/phptemplate.engine b/core/themes/engines/phptemplate/phptemplate.engine.php
similarity index 100%
rename from core/themes/engines/phptemplate/phptemplate.engine
rename to core/themes/engines/phptemplate/phptemplate.engine.php
diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine.php
similarity index 100%
rename from core/themes/engines/twig/twig.engine
rename to core/themes/engines/twig/twig.engine.php
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme.php
similarity index 100%
rename from core/themes/seven/seven.theme
rename to core/themes/seven/seven.theme.php
diff --git a/web.config b/web.config
index b072d9b..32a356f 100644
--- a/web.config
+++ b/web.config
@@ -22,7 +22,7 @@
     <rewrite>
       <rules>
         <rule name="Protect files and directories from prying eyes" stopProcessing="true">
-          <match url="\.(engine|inc|install|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$" />
+          <match url="\.(po|sh|.*sql|twig|tpl(\.php)?|xtmpl|yml|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$" />
           <action type="CustomResponse" statusCode="403" subStatusCode="0" statusReason="Forbidden" statusDescription="Access is forbidden." />
         </rule>
 
