// Previously it was possible to access files in the parent directory of a
// namespace. This was removed in Twig 2.15.3. In order to support backwards
// compatibility, we are adding path directory as a namespace, and therefore
// we can remove the directory traversal from the name.
// @todo deprecate this functionality for removal in Drupal 11.
if (preg_match('/(^\@[^\/]+\/)\.\.\/(.*)/',
$name,
$matches)) { $name =
$matches[1
] .
$matches[2
];
} return parent::
findTemplate($name,
$throw);
}}