bu/extra-param-converter-bundle
strip_tags).sensio_framework_extra.request.converters must be enabled).@ParamConverter, @Route, etc.).strip_tags() is not a full sanitizer—could allow malicious input if misused.User[roles[]] from POST)?NotFoundHttpException) customizable or logged?ParamConverter + Serializer or API Platform?EntityManager::find() is repetitive.sensio_framework_extra is installed and configured:
# config.yml
sensio_framework_extra:
request:
converters: true
composer require bu/extra-param-converter-bundle dev-master
AppKernel.php (Symfony 2.x) or bundles.php (Symfony 4+).public function updateAction(Request $request) {
$user = $this->getDoctrine()->getRepository(User::class)->find($request->get('id'));
}
public function updateAction(User $user) { ... } // Auto-converted from GET/POST
@ParamConverter for custom logic or rely on automatic JSON decoding:
public function createAction(User $user, Request $request) {
// $user is auto-bound from POST body (e.g., JSON)
}
/debug endpoint).find()/create() calls.bu/extra-param-converter-bundle (no upstream maintenance).symfony/var-dumper).| Scenario | Impact | Mitigation |
|---|---|---|
| Missing GET parameter | NotFoundHttpException |
Use @ParamConverter with options={"validation_groups"={...}} |
| Malformed JSON POST | Silent failure or error | Validate with @Assert\Valid or custom exception handler |
| Entity Not Found | NotFoundHttpException |
Override exception in EventSubscriber |
| Symfony Version Mismatch | Bundle fails to load | Fork and update dependencies |
XSS via strip_tags |
Incomplete sanitization | Use htmlspecialchars or Symfony\Component\Security\Csrf |
How can I help you explore Laravel packages today?