Browse Source

suppression bundle datatables

garthh 1 week ago
parent
commit
0532afe439
8 changed files with 20 additions and 253 deletions
  1. 0 1
      composer.json
  2. 1 121
      composer.lock
  3. 0 1
      config/bundles.php
  4. 0 14
      config/packages/datatables.yaml
  5. 19 49
      importmap.php
  6. 0 44
      src/Controller/UserController.php
  7. 0 12
      symfony.lock
  8. 0 11
      templates/user/index.html.twig

+ 0 - 1
composer.json

@@ -12,7 +12,6 @@
         "doctrine/doctrine-migrations-bundle": "^3.4.2",
         "doctrine/orm": "^3.5",
         "odolbeau/phone-number-bundle": "^4.2",
-        "omines/datatables-bundle": "^0.10.2",
         "phpdocumentor/reflection-docblock": "^5.6.2",
         "phpstan/phpdoc-parser": "^2.2",
         "symfony/asset": "7.3.*",

+ 1 - 121
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "8d5c310c71ca5fd01478f5947cfe1903",
+    "content-hash": "6fa7d973c7984a64dfa93cd65ae42ea0",
     "packages": [
         {
             "name": "composer/semver",
@@ -1592,126 +1592,6 @@
             },
             "time": "2025-07-15T20:50:09+00:00"
         },
-        {
-            "name": "omines/datatables-bundle",
-            "version": "0.10.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/omines/datatables-bundle.git",
-                "reference": "9c5138697281d22a8c354d706e27ee09fc94ee11"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/omines/datatables-bundle/zipball/9c5138697281d22a8c354d706e27ee09fc94ee11",
-                "reference": "9c5138697281d22a8c354d706e27ee09fc94ee11",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=8.1",
-                "symfony/event-dispatcher": "^6.4|^7.1",
-                "symfony/framework-bundle": "^6.4|^7.1",
-                "symfony/options-resolver": "^6.4|^7.1",
-                "symfony/polyfill-mbstring": "^1.31.0",
-                "symfony/property-access": "^6.4|^7.1",
-                "symfony/translation": "^6.4|^7.1"
-            },
-            "conflict": {
-                "doctrine/orm": "^3.0 <3.3"
-            },
-            "require-dev": {
-                "doctrine/common": "^3.5.0",
-                "doctrine/doctrine-bundle": "^2.15.0",
-                "doctrine/orm": "^2.19.3|^3.4.1",
-                "doctrine/persistence": "^3.4.0|^4.0.0",
-                "ext-curl": "*",
-                "ext-json": "*",
-                "ext-mbstring": "*",
-                "ext-mongodb": "*",
-                "ext-pdo_sqlite": "*",
-                "ext-zip": "*",
-                "friendsofphp/php-cs-fixer": "^3.75.0",
-                "mongodb/mongodb": "^1.20.0|^2.1.0",
-                "ocramius/package-versions": "^2.10",
-                "openspout/openspout": "^4.30",
-                "phpoffice/phpspreadsheet": "^2.3.3|^3.9.2|^4.4.0",
-                "phpstan/extension-installer": "^1.4.3",
-                "phpstan/phpstan": "^2.1.17",
-                "phpstan/phpstan-doctrine": "^2.0.3",
-                "phpstan/phpstan-phpunit": "^2.0.6",
-                "phpstan/phpstan-symfony": "^2.0.6",
-                "phpunit/phpunit": "^10.5.38|^11.5.24",
-                "ruflin/elastica": "^7.3.2",
-                "symfony/browser-kit": "^6.4.13|^7.3",
-                "symfony/css-selector": "^6.4.13|^7.3",
-                "symfony/doctrine-bridge": "^6.4.13|^7.3",
-                "symfony/dom-crawler": "^6.4.13|^7.3",
-                "symfony/intl": "^6.4.13|^7.3",
-                "symfony/mime": "^6.4.13|^7.3",
-                "symfony/phpunit-bridge": "^7.3",
-                "symfony/twig-bundle": "^6.4|^7.3",
-                "symfony/var-dumper": "^6.4.13|^7.3",
-                "symfony/yaml": "^6.4.13|^7.3"
-            },
-            "suggest": {
-                "doctrine/doctrine-bundle": "For integrated access to Doctrine object managers",
-                "doctrine/orm": "For full automated integration with Doctrine entities",
-                "mongodb/mongodb": "For integration with MongoDB collections",
-                "openspout/openspout": "To use the OpenSpout Excel exporter",
-                "phpoffice/phpspreadsheet": "To export the data from DataTables to Excel",
-                "ruflin/elastica": "For integration with Elasticsearch indexes",
-                "symfony/twig-bundle": "To use default Twig based rendering and TwigColumn"
-            },
-            "type": "symfony-bundle",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "0.10-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Omines\\DataTablesBundle\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Robbert Beesems",
-                    "email": "robbert.beesems@omines.com",
-                    "homepage": "https://www.omines.nl/"
-                },
-                {
-                    "name": "Niels Keurentjes",
-                    "email": "niels.keurentjes@omines.com",
-                    "homepage": "https://www.omines.nl/"
-                }
-            ],
-            "description": "Symfony DataTables Bundle with native Doctrine ORM, Elastica and MongoDB support",
-            "keywords": [
-                "bundle",
-                "datatable",
-                "datatables",
-                "doctrine",
-                "elastica",
-                "jquery",
-                "mongodb",
-                "orm",
-                "symfony"
-            ],
-            "support": {
-                "issues": "https://github.com/omines/datatables-bundle/issues",
-                "source": "https://github.com/omines/datatables-bundle/tree/0.10.2"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/curry684",
-                    "type": "github"
-                }
-            ],
-            "time": "2025-06-23T13:27:47+00:00"
-        },
         {
             "name": "phpdocumentor/reflection-common",
             "version": "2.2.0",

+ 0 - 1
config/bundles.php

@@ -19,5 +19,4 @@ return [
     SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
     SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true],
     Symfony\UX\TogglePassword\TogglePasswordBundle::class => ['all' => true],
-    Omines\DataTablesBundle\DataTablesBundle::class => ['all' => true],
 ];

