Skip to content

Commit

Permalink
Move code to EconumoBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
deeravenger committed Oct 6, 2024
1 parent 1e0041a commit a4951da
Show file tree
Hide file tree
Showing 1,355 changed files with 17,396 additions and 16,992 deletions.
8 changes: 4 additions & 4 deletions config/code-templates/Api/ControllerGET.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use _CG_APPROOT_\Application\_CG_MODULE_\_CG_SUBJECT_Service;
use _CG_APPROOT_\Application\_CG_MODULE_\Dto\_CG_ACTION__CG_SUBJECT__CG_VERSION_RequestDto;
use _CG_APPROOT_\UI\Controller\Api\_CG_MODULE_\_CG_SUBJECT_\Validation\_CG_ACTION__CG_SUBJECT__CG_VERSION_Form;
use App\Application\Exception\ValidationException;
use App\Domain\Entity\User;
use App\EconumoBundle\Application\Exception\ValidationException;
use App\EconumoBundle\Domain\Entity\User;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use App\UI\Service\Validator\ValidatorInterface;
use App\UI\Service\Response\ResponseFactory;
use App\EconumoBundle\UI\Service\Validator\ValidatorInterface;
use App\EconumoBundle\UI\Service\Response\ResponseFactory;
use Symfony\Component\Routing\Annotation\Route;
use Nelmio\ApiDocBundle\Annotation\Model;
use OpenApi\Annotations as OA;
Expand Down
8 changes: 4 additions & 4 deletions config/code-templates/Api/ControllerPOST.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use _CG_APPROOT_\Application\_CG_MODULE_\_CG_SUBJECT_Service;
use _CG_APPROOT_\Application\_CG_MODULE_\Dto\_CG_ACTION__CG_SUBJECT__CG_VERSION_RequestDto;
use _CG_APPROOT_\UI\Controller\Api\_CG_MODULE_\_CG_SUBJECT_\Validation\_CG_ACTION__CG_SUBJECT__CG_VERSION_Form;
use App\Application\Exception\ValidationException;
use App\Domain\Entity\User;
use App\EconumoBundle\Application\Exception\ValidationException;
use App\EconumoBundle\Domain\Entity\User;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use App\UI\Service\Validator\ValidatorInterface;
use App\UI\Service\Response\ResponseFactory;
use App\EconumoBundle\UI\Service\Validator\ValidatorInterface;
use App\EconumoBundle\UI\Service\Response\ResponseFactory;
use Symfony\Component\Routing\Annotation\Route;
use Nelmio\ApiDocBundle\Annotation\Model;
use OpenApi\Annotations as OA;
Expand Down
2 changes: 1 addition & 1 deletion config/code-templates/Api/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace _CG_APPROOT_\UI\Controller\Api\_CG_MODULE_\_CG_SUBJECT_\Validation;

use App\UI\Service\Validator\ValueObjectValidationFactoryInterface;
use App\EconumoBundle\UI\Service\Validator\ValueObjectValidationFactoryInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
Expand Down
2 changes: 1 addition & 1 deletion config/code-templates/Api/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use _CG_APPROOT_\Application\_CG_MODULE_\Dto\_CG_ACTION__CG_SUBJECT__CG_VERSION_RequestDto;
use _CG_APPROOT_\Application\_CG_MODULE_\Dto\_CG_ACTION__CG_SUBJECT__CG_VERSION_ResultDto;
use _CG_APPROOT_\Application\_CG_MODULE_\Assembler\_CG_ACTION__CG_SUBJECT__CG_VERSION_ResultAssembler;
use App\Domain\Entity\ValueObject\Id;
use App\EconumoBundle\Domain\Entity\ValueObject\Id;

