diff --git a/.env.example b/.env.example index 892e582..c59a2a1 100644 --- a/.env.example +++ b/.env.example @@ -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 \ No newline at end of file diff --git a/bin/console.php b/bin/console.php index 151ba0e..3fc1f0c 100644 --- a/bin/console.php +++ b/bin/console.php @@ -1,6 +1,6 @@ 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); diff --git a/bin/script/init b/bin/script/init index f2baa98..fcddc9a 100755 --- a/bin/script/init +++ b/bin/script/init @@ -4,13 +4,34 @@ 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 + 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 # Source key-scripts @@ -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 \ No newline at end of file +drun bee-backend composer console rbac:update +drun bee-backend composer console init:data \ No newline at end of file diff --git a/composer.json b/composer.json index 6413085..cf53759 100644 --- a/composer.json +++ b/composer.json @@ -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/" } } } diff --git a/config/autoload/api.global.php b/config/autoload/api.global.php index 35e85c3..ae0939a 100644 --- a/config/autoload/api.global.php +++ b/config/autoload/api.global.php @@ -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' => [ ] diff --git a/config/autoload/authorization.global.php b/config/autoload/authorization.global.php index d1b8b23..37a6b27 100644 --- a/config/autoload/authorization.global.php +++ b/config/autoload/authorization.global.php @@ -1,7 +1,7 @@ [ + 'bee-rbac' => [ 'roles' => [ 'admin', 'user', diff --git a/config/autoload/logger.global.php b/config/autoload/logger.global.php index 3a3fee7..2ac8f41 100644 --- a/config/autoload/logger.global.php +++ b/config/autoload/logger.global.php @@ -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, ] diff --git a/config/autoload/mezzio.global.php b/config/autoload/mezzio.global.php index b6b10d1..8357989 100644 --- a/config/autoload/mezzio.global.php +++ b/config/autoload/mezzio.global.php @@ -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', ], ], ]; diff --git a/config/config.php b/config/config.php index 814b150..a4c18d7 100644 --- a/config/config.php +++ b/config/config.php @@ -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 diff --git a/config/pipeline.php b/config/pipeline.php index 4d19afa..6449e6f 100644 --- a/config/pipeline.php +++ b/config/pipeline.php @@ -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); diff --git a/config/routes.php b/config/routes.php index a2523a1..bec90e6 100644 --- a/config/routes.php +++ b/config/routes.php @@ -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 diff --git a/data/migrations/business/Version20230922085011.php b/data/migrations/business/Version20230922085011.php index de5b8ec..3244f46 100644 --- a/data/migrations/business/Version20230922085011.php +++ b/data/migrations/business/Version20230922085011.php @@ -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; diff --git a/data/migrations/business/Version20230922092351.php b/data/migrations/business/Version20230922092351.php index a759ef4..67ab302 100644 --- a/data/migrations/business/Version20230922092351.php +++ b/data/migrations/business/Version20230922092351.php @@ -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; diff --git a/data/migrations/business/Version20230922092754.php b/data/migrations/business/Version20230922092754.php index 2bbcb56..97193a3 100644 --- a/data/migrations/business/Version20230922092754.php +++ b/data/migrations/business/Version20230922092754.php @@ -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; diff --git a/data/migrations/business/Version20230922101354.php b/data/migrations/business/Version20230922101354.php index 51cfcd8..5011534 100644 --- a/data/migrations/business/Version20230922101354.php +++ b/data/migrations/business/Version20230922101354.php @@ -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; diff --git a/data/migrations/business/Version20230922101355.php b/data/migrations/business/Version20230922101355.php index 296a9de..e5ad91e 100644 --- a/data/migrations/business/Version20230922101355.php +++ b/data/migrations/business/Version20230922101355.php @@ -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; diff --git a/data/migrations/business/Version20230924113403.php b/data/migrations/business/Version20230924113403.php index fbd6512..5a4ddd9 100644 --- a/data/migrations/business/Version20230924113403.php +++ b/data/migrations/business/Version20230924113403.php @@ -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; diff --git a/data/migrations/log/Version20230922150649.php b/data/migrations/log/Version20230922150649.php index bbc7eae..62e348c 100644 --- a/data/migrations/log/Version20230922150649.php +++ b/data/migrations/log/Version20230922150649.php @@ -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; diff --git a/docker/.gitignore b/docker/.gitignore new file mode 100644 index 0000000..005d3f5 --- /dev/null +++ b/docker/.gitignore @@ -0,0 +1,2 @@ +docker-compose.yml +docker-compose-mac.yml \ No newline at end of file diff --git a/docker/docker-compose-mac.yml b/docker/docker-compose-mac.yml.dist similarity index 53% rename from docker/docker-compose-mac.yml rename to docker/docker-compose-mac.yml.dist index 2b93ebd..b0bebc9 100644 --- a/docker/docker-compose-mac.yml +++ b/docker/docker-compose-mac.yml.dist @@ -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 \ No newline at end of file + - bee-backend-app \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml.dist similarity index 61% rename from docker/docker-compose.yml rename to docker/docker-compose.yml.dist index 4f0f616..f1febac 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml.dist @@ -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 \ No newline at end of file + - bee-backend-app \ No newline at end of file diff --git a/docker/mysql/scripts/initdb.sql b/docker/mysql/scripts/initdb.sql index 206f6e9..88112a3 100644 --- a/docker/mysql/scripts/initdb.sql +++ b/docker/mysql/scripts/initdb.sql @@ -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'@'%'; \ No newline at end of file +GRANT ALL PRIVILEGES on *.* to 'bee'@'%'; \ No newline at end of file diff --git a/docker/nginx/config/nginx.conf b/docker/nginx/config/nginx.conf index 16cb672..c10222a 100644 --- a/docker/nginx/config/nginx.conf +++ b/docker/nginx/config/nginx.conf @@ -1,5 +1,5 @@ upstream host-backend-app { - server template-backend-app:9000; + server bee-backend-app:9000; } server { diff --git a/src/ApiDomain/Console/config/console.php b/src/ApiDomain/Console/config/console.php index 20093d4..3f1b534 100644 --- a/src/ApiDomain/Console/config/console.php +++ b/src/ApiDomain/Console/config/console.php @@ -1,7 +1,7 @@ [ diff --git a/src/ApiDomain/Console/config/service_manager.php b/src/ApiDomain/Console/config/service_manager.php index 9aa3afc..7b31cad 100644 --- a/src/ApiDomain/Console/config/service_manager.php +++ b/src/ApiDomain/Console/config/service_manager.php @@ -1,7 +1,7 @@ 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( diff --git a/src/ApiDomain/Console/src/ConfigProvider.php b/src/ApiDomain/Console/src/ConfigProvider.php index e9a5efc..ed479a4 100644 --- a/src/ApiDomain/Console/src/ConfigProvider.php +++ b/src/ApiDomain/Console/src/ConfigProvider.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Template\API\Console; +namespace Bee\API\Console; class ConfigProvider { diff --git a/src/ApiDomain/External/Authentication/config/routes.php b/src/ApiDomain/External/Authentication/config/routes.php index b776574..06dda9f 100644 --- a/src/ApiDomain/External/Authentication/config/routes.php +++ b/src/ApiDomain/External/Authentication/config/routes.php @@ -1,10 +1,10 @@ [ - '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', ], ], diff --git a/src/DataDomain/Business/config/service_manager.php b/src/DataDomain/Business/config/service_manager.php index c0faf40..0dc87f1 100644 --- a/src/DataDomain/Business/config/service_manager.php +++ b/src/DataDomain/Business/config/service_manager.php @@ -1,19 +1,19 @@ [ - '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], diff --git a/src/DataDomain/Business/src/ConfigProvider.php b/src/DataDomain/Business/src/ConfigProvider.php index e3b2c68..634a3a1 100644 --- a/src/DataDomain/Business/src/ConfigProvider.php +++ b/src/DataDomain/Business/src/ConfigProvider.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Template\Data\Business; +namespace Bee\Data\Business; class ConfigProvider { diff --git a/src/DataDomain/Business/src/Entity/Permission.php b/src/DataDomain/Business/src/Entity/Permission.php index 96f3258..bf34e0c 100644 --- a/src/DataDomain/Business/src/Entity/Permission.php +++ b/src/DataDomain/Business/src/Entity/Permission.php @@ -1,15 +1,15 @@ get('doctrine.entity_manager.orm_template') + $container->get('doctrine.entity_manager.orm_bee') ); } } diff --git a/src/DataDomain/Business/src/Manager/EntityManager.php b/src/DataDomain/Business/src/Manager/EntityManager.php index 75f4baa..f5a74fc 100644 --- a/src/DataDomain/Business/src/Manager/EntityManager.php +++ b/src/DataDomain/Business/src/Manager/EntityManager.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Template\Data\Business\Manager; +namespace Bee\Data\Business\Manager; use Doctrine\ORM\Decorator\EntityManagerDecorator; diff --git a/src/DataDomain/Business/src/Repository/PermissionRepository.php b/src/DataDomain/Business/src/Repository/PermissionRepository.php index 0c4111b..ac02a73 100644 --- a/src/DataDomain/Business/src/Repository/PermissionRepository.php +++ b/src/DataDomain/Business/src/Repository/PermissionRepository.php @@ -1,6 +1,6 @@ [ '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', ], ], diff --git a/src/DataDomain/Log/config/service_manager.php b/src/DataDomain/Log/config/service_manager.php index 3357574..706fa13 100644 --- a/src/DataDomain/Log/config/service_manager.php +++ b/src/DataDomain/Log/config/service_manager.php @@ -1,7 +1,7 @@ 'new-account', + 'bee-identifier' => 'new-account', 'sender' => 'info@stack-up.de', 'recipient' => $command->getMail(), 'data' => [ diff --git a/src/HandlingDomain/Registration/src/Rule/RegistrationWithIdentifierAlreadyExistsRule.php b/src/HandlingDomain/Registration/src/Rule/RegistrationWithIdentifierAlreadyExistsRule.php index 43b82e6..289a347 100644 --- a/src/HandlingDomain/Registration/src/Rule/RegistrationWithIdentifierAlreadyExistsRule.php +++ b/src/HandlingDomain/Registration/src/Rule/RegistrationWithIdentifierAlreadyExistsRule.php @@ -1,17 +1,17 @@ [ - TemplateLogger::class => LoggerFactory::class, + BeeLogger::class => LoggerFactory::class, Logger::class => MonologLoggerFactory::class, FileStreamHandler::class => FileStreamHandlerFactory::class, DoctrineLogHandler::class => AutoWiringFactory::class, diff --git a/src/Infrastructure/Logging/src/ConfigProvider.php b/src/Infrastructure/Logging/src/ConfigProvider.php index 7272673..9d03345 100644 --- a/src/Infrastructure/Logging/src/ConfigProvider.php +++ b/src/Infrastructure/Logging/src/ConfigProvider.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Template\Infrastructure\Logging; +namespace Bee\Infrastructure\Logging; class ConfigProvider { diff --git a/src/Infrastructure/Logging/src/Factory/FileStreamHandlerFactory.php b/src/Infrastructure/Logging/src/Factory/FileStreamHandlerFactory.php index ff50634..ac27087 100644 --- a/src/Infrastructure/Logging/src/Factory/FileStreamHandlerFactory.php +++ b/src/Infrastructure/Logging/src/Factory/FileStreamHandlerFactory.php @@ -1,8 +1,8 @@ get(Logger::class) ); } diff --git a/src/Infrastructure/Logging/src/Factory/MonologLoggerFactory.php b/src/Infrastructure/Logging/src/Factory/MonologLoggerFactory.php index a493539..d861000 100644 --- a/src/Infrastructure/Logging/src/Factory/MonologLoggerFactory.php +++ b/src/Infrastructure/Logging/src/Factory/MonologLoggerFactory.php @@ -1,9 +1,9 @@ [ diff --git a/src/Infrastructure/Request/src/ConfigProvider.php b/src/Infrastructure/Request/src/ConfigProvider.php index 212986c..4b90a44 100644 --- a/src/Infrastructure/Request/src/ConfigProvider.php +++ b/src/Infrastructure/Request/src/ConfigProvider.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Template\Infrastructure\Request; +namespace Bee\Infrastructure\Request; class ConfigProvider { diff --git a/src/Infrastructure/Request/src/Exception/ApiIdentifierUnknownException.php b/src/Infrastructure/Request/src/Exception/ApiIdentifierUnknownException.php index eebb07b..f8ac401 100644 --- a/src/Infrastructure/Request/src/Exception/ApiIdentifierUnknownException.php +++ b/src/Infrastructure/Request/src/Exception/ApiIdentifierUnknownException.php @@ -1,6 +1,6 @@ get(ConfigService::class); - $apiKey = $configService->resolve("api.keys.template"); + $apiKey = $configService->resolve("api.keys.bee"); return new RequestService( $apiKey, diff --git a/src/Infrastructure/Request/src/Middleware/AnalyzeBodyMiddleware.php b/src/Infrastructure/Request/src/Middleware/AnalyzeBodyMiddleware.php index a732d08..a294c66 100644 --- a/src/Infrastructure/Request/src/Middleware/AnalyzeBodyMiddleware.php +++ b/src/Infrastructure/Request/src/Middleware/AnalyzeBodyMiddleware.php @@ -1,11 +1,11 @@