first bee version

This commit is contained in:
Flo 2024-08-24 21:02:48 +00:00
parent 3d60d4b9dc
commit a2d3200f5f
173 changed files with 594 additions and 567 deletions

View File

@ -1,10 +1,10 @@
# DB Configuration
DB_DRIVER=pdo_mysql
DB_HOST=template-backend-mysql
DB_HOST=bee-backend-mysql
DB_PORT=3306
DB_USER=template
DB_USER=bee
DB_PASSWORD=pass
DB_NAME=template
DB_NAME=bee
DB_NAME_LOG=log
# API Keys
@ -14,7 +14,7 @@ FILE_API_KEY=
HOMEPAGE_API_KEY=
BEE_API_KEY=
# Template Setup
# Bee Setup
INIT_USER_NAME=admin
INIT_USER_PASSWORD=password
INIT_USER_MAIL=admin@test.com

View File

@ -1,6 +1,6 @@
<?php
use Template\Infrastructure\Logging\Logger\Logger;
use Bee\Infrastructure\Logging\Logger\Logger;
use Symfony\Component\Console\Application;
require_once __DIR__ . '/../config/autoload/defines.php';

View File

@ -7,7 +7,7 @@ if (count($argv) !== 6) {
}
$projectSourceDirectory = 'src/';
$projectNamespace = 'Template';
$projectNamespace = 'Bee';
$apiType = strtolower($argv[1]) === 'true' ? 'External' : 'Internal';
$apiNamespace = $argv[2];

View File

@ -7,7 +7,7 @@ if (count($argv) < 4) {
}
$projectSourceDirectory = 'src/';
$projectNamespace = 'Template';
$projectNamespace = 'Bee';
$pipelineNamespace = $argv[1];
$pipelineName = $argv[2];

View File

@ -3,7 +3,7 @@
require_once __DIR__ . '/../config/autoload/defines.php';
require APP_ROOT . '/vendor/autoload.php';
use Template\Data\Business\Manager\EntityManager;
use Bee\Data\Business\Manager\EntityManager;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\DBAL\DriverManager;
use Doctrine\Migrations\Configuration\Configuration;

View File

@ -3,7 +3,7 @@
require_once __DIR__ . '/../config/autoload/defines.php';
require APP_ROOT . '/vendor/autoload.php';
use Template\Data\Business\Manager\EntityManager;
use Bee\Data\Business\Manager\EntityManager;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\DBAL\DriverManager;
use Doctrine\Migrations\Configuration\Configuration;
@ -30,10 +30,10 @@ $isDevMode = true;
$container = require APP_ROOT . '/config/container.php';
$config = $container->get('config');
$doctrineConfig = $config['doctrine'];
$paths = $doctrineConfig['driver']['orm_template_annotation_driver']['paths'];
$paths = $doctrineConfig['driver']['orm_bee_annotation_driver']['paths'];
$dbParams = $doctrineConfig['connection']['orm_template']['params'];
$migrationsConf = $doctrineConfig['migrations_configuration']['orm_template'];
$dbParams = $doctrineConfig['connection']['orm_bee']['params'];
$migrationsConf = $doctrineConfig['migrations_configuration']['orm_bee'];
$reader = new AnnotationReader();
$driver = new AnnotationDriver($reader, $paths);

View File

@ -4,12 +4,33 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_DIR=$(realpath $SCRIPT_DIR/../../)
ENV_DIR=$(realpath $PROJECT_DIR/../../../)
EXIT=0
# Check .env file
if [ ! -f "$PROJECT_DIR/.env" ]
then
echo "Create .env file from example..."
cp "$PROJECT_DIR/.env.example" "$PROJECT_DIR/.env"
echo ".env file created, please change variables and call init again"
EXIT=1
fi
# Check docker-compose.yml file
if [ ! -f "$PROJECT_DIR/docker/docker-compose.yml" ]
then
cp "$PROJECT_DIR/docker/docker-compose.yml.dist" "$PROJECT_DIR/docker/docker-compose.yml"
EXIT=1
fi
# Check docker-compose-mac.yml file
if [ ! -f "$PROJECT_DIR/docker/docker-compose-mac.yml" ]
then
cp "$PROJECT_DIR/docker/docker-compose-mac.yml.dist" "$PROJECT_DIR/docker/docker-compose-mac.yml"
EXIT=1
fi
if [ $EXIT -eq 1 ]
then
echo "docker-compose or env files created, please change variables and call init again"
exit 1
fi
@ -18,19 +39,19 @@ source $ENV_DIR/bin/drun
source $ENV_DIR/bin/dexec
# Build and start docker containers
dexec template-backend build
dexec template-backend up -d
dexec bee-backend build
dexec bee-backend up -d
# Install PHP packages
drun template-backend composer install
drun bee-backend composer install
# Dump autoload
drun template-backend composer da
drun bee-backend composer da
# Migrate databases to current version
drun template-backend composer dmm
drun template-backend composer dmlm
drun bee-backend composer dmm
drun bee-backend composer dmlm
# Insert setup for project after this line
drun template-backend composer console rbac:update
drun template-backend composer console init:data
drun bee-backend composer console rbac:update
drun bee-backend composer console init:data

View File

