These changes allow to use the relative path for the Twig function source.
Twig function source uses the resource path value that is specified in the template. If this is a relative path (i.e. the one that starts with ./ or ../) it does not convert this path to an absolute path relative to the template file.
This leads to the fact that we cannot use {{ source('./path/to/some/file') }} in Twig templates.
The solution to this issue is to convert relative paths to absolute paths.
These changes allow to use the relative path for the Twig function
source
.Twig function source uses the resource path value that is specified in the template. If this is a relative path (i.e. the one that starts with
./
or../
) it does not convert this path to an absolute path relative to the template file.This leads to the fact that we cannot use
{{ source('./path/to/some/file') }}
in Twig templates.The solution to this issue is to convert relative paths to absolute paths.