readonly class _CG_SUBJECT_Service
{
Expand Down
46 changes: 23 additions & 23 deletions config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ doctrine:
url: '%env(resolve:DATABASE_URL)%'
charset: 'utf8'
types:
uuid: App\Infrastructure\Doctrine\Type\UuidType
account_type: App\Infrastructure\Doctrine\Type\AccountType
account_name_type: App\Infrastructure\Doctrine\Type\AccountNameType
account_user_role_type: App\Infrastructure\Doctrine\Type\AccountUserRoleType
category_type: App\Infrastructure\Doctrine\Type\CategoryType
category_name_type: App\Infrastructure\Doctrine\Type\CategoryNameType
transaction_type: App\Infrastructure\Doctrine\Type\TransactionType
icon_type: App\Infrastructure\Doctrine\Type\IconType
folder_name_type: App\Infrastructure\Doctrine\Type\FolderNameType
connection_code_type: App\Infrastructure\Doctrine\Type\ConnectionCodeType
currency_code_type: App\Infrastructure\Doctrine\Type\CurrencyCodeType
payee_name_type: App\Infrastructure\Doctrine\Type\PayeeNameType
tag_name_type: App\Infrastructure\Doctrine\Type\TagNameType
user_role_type: App\Infrastructure\Doctrine\Type\UserRoleType
user_password_request_code_type: App\Infrastructure\Doctrine\Type\UserPasswordRequestCodeType
budget_name_type: App\Infrastructure\Doctrine\Type\BudgetNameType
budget_folder_name_type: App\Infrastructure\Doctrine\Type\BudgetFolderNameType
budget_envelope_name_type: App\Infrastructure\Doctrine\Type\BudgetEnvelopeNameType
budget_entity_type: App\Infrastructure\Doctrine\Type\BudgetEntityType
uuid: App\EconumoBundle\Infrastructure\Doctrine\Type\UuidType
account_type: App\EconumoBundle\Infrastructure\Doctrine\Type\AccountType
account_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\AccountNameType
account_user_role_type: App\EconumoBundle\Infrastructure\Doctrine\Type\AccountUserRoleType
category_type: App\EconumoBundle\Infrastructure\Doctrine\Type\CategoryType
category_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\CategoryNameType
transaction_type: App\EconumoBundle\Infrastructure\Doctrine\Type\TransactionType
icon_type: App\EconumoBundle\Infrastructure\Doctrine\Type\IconType
folder_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\FolderNameType
connection_code_type: App\EconumoBundle\Infrastructure\Doctrine\Type\ConnectionCodeType
currency_code_type: App\EconumoBundle\Infrastructure\Doctrine\Type\CurrencyCodeType
payee_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\PayeeNameType
tag_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\TagNameType
user_role_type: App\EconumoBundle\Infrastructure\Doctrine\Type\UserRoleType
user_password_request_code_type: App\EconumoBundle\Infrastructure\Doctrine\Type\UserPasswordRequestCodeType
budget_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\BudgetNameType
budget_folder_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\BudgetFolderNameType
budget_envelope_name_type: App\EconumoBundle\Infrastructure\Doctrine\Type\BudgetEnvelopeNameType
budget_entity_type: App\EconumoBundle\Infrastructure\Doctrine\Type\BudgetEntityType
server_version: 13

orm:
Expand All @@ -39,9 +39,9 @@ doctrine:
mappings:
Domain:
type: xml
dir: '%kernel.project_dir%/src/Infrastructure/Doctrine/Entity/mapping'
prefix: 'App\Domain\Entity'
dir: '%kernel.project_dir%/src/EconumoBundle/Infrastructure/Doctrine/Entity/mapping'
prefix: 'App\EconumoBundle\Domain\Entity'
Infrastructure:
type: annotation
dir: '%kernel.project_dir%/src/Infrastructure/Doctrine/Entity'
prefix: 'App\Infrastructure\Doctrine\Entity'
dir: '%kernel.project_dir%/src/EconumoBundle/Infrastructure/Doctrine/Entity'
prefix: 'App\EconumoBundle\Infrastructure\Doctrine\Entity'
4 changes: 2 additions & 2 deletions config/packages/doctrine_migrations.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
doctrine_migrations:
dir_name: '%kernel.project_dir%/src/Infrastructure/Doctrine/Migration'
dir_name: '%kernel.project_dir%/src/EconumoBundle/Infrastructure/Doctrine/Migration'
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
namespace: App\Infrastructure\Doctrine\Migration
namespace: App\EconumoBundle\Infrastructure\Doctrine\Migration
#organize_migrations: BY_YEAR
14 changes: 7 additions & 7 deletions config/packages/messenger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ framework:
max_retries: 1

routing:
'App\Domain\Events\AccountFolderCreatedEvent': domain_events
'App\Domain\Events\BudgetFolderCreatedEvent': domain_events
'App\Domain\Events\RemindPasswordRequestedEvent': domain_events
'App\Domain\Events\UserRegisteredEvent': domain_events
'App\Domain\Events\BudgetEnvelopeCreatedEvent': domain_events
'App\Domain\Events\CategoryCreatedEvent': domain_events
'App\Domain\Events\TagCreatedEvent': domain_events
'App\EconumoBundle\Domain\Events\AccountFolderCreatedEvent': domain_events
'App\EconumoBundle\Domain\Events\BudgetFolderCreatedEvent': domain_events
'App\EconumoBundle\Domain\Events\RemindPasswordRequestedEvent': domain_events
'App\EconumoBundle\Domain\Events\UserRegisteredEvent': domain_events
'App\EconumoBundle\Domain\Events\BudgetEnvelopeCreatedEvent': domain_events
'App\EconumoBundle\Domain\Events\CategoryCreatedEvent': domain_events
'App\EconumoBundle\Domain\Events\TagCreatedEvent': domain_events
6 changes: 3 additions & 3 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
security:
password_hashers:
App\Domain\Entity\User:
App\EconumoBundle\Domain\Entity\User:
algorithm: sha512
encode_as_base64: true
iterations: 500
Expand All @@ -17,7 +17,7 @@ security:
json_login:
check_path: /api/v1/user/login-user
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: App\Infrastructure\Auth\AuthenticationFailureHandler
failure_handler: App\EconumoBundle\Infrastructure\Auth\AuthenticationFailureHandler

api_register:
pattern: ^/api/v1/user/register-user
Expand Down Expand Up @@ -64,4 +64,4 @@ security:

providers:
app_user_provider:
id: App\Infrastructure\Doctrine\UserProvider
id: App\EconumoBundle\Infrastructure\Doctrine\UserProvider
2 changes: 1 addition & 1 deletion config/routes/annotations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
controllers:
resource: ../../src/UI/Controller/
resource: ../../src/EconumoBundle/UI/Controller/
type: annotation
43 changes: 22 additions & 21 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,35 @@ services:
App\:
resource: '../src/*'
exclude:
- '../src/Infrastructure/Symfony/Form/ValueObjectValidator.php'
- '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
- '../src/Infrastructure/Doctrine/Migrations/**.php'
- '../src/Kernel.php'
- '../src/EconumoBundle/Infrastructure/Symfony/Form/ValueObjectValidator.php'
- '../src/EconumoBundle/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
- '../src/EconumoBundle/Infrastructure/Doctrine/Migrations/**.php'

App\Domain\Service\Currency\CurrencyServiceInterface:
class: \App\Domain\Service\Currency\CurrencyService
App\EconumoBundle\Domain\Service\Currency\CurrencyServiceInterface:
class: \App\EconumoBundle\Domain\Service\Currency\CurrencyService
arguments:
$baseCurrency: '%env(string:ECONUMO_CURRENCY_BASE)%'

App\Domain\Service\Currency\CurrencyConvertorInterface:
class: \App\Domain\Service\Currency\CurrencyConvertor
App\EconumoBundle\Domain\Service\Currency\CurrencyConvertorInterface:
class: \App\EconumoBundle\Domain\Service\Currency\CurrencyConvertor
arguments:
$baseCurrency: '%env(string:ECONUMO_CURRENCY_BASE)%'

App\Domain\Service\Currency\CurrencyRateServiceInterface:
class: \App\Domain\Service\Currency\CurrencyRateService
App\EconumoBundle\Domain\Service\Currency\CurrencyRateServiceInterface:
class: \App\EconumoBundle\Domain\Service\Currency\CurrencyRateService
arguments:
$baseCurrency: '%env(string:ECONUMO_CURRENCY_BASE)%'

# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\UI\Controller\:
resource: '../src/UI/Controller'
App\EconumoBundle\UI\Controller\:
resource: '../src/EconumoBundle/UI/Controller'
tags: ['controller.service_arguments']

# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
App\UI\Middleware\HttpApiResponse\HttpApiExceptionListener:
App\EconumoBundle\UI\Middleware\HttpApiResponse\HttpApiExceptionListener:
tags:
- {name: kernel.event_listener, event: kernel.exception}

Expand All @@ -52,30 +53,30 @@ services:
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 100 }

