diff --git a/composer.json b/composer.json index 7ad9681f..ec61e41e 100755 --- a/composer.json +++ b/composer.json @@ -24,17 +24,16 @@ "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", "symfony/security-core": "^6.2|^7.0", - "phpoffice/phpspreadsheet": "^1.28", - "doctrine/orm": "^2.15", - "doctrine/doctrine-bundle": "^2.9", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.4", - "dg/bypass-finals": "dev-master", + "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|^11.0|^12.0|^13.0", + "dg/bypass-finals": "^1.9", "openspout/openspout": "^4.23", "symfony/http-foundation": "^6.0|^7.0" }, 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