Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibilty to Araise/AraiseBundle #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 6 additions & 3 deletions src/Controller/HistoryCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(),
]
);
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/AuditSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Manager/HistoryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Page/HistoryPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace whatwedo\CrudHistoryBundle\Page;

use araise\CrudBundle\Enums\PageInterface;
use Araise\AraiseBundle\Enums\PageInterface;

enum HistoryPage: string implements PageInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/views/history/history.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{% block topbar %}
<nav class="whatwedo_crud-topbar flex-grow-0 flex-auto px-4 py-4 min-h-[71px] flex justify-end lg:justify-between">
{% block breadcrumbs %}
{% include "@araiseCrud/includes/topbar/_breadcrumbs.html.twig" %}
{% include "@Araise/includes/topbar/_breadcrumbs.html.twig" %}
{% endblock %}

{% block actions %}
<div class="hidden md:flex lg:ml-3 flex space-x-3 justify-end flex-nowrap items-stretch">
<a href="{{ wwd_crud_entity_path(entity, constant('araise\\CrudBundle\\Enums\\Page::SHOW')) }}" class="whatwedo-crud-button--action" role="menuitem" tabindex="-1">
<a href="{{ wwd_crud_entity_path(entity, constant('Araise\\AraiseBundle\\Enums\\Page::SHOW')) }}" class="whatwedo-crud-button--action" role="menuitem" tabindex="-1">
<span class="2xl:block">{{ 'whatwedo_crud_history.back'|trans({'%name%': entityTitle|trans }) }}</span>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/CrudHistoryLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace whatwedo\CrudHistoryBundle\Routing;

use araise\CrudBundle\Manager\DefinitionManager;
use Araise\AraiseBundle\Manager\DefinitionManager;
use Symfony\Component\Config\Loader\Loader;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
Expand Down
Loading