I created a new twig extension with the maker bundle, and I saw that
public function getFilters(): array
{
return [
new TwigFilter('my_filter', [$this, 'doSomething'], ['is_safe' => ['html']]),
];
}
IMHO, this should not be added because it's a major security issue.
If you really want to make things easy for new comer, it should be commented by default.