Please rename `$twig` variable (and the property) to `$templating`.