feat: improved error handling in controllers, cleanup

This commit is contained in:
Björn Fromme
2025-09-26 09:00:40 +02:00
parent 391dd63ebf
commit 122df1a3f5
11 changed files with 261 additions and 119 deletions
@@ -1,29 +0,0 @@
<?php
namespace App\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
use voku\helper\AntiXSS;
class XssCleanTransformer implements DataTransformerInterface
{
private ?AntiXSS $antiXss = null;
public function transform(mixed $value): mixed
{
return $value;
}
public function reverseTransform(mixed $value): mixed
{
if (false === is_string($value) || true === empty($value)) {
return $value;
}
if (null === $this->antiXss) {
$this->antiXss = new AntiXSS();
}
return $this->antiXss->xss_clean($value);
}
}