Add magit php function required by twig