diff --git a/composer.json b/composer.json index b703189..8b8c5e6 100644 --- a/composer.json +++ b/composer.json @@ -12,15 +12,13 @@ } ], "require": { - "php": ">=8.2", + "php": ">=8.3", "symfony/security-bundle": "^6.4|^7.0", - "damienharper/auditor-bundle": "dev-master", + "damienharper/auditor-bundle": "^6.2.0", "symfony/form": "^6.4|^7.0", + "doctrine/common": "^3.0", "whatwedo/twig-bootstrap-icons": "^v1.1.1", - "araise/table-bundle": "^1.1", - "araise/core-bundle": "^1.1", - "araise/crud-bundle": "^1.1", - "araise/search-bundle": "^3.1" + "araise/araise-bundle": "@stable" }, "require-dev": { "symfony/phpunit-bridge": "^7.0", diff --git a/src/Controller/HistoryCrudController.php b/src/Controller/HistoryCrudController.php index 4217c10..c50ab32 100644 --- a/src/Controller/HistoryCrudController.php +++ b/src/Controller/HistoryCrudController.php @@ -4,9 +4,9 @@ namespace whatwedo\CrudHistoryBundle\Controller; -use araise\CrudBundle\Controller\CrudController; -use araise\CrudBundle\Enums\Page; -use araise\CrudBundle\Manager\DefinitionManager; +use Araise\AraiseBundle\Controller\CrudController; +use Araise\AraiseBundle\Enums\Page; +use Araise\AraiseBundle\Manager\DefinitionManager; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use whatwedo\CrudHistoryBundle\Manager\HistoryManager; @@ -27,12 +27,15 @@ public function history(Request $request, HistoryManager $historyManager, Defini 'id' => $entity->getId(), ]); + $view = $this->definition->createView(Page::SHOW, $entity); + return $this->render( '@whatwedoCrudHistory/history/history.html.twig', [ 'wwd_crud_enable_breadcrumbs' => true, 'transactionList' => $transactionList, 'entity' => $entity, + 'view' => $view, 'entityTitle' => (new \ReflectionMethod($this->definition, 'getEntityTitle'))->isStatic() ? $this->definition::getEntityTitle() : $this->definition->getEntityTitle(), ] ); diff --git a/src/EventSubscriber/AuditSubscriber.php b/src/EventSubscriber/AuditSubscriber.php index 3191d77..99899c6 100644 --- a/src/EventSubscriber/AuditSubscriber.php +++ b/src/EventSubscriber/AuditSubscriber.php @@ -4,7 +4,7 @@ namespace whatwedo\CrudHistoryBundle\EventSubscriber; -use araise\CrudBundle\Event\CrudEvent; +use Araise\AraiseBundle\Crud\Event\CrudEvent; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use whatwedo\CrudHistoryBundle\Entity\AuditManyToOneTriggerInterface; diff --git a/src/Manager/HistoryManager.php b/src/Manager/HistoryManager.php index d62977b..c76e7f7 100644 --- a/src/Manager/HistoryManager.php +++ b/src/Manager/HistoryManager.php @@ -4,7 +4,7 @@ namespace whatwedo\CrudHistoryBundle\Manager; -use araise\CrudBundle\Manager\DefinitionManager; +use Araise\AraiseBundle\Manager\DefinitionManager; use DH\Auditor\Model\Entry; use DH\Auditor\Provider\Doctrine\Persistence\Reader\Filter\SimpleFilter; use DH\Auditor\Provider\Doctrine\Persistence\Reader\Query; diff --git a/src/Page/HistoryPage.php b/src/Page/HistoryPage.php index 6d04729..e710b40 100644 --- a/src/Page/HistoryPage.php +++ b/src/Page/HistoryPage.php @@ -4,7 +4,7 @@ namespace whatwedo\CrudHistoryBundle\Page; -use araise\CrudBundle\Enums\PageInterface; +use Araise\AraiseBundle\Enums\PageInterface; enum HistoryPage: string implements PageInterface { diff --git a/src/Resources/views/history/history.html.twig b/src/Resources/views/history/history.html.twig index 8d25b23..715d04c 100644 --- a/src/Resources/views/history/history.html.twig +++ b/src/Resources/views/history/history.html.twig @@ -4,12 +4,12 @@ {% block topbar %}