+ 0 - 14
config/packages/datatables.yaml

@@ -1,14 +0,0 @@
-# Latest documentation available at https://omines.github.io/datatables-bundle/#configuration
-datatables:
-    # Set options, as documented at https://datatables.net/reference/option/
-    options:
-        lengthMenu : [10, 25, 50, 100, 250, 500, 1000, 2500]
-        pageLength: 50
-        dom: "<'row' <'col-sm-12' tr>><'row' <'col-sm-6'l><'col-sm-6 text-right'pi>>"
-
-    template_parameters:
-        # Example classes to integrate nicely with Bootstrap 3.x
-        className: 'table table-striped table-bordered table-hover data-table'
-
-    # You can for example override this to "tables" to keep the translation domains separated nicely
-    translation_domain: 'messages'

+ 19 - 49
importmap.php

@@ -16,44 +16,23 @@ return [
         'path' => './assets/app.js',
         'entrypoint' => true,
     ],
-    '@hotwired/stimulus' => [
-        'version' => '3.2.2',
-    ],
     '@symfony/stimulus-bundle' => [
         'path' => './vendor/symfony/stimulus-bundle/assets/dist/loader.js',
     ],
-    '@hotwired/turbo' => [
-        'version' => '7.3.0',
-    ],
-    'datatables.net-bs5' => [
-        'version' => '2.3.2',
-    ],
-    'jquery' => [
-        'version' => '3.7.1',
+    '@hotwired/stimulus' => [
+        'version' => '3.2.2',
     ],
-    'datatables.net' => [
-        'version' => '2.3.2',
+    '@hotwired/turbo' => [
+        'version' => '8.0.13',
     ],
     'datatables.net-bs5/css/dataTables.bootstrap5.min.css' => [
         'version' => '2.3.2',
         'type' => 'css',
     ],
-    'datatables.net-buttons' => [
-        'version' => '3.2.4',
-    ],
-    'datatables.net-buttons-bs5' => [
-        'version' => '3.2.4',
-    ],
     'datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css' => [
         'version' => '3.2.4',
         'type' => 'css',
     ],
-    'datatables.net-buttons-dt' => [
-        'version' => '3.2.4',
-    ],
-    'datatables.net-dt' => [
-        'version' => '2.3.2',
-    ],
     'datatables.net-buttons-dt/css/buttons.dataTables.min.css' => [
         'version' => '3.2.4',
         'type' => 'css',
@@ -88,47 +67,38 @@ return [
     'datatables.net-buttons/js/buttons.print' => [
         'version' => '3.2.4',
     ],
-    'datatables.net-select-bs5' => [
-        'version' => '3.0.1',
-    ],
-    'datatables.net-select' => [
-        'version' => '3.0.1',
-    ],
     'datatables.net-select-bs5/css/select.bootstrap5.min.css' => [
         'version' => '3.0.1',
         'type' => 'css',
     ],
-    'datatables.net-select-dt' => [
-        'version' => '3.0.1',
-    ],
     'datatables.net-select-dt/css/select.dataTables.min.css' => [
         'version' => '3.0.1',
         'type' => 'css',
     ],
-    'datatables.net-responsive-bs5' => [
-        'version' => '3.0.5',
-    ],
-    'datatables.net-responsive' => [
-        'version' => '3.0.5',
-    ],
     'datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css' => [
         'version' => '3.0.5',
         'type' => 'css',
     ],
-    'datatables.net-responsive-dt' => [
-        'version' => '3.0.5',
-    ],
     'datatables.net-responsive-dt/css/responsive.dataTables.min.css' => [
         'version' => '3.0.5',
         'type' => 'css',
     ],
-    'jszip' => [
-        'version' => '3.10.1',
-    ],
-    'pdfmake' => [
-        'version' => '0.2.20',
-    ],
     'pdfmake/build/vfs_fonts' => [
         'version' => '0.2.20',
     ],
+    'jquery' => [
+        'version' => '3.7.1',
+    ],
+    'datatables.net-bs5' => [
+        'version' => '2.3.2',
+    ],
+    'datatables.net' => [
+        'version' => '2.3.2',
+    ],
+    'datatables.net-dt' => [
+        'version' => '2.3.2',
+    ],
+    'datatables.net-buttons' => [
+        'version' => '3.2.4',
+    ],
 ];

+ 0 - 44
src/Controller/UserController.php

@@ -1,44 +0,0 @@
-<?php
-
-namespace App\Controller;
-
-use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
-use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\Routing\Attribute\Route;
-use App\Repository\UserRepository;
-use Pentiminax\UX\DataTables\Builder\DataTableBuilderInterface;
-use Pentiminax\UX\DataTables\Model\Column;
-
-final class UserController extends AbstractController
-{
-    // Lister tous les utilisateurs 
-
-    #[Route('/admin/user', name: 'app_user')]
-    public function index(UserRepository $repository, DataTableBuilderInterface $builder): Response
-    {
-        // Récupérer tous les utilisateurs du dépot
-        $usersRequest = $repository->findAll();
-        $users = [['1', 'admin', 'ADMIN', "supprimer"]];
-
-        // Création du datatable 
-        $table = $builder->createDataTable('usersTable')
-            ->columns([
-                Column::new('uid', "Identifiant"),
-                Column::new('email', 'Email'),
-                Column::new('roles', 'Rôles'),
-                Column::new('lastLogin', 'Dernière connexion'),
-      
-            ])
-            ->data($usersRequest);
-
-        // Envoyer à la vue
-        return $this->render('user/index.html.twig', [
-            'controller_name' => 'UserController',
-            'users' => $usersRequest,
-            'table' => $table,
-        ]);
-    }
-
-    // Supprimer un utilisateur
-    
-}

+ 0 - 12
symfony.lock

@@ -47,18 +47,6 @@
             "config/packages/misd_phone_number.yaml"
         ]
     },
-    "omines/datatables-bundle": {
-        "version": "0.10",
-        "recipe": {
-            "repo": "github.com/symfony/recipes-contrib",
-            "branch": "main",
-            "version": "0.1",
-            "ref": "467488ddc00aa190c37a4357f226457d4dd6b339"
-        },
-        "files": [
-            "config/packages/datatables.yaml"
-        ]
-    },
     "phpunit/phpunit": {
         "version": "12.2",
         "recipe": {

+ 0 - 11
templates/user/index.html.twig

@@ -1,11 +0,0 @@
-{% extends 'base.html.twig' %}
-
-{% block title %}User admin{% endblock %}
-
-{% block content %}
-
-    {{ render_datatable(table)}}
-
-    {{ dump(users) }}
-
-{% endblock %}