App\Domain\Service\User\UserRegistrationServiceInterface:
class: App\Domain\Service\User\UserRegistrationService
App\EconumoBundle\Domain\Service\User\UserRegistrationServiceInterface:
class: App\EconumoBundle\Domain\Service\User\UserRegistrationService
arguments:
$isRegistrationAllowed: '%env(bool:ECONUMO_ALLOW_REGISTRATION)%'

App\Domain\Service\EmailServiceInterface:
class: App\Infrastructure\Symfony\Mailer\EmailService
App\EconumoBundle\Domain\Service\EmailServiceInterface:
class: App\EconumoBundle\Infrastructure\Symfony\Mailer\EmailService
arguments:
$fromEmail: '%env(string:ECONUMO_FROM_EMAIL)%'
$replyToEmail: '%env(string:ECONUMO_REPLY_TO_EMAIL)%'

App\Infrastructure\Auth\AuthenticationUpdateTokenPayload:
App\EconumoBundle\Infrastructure\Auth\AuthenticationUpdateTokenPayload:
arguments:
$baseCurrency: '%env(string:ECONUMO_CURRENCY_BASE)%'
tags:
- { name: kernel.event_listener, event: lexik_jwt_authentication.on_jwt_created, method: onTokenCreated }

App\Infrastructure\Auth\AuthenticationSuccessListener:
class: App\Infrastructure\Auth\AuthenticationSuccessListener
App\EconumoBundle\Infrastructure\Auth\AuthenticationSuccessListener:
class: App\EconumoBundle\Infrastructure\Auth\AuthenticationSuccessListener
tags:
- { name: kernel.event_listener, event: lexik_jwt_authentication.on_authentication_success, method: onAuthenticationSuccessResponse }

App\UI\Middleware\ProtectSystemApi\ProtectSystemApiListener:
class: App\UI\Middleware\ProtectSystemApi\ProtectSystemApiListener
App\EconumoBundle\UI\Middleware\ProtectSystemApi\ProtectSystemApiListener:
class: App\EconumoBundle\UI\Middleware\ProtectSystemApi\ProtectSystemApiListener
arguments:
$token: '%env(ECONUMO_SYSTEM_API_KEY)%'
tags:
Expand Down
44 changes: 0 additions & 44 deletions src/Application/Account/AccountListService.php

This file was deleted.

84 changes: 0 additions & 84 deletions src/Application/Account/AccountService.php

This file was deleted.

Loading

0 comments on commit a4951da

Please sign in to comment.