Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

drupal_get_filename() always returns the relative pathname of the main extension file now — regardless of whether such a file exists.

Drupal 7

$pathname = drupal_get_filename('module', 'node');
var_dump($pathname);
$pathname = drupal_get_filename('theme', 'stark');
var_dump($pathname);
core/modules/node/node.module
core/themes/stark/stark.info

Drupal 8

$pathname = drupal_get_filename('module', 'node');
var_dump($pathname);
$pathname = drupal_get_filename('theme', 'stark');
var_dump($pathname);
core/modules/node/node.module
core/themes/stark/stark.theme

Note

drupal_get_filename() will most likely be removed prior to the release of Drupal 8.0. It is mostly used internally by Drupal core. If your code relies on it, change it to use the information from respective extension handlers instead; e.g., ModuleHandler::getModuleList().

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done