diff --git a/CHANGELOG.md b/CHANGELOG.md index c2446289..eab7357f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Nothing yet. ## 0.8.0 - in RC ### Breaking - All interfaces and classes are now fully typed, this will likely require modifications in any custom extensions + - Removed `DataTablesTrait` for use in controllers - EOL: Drop PHP <8.1 support - EOL: Drop Symfony <6.3 support diff --git a/src/Controller/DataTablesTrait.php b/src/Controller/DataTablesTrait.php deleted file mode 100644 index 5a90fb1e..00000000 --- a/src/Controller/DataTablesTrait.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * @property ContainerInterface $container - * - * @deprecated inject the DataTableFactory in your controllers or actions instead - */ -trait DataTablesTrait -{ - /** - * Creates and returns a basic DataTable instance. - * - * @param array $options Options to be passed - * @return DataTable - */ - protected function createDataTable(array $options = []) - { - @trigger_error('Omines\DataTablesBundle\Controller\DataTablesTrait is deprecated. Use dependency injection to inject the Omines\DataTablesBundle\DataTableFactory service instead.', E_USER_DEPRECATED); - - return $this->container->get(DataTableFactory::class)->create($options); - } - - /** - * Creates and returns a DataTable based upon a registered DataTableType or an FQCN. - * - * @param string $type FQCN or service name - * @param array $typeOptions Type-specific options to be considered - * @param array $options Options to be passed - * @return DataTable - */ - protected function createDataTableFromType($type, array $typeOptions = [], array $options = []) - { - @trigger_error('Omines\DataTablesBundle\Controller\DataTablesTrait is deprecated. Use dependency injection to inject the Omines\DataTablesBundle\DataTableFactory service instead.', E_USER_DEPRECATED); - - return $this->container->get(DataTableFactory::class)->createFromType($type, $typeOptions, $options); - } -}