Skip to content
Merged
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
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@
},
"autoload": {
"psr-4": {
"Frontend\\App\\": "src/App/src/",
"Frontend\\Admin\\": "src/Admin/src/",
"Frontend\\Setting\\": "src/Setting/src/"
"Admin\\App\\": "src/App/src/",
"Admin\\Admin\\": "src/Admin/src/",
"Admin\\Setting\\": "src/Setting/src/"
}
},
"autoload-dev": {
"psr-4": {
"FrontendTest\\Common\\": "test/Common",
"FrontendTest\\Functional\\": "test/Functional/",
"FrontendTest\\Unit\\": "test/Unit"
"AdminTest\\Common\\": "test/Common",
"AdminTest\\Functional\\": "test/Functional/",
"AdminTest\\Unit\\": "test/Unit"
}
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions config/autoload/authentication.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

use Frontend\Admin\Entity\Admin;
use Admin\Admin\Entity\Admin;

return [
'doctrine' => [
Expand All @@ -12,7 +12,7 @@
'identity_class' => Admin::class,
'identity_property' => 'identity',
'credential_property' => 'password',
'credential_callable' => 'Frontend\Admin\Doctrine\AdminAuthentication::verifyCredential',
'credential_callable' => 'Admin\Admin\Doctrine\AdminAuthentication::verifyCredential',
'messages' => [
'success' => 'Authenticated successfully.',
'not_found' => 'Identity not found.',
Expand Down
4 changes: 2 additions & 2 deletions config/autoload/dependencies.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

declare(strict_types=1);

use Admin\App\Factory\AuthMiddlewareFactory;
use Admin\App\Middleware\AuthMiddleware;
use Dot\Authorization\AuthorizationInterface;
use Dot\ErrorHandler\ErrorHandlerInterface;
use Dot\ErrorHandler\LogErrorHandler;
use Dot\Mail\Factory\MailOptionsAbstractFactory;
use Dot\Mail\Factory\MailServiceAbstractFactory;
use Dot\Mail\Service\MailService;
use Dot\Rbac\Authorization\AuthorizationService;
use Frontend\App\Factory\AuthMiddlewareFactory;
use Frontend\App\Middleware\AuthMiddleware;

return [
// Provides application-wide services.
Expand Down
2 changes: 1 addition & 1 deletion config/autoload/doctrine.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

use Admin\App\Resolver\EntityListenerResolver;
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
use Dot\Cache\Adapter\ArrayAdapter;
use Dot\Cache\Adapter\FilesystemAdapter;
use Frontend\App\Resolver\EntityListenerResolver;
use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType;
use Ramsey\Uuid\Doctrine\UuidBinaryType;
use Ramsey\Uuid\Doctrine\UuidType;
Expand Down
2 changes: 1 addition & 1 deletion config/autoload/local.test.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

use FrontendTest\Common\TestMode;
use AdminTest\Common\TestMode;

if (! TestMode::isEnabled()) {
return [];
Expand Down
6 changes: 3 additions & 3 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
new ArrayProvider($cacheConfig),

// DotKernel modules
Frontend\App\ConfigProvider::class,
Frontend\Admin\ConfigProvider::class,
Frontend\Setting\ConfigProvider::class,
Admin\App\ConfigProvider::class,
Admin\Admin\ConfigProvider::class,
Admin\Setting\ConfigProvider::class,

// Load application config in a pre-defined order in such a way that local settings
// overwrite global settings. (Loaded as first to last):
Expand Down
2 changes: 1 addition & 1 deletion config/pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

use Admin\App\Middleware\AuthMiddleware;
use Dot\ErrorHandler\ErrorHandlerInterface;
use Dot\Navigation\NavigationMiddleware;
use Dot\Rbac\Guard\Middleware\ForbiddenHandler;
use Dot\Rbac\Guard\Middleware\RbacGuardMiddleware;
use Dot\Session\SessionMiddleware;
use Frontend\App\Middleware\AuthMiddleware;
use Mezzio\Application;
use Mezzio\Cors\Middleware\CorsMiddleware;
use Mezzio\Handler\NotFoundHandler;
Expand Down
4 changes: 2 additions & 2 deletions data/doctrine/fixtures/AdminLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Admin\Fixtures;

use Admin\Admin\Entity\Admin;
use Admin\Admin\Entity\AdminRole;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Frontend\Admin\Entity\Admin;
use Frontend\Admin\Entity\AdminRole;

use function password_hash;

Expand Down
2 changes: 1 addition & 1 deletion data/doctrine/fixtures/AdminRoleLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Admin\Fixtures;

use Admin\Admin\Entity\AdminRole;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Frontend\Admin\Entity\AdminRole;

class AdminRoleLoader implements FixtureInterface
{
Expand Down
8 changes: 4 additions & 4 deletions src/Admin/src/Adapter/AuthenticationAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

declare(strict_types=1);

namespace Frontend\Admin\Adapter;
namespace Admin\Admin\Adapter;

use Admin\Admin\Entity\Admin;
use Admin\Admin\Entity\AdminIdentity;
use Admin\Admin\Entity\AdminRole;
use Doctrine\ORM\EntityManager;
use Dot\DependencyInjection\Attribute\Inject;
use Exception;
use Frontend\Admin\Entity\Admin;
use Frontend\Admin\Entity\AdminIdentity;
use Frontend\Admin\Entity\AdminRole;
use Laminas\Authentication\Adapter\AdapterInterface;
use Laminas\Authentication\Result;

Expand Down
32 changes: 16 additions & 16 deletions src/Admin/src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

declare(strict_types=1);

namespace Frontend\Admin;
namespace Admin\Admin;

use Admin\Admin\Adapter\AuthenticationAdapter;
use Admin\Admin\Controller\AdminController;
use Admin\Admin\Delegator\AdminRoleDelegator;
use Admin\Admin\Entity\Admin;
use Admin\Admin\Entity\AdminInterface;
use Admin\Admin\Factory\AuthenticationServiceFactory;
use Admin\Admin\Form\AdminDeleteForm;
use Admin\Admin\Form\AdminForm;
use Admin\Admin\Form\ChangePasswordForm;
use Admin\Admin\Form\LoginForm;
use Admin\Admin\Repository\AdminRepository;
use Admin\Admin\Repository\AdminRoleRepository;
use Admin\Admin\Service\AdminService;
use Admin\Admin\Service\AdminServiceInterface;
use Doctrine\ORM\Mapping\Driver\AttributeDriver;
use Dot\DependencyInjection\Factory\AttributedRepositoryFactory;
use Dot\DependencyInjection\Factory\AttributedServiceFactory;
use Frontend\Admin\Adapter\AuthenticationAdapter;
use Frontend\Admin\Controller\AdminController;
use Frontend\Admin\Delegator\AdminRoleDelegator;
use Frontend\Admin\Entity\Admin;
use Frontend\Admin\Entity\AdminInterface;
use Frontend\Admin\Factory\AuthenticationServiceFactory;
use Frontend\Admin\Form\AdminDeleteForm;
use Frontend\Admin\Form\AdminForm;
use Frontend\Admin\Form\ChangePasswordForm;
use Frontend\Admin\Form\LoginForm;
use Frontend\Admin\Repository\AdminRepository;
use Frontend\Admin\Repository\AdminRoleRepository;
use Frontend\Admin\Service\AdminService;
use Frontend\Admin\Service\AdminServiceInterface;
use Laminas\Authentication\AuthenticationService;
use Laminas\Form\ElementFactory;
use Mezzio\Application;
Expand Down Expand Up @@ -94,7 +94,7 @@ public function getDoctrineConfig(): array
'driver' => [
'orm_default' => [
'drivers' => [
'Frontend\Admin\Entity' => 'AdminEntities',
'Admin\Admin\Entity' => 'AdminEntities',
],
],
'AdminEntities' => [
Expand Down
36 changes: 18 additions & 18 deletions src/Admin/src/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@

declare(strict_types=1);

namespace Frontend\Admin\Controller;

namespace Admin\Admin\Controller;

use Admin\Admin\Adapter\AuthenticationAdapter;
use Admin\Admin\Entity\Admin;
use Admin\Admin\Entity\AdminIdentity;
use Admin\Admin\Entity\AdminLogin;
use Admin\Admin\Form\AccountForm;
use Admin\Admin\Form\AdminDeleteForm;
use Admin\Admin\Form\AdminForm;
use Admin\Admin\Form\ChangePasswordForm;
use Admin\Admin\Form\LoginForm;
use Admin\Admin\FormData\AdminFormData;
use Admin\Admin\InputFilter\EditAdminInputFilter;
use Admin\Admin\Service\AdminServiceInterface;
use Admin\App\Common\ServerRequestAwareTrait;
use Admin\App\Exception\IdentityException;
use Admin\App\Message;
use Admin\App\Plugin\FormsPlugin;
use Doctrine\ORM\NonUniqueResultException;
use Dot\Controller\AbstractActionController;
use Dot\DependencyInjection\Attribute\Inject;
use Dot\FlashMessenger\FlashMessengerInterface;
use Fig\Http\Message\RequestMethodInterface;
use Fig\Http\Message\StatusCodeInterface;
use Frontend\Admin\Adapter\AuthenticationAdapter;
use Frontend\Admin\Entity\Admin;
use Frontend\Admin\Entity\AdminIdentity;
use Frontend\Admin\Entity\AdminLogin;
use Frontend\Admin\Form\AccountForm;
use Frontend\Admin\Form\AdminDeleteForm;
use Frontend\Admin\Form\AdminForm;
use Frontend\Admin\Form\ChangePasswordForm;
use Frontend\Admin\Form\LoginForm;
use Frontend\Admin\FormData\AdminFormData;
use Frontend\Admin\InputFilter\EditAdminInputFilter;
use Frontend\Admin\Service\AdminServiceInterface;
use Frontend\App\Common\ServerRequestAwareTrait;
use Frontend\App\Exception\IdentityException;
use Frontend\App\Message;
use Frontend\App\Plugin\FormsPlugin;
use Laminas\Authentication\AuthenticationServiceInterface;
use Laminas\Authentication\Exception\ExceptionInterface;
use Laminas\Diactoros\Response\HtmlResponse;
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/src/Delegator/AdminRoleDelegator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Frontend\Admin\Delegator;
namespace Admin\Admin\Delegator;

use Frontend\Admin\Form\AdminForm;
use Frontend\Admin\Service\AdminService;
use Admin\Admin\Form\AdminForm;
use Admin\Admin\Service\AdminService;
use Laminas\ServiceManager\Factory\DelegatorFactoryInterface;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
Expand Down
10 changes: 5 additions & 5 deletions src/Admin/src/Entity/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

declare(strict_types=1);

namespace Frontend\Admin\Entity;
namespace Admin\Admin\Entity;

use Admin\Admin\Repository\AdminRepository;
use Admin\App\Entity\AbstractEntity;
use Admin\App\Entity\TimestampsTrait;
use Admin\Setting\Entity\Setting;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Frontend\Admin\Repository\AdminRepository;
use Frontend\App\Entity\AbstractEntity;
use Frontend\App\Entity\TimestampsTrait;
use Frontend\Setting\Entity\Setting;

use function array_map;
use function password_verify;
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/src/Entity/AdminIdentity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Frontend\Admin\Entity;
namespace Admin\Admin\Entity;

use Mezzio\Authentication\UserInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Admin/src/Entity/AdminInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Frontend\Admin\Entity;
namespace Admin\Admin\Entity;

use Doctrine\Common\Collections\ArrayCollection;

Expand Down
8 changes: 4 additions & 4 deletions src/Admin/src/Entity/AdminLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace Frontend\Admin\Entity;
namespace Admin\Admin\Entity;

use Admin\Admin\Repository\AdminLoginRepository;
use Admin\App\Entity\AbstractEntity;
use Admin\App\Entity\TimestampsTrait;
use Doctrine\ORM\Mapping as ORM;
use Frontend\Admin\Repository\AdminLoginRepository;
use Frontend\App\Entity\AbstractEntity;
use Frontend\App\Entity\TimestampsTrait;

#[ORM\Entity(repositoryClass: AdminLoginRepository::class)]
#[ORM\Table(name: 'admin_login')]
Expand Down
8 changes: 4 additions & 4 deletions src/Admin/src/Entity/AdminRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace Frontend\Admin\Entity;
namespace Admin\Admin\Entity;

use Admin\Admin\Repository\AdminRoleRepository;
use Admin\App\Entity\AbstractEntity;
use Admin\App\Entity\TimestampsTrait;
use Doctrine\ORM\Mapping as ORM;
use Frontend\Admin\Repository\AdminRoleRepository;
use Frontend\App\Entity\AbstractEntity;
use Frontend\App\Entity\TimestampsTrait;

#[ORM\Entity(repositoryClass: AdminRoleRepository::class)]
#[ORM\Table(name: 'admin_role')]
Expand Down
4 changes: 2 additions & 2 deletions src/Admin/src/Factory/AuthenticationServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Frontend\Admin\Factory;
namespace Admin\Admin\Factory;

use Frontend\Admin\Adapter\AuthenticationAdapter;
use Admin\Admin\Adapter\AuthenticationAdapter;
use Laminas\Authentication\AuthenticationService;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
Expand Down
4 changes: 2 additions & 2 deletions src/Admin/src/Form/AccountForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Frontend\Admin\Form;
namespace Admin\Admin\Form;

use Frontend\Admin\InputFilter\AccountInputFilter;
use Admin\Admin\InputFilter\AccountInputFilter;
use Laminas\Form\Element\Csrf;
use Laminas\Form\Form;
use Laminas\Form\FormInterface;
Expand Down
4 changes: 2 additions & 2 deletions src/Admin/src/Form/AdminDeleteForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Frontend\Admin\Form;
namespace Admin\Admin\Form;

use Frontend\Admin\InputFilter\AdminDeleteInputFilter;
use Admin\Admin\InputFilter\AdminDeleteInputFilter;
use Laminas\Form\Element\Csrf;
use Laminas\Form\Form;
use Laminas\Form\FormInterface;
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/src/Form/AdminForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Frontend\Admin\Form;
namespace Admin\Admin\Form;

use Frontend\Admin\Entity\Admin;
use Frontend\Admin\InputFilter\AdminInputFilter;
use Admin\Admin\Entity\Admin;
use Admin\Admin\InputFilter\AdminInputFilter;
use Laminas\Form\Element\Csrf;
use Laminas\Form\Form;
use Laminas\Form\FormInterface;
Expand Down
4 changes: 2 additions & 2 deletions src/Admin/src/Form/ChangePasswordForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Frontend\Admin\Form;
namespace Admin\Admin\Form;

use Frontend\Admin\InputFilter\ChangePasswordInputFilter;
use Admin\Admin\InputFilter\ChangePasswordInputFilter;
use Laminas\Form\Element\Csrf;
use Laminas\Form\Form;
use Laminas\Form\FormInterface;
Expand Down
Loading