From 5117f9cae10d2f52f94cc9e69fe1be6974fb03f9 Mon Sep 17 00:00:00 2001 From: Marco Wansinck Date: Fri, 20 Mar 2026 20:45:14 +0100 Subject: [PATCH 1/4] chore(deps): Updated phpstan/phpstan to ^2.0 --- composer.json | 2 +- phpstan.dist.neon | 4 ++++ src/Action/Type/ButtonActionType.php | 2 +- src/Bridge/PhpSpreadsheet/Exporter/Type/PdfExporterType.php | 2 +- src/Column/Type/ActionsColumnType.php | 2 +- src/DataTable.php | 5 +---- src/Type/ResolvedDataTableType.php | 6 ++---- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 7ad9681f..9fd2ad29 100755 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "phpoffice/phpspreadsheet": "^1.28", "doctrine/orm": "^2.15", "doctrine/doctrine-bundle": "^2.9", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.4", "dg/bypass-finals": "dev-master", "openspout/openspout": "^4.23", diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 24c32c70..e8b6b02a 100755 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -1,5 +1,9 @@ parameters: level: 5 + treatPhpDocTypesAsCertain: false + ignoreErrors: + - + identifier: trait.unused paths: - src - tests diff --git a/src/Action/Type/ButtonActionType.php b/src/Action/Type/ButtonActionType.php index 2f10ddf8..12916cfe 100755 --- a/src/Action/Type/ButtonActionType.php +++ b/src/Action/Type/ButtonActionType.php @@ -6,7 +6,7 @@ final class ButtonActionType extends AbstractActionType { - public function getParent(): ?string + public function getParent(): string { return LinkActionType::class; } diff --git a/src/Bridge/PhpSpreadsheet/Exporter/Type/PdfExporterType.php b/src/Bridge/PhpSpreadsheet/Exporter/Type/PdfExporterType.php index d84b3d7a..0a3f3cd6 100755 --- a/src/Bridge/PhpSpreadsheet/Exporter/Type/PdfExporterType.php +++ b/src/Bridge/PhpSpreadsheet/Exporter/Type/PdfExporterType.php @@ -32,7 +32,7 @@ public function configureOptions(OptionsResolver $resolver): void ; } - public function getParent(): ?string + public function getParent(): string { return HtmlExporterType::class; } diff --git a/src/Column/Type/ActionsColumnType.php b/src/Column/Type/ActionsColumnType.php index 4cdfa809..6320d828 100755 --- a/src/Column/Type/ActionsColumnType.php +++ b/src/Column/Type/ActionsColumnType.php @@ -46,7 +46,7 @@ public function buildValueView(ColumnValueView $view, ColumnInterface $column, a $actions[$name] = $action->createView($view); } - $view->vars['actions'] = array_filter($actions); + $view->vars['actions'] = $actions; } public function configureOptions(OptionsResolver $resolver): void diff --git a/src/DataTable.php b/src/DataTable.php index c48a3303..9d46c7ae 100755 --- a/src/DataTable.php +++ b/src/DataTable.php @@ -802,10 +802,7 @@ public function createExportFormBuilder(?DataTableView $view = null): FormBuilde } $data = $this->config->getDefaultExportData() ?? ExportData::fromDataTable($this); - - if (null !== $data) { - $data->filename ??= $this->getName(); - } + $data->filename ??= $this->getName(); return $formFactory->createNamedBuilder( name: $this->config->getExportParameterName(), diff --git a/src/Type/ResolvedDataTableType.php b/src/Type/ResolvedDataTableType.php index 8db12642..4b6e2e1c 100755 --- a/src/Type/ResolvedDataTableType.php +++ b/src/Type/ResolvedDataTableType.php @@ -97,13 +97,11 @@ public function buildView(DataTableView $view, DataTableInterface $dataTable, ar public function buildExportView(DataTableView $view, DataTableInterface $dataTable, array $options): void { - if ($this->parent && method_exists($this->parent, 'buildExportView')) { + if ($this->parent) { $this->parent->buildExportView($view, $dataTable, $options); } - if (method_exists($this->innerType, 'buildExportView')) { - $this->innerType->buildExportView($view, $dataTable, $options); - } + $this->innerType->buildExportView($view, $dataTable, $options); } public function getOptionsResolver(): OptionsResolver From 2356c417c97074682059c27bcdf85f5a61682f6b Mon Sep 17 00:00:00 2001 From: Marco Wansinck Date: Fri, 20 Mar 2026 20:46:14 +0100 Subject: [PATCH 2/4] chore(deps): Remove roave/security-advisories (use composer audit instead) --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 9fd2ad29..432a6557 100755 --- a/composer.json +++ b/composer.json @@ -24,7 +24,6 @@ "symfony/validator": "^6.0|^7.0" }, "require-dev": { - "roave/security-advisories": "dev-latest", "friendsofphp/php-cs-fixer": "^3.49", "kubawerlos/php-cs-fixer-custom-fixers": "^3.11", "symfony/maker-bundle": "^1.48", From adc5161cd7bc39ecaa58296a97e2b8fd684af734 Mon Sep 17 00:00:00 2001 From: Marco Wansinck Date: Fri, 20 Mar 2026 20:57:52 +0100 Subject: [PATCH 3/4] chore(deps): Use tagged versions for dg/bypass-finals --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 432a6557..0231dfea 100755 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "doctrine/doctrine-bundle": "^2.9", "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^10.4", - "dg/bypass-finals": "dev-master", + "dg/bypass-finals": "^1.9", "openspout/openspout": "^4.23", "symfony/http-foundation": "^6.0|^7.0" }, From d7264abfdc71dc82874e0a2d1a71d0816884ad2f Mon Sep 17 00:00:00 2001 From: Marco Wansinck Date: Fri, 20 Mar 2026 21:49:19 +0100 Subject: [PATCH 4/4] chore(deps): Allow newer versions for phpoffice/phpspreadsheet, doctrine/orm, "doctrine/doctrine-bundle and phpunit/phpunit --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 0231dfea..ec61e41e 100755 --- a/composer.json +++ b/composer.json @@ -28,11 +28,11 @@ "kubawerlos/php-cs-fixer-custom-fixers": "^3.11", "symfony/maker-bundle": "^1.48", "symfony/security-core": "^6.2|^7.0", - "phpoffice/phpspreadsheet": "^1.28", - "doctrine/orm": "^2.15", - "doctrine/doctrine-bundle": "^2.9", + "phpoffice/phpspreadsheet": "^1.28|^2.0|^3.0|^4.0|^5.0", + "doctrine/orm": "^2.15|^3.0", + "doctrine/doctrine-bundle": "^2.9|^3.0", "phpstan/phpstan": "^2.0", - "phpunit/phpunit": "^10.4", + "phpunit/phpunit": "^10.4|^11.0|^12.0|^13.0", "dg/bypass-finals": "^1.9", "openspout/openspout": "^4.23", "symfony/http-foundation": "^6.0|^7.0"