Skip to content

Commit cb037bc

Browse files
authored
Refactor action retrieval in render method
New in Symfony 7.4 Request Class Improvements Deprecated the get() Method This fixes the deprecated method and warning log entries like ´Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead.`
1 parent f53cbbd commit cb037bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Services/DataTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function __invoke(): mixed
183183
public function render(?string $view = null, array $data = [], array $mergeData = [])
184184
{
185185
/** @var string $action */
186-
$action = $this->request()->get('action');
186+
$action = $this->request()->action;
187187
$actionMethod = $action === 'print' ? 'printPreview' : $action;
188188

189189
if (in_array($action, $this->actions) && method_exists($this, $actionMethod)) {

0 commit comments

Comments
 (0)