@ -23,25 +23,25 @@
},
"autoload": {
"psr-4": {
"Template\\API\\Console\\": "src/ApiDomain/Console/src/"
"Bee\\API\\Console\\": "src/ApiDomain/Console/src/"
}
},
"extra": {
"teewurst/psr4-advanced-wildcard-composer-plugin": {
"autoload": {
"psr-4": {
"Template\\API\\%s\\%s\\": "src/ApiDomain/{*}/{*}/src/",
"Template\\Data\\%s\\": "src/DataDomain/{*}/src/",
"Template\\Handling\\%s\\": "src/HandlingDomain/{*}/src/",
"Template\\Infrastructure\\%s\\": "src/Infrastructure/{*}/src/"
"Bee\\API\\%s\\%s\\": "src/ApiDomain/{*}/{*}/src/",
"Bee\\Data\\%s\\": "src/DataDomain/{*}/src/",
"Bee\\Handling\\%s\\": "src/HandlingDomain/{*}/src/",
"Bee\\Infrastructure\\%s\\": "src/Infrastructure/{*}/src/"
}
},
"autoload-dev": {
"psr-4": {
"Template\\API\\%s\\%s\\": "src/ApiDomain/{*}/{*}/src/",
"Template\\Data\\%s\\": "src/DataDomain/{*}/src/",
"Template\\Handling\\%s\\": "src/HandlingDomain/{*}/src/",
"Template\\Infrastructure\\%s\\": "src/Infrastructure/{*}/src/"
"Bee\\API\\%s\\%s\\": "src/ApiDomain/{*}/{*}/src/",
"Bee\\Data\\%s\\": "src/DataDomain/{*}/src/",
"Bee\\Handling\\%s\\": "src/HandlingDomain/{*}/src/",
"Bee\\Infrastructure\\%s\\": "src/Infrastructure/{*}/src/"
}
}
}

View File

@ -3,13 +3,13 @@
return [
'api' => [
'keys' => [
'template' => $_ENV['HOMEPAGE_API_KEY'],
'bee' => $_ENV['HOMEPAGE_API_KEY'],
'notification' => $_ENV['NOTIFICATION_API_KEY'],
],
'services' => [
'template' => [
'host' => 'template-backend-nginx',
'bee' => [
'host' => 'bee-backend-nginx',
'apis' => [
]

View File

@ -1,7 +1,7 @@
<?php
return [
'template-rbac' => [
'bee-rbac' => [
'roles' => [
'admin',
'user',

View File

@ -6,8 +6,8 @@ use Monolog\Level;
return [
'logger' => [
'name' => 'template.backend',
'path' => APP_ROOT . '/var/log/template.backend.log',
'name' => 'bee.backend',
'path' => APP_ROOT . '/var/log/bee.backend.log',
'level' => Level::Debug,
'pretty' => true,
]

View File

@ -11,14 +11,14 @@ return [
// `composer clear-config-cache`.
ConfigAggregator::ENABLE_CACHE => false,
// Enable debugging; typically used to provide debugging information within templates.
// Enable debugging; typically used to provide debugging information within bees.
'debug' => false,
'mezzio' => [
// Provide templates for the error handling middleware to use when
// Provide bees for the error handling middleware to use when
// generating responses.
'error_handler' => [
'template_404' => 'error::404',
'template_error' => 'error::error',
'bee_404' => 'error::404',
'bee_error' => 'error::error',
],
],
];

View File

@ -40,32 +40,32 @@ $aggregator = new ConfigAggregator([
// Data
\Template\Data\Business\ConfigProvider::class,
\Template\Data\Log\ConfigProvider::class,
\Bee\Data\Business\ConfigProvider::class,
\Bee\Data\Log\ConfigProvider::class,
// Infrastructure
\Template\Infrastructure\Database\ConfigProvider::class,
\Template\Infrastructure\DependencyInjection\ConfigProvider::class,
\Template\Infrastructure\Encryption\ConfigProvider::class,
\Template\Infrastructure\Exception\ConfigProvider::class,
\Template\Infrastructure\Logging\ConfigProvider::class,
\Template\Infrastructure\Rbac\ConfigProvider::class,
\Template\Infrastructure\Request\ConfigProvider::class,
\Template\Infrastructure\Session\ConfigProvider::class,
\Bee\Infrastructure\Database\ConfigProvider::class,
\Bee\Infrastructure\DependencyInjection\ConfigProvider::class,
\Bee\Infrastructure\Encryption\ConfigProvider::class,
\Bee\Infrastructure\Exception\ConfigProvider::class,
\Bee\Infrastructure\Logging\ConfigProvider::class,
\Bee\Infrastructure\Rbac\ConfigProvider::class,
\Bee\Infrastructure\Request\ConfigProvider::class,
\Bee\Infrastructure\Session\ConfigProvider::class,
// HandlingDomain
\Template\Handling\User\ConfigProvider::class,
\Template\Handling\UserSession\ConfigProvider::class,
\Template\Handling\Registration\ConfigProvider::class,
\Bee\Handling\User\ConfigProvider::class,
\Bee\Handling\UserSession\ConfigProvider::class,
\Bee\Handling\Registration\ConfigProvider::class,
// API
/// Command
\Template\API\Console\ConfigProvider::class,
\Bee\API\Console\ConfigProvider::class,
/// External
\Template\API\External\Health\ConfigProvider::class,
\Template\API\External\User\ConfigProvider::class,
\Template\API\External\Authentication\ConfigProvider::class,
\Bee\API\External\Health\ConfigProvider::class,
\Bee\API\External\User\ConfigProvider::class,
\Bee\API\External\Authentication\ConfigProvider::class,
/// Internal

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
use Template\Infrastructure\Exception\Middleware\ExceptionHandlerMiddleware;
use Template\Infrastructure\Request\Middleware\AnalyzeBodyMiddleware;
use Template\Infrastructure\Request\Middleware\AnalyzeHeaderMiddleware;
use Template\Infrastructure\Session\Middleware\SessionMiddleware;
use Bee\Infrastructure\Exception\Middleware\ExceptionHandlerMiddleware;
use Bee\Infrastructure\Request\Middleware\AnalyzeBodyMiddleware;
use Bee\Infrastructure\Request\Middleware\AnalyzeHeaderMiddleware;
use Bee\Infrastructure\Session\Middleware\SessionMiddleware;
use Laminas\Stratigility\Middleware\ErrorHandler;
use Mezzio\Application;
use Mezzio\Handler\NotFoundHandler;
@ -67,12 +67,12 @@ return function (Application $app, MiddlewareFactory $factory, ContainerInterfac
//// Pre Template Space
//// Pre Bee Space
$app->pipe(ExceptionHandlerMiddleware::class);
$app->pipe(AnalyzeHeaderMiddleware::class);
$app->pipe(AnalyzeBodyMiddleware::class);
//// Template Space
//// Bee Space
$app->pipe(SessionMiddleware::class);

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
use Mezzio\Application;
use Mezzio\MiddlewareFactory;
use Psr\Container\ContainerInterface;
use Template\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Bee\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
/**
* laminas-router route configuration

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Migrations\Template;
namespace Bee\Migrations\Bee;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Migrations\Template;
namespace Bee\Migrations\Bee;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Migrations\Template;
namespace Bee\Migrations\Bee;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Migrations\Template;
namespace Bee\Migrations\Bee;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Migrations\Template;
namespace Bee\Migrations\Bee;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Migrations\Template;
namespace Bee\Migrations\Bee;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Migrations\Log;
namespace Bee\Migrations\Log;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

2
docker/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
docker-compose.yml
docker-compose-mac.yml

View File

@ -1,17 +1,17 @@
networks:
template:
bee:
external: true
services:
template-backend-mysql:
image: template-backend-mysql
bee-backend-mysql:
image: bee-backend-mysql
networks:
- template
- bee
build:
context: ./../
dockerfile: ./docker/mysql/dockerfile
volumes:
- /Users/flo/dev/backend/template/var/db:/var/lib/mysql:z
- /Users/flo/dev/backend/bee/var/db:/var/lib/mysql:z
environment:
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
@ -22,29 +22,31 @@ services:
timeout: 20s
retries: 10
template-backend-app:
image: template-backend-app
bee-backend-app:
image: bee-backend-app
networks:
- template
- bee
build:
context: ./../
dockerfile: ./docker/php/dockerfile
volumes:
- /Users/flo/dev/backend/template/:/var/www/html:z
- /Users/flo/dev/backend/bee/:/var/www/html:z
ports:
- 9000:9000
depends_on:
template-backend-mysql:
bee-backend-mysql:
condition: service_healthy
template-backend-nginx:
image: template-backend-nginx
bee-backend-nginx:
image: bee-backend-nginx
networks:
- template
- bee
build:
context: ./../
dockerfile: ./docker/nginx/dockerfile
ports:
- 8080:80
labels:
- "traefik.http.routers.backend.rule=Host(`bee.local`) && PathPrefix(`/api`)"
- "traefik.http.routers.backend.entrypoints=websecure"
- "traefik.http.routers.backend.tls.certresolver=le"
depends_on:
- template-backend-app
- bee-backend-app

View File

@ -1,12 +1,12 @@
networks:
template:
bee:
external: true
services:
template-backend-mysql:
image: template-backend-mysql
bee-backend-mysql:
image: bee-backend-mysql
networks:
- template
- bee
build:
context: ./../
dockerfile: ./docker/mysql/dockerfile
@ -22,10 +22,10 @@ services:
timeout: 20s
retries: 10
template-backend-app:
image: template-backend-app
bee-backend-app:
image: bee-backend-app
networks:
- template
- bee
build:
context: ./../
dockerfile: ./docker/php/dockerfile
@ -34,17 +34,19 @@ services:
ports:
- 9000:9000
depends_on:
template-backend-mysql:
bee-backend-mysql:
condition: service_healthy
template-backend-nginx:
image: template-backend-nginx
bee-backend-nginx:
image: bee-backend-nginx
networks:
- template
- bee
build:
context: ./../
dockerfile: ./docker/nginx/dockerfile
ports:
- 8080:80
labels:
- "traefik.http.routers.backend.rule=Host(`bee.local`) && PathPrefix(`/api`)"
- "traefik.http.routers.backend.entrypoints=websecure"
- "traefik.http.routers.backend.tls.certresolver=le"
depends_on:
- template-backend-app
- bee-backend-app

View File

@ -1,4 +1,4 @@
CREATE DATABASE IF NOT EXISTS `log`;
CREATE DATABASE IF NOT EXISTS `template`;
CREATE DATABASE IF NOT EXISTS `bee`;
GRANT ALL PRIVILEGES on *.* to 'template'@'%';
GRANT ALL PRIVILEGES on *.* to 'bee'@'%';

View File

@ -1,5 +1,5 @@
upstream host-backend-app {
server template-backend-app:9000;
server bee-backend-app:9000;
}
server {

View File

@ -1,7 +1,7 @@
<?php
use Template\API\Console\Command\InitializeDataCommand;
use Template\API\Console\Command\RbacUpdateCommand;
use Bee\API\Console\Command\InitializeDataCommand;
use Bee\API\Console\Command\RbacUpdateCommand;
return [
'commands' => [

View File

@ -1,7 +1,7 @@
<?php
use Template\API\Console\Command\InitializeDataCommand;
use Template\API\Console\Command\RbacUpdateCommand;
use Bee\API\Console\Command\InitializeDataCommand;
use Bee\API\Console\Command\RbacUpdateCommand;
use Reinfi\DependencyInjection\Factory\AutoWiringFactory;
return [

View File

@ -1,14 +1,14 @@
<?php
namespace Template\API\Console\Command;
namespace Bee\API\Console\Command;
use Template\Data\Business\Entity\Role;
use Template\Data\Business\Entity\User;
use Template\Data\Business\Repository\RoleRepository;
use Template\Data\Business\Repository\UserRepository;
use Template\Data\Business\Manager\EntityManager;
use Template\Infrastructure\Encryption\Client\EncryptionClient;
use Template\Infrastructure\Logging\Logger\Logger;
use Bee\Data\Business\Entity\Role;
use Bee\Data\Business\Entity\User;
use Bee\Data\Business\Repository\RoleRepository;
use Bee\Data\Business\Repository\UserRepository;
use Bee\Data\Business\Manager\EntityManager;
use Bee\Infrastructure\Encryption\Client\EncryptionClient;
use Bee\Infrastructure\Logging\Logger\Logger;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;

View File

@ -1,13 +1,13 @@
<?php
namespace Template\API\Console\Command;
namespace Bee\API\Console\Command;
use Template\Data\Business\Entity\Permission;
use Template\Data\Business\Entity\Role;
use Template\Data\Business\Repository\PermissionRepository;
use Template\Data\Business\Repository\RoleRepository;
use Template\Data\Business\Manager\EntityManager;
use Template\Infrastructure\Logging\Logger\Logger;
use Bee\Data\Business\Entity\Permission;
use Bee\Data\Business\Entity\Role;
use Bee\Data\Business\Repository\PermissionRepository;
use Bee\Data\Business\Repository\RoleRepository;
use Bee\Data\Business\Manager\EntityManager;
use Bee\Infrastructure\Logging\Logger\Logger;
use Reinfi\DependencyInjection\Service\ConfigService;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
@ -32,7 +32,7 @@ class RbacUpdateCommand extends Command
$this->roleRepository = $this->entityManager->getRepository(Role::class);
$this->permissionRepository = $this->entityManager->getRepository(Permission::class);
$this->rbacConfig = $this->configService->resolve('template-rbac')->toArray();
$this->rbacConfig = $this->configService->resolve('bee-rbac')->toArray();
}
protected function execute(

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\API\Console;
namespace Bee\API\Console;
class ConfigProvider
{

View File

@ -1,10 +1,10 @@
<?php
use Template\API\External\Authentication\Handler\ConfirmRegistrationHandler;
use Template\API\External\Authentication\Handler\LoginUserHandler;
use Template\API\External\Authentication\Handler\LogoutUserHandler;
use Template\API\External\Authentication\Handler\RegisterUserHandler;
use Template\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Bee\API\External\Authentication\Handler\ConfirmRegistrationHandler;
use Bee\API\External\Authentication\Handler\LoginUserHandler;
use Bee\API\External\Authentication\Handler\LogoutUserHandler;
use Bee\API\External\Authentication\Handler\RegisterUserHandler;
use Bee\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
return [
[

View File

@ -1,9 +1,9 @@
<?php
use Template\API\External\Authentication\Handler\ConfirmRegistrationHandler;
use Template\API\External\Authentication\Handler\LoginUserHandler;
use Template\API\External\Authentication\Handler\LogoutUserHandler;
use Template\API\External\Authentication\Handler\RegisterUserHandler;
use Bee\API\External\Authentication\Handler\ConfirmRegistrationHandler;
use Bee\API\External\Authentication\Handler\LoginUserHandler;
use Bee\API\External\Authentication\Handler\LogoutUserHandler;
use Bee\API\External\Authentication\Handler\RegisterUserHandler;
use Reinfi\DependencyInjection\Factory\AutoWiringFactory;
return [

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\API\External\Authentication;
namespace Bee\API\External\Authentication;
class ConfigProvider
{

View File

@ -2,12 +2,12 @@
declare(strict_types=1);
namespace Template\API\External\Authentication\Handler;
namespace Bee\API\External\Authentication\Handler;
use Template\API\External\User\Formatter\UserFormatter;
use Template\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandBuilder;
use Template\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandHandler;
use Template\Infrastructure\Session\Middleware\SessionMiddleware;
use Bee\API\External\User\Formatter\UserFormatter;
use Bee\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandBuilder;
use Bee\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandHandler;
use Bee\Infrastructure\Session\Middleware\SessionMiddleware;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

View File

@ -2,11 +2,11 @@
declare(strict_types=1);
namespace Template\API\External\Authentication\Handler;
namespace Bee\API\External\Authentication\Handler;
use Template\Handling\UserSession\Handler\Command\LoginUser\LoginUserCommandBuilder;
use Template\Handling\UserSession\Handler\Command\LoginUser\LoginUserCommandHandler;
use Template\Infrastructure\Session\Middleware\SessionMiddleware;
use Bee\Handling\UserSession\Handler\Command\LoginUser\LoginUserCommandBuilder;
use Bee\Handling\UserSession\Handler\Command\LoginUser\LoginUserCommandHandler;
use Bee\Infrastructure\Session\Middleware\SessionMiddleware;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

View File

@ -2,12 +2,12 @@
declare(strict_types=1);
namespace Template\API\External\Authentication\Handler;
namespace Bee\API\External\Authentication\Handler;
use Template\Handling\UserSession\Handler\Command\LogoutUser\LogoutUserCommandBuilder;
use Template\Handling\UserSession\Handler\Command\LogoutUser\LogoutUserCommandHandler;
use Template\Infrastructure\Response\SuccessResponse;
use Template\Infrastructure\Session\Middleware\SessionMiddleware;
use Bee\Handling\UserSession\Handler\Command\LogoutUser\LogoutUserCommandBuilder;
use Bee\Handling\UserSession\Handler\Command\LogoutUser\LogoutUserCommandHandler;
use Bee\Infrastructure\Response\SuccessResponse;
use Bee\Infrastructure\Session\Middleware\SessionMiddleware;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

View File

@ -2,16 +2,16 @@
declare(strict_types=1);
namespace Template\API\External\Authentication\Handler;
namespace Bee\API\External\Authentication\Handler;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Template\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandBuilder;
use Template\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandHandler;
use Template\Infrastructure\Logging\Logger\Logger;
use Template\Infrastructure\Request\Middleware\AnalyzeHeaderMiddleware;
use Template\Infrastructure\Response\SuccessResponse;
use Bee\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandBuilder;
use Bee\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandHandler;
use Bee\Infrastructure\Logging\Logger\Logger;
use Bee\Infrastructure\Request\Middleware\AnalyzeHeaderMiddleware;
use Bee\Infrastructure\Response\SuccessResponse;
class RegisterUserHandler implements RequestHandlerInterface
{

View File

@ -1,6 +1,6 @@
<?php
use Template\API\External\Health\Handler\HealthHandler;
use Bee\API\External\Health\Handler\HealthHandler;
return [
[

View File

@ -1,6 +1,6 @@
<?php
use Template\API\External\Health\Handler\HealthHandler;
use Bee\API\External\Health\Handler\HealthHandler;
use Reinfi\DependencyInjection\Factory\AutoWiringFactory;
return [

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\API\External\Health;
namespace Bee\API\External\Health;
class ConfigProvider
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\API\External\Health\Handler;
namespace Bee\API\External\Health\Handler;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;

View File

@ -1,11 +1,11 @@
<?php
use Template\API\External\User\Handler\ChangePasswordHandler;
use Template\API\External\User\Handler\ChangeUsernameHandler;
use Template\API\External\User\Handler\CreateUserHandler;
use Template\API\External\User\Handler\UserStateHandler;
use Template\Infrastructure\Rbac\Middleware\EnsureAuthorizationMiddleware;
use Template\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Bee\API\External\User\Handler\ChangePasswordHandler;
use Bee\API\External\User\Handler\ChangeUsernameHandler;
use Bee\API\External\User\Handler\CreateUserHandler;
use Bee\API\External\User\Handler\UserStateHandler;
use Bee\Infrastructure\Rbac\Middleware\EnsureAuthorizationMiddleware;
use Bee\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
return [
[

View File

@ -1,10 +1,10 @@
<?php
use Template\API\External\User\Formatter\UserFormatter;
use Template\API\External\User\Handler\ChangePasswordHandler;
use Template\API\External\User\Handler\ChangeUsernameHandler;
use Template\API\External\User\Handler\CreateUserHandler;
use Template\API\External\User\Handler\UserStateHandler;
use Bee\API\External\User\Formatter\UserFormatter;
use Bee\API\External\User\Handler\ChangePasswordHandler;
use Bee\API\External\User\Handler\ChangeUsernameHandler;
use Bee\API\External\User\Handler\CreateUserHandler;
use Bee\API\External\User\Handler\UserStateHandler;
use Reinfi\DependencyInjection\Factory\AutoWiringFactory;
return [

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\API\External\User;
namespace Bee\API\External\User;
class ConfigProvider
{

View File

@ -1,9 +1,9 @@
<?php
namespace Template\API\External\User\Formatter;
namespace Bee\API\External\User\Formatter;
use DateTime;
use Template\Data\Business\Entity\User;
use Bee\Data\Business\Entity\User;
class UserFormatter {

View File

@ -2,13 +2,13 @@
declare(strict_types=1);
namespace Template\API\External\User\Handler;
namespace Bee\API\External\User\Handler;
use Template\Data\Business\Entity\User;
use Template\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandBuilder;
use Template\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandHandler;
use Template\Infrastructure\Response\SuccessResponse;
use Template\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Bee\Data\Business\Entity\User;
use Bee\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandBuilder;
use Bee\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandHandler;
use Bee\Infrastructure\Response\SuccessResponse;
use Bee\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;

View File

@ -2,13 +2,13 @@
declare(strict_types=1);
namespace Template\API\External\User\Handler;
namespace Bee\API\External\User\Handler;
use Template\Data\Business\Entity\User;
use Template\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandBuilder;
use Template\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandHandler;
use Template\Infrastructure\Response\SuccessResponse;
use Template\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Bee\Data\Business\Entity\User;
use Bee\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandBuilder;
use Bee\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandHandler;
use Bee\Infrastructure\Response\SuccessResponse;
use Bee\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;

View File

@ -2,11 +2,11 @@
declare(strict_types=1);
namespace Template\API\External\User\Handler;
namespace Bee\API\External\User\Handler;
use Template\API\External\User\Formatter\UserFormatter;
use Template\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Template\Handling\User\Handler\Command\CreateUser\CreateUserCommandHandler;
use Bee\API\External\User\Formatter\UserFormatter;
use Bee\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Bee\Handling\User\Handler\Command\CreateUser\CreateUserCommandHandler;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

View File

@ -2,13 +2,13 @@
declare(strict_types=1);
namespace Template\API\External\User\Handler;
namespace Bee\API\External\User\Handler;
use Template\API\External\User\Formatter\UserFormatter;
use Template\Data\Business\Entity\User;
use Template\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Template\Handling\User\Handler\Command\CreateUser\ChangePasswordCommandHandler;
use Template\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Bee\API\External\User\Formatter\UserFormatter;
use Bee\Data\Business\Entity\User;
use Bee\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Bee\Handling\User\Handler\Command\CreateUser\ChangePasswordCommandHandler;
use Bee\Infrastructure\Session\Middleware\LoggedInUserMiddleware;
use Laminas\Diactoros\Response\JsonResponse;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

View File

@ -6,7 +6,7 @@ use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
return [
'configuration' => [
'orm_template' => [
'orm_bee' => [
'second_level_cache' => [
'enabled' => false,
]
@ -14,7 +14,7 @@ return [
],
'driver' => [
'orm_template_annotation_driver' => [
'orm_bee_annotation_driver' => [
'class' => AnnotationDriver::class,
'cache' => 'array',
'paths' => [
@ -22,16 +22,16 @@ return [
],
],
'orm_template' => [
'orm_bee' => [
'class' => MappingDriverChain::class,
'drivers' => [
'Template\Data\Business\Entity' => 'orm_template_annotation_driver',
'Bee\Data\Business\Entity' => 'orm_bee_annotation_driver',
],
],
],
'connection' => [
'orm_template' => [
'orm_bee' => [
'driverClass' => Driver::class,
'params' => [
'driver' => $_ENV['DB_DRIVER'],
@ -45,10 +45,10 @@ return [
],
'migrations_configuration' => [
'orm_template' => [
'orm_bee' => [
'directory' => 'data/migrations/business',
'name' => 'Doctrine Database Migrations for Template',
'namespace' => 'Template\Migrations\Template',
'name' => 'Doctrine Database Migrations for Bee',
'namespace' => 'Bee\Migrations\Bee',
'table' => 'migrations',
],
],

View File

@ -1,19 +1,19 @@
<?php
use Template\Data\Business\Entity\User;
use Template\Data\Business\Factory\EntityManagerFactory;
use Template\Data\Business\Manager\EntityManager;
use Template\Data\Business\Repository\UserRepository;
use Template\Infrastructure\Database\AutowireRepositoryFactory;
use Bee\Data\Business\Entity\User;
use Bee\Data\Business\Factory\EntityManagerFactory;
use Bee\Data\Business\Manager\EntityManager;
use Bee\Data\Business\Repository\UserRepository;
use Bee\Infrastructure\Database\AutowireRepositoryFactory;
use Roave\PsrContainerDoctrine\ConfigurationFactory;
use Roave\PsrContainerDoctrine\ConnectionFactory;
use Roave\PsrContainerDoctrine\EntityManagerFactory as BaseEntityManagerFactory;
return [
'factories' => [
'doctrine.entity_manager.orm_template' => [BaseEntityManagerFactory::class, 'orm_template'],
'doctrine.configuration.orm_template' => [ConfigurationFactory::class, 'orm_template'],
'doctrine.connection.orm_template' => [ConnectionFactory::class, 'orm_template'],
'doctrine.entity_manager.orm_bee' => [BaseEntityManagerFactory::class, 'orm_bee'],
'doctrine.configuration.orm_bee' => [ConfigurationFactory::class, 'orm_bee'],
'doctrine.connection.orm_bee' => [ConnectionFactory::class, 'orm_bee'],
EntityManager::class => EntityManagerFactory::class,
UserRepository::class => [AutowireRepositoryFactory::class, EntityManager::class, User::class],

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Data\Business;
namespace Bee\Data\Business;
class ConfigProvider
{

View File

@ -1,15 +1,15 @@
<?php
namespace Template\Data\Business\Entity;
namespace Bee\Data\Business\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Template\Infrastructure\UuidGenerator\UuidGenerator;
use Bee\Infrastructure\UuidGenerator\UuidGenerator;
use Ramsey\Uuid\UuidInterface;
/**
* @ORM\Entity(repositoryClass="Template\Data\Business\Repository\PermissionRepository")
* @ORM\Entity(repositoryClass="Bee\Data\Business\Repository\PermissionRepository")
* @ORM\Table(name="permission")
*/
class Permission {
@ -23,7 +23,7 @@ class Permission {
private string $identifier;
/**
* @ORM\ManyToMany(targetEntity="Template\Data\Business\Entity\Role", inversedBy="permissions")
* @ORM\ManyToMany(targetEntity="Bee\Data\Business\Entity\Role", inversedBy="permissions")
* @ORM\JoinTable(
* name="role_permission",
* joinColumns={@ORM\JoinColumn(name="permission_id", referencedColumnName="id")},

View File

@ -1,14 +1,14 @@
<?php
namespace Template\Data\Business\Entity;
namespace Bee\Data\Business\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Template\Infrastructure\UuidGenerator\UuidGenerator;
use Bee\Infrastructure\UuidGenerator\UuidGenerator;
use Ramsey\Uuid\UuidInterface;
/**
* @ORM\Entity(repositoryClass="Template\Data\Business\Repository\RegistrationRepository")
* @ORM\Entity(repositoryClass="Bee\Data\Business\Repository\RegistrationRepository")
* @ORM\Table(name="registration")
*/
class Registration {

View File

@ -1,16 +1,16 @@
<?php
namespace Template\Data\Business\Entity;
namespace Bee\Data\Business\Entity;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Template\Infrastructure\UuidGenerator\UuidGenerator;
use Bee\Infrastructure\UuidGenerator\UuidGenerator;
use Ramsey\Uuid\UuidInterface;
/**
* @ORM\Entity(repositoryClass="Template\Data\Business\Repository\RoleRepository")
* @ORM\Entity(repositoryClass="Bee\Data\Business\Repository\RoleRepository")
* @ORM\Table(name="role")
*/
class Role {
@ -24,7 +24,7 @@ class Role {
private string $identifier;
/**
* @ORM\ManyToMany(targetEntity="Template\Data\Business\Entity\Permission", mappedBy="roles")
* @ORM\ManyToMany(targetEntity="Bee\Data\Business\Entity\Permission", mappedBy="roles")
* @ORM\JoinTable(
* name="role_permission",
* joinColumns={@ORM\JoinColumn(name="role_id", referencedColumnName="id")},

View File

@ -1,14 +1,14 @@
<?php
namespace Template\Data\Business\Entity;
namespace Bee\Data\Business\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Template\Infrastructure\UuidGenerator\UuidGenerator;
use Bee\Infrastructure\UuidGenerator\UuidGenerator;
use Ramsey\Uuid\UuidInterface;
/**
* @ORM\Entity(repositoryClass="Template\Data\Business\Repository\UserRepository")
* @ORM\Entity(repositoryClass="Bee\Data\Business\Repository\UserRepository")
* @ORM\Table(name="user")
*/
class User {
@ -22,7 +22,7 @@ class User {
private UuidInterface $roleId;
/**
* @ORM\OneToOne(targetEntity="Template\Data\Business\Entity\Role")
* @ORM\OneToOne(targetEntity="Bee\Data\Business\Entity\Role")
* @ORM\JoinColumn(name="role_id", referencedColumnName="id")
*/
private Role $role;
@ -36,7 +36,7 @@ class User {
/** @ORM\Column(name="password", type="string") */
private string $password;
/** @ORM\OneToOne(targetEntity="Template\Data\Business\Entity\UserSession", mappedBy="user") */
/** @ORM\OneToOne(targetEntity="Bee\Data\Business\Entity\UserSession", mappedBy="user") */
private ?UserSession $session;
/** @ORM\Column(name="last_login_at", type="datetime", nullable=true) */

View File

@ -1,14 +1,14 @@
<?php
namespace Template\Data\Business\Entity;
namespace Bee\Data\Business\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Template\Infrastructure\UuidGenerator\UuidGenerator;
use Bee\Infrastructure\UuidGenerator\UuidGenerator;
use Ramsey\Uuid\UuidInterface;
/**
* @ORM\Entity(repositoryClass="Template\Data\Business\Repository\UserSessionRepository")
* @ORM\Entity(repositoryClass="Bee\Data\Business\Repository\UserSessionRepository")
* @ORM\Table(name="user_session")
*/
class UserSession {
@ -22,7 +22,7 @@ class UserSession {
private ?UuidInterface $userId;
/**
* @ORM\OneToOne(targetEntity="Template\Data\Business\Entity\User", mappedBy="session")
* @ORM\OneToOne(targetEntity="Bee\Data\Business\Entity\User", mappedBy="session")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true)
*/
private ?User $user;

View File

@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Template\Data\Business\Factory;
namespace Bee\Data\Business\Factory;
use Template\Data\Business\Manager\EntityManager;
use Bee\Data\Business\Manager\EntityManager;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Psr\Container\ContainerInterface;
@ -13,7 +13,7 @@ class EntityManagerFactory implements FactoryInterface
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): EntityManager
{
return new EntityManager(
$container->get('doctrine.entity_manager.orm_template')
$container->get('doctrine.entity_manager.orm_bee')
);
}
}

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Data\Business\Manager;
namespace Bee\Data\Business\Manager;
use Doctrine\ORM\Decorator\EntityManagerDecorator;

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Data\Business\Repository;
namespace Bee\Data\Business\Repository;
use Doctrine\ORM\EntityRepository;

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Data\Business\Repository;
namespace Bee\Data\Business\Repository;
use Doctrine\ORM\EntityRepository;

View File

@ -1,8 +1,8 @@
<?php
namespace Template\Data\Business\Repository;
namespace Bee\Data\Business\Repository;
use Template\Data\Business\Entity\Registration;
use Bee\Data\Business\Entity\Registration;
use Doctrine\ORM\EntityRepository;
class RegistrationRepository extends EntityRepository {

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Data\Business\Repository;
namespace Bee\Data\Business\Repository;
use Doctrine\ORM\EntityRepository;

View File

@ -1,8 +1,8 @@
<?php
namespace Template\Data\Business\Repository;
namespace Bee\Data\Business\Repository;
use Template\Data\Business\Entity\User;
use Bee\Data\Business\Entity\User;
use Doctrine\ORM\EntityRepository;
class UserRepository extends EntityRepository {

View File

@ -1,10 +1,10 @@
<?php
namespace Template\Data\Business\Repository;
namespace Bee\Data\Business\Repository;
use Template\Data\Business\Entity\User;
use Bee\Data\Business\Entity\User;
use Doctrine\ORM\EntityRepository;
use Template\Data\Business\Entity\UserSession;
use Bee\Data\Business\Entity\UserSession;
class UserSessionRepository extends EntityRepository {
public function findByUser(User $user) : ?UserSession {

View File

@ -25,7 +25,7 @@ return [
'orm_log' => [
'class' => MappingDriverChain::class,
'drivers' => [
'Template\Data\Log\Entity' => 'orm_log_annotation_driver',
'Bee\Data\Log\Entity' => 'orm_log_annotation_driver',
],
],
],
@ -48,7 +48,7 @@ return [
'orm_log' => [
'directory' => 'data/migrations/log',
'name' => 'Doctrine Database Migrations for Log',
'namespace' => 'Template\Migrations\Log',
'namespace' => 'Bee\Migrations\Log',
'table' => 'migrations',
],
],

View File

@ -1,7 +1,7 @@
<?php
use Template\Data\Log\Factory\LogEntityManagerFactory;
use Template\Data\Log\Manager\LogEntityManager;
use Bee\Data\Log\Factory\LogEntityManagerFactory;
use Bee\Data\Log\Manager\LogEntityManager;
use Roave\PsrContainerDoctrine\ConfigurationFactory;
use Roave\PsrContainerDoctrine\ConnectionFactory;
use Roave\PsrContainerDoctrine\EntityManagerFactory;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Data\Log;
namespace Bee\Data\Log;
class ConfigProvider
{

View File

@ -1,15 +1,15 @@
<?php
namespace Template\Data\Log\Entity;
namespace Bee\Data\Log\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Template\Infrastructure\UuidGenerator\UuidGenerator;
use Bee\Infrastructure\UuidGenerator\UuidGenerator;
use Ramsey\Uuid\UuidInterface;
/**
* Member
* @ORM\Entity(repositoryClass="Template\Data\Log\Repository\LogRepository")
* @ORM\Entity(repositoryClass="Bee\Data\Log\Repository\LogRepository")
* @ORM\Table(name="log")
*/
class Log

View File

@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Template\Data\Log\Factory;
namespace Bee\Data\Log\Factory;
use Template\Data\Log\Manager\LogEntityManager;
use Bee\Data\Log\Manager\LogEntityManager;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Psr\Container\ContainerInterface;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Data\Log\Manager;
namespace Bee\Data\Log\Manager;
use Doctrine\ORM\Decorator\EntityManagerDecorator;

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Data\Log\Repository;
namespace Bee\Data\Log\Repository;
use Doctrine\ORM\EntityRepository;

View File

@ -1,20 +1,20 @@
<?php
use Template\Handling\Registration\Builder\RegistrationBuilder;
use Template\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandBuilder;
use Template\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandHandler;
use Template\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandBuilder;
use Template\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandHandler;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\ConfirmRegistrationPipeline;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\Step\CreateUserStep;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\Step\LoadRegistrationStep;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\Step\SaveRegistrationAndUserStep;
use Template\Handling\Registration\Pipeline\RegisterUser\RegisterUserPipeline;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\BuildRegistrationStep;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\CheckIdentifierStep;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\SaveRegistrationStep;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\SendMailStep;
use Template\Handling\Registration\Rule\RegistrationWithIdentifierAlreadyExistsRule;
use Bee\Handling\Registration\Builder\RegistrationBuilder;
use Bee\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandBuilder;
use Bee\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommandHandler;
use Bee\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandBuilder;
use Bee\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommandHandler;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\ConfirmRegistrationPipeline;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step\CreateUserStep;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step\LoadRegistrationStep;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step\SaveRegistrationAndUserStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\RegisterUserPipeline;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\BuildRegistrationStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\CheckIdentifierStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\SaveRegistrationStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\SendMailStep;
use Bee\Handling\Registration\Rule\RegistrationWithIdentifierAlreadyExistsRule;
use Reinfi\DependencyInjection\Factory\AutoWiringFactory;
use Reinfi\DependencyInjection\Factory\InjectionFactory;

View File

@ -1,8 +1,8 @@
<?php
namespace Template\Handling\Registration\Builder;
namespace Bee\Handling\Registration\Builder;
use Template\Data\Business\Entity\Registration;
use Bee\Data\Business\Entity\Registration;
class RegistrationBuilder
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Template\Handling\Registration;
namespace Bee\Handling\Registration;
class ConfigProvider
{

View File

@ -1,10 +1,10 @@
<?php
namespace Template\Handling\Registration\Exception;
namespace Bee\Handling\Registration\Exception;
use Template\Infrastructure\Exception\ErrorCode;
use Template\Infrastructure\Exception\ErrorDomain;
use Template\Infrastructure\Exception\Exception\Exception;
use Bee\Infrastructure\Exception\ErrorCode;
use Bee\Infrastructure\Exception\ErrorDomain;
use Bee\Infrastructure\Exception\Exception\Exception;
use Ramsey\Uuid\UuidInterface;
class RegistrationNotFoundByIdException extends Exception

View File

@ -1,10 +1,10 @@
<?php
namespace Template\Handling\Registration\Exception;
namespace Bee\Handling\Registration\Exception;
use Template\Infrastructure\Exception\ErrorCode;
use Template\Infrastructure\Exception\ErrorDomain;
use Template\Infrastructure\Exception\Exception\Exception;
use Bee\Infrastructure\Exception\ErrorCode;
use Bee\Infrastructure\Exception\ErrorDomain;
use Bee\Infrastructure\Exception\Exception\Exception;
class RegistrationWithIdentifierAlreadyExistsException extends Exception
{

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Handling\Registration\Handler\Command\ConfirmRegistration;
namespace Bee\Handling\Registration\Handler\Command\ConfirmRegistration;
use Ramsey\Uuid\UuidInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Handling\Registration\Handler\Command\ConfirmRegistration;
namespace Bee\Handling\Registration\Handler\Command\ConfirmRegistration;
use Ramsey\Uuid\UuidInterface;

View File

@ -1,10 +1,10 @@
<?php
namespace Template\Handling\Registration\Handler\Command\ConfirmRegistration;
namespace Bee\Handling\Registration\Handler\Command\ConfirmRegistration;
use Template\Data\Business\Entity\User;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\ConfirmRegistrationPayload;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\ConfirmRegistrationPipeline;
use Bee\Data\Business\Entity\User;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\ConfirmRegistrationPayload;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\ConfirmRegistrationPipeline;
class ConfirmRegistrationCommandHandler
{

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Handling\Registration\Handler\Command\RegisterUser;
namespace Bee\Handling\Registration\Handler\Command\RegisterUser;
class RegisterUserCommand
{

View File

@ -1,6 +1,6 @@
<?php
namespace Template\Handling\Registration\Handler\Command\RegisterUser;
namespace Bee\Handling\Registration\Handler\Command\RegisterUser;
class RegisterUserCommandBuilder
{

View File

@ -1,10 +1,10 @@
<?php
namespace Template\Handling\Registration\Handler\Command\RegisterUser;
namespace Bee\Handling\Registration\Handler\Command\RegisterUser;
use Template\Data\Business\Entity\Registration;
use Template\Handling\Registration\Pipeline\RegisterUser\RegisterUserPayload;
use Template\Handling\Registration\Pipeline\RegisterUser\RegisterUserPipeline;
use Bee\Data\Business\Entity\Registration;
use Bee\Handling\Registration\Pipeline\RegisterUser\RegisterUserPayload;
use Bee\Handling\Registration\Pipeline\RegisterUser\RegisterUserPipeline;
class RegisterUserCommandHandler
{

View File

@ -2,12 +2,12 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\ConfirmRegistration;
namespace Bee\Handling\Registration\Pipeline\ConfirmRegistration;
use Template\Data\Business\Entity\Registration;
use Template\Data\Business\Entity\User;
use Template\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommand;
use Template\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommand;
use Bee\Data\Business\Entity\Registration;
use Bee\Data\Business\Entity\User;
use Bee\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommand;
use Bee\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommand;
class ConfirmRegistrationPayload
{

View File

@ -2,11 +2,11 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\ConfirmRegistration;
namespace Bee\Handling\Registration\Pipeline\ConfirmRegistration;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\Step\LoadRegistrationStep;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\Step\CreateUserStep;
use Template\Handling\Registration\Pipeline\ConfirmRegistration\Step\SaveRegistrationAndUserStep;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step\LoadRegistrationStep;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step\CreateUserStep;
use Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step\SaveRegistrationAndUserStep;
use teewurst\Pipeline\Pipeline;
class ConfirmRegistrationPipeline extends Pipeline

View File

@ -2,17 +2,17 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\ConfirmRegistration\Step;
namespace Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step;
use Template\Handling\Registration\Exception\RegistrationWithIdentifierAlreadyExistsException;
use Template\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommand;
use Template\Handling\Registration\Rule\RegistrationWithIdentifierAlreadyExistsRule;
use Template\Handling\User\Exception\UserPasswordMismatchException;
use Template\Handling\User\Exception\UserWithIdentifierAlreadyExistsException;
use Template\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Template\Handling\User\Handler\Command\CreateUser\CreateUserCommandHandler;
use Template\Handling\User\Rule\UserPasswordMatchRule;
use Template\Handling\User\Rule\UserWithIdentifierAlreadyExistsRule;
use Bee\Handling\Registration\Exception\RegistrationWithIdentifierAlreadyExistsException;
use Bee\Handling\Registration\Handler\Command\ConfirmRegistration\ConfirmRegistrationCommand;
use Bee\Handling\Registration\Rule\RegistrationWithIdentifierAlreadyExistsRule;
use Bee\Handling\User\Exception\UserPasswordMismatchException;
use Bee\Handling\User\Exception\UserWithIdentifierAlreadyExistsException;
use Bee\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Bee\Handling\User\Handler\Command\CreateUser\CreateUserCommandHandler;
use Bee\Handling\User\Rule\UserPasswordMatchRule;
use Bee\Handling\User\Rule\UserWithIdentifierAlreadyExistsRule;
use teewurst\Pipeline\PipelineInterface;
use teewurst\Pipeline\TaskInterface;

View File

@ -2,11 +2,11 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\ConfirmRegistration\Step;
namespace Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step;
use Template\Data\Business\Entity\Registration;
use Template\Data\Business\Repository\RegistrationRepository;
use Template\Handling\Registration\Exception\RegistrationNotFoundByIdException;
use Bee\Data\Business\Entity\Registration;
use Bee\Data\Business\Repository\RegistrationRepository;
use Bee\Handling\Registration\Exception\RegistrationNotFoundByIdException;
use teewurst\Pipeline\PipelineInterface;
use teewurst\Pipeline\TaskInterface;
use Reinfi\DependencyInjection\Annotation\InjectDoctrineRepository;
@ -15,8 +15,8 @@ class LoadRegistrationStep implements TaskInterface
{
/**
* @InjectDoctrineRepository(
* entityManager="Template\Data\Business\Manager\EntityManager",
* entity="Template\Data\Business\Entity\Registration"
* entityManager="Bee\Data\Business\Manager\EntityManager",
* entity="Bee\Data\Business\Entity\Registration"
* )
*/
public function __construct(

View File

@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\ConfirmRegistration\Step;
namespace Bee\Handling\Registration\Pipeline\ConfirmRegistration\Step;
use Template\Data\Business\Manager\EntityManager;
use Bee\Data\Business\Manager\EntityManager;
use teewurst\Pipeline\PipelineInterface;
use teewurst\Pipeline\TaskInterface;

View File

@ -2,10 +2,10 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\RegisterUser;
namespace Bee\Handling\Registration\Pipeline\RegisterUser;
use Template\Data\Business\Entity\Registration;
use Template\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommand;
use Bee\Data\Business\Entity\Registration;
use Bee\Handling\Registration\Handler\Command\RegisterUser\RegisterUserCommand;
class RegisterUserPayload
{

View File

@ -2,12 +2,12 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\RegisterUser;
namespace Bee\Handling\Registration\Pipeline\RegisterUser;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\BuildRegistrationStep;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\CheckIdentifierStep;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\SaveRegistrationStep;
use Template\Handling\Registration\Pipeline\RegisterUser\Step\SendMailStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\BuildRegistrationStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\CheckIdentifierStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\SaveRegistrationStep;
use Bee\Handling\Registration\Pipeline\RegisterUser\Step\SendMailStep;
use teewurst\Pipeline\Pipeline;
class RegisterUserPipeline extends Pipeline

View File

@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\RegisterUser\Step;
namespace Bee\Handling\Registration\Pipeline\RegisterUser\Step;
use Template\Handling\Registration\Builder\RegistrationBuilder;
use Bee\Handling\Registration\Builder\RegistrationBuilder;
use teewurst\Pipeline\PipelineInterface;
use teewurst\Pipeline\TaskInterface;

View File

@ -2,12 +2,12 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\RegisterUser\Step;
namespace Bee\Handling\Registration\Pipeline\RegisterUser\Step;
use Template\Handling\Registration\Exception\RegistrationWithIdentifierAlreadyExistsException;
use Template\Handling\Registration\Rule\RegistrationWithIdentifierAlreadyExistsRule;
use Template\Handling\User\Exception\UserWithIdentifierAlreadyExistsException;
use Template\Handling\User\Rule\UserWithIdentifierAlreadyExistsRule;
use Bee\Handling\Registration\Exception\RegistrationWithIdentifierAlreadyExistsException;
use Bee\Handling\Registration\Rule\RegistrationWithIdentifierAlreadyExistsRule;
use Bee\Handling\User\Exception\UserWithIdentifierAlreadyExistsException;
use Bee\Handling\User\Rule\UserWithIdentifierAlreadyExistsRule;
use teewurst\Pipeline\PipelineInterface;
use teewurst\Pipeline\TaskInterface;

View File

@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\RegisterUser\Step;
namespace Bee\Handling\Registration\Pipeline\RegisterUser\Step;
use Template\Data\Business\Manager\EntityManager;
use Bee\Data\Business\Manager\EntityManager;
use teewurst\Pipeline\PipelineInterface;
use teewurst\Pipeline\TaskInterface;

View File

@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Template\Handling\Registration\Pipeline\RegisterUser\Step;
namespace Bee\Handling\Registration\Pipeline\RegisterUser\Step;
use Template\Infrastructure\Request\Service\RequestService;
use Bee\Infrastructure\Request\Service\RequestService;
use teewurst\Pipeline\PipelineInterface;
use teewurst\Pipeline\TaskInterface;
@ -29,7 +29,7 @@ class SendMailStep implements TaskInterface
'notification',
'send-mail',
[
'template-identifier' => 'new-account',
'bee-identifier' => 'new-account',
'sender' => 'info@stack-up.de',
'recipient' => $command->getMail(),
'data' => [

View File

@ -1,17 +1,17 @@
<?php
namespace Template\Handling\Registration\Rule;
namespace Bee\Handling\Registration\Rule;
use Template\Data\Business\Repository\RegistrationRepository;
use Template\Handling\Registration\Exception\RegistrationWithIdentifierAlreadyExistsException;
use Bee\Data\Business\Repository\RegistrationRepository;
use Bee\Handling\Registration\Exception\RegistrationWithIdentifierAlreadyExistsException;
use Reinfi\DependencyInjection\Annotation\InjectDoctrineRepository;
class RegistrationWithIdentifierAlreadyExistsRule
{
/**
* @InjectDoctrineRepository(
* entityManager="Template\Data\Business\Manager\EntityManager",
* entity="Template\Data\Business\Entity\Registration"
* entityManager="Bee\Data\Business\Manager\EntityManager",
* entity="Bee\Data\Business\Entity\Registration"
* )
*/
public function __construct(

View File

@ -1,10 +1,10 @@
<?php
namespace Template\Handling\Role\Exception;
namespace Bee\Handling\Role\Exception;
use Template\Infrastructure\Exception\ErrorCode;
use Template\Infrastructure\Exception\ErrorDomain;
use Template\Infrastructure\Exception\Exception\Exception;
use Bee\Infrastructure\Exception\ErrorCode;
use Bee\Infrastructure\Exception\ErrorDomain;
use Bee\Infrastructure\Exception\Exception\Exception;
class RoleNotFoundByIdentifierException extends Exception {

View File

@ -1,14 +1,14 @@
<?php
use Template\Handling\User\Builder\UserBuilder;
use Template\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandBuilder;
use Template\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandHandler;
use Template\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandBuilder;
use Template\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandHandler;
use Template\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Template\Handling\User\Handler\Command\CreateUser\CreateUserCommandHandler;
use Template\Handling\User\Rule\UserPasswordMatchRule;
use Template\Handling\User\Rule\UserWithIdentifierAlreadyExistsRule;
use Bee\Handling\User\Builder\UserBuilder;
use Bee\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandBuilder;
use Bee\Handling\User\Handler\Command\ChangePassword\ChangePasswordCommandHandler;
use Bee\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandBuilder;
use Bee\Handling\User\Handler\Command\ChangeUsername\ChangeUsernameCommandHandler;
use Bee\Handling\User\Handler\Command\CreateUser\CreateUserCommandBuilder;
use Bee\Handling\User\Handler\Command\CreateUser\CreateUserCommandHandler;
use Bee\Handling\User\Rule\UserPasswordMatchRule;
use Bee\Handling\User\Rule\UserWithIdentifierAlreadyExistsRule;
use Reinfi\DependencyInjection\Factory\AutoWiringFactory;
use Reinfi\DependencyInjection\Factory\InjectionFactory;

View File

@ -1,12 +1,12 @@
<?php
namespace Template\Handling\User\Builder;
namespace Bee\Handling\User\Builder;
use Template\Data\Business\Entity\Role;
use Template\Data\Business\Entity\User;
use Template\Data\Business\Repository\RoleRepository;
use Template\Handling\Role\Exception\RoleNotFoundByIdentifierException;
use Template\Infrastructure\Encryption\Client\EncryptionClient;
use Bee\Data\Business\Entity\Role;
use Bee\Data\Business\Entity\User;
use Bee\Data\Business\Repository\RoleRepository;
use Bee\Handling\Role\Exception\RoleNotFoundByIdentifierException;
use Bee\Infrastructure\Encryption\Client\EncryptionClient;
use Reinfi\DependencyInjection\Annotation\Inject;
use Reinfi\DependencyInjection\Annotation\InjectDoctrineRepository;
@ -14,10 +14,10 @@ class UserBuilder
{
/**
* @InjectDoctrineRepository(
* entityManager="Template\Data\Business\Manager\EntityManager",
* entity="Template\Data\Business\Entity\Role"
* entityManager="Bee\Data\Business\Manager\EntityManager",
* entity="Bee\Data\Business\Entity\Role"
* )
* @Inject("Template\Infrastructure\Encryption\Client\EncryptionClient")
* @Inject("Bee\Infrastructure\Encryption\Client\EncryptionClient")
*/
public function __construct(
private readonly RoleRepository $roleRepository,

Some files were not shown because too many files have changed in this diff Show More