Method is deprecated error Twig Template

oemi

Registered
Mar 31, 2019
3
1
3
South Africa
cPanel Access Level
Website Owner
Hello.
I am a https website owner. I designed and published my own web site using Dreamweaver.
I have a hosting package with a hosting provider. The version of cPanel supplied for my use by the hosting provider is v72.0.10. Some weeks ago after doing the usual virus scan in cpanel I noticed a TWIG folder appear that wasn't there before. The TWIG folder contains over 30 different folder which all contain script entries - which I do not understand the meaning of. I asked my host provider to tell me what is the purpose and function of this TWIG file and folders and they said ask cPanel because they did not put it in my cPanel File manager.

I have posted below a sample of one of the TWIG folder files contents.

Someone please be kind and tell me what this TWIG issue is:

<?php /* server/plugins/section_links.twig */ class __TwigTemplate_12c931d4b55a70e1362368b19d95810508431e4e2a46e8666a556281efcf0b7f extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( ); } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "<div id=\"sectionlinks\"> "; // line 2 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(twig_get_array_keys_filter(($context["plugins"] ?? null))); foreach ($context['_seq'] as $context["_key"] => $context["plugin_type"]) { // line 3 echo " <a href=\"#plugins-"; echo twig_escape_filter($this->env, preg_replace("/[^a-z]/", "", twig_lower_filter($this->env, $context["plugin_type"])), "html", null, true); echo "\"> "; // line 4 echo twig_escape_filter($this->env, $context["plugin_type"], "html", null, true); echo " </a> "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['plugin_type'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 7 echo "</div> "; } public function getTemplateName() { return "server/plugins/section_links.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 40 => 7, 31 => 4, 26 => 3, 22 => 2, 19 => 1,); } /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */ public function getSource() { @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED); return $this->getSourceContext()->getCode(); } public function getSourceContext() { return new Twig_Source("", "server/plugins/section_links.twig", "/usr/local/cpanel/base/3rdparty/phpMyAdmin/templates/server/plugins/section_links.twig");

Thank you.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,977
155
368
SLC
cPanel Access Level
DataCenter Provider
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,257
313
Houston

oemi

Registered
Mar 31, 2019
3
1
3
South Africa
cPanel Access Level
Website Owner
twig is php template framework
How to Set Up (PHP) Composer - cPanel Knowledge Base - cPanel Documentation
Symfony2 PHP framework comes with a bundled support for Twig

cPanel does not install it but it does support the installation of it


Note: Dreamweaver can be made Twig aware unsure if it installs anything ?
Hi Dalem, Thank you for your very prompt and very helpful reply. I will post again about any developments/further information or queries about my issue as and when I know.
 

oemi

Registered
Mar 31, 2019
3
1
3
South Africa
cPanel Access Level
Website Owner
  • Like
Reactions: cPanelLauren