├── .bitbucket └── dependencies.sh ├── .circleci └── config.yml ├── .dockerignore ├── .editorconfig ├── .env ├── .env.dev ├── .env.prod ├── .env.staging ├── .env.test ├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── .gitignore ├── .gitlab-ci.yml ├── .idea ├── .gitignore ├── PMDPlugin.xml ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── codeception.xml ├── elasticsearchSettings.xml ├── htdocs.iml ├── inspectionProfiles │ └── Project_Default.xml ├── laravel-idea.xml ├── misc.xml ├── modules.xml ├── php-docker-settings.xml ├── php.xml ├── phpspec.xml ├── phpunit.xml ├── redis-manager-config.xml ├── remote-mappings.xml ├── symfony2.xml ├── vagrant.xml ├── vcs.xml └── webResources.xml ├── .php-cs-fixer.dist.php ├── Dockerfile ├── LICENSE ├── Makefile ├── assets ├── app.js ├── bootstrap.js ├── controllers.json ├── controllers │ ├── csrf_protection_controller.js │ └── hello_controller.js └── styles │ └── app.css ├── bin └── console ├── bitbucket-pipelines.yml ├── compose-prod.yaml ├── compose-staging.yaml ├── compose-test-ci.yaml ├── compose.yaml ├── composer-unused.php ├── composer.json ├── composer.lock ├── config ├── bundles.php ├── jwt │ └── .gitkeep ├── packages │ ├── asset_mapper.yaml │ ├── cache.yaml │ ├── debug.yaml │ ├── dev │ │ └── systemsdk_easy_log.yaml │ ├── doctrine.yaml │ ├── doctrine_extensions.yaml │ ├── doctrine_migrations.yaml │ ├── event_listeners.yaml │ ├── framework.yaml │ ├── lexik_jwt_authentication.yaml │ ├── lock.yaml │ ├── mailer.yaml │ ├── messenger.yaml │ ├── monolog.yaml │ ├── nelmio_api_doc.yaml │ ├── nelmio_cors.yaml │ ├── notifier.yaml │ ├── ramsey_uuid_doctrine.yaml │ ├── routing.yaml │ ├── scheduler.yaml │ ├── security.yaml │ ├── test │ │ └── systemsdk_easy_log.yaml │ ├── translation.yaml │ ├── twig.yaml │ ├── validator.yaml │ └── web_profiler.yaml ├── preload.php ├── routes.yaml ├── routes │ ├── framework.yaml │ ├── nelmio_api_doc.yaml │ ├── prod │ │ └── annotations.yaml │ ├── scheduler.yaml │ ├── security.yaml │ ├── staging │ │ └── annotations.yaml │ └── web_profiler.yaml └── services.yaml ├── docker ├── dev │ ├── init-db.sql │ ├── kibana.yml │ ├── nginx.conf │ ├── php.ini │ ├── www.conf │ ├── xdebug-main.ini │ └── xdebug-osx.ini ├── elasticsearch │ ├── Dockerfile │ └── config │ │ └── elasticsearch.yml ├── fish │ ├── completions │ │ ├── composer.fish │ │ └── sf_console.fish │ ├── config.fish │ └── functions │ │ └── console.fish ├── general │ ├── cron │ ├── do_we_need_xdebug.sh │ └── supervisord.conf ├── kibana │ └── Dockerfile ├── nginx │ └── Dockerfile ├── prod │ ├── kibana.yml │ ├── nginx.conf │ ├── php.ini │ └── www.conf ├── rabbitmq │ ├── Dockerfile │ └── rabbitmq_delayed_message_exchange-v4.0.7.ez ├── redis │ ├── Dockerfile │ └── redis.conf ├── staging │ ├── kibana.yml │ ├── nginx.conf │ ├── php.ini │ └── www.conf └── test │ ├── kibana.yml │ ├── nginx.conf │ ├── php.ini │ └── www.conf ├── docs ├── api-key.md ├── commands.md ├── development.md ├── images │ ├── phpstorm_00.png │ ├── phpstorm_01.png │ ├── phpstorm_02.png │ ├── phpstorm_03.png │ ├── phpstorm_04.png │ ├── phpstorm_05.png │ ├── phpstorm_06.png │ ├── phpstorm_12.png │ ├── phpstorm_13.png │ ├── phpstorm_code_style.png │ ├── phpstorm_inspections.png │ ├── phpstorm_php_code_sniffer_1.png │ ├── phpstorm_php_code_sniffer_2.png │ ├── phpstorm_php_cs_fixer_1.png │ ├── phpstorm_php_cs_fixer_2.png │ ├── phpstorm_phpmd_1.png │ ├── phpstorm_phpmd_2.png │ ├── phpstorm_phpstan_1.png │ ├── phpstorm_phpstan_2.png │ ├── postman_01.png │ ├── ri_01.png │ ├── ri_02.png │ ├── xdebug_01.png │ └── xdebug_02.png ├── messenger.md ├── phpstorm.md ├── phpstorm │ ├── CodeStyle.xml │ └── Inspections.xml ├── postman.md ├── postman │ ├── dev.postman_environment.json │ └── symfony.postman_collection.json ├── rdm.md ├── swagger.md ├── testing.md └── xdebug.md ├── ecs.php ├── importmap.php ├── migrations ├── .gitignore ├── Version20211001194001.php ├── Version20231029164236.php └── Version20240428215320.php ├── phpinsights.php ├── phpmd_ruleset.xml ├── phpstan.neon.dist ├── phpunit.xml.dist ├── public ├── check.php ├── favicon.ico ├── index.php └── robots.txt ├── qodana.yaml ├── readme.md ├── rector.php ├── reports └── .gitkeep ├── src ├── ApiKey │ ├── Application │ │ ├── DTO │ │ │ └── ApiKey │ │ │ │ ├── ApiKey.php │ │ │ │ ├── ApiKeyCreate.php │ │ │ │ ├── ApiKeyPatch.php │ │ │ │ └── ApiKeyUpdate.php │ │ ├── Resource │ │ │ ├── ApiKeyCountResource.php │ │ │ ├── ApiKeyCreateResource.php │ │ │ ├── ApiKeyDeleteResource.php │ │ │ ├── ApiKeyFindOneResource.php │ │ │ ├── ApiKeyIdsResource.php │ │ │ ├── ApiKeyListResource.php │ │ │ ├── ApiKeyPatchResource.php │ │ │ ├── ApiKeyResource.php │ │ │ ├── ApiKeyUpdateResource.php │ │ │ └── Interfaces │ │ │ │ ├── ApiKeyCountResourceInterface.php │ │ │ │ ├── ApiKeyCreateResourceInterface.php │ │ │ │ ├── ApiKeyDeleteResourceInterface.php │ │ │ │ ├── ApiKeyFindOneResourceInterface.php │ │ │ │ ├── ApiKeyIdsResourceInterface.php │ │ │ │ ├── ApiKeyListResourceInterface.php │ │ │ │ ├── ApiKeyPatchResourceInterface.php │ │ │ │ └── ApiKeyUpdateResourceInterface.php │ │ ├── Security │ │ │ ├── ApiKeyUser.php │ │ │ ├── Authenticator │ │ │ │ └── ApiKeyAuthenticator.php │ │ │ ├── Interfaces │ │ │ │ └── ApiKeyUserInterface.php │ │ │ └── Provider │ │ │ │ ├── ApiKeyUserProvider.php │ │ │ │ └── Interfaces │ │ │ │ └── ApiKeyUserProviderInterface.php │ │ └── Service │ │ │ └── Crypt │ │ │ ├── Interfaces │ │ │ └── OpenSslCryptApiKeyServiceInterface.php │ │ │ └── OpenSslCryptApiKeyService.php │ ├── Domain │ │ ├── Entity │ │ │ └── ApiKey.php │ │ └── Repository │ │ │ └── Interfaces │ │ │ └── ApiKeyRepositoryInterface.php │ ├── Infrastructure │ │ ├── DataFixtures │ │ │ └── ORM │ │ │ │ └── LoadApiKeyData.php │ │ └── Repository │ │ │ └── ApiKeyRepository.php │ └── Transport │ │ ├── AutoMapper │ │ └── ApiKey │ │ │ ├── AutoMapperConfiguration.php │ │ │ └── RequestMapper.php │ │ ├── Command │ │ └── ApiKey │ │ │ ├── ApiKeyHelper.php │ │ │ ├── ApiKeyManagementCommand.php │ │ │ ├── ChangeTokenCommand.php │ │ │ ├── CreateApiKeyCommand.php │ │ │ ├── EditApiKeyCommand.php │ │ │ ├── ListApiKeysCommand.php │ │ │ └── RemoveApiKeyCommand.php │ │ ├── Controller │ │ └── Api │ │ │ ├── v1 │ │ │ └── ApiKey │ │ │ │ └── ApiKeyController.php │ │ │ └── v2 │ │ │ └── ApiKey │ │ │ ├── ApiKeyCountController.php │ │ │ ├── ApiKeyCreateController.php │ │ │ ├── ApiKeyDeleteController.php │ │ │ ├── ApiKeyIdsController.php │ │ │ ├── ApiKeyListController.php │ │ │ ├── ApiKeyPatchController.php │ │ │ ├── ApiKeyUpdateController.php │ │ │ └── ApiKeyViewController.php │ │ ├── EventListener │ │ └── ApiKeyEntityEventListener.php │ │ └── Form │ │ └── Type │ │ └── Console │ │ └── ApiKeyType.php ├── DateDimension │ ├── Application │ │ └── Resource │ │ │ └── DateDimensionResource.php │ ├── Domain │ │ ├── Entity │ │ │ └── DateDimension.php │ │ └── Repository │ │ │ └── Interfaces │ │ │ └── DateDimensionRepositoryInterface.php │ ├── Infrastructure │ │ └── Repository │ │ │ └── DateDimensionRepository.php │ └── Transport │ │ └── Command │ │ └── Utils │ │ └── CreateDateDimensionEntitiesCommand.php ├── General │ ├── Application │ │ ├── Collection │ │ │ └── Traits │ │ │ │ └── CollectionTrait.php │ │ ├── Compiler │ │ │ └── StopwatchCompilerPass.php │ │ ├── DTO │ │ │ ├── Interfaces │ │ │ │ └── RestDtoInterface.php │ │ │ └── RestDto.php │ │ ├── Decorator │ │ │ └── StopwatchDecorator.php │ │ ├── Exception │ │ │ ├── Interfaces │ │ │ │ └── ClientErrorInterface.php │ │ │ ├── Models │ │ │ │ └── ValidatorError.php │ │ │ └── ValidatorException.php │ │ ├── Resource │ │ │ └── ResourceCollection.php │ │ ├── Rest │ │ │ ├── Interfaces │ │ │ │ ├── BaseRestResourceInterface.php │ │ │ │ ├── RestCountResourceInterface.php │ │ │ │ ├── RestCreateResourceInterface.php │ │ │ │ ├── RestDeleteResourceInterface.php │ │ │ │ ├── RestFindOneResourceInterface.php │ │ │ │ ├── RestIdsResourceInterface.php │ │ │ │ ├── RestListResourceInterface.php │ │ │ │ ├── RestPatchResourceInterface.php │ │ │ │ ├── RestResourceInterface.php │ │ │ │ ├── RestSaveResourceInterface.php │ │ │ │ ├── RestSmallResourceInterface.php │ │ │ │ └── RestUpdateResourceInterface.php │ │ │ ├── RestResource.php │ │ │ ├── RestSmallResource.php │ │ │ └── Traits │ │ │ │ ├── Methods │ │ │ │ ├── ResourceCountMethod.php │ │ │ │ ├── ResourceCreateMethod.php │ │ │ │ ├── ResourceDeleteMethod.php │ │ │ │ ├── ResourceFindMethod.php │ │ │ │ ├── ResourceFindOneByMethod.php │ │ │ │ ├── ResourceFindOneMethod.php │ │ │ │ ├── ResourceIdsMethod.php │ │ │ │ ├── ResourcePatchMethod.php │ │ │ │ ├── ResourceSaveMethod.php │ │ │ │ └── ResourceUpdateMethod.php │ │ │ │ ├── RestResourceBaseMethods.php │ │ │ │ ├── RestResourceCount.php │ │ │ │ ├── RestResourceCreate.php │ │ │ │ ├── RestResourceDelete.php │ │ │ │ ├── RestResourceFind.php │ │ │ │ ├── RestResourceFindOne.php │ │ │ │ ├── RestResourceFindOneBy.php │ │ │ │ ├── RestResourceIds.php │ │ │ │ ├── RestResourcePatch.php │ │ │ │ ├── RestResourceSave.php │ │ │ │ └── RestResourceUpdate.php │ │ ├── Utils │ │ │ ├── Interfaces │ │ │ │ └── MailSenderInterface.php │ │ │ └── Traits │ │ │ │ └── MailSenderTrait.php │ │ └── Validator │ │ │ └── Constraints │ │ │ ├── EntityReferenceExists.php │ │ │ └── EntityReferenceExistsValidator.php │ ├── Domain │ │ ├── Doctrine │ │ │ └── DBAL │ │ │ │ └── Types │ │ │ │ ├── EnumLanguageType.php │ │ │ │ ├── EnumLocaleType.php │ │ │ │ ├── EnumLogLoginType.php │ │ │ │ ├── EnumType.php │ │ │ │ ├── Types.php │ │ │ │ └── UTCDateTimeType.php │ │ ├── Entity │ │ │ ├── Interfaces │ │ │ │ └── EntityInterface.php │ │ │ └── Traits │ │ │ │ ├── Timestampable.php │ │ │ │ └── Uuid.php │ │ ├── Enum │ │ │ ├── Interfaces │ │ │ │ ├── DatabaseEnumInterface.php │ │ │ │ └── StringEnumInterface.php │ │ │ ├── Language.php │ │ │ ├── Locale.php │ │ │ └── Traits │ │ │ │ └── GetValues.php │ │ ├── Exception │ │ │ ├── BaseException.php │ │ │ ├── BaseTranslatableException.php │ │ │ └── Interfaces │ │ │ │ ├── ExceptionInterface.php │ │ │ │ └── TranslatableExceptionInterface.php │ │ ├── Message │ │ │ └── Interfaces │ │ │ │ ├── MessageHighInterface.php │ │ │ │ └── MessageLowInterface.php │ │ ├── Repository │ │ │ └── Interfaces │ │ │ │ └── BaseRepositoryInterface.php │ │ ├── Rest │ │ │ └── UuidHelper.php │ │ ├── Service │ │ │ └── Interfaces │ │ │ │ ├── ElasticsearchServiceInterface.php │ │ │ │ ├── MailerServiceInterface.php │ │ │ │ └── MessageServiceInterface.php │ │ └── Utils │ │ │ └── JSON.php │ ├── Infrastructure │ │ ├── DQL │ │ │ ├── BinToUuidOT.php │ │ │ └── UuidOTToBin.php │ │ ├── Messenger │ │ │ └── Strategy │ │ │ │ └── FailedRetry.php │ │ ├── Repository │ │ │ ├── BaseRepository.php │ │ │ └── Traits │ │ │ │ ├── RepositoryMethodsTrait.php │ │ │ │ └── RepositoryWrappersTrait.php │ │ ├── Rest │ │ │ ├── Interfaces │ │ │ │ └── SearchTermInterface.php │ │ │ ├── RepositoryHelper.php │ │ │ └── SearchTerm.php │ │ └── Service │ │ │ ├── ElasticsearchService.php │ │ │ ├── MailerService.php │ │ │ └── MessageService.php │ └── Transport │ │ ├── AutoMapper │ │ ├── RestAutoMapperConfiguration.php │ │ └── RestRequestMapper.php │ │ ├── Command │ │ ├── HelperConfigure.php │ │ └── Traits │ │ │ ├── ExecuteMultipleCommandTrait.php │ │ │ ├── GetApplicationTrait.php │ │ │ └── SymfonyStyleTrait.php │ │ ├── EventSubscriber │ │ ├── BodySubscriber.php │ │ ├── ExceptionSubscriber.php │ │ ├── RequestLogSubscriber.php │ │ └── ResponseSubscriber.php │ │ ├── Form │ │ └── Type │ │ │ ├── Interfaces │ │ │ └── FormTypeLabelInterface.php │ │ │ └── Traits │ │ │ └── AddBasicFieldToForm.php │ │ ├── Rest │ │ ├── Controller.php │ │ ├── ControllerCollection.php │ │ ├── Interfaces │ │ │ ├── ControllerInterface.php │ │ │ └── ResponseHandlerInterface.php │ │ ├── RequestHandler.php │ │ ├── ResponseHandler.php │ │ └── Traits │ │ │ ├── Actions │ │ │ ├── Admin │ │ │ │ ├── CountAction.php │ │ │ │ ├── CreateAction.php │ │ │ │ ├── DeleteAction.php │ │ │ │ ├── FindAction.php │ │ │ │ ├── FindOneAction.php │ │ │ │ ├── IdsAction.php │ │ │ │ ├── PatchAction.php │ │ │ │ └── UpdateAction.php │ │ │ ├── Anon │ │ │ │ ├── CountAction.php │ │ │ │ ├── CreateAction.php │ │ │ │ ├── DeleteAction.php │ │ │ │ ├── FindAction.php │ │ │ │ ├── FindOneAction.php │ │ │ │ ├── IdsAction.php │ │ │ │ ├── PatchAction.php │ │ │ │ └── UpdateAction.php │ │ │ ├── Authenticated │ │ │ │ ├── CountAction.php │ │ │ │ ├── CreateAction.php │ │ │ │ ├── DeleteAction.php │ │ │ │ ├── FindAction.php │ │ │ │ ├── FindOneAction.php │ │ │ │ ├── IdsAction.php │ │ │ │ ├── PatchAction.php │ │ │ │ └── UpdateAction.php │ │ │ ├── Logged │ │ │ │ ├── CountAction.php │ │ │ │ ├── CreateAction.php │ │ │ │ ├── DeleteAction.php │ │ │ │ ├── FindAction.php │ │ │ │ ├── FindOneAction.php │ │ │ │ ├── IdsAction.php │ │ │ │ ├── PatchAction.php │ │ │ │ └── UpdateAction.php │ │ │ ├── RestActionBase.php │ │ │ ├── Root │ │ │ │ ├── CountAction.php │ │ │ │ ├── CreateAction.php │ │ │ │ ├── DeleteAction.php │ │ │ │ ├── FindAction.php │ │ │ │ ├── FindOneAction.php │ │ │ │ ├── IdsAction.php │ │ │ │ ├── PatchAction.php │ │ │ │ └── UpdateAction.php │ │ │ └── User │ │ │ │ ├── CountAction.php │ │ │ │ ├── CreateAction.php │ │ │ │ ├── DeleteAction.php │ │ │ │ ├── FindAction.php │ │ │ │ ├── FindOneAction.php │ │ │ │ ├── IdsAction.php │ │ │ │ ├── PatchAction.php │ │ │ │ └── UpdateAction.php │ │ │ ├── Methods │ │ │ ├── CountMethod.php │ │ │ ├── CreateMethod.php │ │ │ ├── DeleteMethod.php │ │ │ ├── FindMethod.php │ │ │ ├── FindOneByMethod.php │ │ │ ├── FindOneMethod.php │ │ │ ├── IdsMethod.php │ │ │ ├── PatchMethod.php │ │ │ ├── RestMethodProcessCriteria.php │ │ │ └── UpdateMethod.php │ │ │ └── RestMethodHelper.php │ │ └── ValueResolver │ │ ├── EntityValueResolver.php │ │ ├── LoggedInUserValueResolver.php │ │ └── RestDtoValueResolver.php ├── Kernel.php ├── Log │ ├── Application │ │ ├── Resource │ │ │ ├── LogLoginFailureResource.php │ │ │ ├── LogLoginResource.php │ │ │ └── LogRequestResource.php │ │ └── Service │ │ │ ├── Interfaces │ │ │ ├── LoginLoggerServiceInterface.php │ │ │ └── RequestLoggerServiceInterface.php │ │ │ ├── LoginLoggerService.php │ │ │ ├── RequestLoggerService.php │ │ │ └── Utils │ │ │ ├── CleanupLogService.php │ │ │ └── Interfaces │ │ │ └── CleanupLogServiceInterface.php │ ├── Domain │ │ ├── Entity │ │ │ ├── LogLogin.php │ │ │ ├── LogLoginFailure.php │ │ │ ├── LogRequest.php │ │ │ └── Traits │ │ │ │ ├── LogEntityTrait.php │ │ │ │ └── LogRequestProcessRequestTrait.php │ │ ├── Enum │ │ │ └── LogLogin.php │ │ └── Repository │ │ │ └── Interfaces │ │ │ ├── LogLoginFailureRepositoryInterface.php │ │ │ ├── LogLoginRepositoryInterface.php │ │ │ └── LogRequestRepositoryInterface.php │ ├── Infrastructure │ │ └── Repository │ │ │ ├── LogLoginFailureRepository.php │ │ │ ├── LogLoginRepository.php │ │ │ └── LogRequestRepository.php │ └── Transport │ │ └── Command │ │ ├── Scheduler │ │ └── CleanupLogsScheduledCommand.php │ │ └── Utils │ │ └── CleanupLogsCommand.php ├── Role │ ├── Application │ │ ├── Resource │ │ │ └── RoleResource.php │ │ ├── Security │ │ │ ├── Interfaces │ │ │ │ └── RolesServiceInterface.php │ │ │ └── RolesService.php │ │ └── Service │ │ │ └── Role │ │ │ ├── Interfaces │ │ │ └── SyncRolesServiceInterface.php │ │ │ └── SyncRolesService.php │ ├── Domain │ │ ├── Entity │ │ │ └── Role.php │ │ ├── Enum │ │ │ └── Role.php │ │ └── Repository │ │ │ └── Interfaces │ │ │ └── RoleRepositoryInterface.php │ ├── Infrastructure │ │ ├── DataFixtures │ │ │ └── ORM │ │ │ │ └── LoadRoleData.php │ │ └── Repository │ │ │ └── RoleRepository.php │ └── Transport │ │ ├── Command │ │ └── Role │ │ │ ├── CreateRolesCommand.php │ │ │ └── CreateRolesWithUserGroupsCommand.php │ │ ├── Controller │ │ └── Api │ │ │ └── v1 │ │ │ └── Role │ │ │ ├── FindOneRoleController.php │ │ │ ├── InheritedRolesController.php │ │ │ └── RoleController.php │ │ └── Form │ │ └── DataTransformer │ │ └── RoleTransformer.php ├── Tool │ ├── Application │ │ ├── Resource │ │ │ └── HealthResource.php │ │ ├── Service │ │ │ ├── Elastic │ │ │ │ ├── CreateOrUpdateTemplateService.php │ │ │ │ └── Interfaces │ │ │ │ │ └── CreateOrUpdateTemplateServiceInterface.php │ │ │ ├── HealthService.php │ │ │ ├── Interfaces │ │ │ │ ├── HealthServiceInterface.php │ │ │ │ └── VersionServiceInterface.php │ │ │ ├── LocalizationService.php │ │ │ ├── Scheduler │ │ │ │ ├── Interfaces │ │ │ │ │ └── ScheduledCommandServiceInterface.php │ │ │ │ └── ScheduledCommandService.php │ │ │ ├── Utils │ │ │ │ ├── CheckDependenciesService.php │ │ │ │ ├── Interfaces │ │ │ │ │ ├── CheckDependenciesServiceInterface.php │ │ │ │ │ ├── MessengerMessagesServiceInterface.php │ │ │ │ │ ├── WaitDatabaseServiceInterface.php │ │ │ │ │ └── WaitElasticServiceInterface.php │ │ │ │ ├── MessengerMessagesService.php │ │ │ │ ├── WaitDatabaseService.php │ │ │ │ └── WaitElasticService.php │ │ │ └── VersionService.php │ │ └── Validator │ │ │ └── Constraints │ │ │ ├── Language.php │ │ │ ├── LanguageValidator.php │ │ │ ├── Locale.php │ │ │ ├── LocaleValidator.php │ │ │ ├── Timezone.php │ │ │ └── TimezoneValidator.php │ ├── Domain │ │ ├── Entity │ │ │ └── Health.php │ │ ├── Exception │ │ │ └── Crypt │ │ │ │ └── Exception.php │ │ ├── Message │ │ │ ├── ExternalMessage.php │ │ │ └── TestMessage.php │ │ ├── Repository │ │ │ └── Interfaces │ │ │ │ ├── HealthRepositoryInterface.php │ │ │ │ ├── MessengerMessagesRepositoryInterface.php │ │ │ │ └── ScheduledCommandRepositoryInterface.php │ │ └── Service │ │ │ ├── Crypt │ │ │ ├── Interfaces │ │ │ │ ├── CryptServiceInterface.php │ │ │ │ └── OpenSslCryptServiceInterface.php │ │ │ └── OpenSslCryptService.php │ │ │ ├── Interfaces │ │ │ └── LocalizationServiceInterface.php │ │ │ └── Utils │ │ │ └── Interfaces │ │ │ └── CheckDatabaseConnectionServiceInterface.php │ ├── Infrastructure │ │ ├── Repository │ │ │ ├── HealthRepository.php │ │ │ ├── MessengerMessagesRepository.php │ │ │ └── ScheduledCommandRepository.php │ │ └── Service │ │ │ └── Utils │ │ │ └── CheckDatabaseConnectionService.php │ └── Transport │ │ ├── Command │ │ ├── Elastic │ │ │ └── CreateOrUpdateTemplateCommand.php │ │ ├── Scheduler │ │ │ └── CleanupMessengerMessagesScheduledCommand.php │ │ └── Utils │ │ │ ├── CheckDependencies.php │ │ │ ├── CleanupMessengerMessagesCommand.php │ │ │ ├── WaitDatabaseCommand.php │ │ │ └── WaitElasticCommand.php │ │ ├── Controller │ │ └── Api │ │ │ ├── HealthController.php │ │ │ ├── IndexController.php │ │ │ ├── VersionController.php │ │ │ └── v1 │ │ │ └── Localization │ │ │ ├── LanguageController.php │ │ │ ├── LocaleController.php │ │ │ └── TimeZoneController.php │ │ ├── EventSubscriber │ │ └── AcceptLanguageSubscriber.php │ │ ├── MessageHandler │ │ ├── ExternalHandler.php │ │ └── TestHandler.php │ │ └── Serializer │ │ └── ExternalMessageSerializer.php └── User │ ├── Application │ ├── DTO │ │ ├── Traits │ │ │ └── PatchUserGroups.php │ │ ├── User │ │ │ ├── User.php │ │ │ ├── UserCreate.php │ │ │ ├── UserPatch.php │ │ │ └── UserUpdate.php │ │ └── UserGroup │ │ │ ├── UserGroup.php │ │ │ ├── UserGroupCreate.php │ │ │ ├── UserGroupPatch.php │ │ │ └── UserGroupUpdate.php │ ├── Resource │ │ ├── UserGroupResource.php │ │ └── UserResource.php │ ├── Security │ │ ├── Handler │ │ │ └── TranslatedAuthenticationFailureHandler.php │ │ ├── Provider │ │ │ └── SecurityUserFactory.php │ │ ├── SecurityUser.php │ │ ├── UserTypeIdentification.php │ │ └── Voter │ │ │ └── IsUserHimselfVoter.php │ └── Validator │ │ └── Constraints │ │ ├── UniqueEmail.php │ │ ├── UniqueEmailValidator.php │ │ ├── UniqueUsername.php │ │ └── UniqueUsernameValidator.php │ ├── Domain │ ├── Entity │ │ ├── Interfaces │ │ │ ├── UserGroupAwareInterface.php │ │ │ └── UserInterface.php │ │ ├── Traits │ │ │ ├── Blameable.php │ │ │ └── UserRelations.php │ │ ├── User.php │ │ └── UserGroup.php │ └── Repository │ │ └── Interfaces │ │ ├── UserGroupRepositoryInterface.php │ │ └── UserRepositoryInterface.php │ ├── Infrastructure │ ├── DataFixtures │ │ └── ORM │ │ │ ├── LoadUserData.php │ │ │ └── LoadUserGroupData.php │ └── Repository │ │ ├── UserGroupRepository.php │ │ └── UserRepository.php │ └── Transport │ ├── AutoMapper │ ├── User │ │ ├── AutoMapperConfiguration.php │ │ └── RequestMapper.php │ └── UserGroup │ │ ├── AutoMapperConfiguration.php │ │ └── RequestMapper.php │ ├── Command │ ├── Traits │ │ └── ApiKeyUserManagementHelperTrait.php │ └── User │ │ ├── CreateUserCommand.php │ │ ├── CreateUserGroupCommand.php │ │ ├── EditUserCommand.php │ │ ├── EditUserGroupCommand.php │ │ ├── ListUserGroupsCommand.php │ │ ├── ListUsersCommand.php │ │ ├── ManagementCommand.php │ │ ├── RemoveUserCommand.php │ │ ├── RemoveUserGroupCommand.php │ │ └── UserHelper.php │ ├── Controller │ └── Api │ │ └── v1 │ │ ├── Auth │ │ └── GetTokenController.php │ │ ├── Profile │ │ ├── GroupsController.php │ │ ├── IndexController.php │ │ └── RolesController.php │ │ ├── User │ │ ├── AttachUserGroupController.php │ │ ├── DeleteUserController.php │ │ ├── DetachUserGroupController.php │ │ ├── UserController.php │ │ ├── UserGroupsController.php │ │ └── UserRolesController.php │ │ └── UserGroup │ │ ├── AttachUserController.php │ │ ├── DetachUserController.php │ │ ├── UserGroupController.php │ │ └── UsersController.php │ ├── EventListener │ └── UserEntityEventListener.php │ ├── EventSubscriber │ ├── AuthenticationFailureSubscriber.php │ ├── AuthenticationSuccessSubscriber.php │ ├── DoctrineExtensionSubscriber.php │ ├── JWTCreatedSubscriber.php │ ├── JWTDecodedSubscriber.php │ └── LockedUserSubscriber.php │ └── Form │ ├── DataTransformer │ └── UserGroupTransformer.php │ └── Type │ ├── Console │ ├── UserGroupType.php │ └── UserType.php │ └── Traits │ └── UserGroupChoices.php ├── symfony.lock ├── templates ├── Doctrine │ └── migration.tpl ├── Emails │ └── error.html.twig ├── Swagger │ ├── parameter_criteria.twig │ ├── parameter_limit.twig │ ├── parameter_offset.twig │ ├── parameter_order.twig │ ├── parameter_populate.twig │ └── parameter_search.twig └── base.html.twig ├── tests ├── Application │ ├── ApiKey │ │ └── Transport │ │ │ └── Controller │ │ │ └── Api │ │ │ ├── v1 │ │ │ └── ApiKeyControllerTest.php │ │ │ └── v2 │ │ │ ├── ApiKeyCountControllerTest.php │ │ │ ├── ApiKeyCreateControllerTest.php │ │ │ ├── ApiKeyDeleteControllerTest.php │ │ │ ├── ApiKeyIdsControllerTest.php │ │ │ ├── ApiKeyListControllerTest.php │ │ │ ├── ApiKeyPatchControllerTest.php │ │ │ ├── ApiKeyUpdateControllerTest.php │ │ │ ├── ApiKeyViewControllerTest.php │ │ │ └── Traits │ │ │ └── ApiKeyHelper.php │ ├── Controller │ │ ├── CommandSchedulerTest.php │ │ └── DocumentationTest.php │ ├── Role │ │ └── Transport │ │ │ └── Controller │ │ │ └── Api │ │ │ └── v1 │ │ │ └── Role │ │ │ ├── FindOneRoleControllerTest.php │ │ │ ├── InheritedRolesControllerTest.php │ │ │ └── RoleControllerTest.php │ ├── Tool │ │ └── Transport │ │ │ └── Controller │ │ │ └── Api │ │ │ ├── HealthControllerTest.php │ │ │ ├── IndexControllerTest.php │ │ │ ├── VersionControllerTest.php │ │ │ └── v1 │ │ │ └── Localization │ │ │ ├── LanguageControllerTest.php │ │ │ ├── LocaleControllerTest.php │ │ │ └── TimeZoneControllerTest.php │ └── User │ │ └── Transport │ │ └── Controller │ │ └── Api │ │ └── v1 │ │ ├── Auth │ │ └── GetTokenControllerTest.php │ │ ├── Profile │ │ ├── GroupsControllerTest.php │ │ ├── IndexControllerTest.php │ │ └── RolesControllerTest.php │ │ ├── Traits │ │ └── UserHelper.php │ │ ├── User │ │ ├── AttachUserGroupControllerTest.php │ │ ├── DeleteUserControllerTest.php │ │ ├── DetachUserGroupControllerTest.php │ │ ├── UserControllerTest.php │ │ ├── UserGroupsControllerTest.php │ │ └── UserRolesControllerTest.php │ │ └── UserGroup │ │ ├── AttachUserControllerTest.php │ │ ├── DetachUserControllerTest.php │ │ ├── UserGroupControllerTest.php │ │ └── UsersControllerTest.php ├── Integration │ └── General │ │ └── Application │ │ └── Validator │ │ └── Constraints │ │ ├── EntityReferenceExistsValidatorTest.php │ │ └── src │ │ └── TestEntityReference.php ├── TestCase │ ├── Auth.php │ └── WebTestCase.php ├── Unit │ ├── DateDimension │ │ └── Domain │ │ │ └── Entity │ │ │ └── DateDimensionTest.php │ ├── ExampleTest.php │ └── Tool │ │ └── Domain │ │ └── Service │ │ └── Crypt │ │ └── OpenSslCryptServiceTest.php ├── Utils │ ├── PhpUnitUtil.php │ └── StringableArrayObject.php └── bootstrap.php ├── tools ├── 01_phpunit │ ├── composer.json │ └── composer.lock ├── 02_phpstan │ ├── composer.json │ └── composer.lock ├── 03_ecs │ ├── composer.json │ └── composer.lock ├── 04_php-coveralls │ ├── composer.json │ └── composer.lock ├── 05_phpinsights │ ├── composer.json │ └── composer.lock ├── 06_phpmd │ ├── composer.json │ └── composer.lock ├── 07_phpmetrics │ ├── composer.json │ └── composer.lock ├── 08_rector │ ├── composer.json │ └── composer.lock ├── 09_composer │ ├── composer.json │ └── composer.lock └── 10_phpcpd │ ├── composer.json │ └── composer.lock ├── translations ├── .gitignore ├── crypt.en.yaml ├── crypt.ru.yaml ├── crypt.ua.yaml ├── security.fi.yaml ├── security.ru.yaml └── security.ua.yaml └── var └── elasticsearch-data └── .gitkeep /.bitbucket/dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -eu 4 | 5 | # Add python pip and bash 6 | apk add --no-cache py-pip bash make 7 | 8 | # Install docker-compose via pip 9 | pip install --no-cache-dir docker-compose~=1.23.0 10 | docker-compose -v 11 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | ### User-specific stuff: 2 | /.git* 3 | /.idea/workspace.xml 4 | .dockerignore 5 | 6 | ###> symfony/framework-bundle ### 7 | /.env.local 8 | /.env.*.local 9 | /.env.local.php 10 | /public/bundles/ 11 | /vendor/ 12 | ###< symfony/framework-bundle ### 13 | 14 | ### Other data 15 | /var/mysql-data 16 | /var/rabbitmq 17 | /var/elasticsearch-data 18 | /var/redis 19 | 20 | ### Vendor bin dependencies 21 | /tools/*/vendor/ 22 | .phpunit.cache 23 | .phpunit.result.cache 24 | 25 | ### Docker 26 | Dockerfile 27 | compose.yaml 28 | compose-test-ci.yaml 29 | compose-staging.yaml 30 | compose-prod.yaml 31 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 4 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [*.yml] 16 | indent_size = 2 17 | 18 | [{composer.json,Makefile}] 19 | indent_style = tab 20 | -------------------------------------------------------------------------------- /.env.dev: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/.env.dev -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | # define your env variables for the test env here 2 | APP_ENV=test 3 | KERNEL_CLASS='App\Kernel' 4 | APP_SECRET='$ecretf0rt3st' 5 | APP_DEBUG=0 6 | SYMFONY_DEPRECATIONS_HELPER=999999 7 | 8 | ###> doctrine/doctrine-bundle ### 9 | DATABASE_URL=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/symfony_testing 10 | ###< doctrine/doctrine-bundle ### 11 | 12 | ###> symfony/mailer ### 13 | MAILER_DSN=null://null 14 | APP_SENDER_EMAIL=admin@localhost 15 | APP_EMAIL_NOTIFICATION_ABOUT_ERROR=1 16 | APP_ERROR_RECEIVER_EMAIL=admin@localhost 17 | ###< symfony/mailer ### 18 | 19 | ###> symfony/lock ### 20 | LOCK_DSN=flock 21 | ###< symfony/lock ### 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | *.js linguist-vendored 5 | CHANGELOG.md export-ignore 6 | docs/postman/symfony.postman_collection.json binary 7 | tools/**/composer.lock binary 8 | composer.lock binary 9 | symfony.lock binary 10 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://www.paypal.com/donate/?hosted_button_id=4ZZHRZHENRPZN"] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | reports/* 2 | !reports/.gitkeep 3 | 4 | ###> symfony/framework-bundle ### 5 | /.env.local 6 | /.env.local.php 7 | /.env.*.local 8 | /config/secrets/prod/prod.decrypt.private.php 9 | /public/bundles/ 10 | /var/* 11 | !/var/elasticsearch-data/.gitkeep 12 | /vendor/ 13 | /tools/**/vendor 14 | ###< symfony/framework-bundle ### 15 | 16 | ###> symfony/phpunit-bridge ### 17 | .phpunit 18 | .phpunit.result.cache 19 | /phpunit.xml 20 | .phpunit.cache 21 | ###< symfony/phpunit-bridge ### 22 | 23 | ###> lexik/jwt-authentication-bundle ### 24 | /config/jwt/*.pem 25 | ###< lexik/jwt-authentication-bundle ### 26 | 27 | ###> symfony/asset-mapper ### 28 | /public/assets/ 29 | /assets/vendor/ 30 | ###< symfony/asset-mapper ### 31 | 32 | ###> friendsofphp/php-cs-fixer ### 33 | .php-cs-fixer.cache 34 | .php_cs 35 | .php_cs.cache 36 | ###< friendsofphp/php-cs-fixer ### 37 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /dictionaries/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/PMDPlugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/codeception.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 29 | 30 | -------------------------------------------------------------------------------- /.idea/elasticsearchSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/laravel-idea.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/php-docker-settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /.idea/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/redis-manager-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/remote-mappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/symfony2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vagrant.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/webResources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Dmitriy Kravtsov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap.js'; 2 | /* 3 | * Welcome to your app's main JavaScript file! 4 | * 5 | * This file will be included onto the page via the importmap() Twig function, 6 | * which should already be in your base.html.twig. 7 | */ 8 | import './styles/app.css'; 9 | 10 | console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉'); 11 | -------------------------------------------------------------------------------- /assets/bootstrap.js: -------------------------------------------------------------------------------- 1 | import { startStimulusApp } from '@symfony/stimulus-bundle'; 2 | 3 | const app = startStimulusApp(); 4 | // register any custom, 3rd party controllers here 5 | // app.register('some_controller_name', SomeImportedController); 6 | -------------------------------------------------------------------------------- /assets/controllers.json: -------------------------------------------------------------------------------- 1 | { 2 | "controllers": { 3 | "@symfony/ux-turbo": { 4 | "turbo-core": { 5 | "enabled": true, 6 | "fetch": "eager" 7 | }, 8 | "mercure-turbo-stream": { 9 | "enabled": false, 10 | "fetch": "eager" 11 | } 12 | } 13 | }, 14 | "entrypoints": [] 15 | } 16 | -------------------------------------------------------------------------------- /assets/controllers/hello_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from '@hotwired/stimulus'; 2 | 3 | /* 4 | * This is an example Stimulus controller! 5 | * 6 | * Any element with a data-controller="hello" attribute will cause 7 | * this controller to be executed. The name "hello" comes from the filename: 8 | * hello_controller.js -> "hello" 9 | * 10 | * Delete this file or adapt it for your use! 11 | */ 12 | export default class extends Controller { 13 | connect() { 14 | this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /assets/styles/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: skyblue; 3 | } 4 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | addPatternFilter(PatternFilter::fromString('/ext-.*/')) 13 | ->addNamedFilter(NamedFilter::fromString('beberlei/doctrineextensions')) 14 | ->addNamedFilter(NamedFilter::fromString('doctrine/doctrine-migrations-bundle')) 15 | ->addNamedFilter(NamedFilter::fromString('nelmio/cors-bundle')) 16 | ->addPatternFilter(PatternFilter::fromString('/symfony\/.*/')) 17 | ->addNamedFilter(NamedFilter::fromString('twig/extra-bundle')) 18 | ->setAdditionalFilesFor('icanhazstring/composer-unused', [ 19 | __FILE__, 20 | ...Glob::glob(__DIR__ . '/config/*.php'), 21 | ]); 22 | }; 23 | -------------------------------------------------------------------------------- /config/jwt/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/config/jwt/.gitkeep -------------------------------------------------------------------------------- /config/packages/asset_mapper.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | asset_mapper: 3 | # The paths to make available to the asset mapper. 4 | paths: 5 | - assets/ 6 | missing_import_mode: strict 7 | 8 | when@prod: 9 | framework: 10 | asset_mapper: 11 | missing_import_mode: warn 12 | -------------------------------------------------------------------------------- /config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | # Unique name of your app: used to compute stable namespaces for cache keys. 4 | prefix_seed: systemsdk/docker-symfony-api 5 | 6 | # The "app" cache stores to the filesystem by default. 7 | # The data in this cache should persist between deploys. 8 | # Other options include: 9 | 10 | # Redis 11 | app: cache.adapter.redis 12 | default_redis_provider: '%env(resolve:REDIS_URL)%' 13 | 14 | # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) 15 | #app: cache.adapter.apcu 16 | 17 | # Namespaced pools use the above "app" backend by default 18 | #pools: 19 | #my.dedicated.cache: null 20 | -------------------------------------------------------------------------------- /config/packages/debug.yaml: -------------------------------------------------------------------------------- 1 | when@dev: 2 | debug: 3 | # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser. 4 | # See the "server:dump" command to start a new server. 5 | dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%" 6 | -------------------------------------------------------------------------------- /config/packages/dev/systemsdk_easy_log.yaml: -------------------------------------------------------------------------------- 1 | easy_log: 2 | log_path: '%kernel.logs_dir%/%kernel.environment%-readable.log' 3 | max_line_length: 120 4 | prefix_length: 2 5 | ignored_routes: ['_wdt', '_profiler'] 6 | -------------------------------------------------------------------------------- /config/packages/doctrine_extensions.yaml: -------------------------------------------------------------------------------- 1 | # See https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/doc/symfony4.md 2 | services: 3 | Gedmo\Timestampable\TimestampableListener: 4 | tags: 5 | - { name: doctrine.event_listener, event: 'prePersist', connection: default } 6 | - { name: doctrine.event_listener, event: 'onFlush', connection: default } 7 | - { name: doctrine.event_listener, event: 'loadClassMetadata', connection: default } 8 | 9 | Gedmo\Blameable\BlameableListener: 10 | tags: 11 | - { name: doctrine.event_listener, event: 'prePersist', connection: default } 12 | - { name: doctrine.event_listener, event: 'onFlush', connection: default } 13 | - { name: doctrine.event_listener, event: 'loadClassMetadata', connection: default } 14 | -------------------------------------------------------------------------------- /config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | migrations_paths: 3 | # namespace is arbitrary but should be different from App\Migrations 4 | # as migrations classes should NOT be autoloaded 5 | 'DoctrineMigrations': '%kernel.project_dir%/migrations' 6 | enable_profiler: '%kernel.debug%' 7 | storage: 8 | table_storage: 9 | table_name: 'migration_versions' 10 | version_column_name: 'version' 11 | version_column_length: 512 12 | executed_at_column_name: 'executed_at' 13 | all_or_nothing: false 14 | custom_template: '%kernel.project_dir%/templates/Doctrine/migration.tpl' 15 | -------------------------------------------------------------------------------- /config/packages/event_listeners.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | # default configuration for services in *this* file 3 | _defaults: 4 | # automatically injects dependencies in your services 5 | autowire: true 6 | # automatically registers your services as commands, form types, etc. 7 | autoconfigure: true 8 | # this means you cannot fetch services directly from the container via $container->get() 9 | # if you need to do this, you can override this setting on individual services 10 | public: false 11 | 12 | App\User\Transport\EventListener\UserEntityEventListener: 13 | tags: 14 | - { name: doctrine.event_listener, event: prePersist } 15 | - { name: doctrine.event_listener, event: preUpdate } 16 | 17 | App\ApiKey\Transport\EventListener\ApiKeyEntityEventListener: 18 | arguments: 19 | $apiKeyTokenOpenSslEncrypt: '%env(bool:API_KEY_TOKEN_OPEN_SSL_ENCRYPT)%' 20 | tags: 21 | - { name: doctrine.event_listener, event: prePersist } 22 | - { name: doctrine.event_listener, event: postPersist } 23 | - { name: doctrine.event_listener, event: preUpdate } 24 | - { name: doctrine.event_listener, event: postUpdate } 25 | - { name: doctrine.event_listener, event: postLoad } 26 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | # see https://symfony.com/doc/current/reference/configuration/framework.html 2 | framework: 3 | secret: '%env(APP_SECRET)%' 4 | csrf_protection: false 5 | annotations: false 6 | http_method_override: false 7 | handle_all_throwables: true 8 | default_locale: '%locale%' 9 | 10 | # see https://symfony.com/doc/current/deployment/proxies.html 11 | trusted_proxies: '%env(TRUSTED_PROXIES)%' 12 | trusted_headers: [ 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix' ] 13 | 14 | translator: 15 | default_path: '%kernel.project_dir%/translations' 16 | 17 | serializer: 18 | enable_attributes: true 19 | 20 | php_errors: 21 | log: true 22 | 23 | # Enables session support. Note that the session will ONLY be started if you read or write from it. 24 | # Remove or comment this section to explicitly disable session support. 25 | #session: 26 | # handler_id: null 27 | # cookie_secure: auto 28 | # cookie_samesite: lax 29 | # storage_factory_id: session.storage.factory.native 30 | 31 | #esi: true 32 | #fragments: true 33 | 34 | when@test: 35 | framework: 36 | test: true 37 | profiler: 38 | collect: false 39 | cache: 40 | pools: 41 | app.version.cache: 42 | adapter: cache.adapter.filesystem 43 | -------------------------------------------------------------------------------- /config/packages/lexik_jwt_authentication.yaml: -------------------------------------------------------------------------------- 1 | lexik_jwt_authentication: 2 | secret_key: '%kernel.project_dir%/%env(JWT_SECRET_KEY)%' 3 | public_key: '%kernel.project_dir%/%env(JWT_PUBLIC_KEY)%' 4 | pass_phrase: '%env(JWT_PASSPHRASE)%' 5 | token_ttl: '%env(JWT_TOKEN_TTL)%' 6 | 7 | # token extraction settings 8 | token_extractors: 9 | authorization_header: # look for a token as Authorization Header 10 | enabled: true 11 | prefix: Bearer 12 | name: Authorization 13 | cookie: # check token in a cookie 14 | enabled: true 15 | name: BEARER 16 | query_parameter: # check token in query string parameter 17 | enabled: true 18 | name: bearer 19 | -------------------------------------------------------------------------------- /config/packages/lock.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | lock: '%env(LOCK_DSN)%' 3 | -------------------------------------------------------------------------------- /config/packages/mailer.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | mailer: 3 | dsn: '%env(MAILER_DSN)%' 4 | -------------------------------------------------------------------------------- /config/packages/nelmio_cors.yaml: -------------------------------------------------------------------------------- 1 | nelmio_cors: 2 | defaults: 3 | origin_regex: true 4 | allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] 5 | allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'] 6 | allow_headers: ['Content-Type', 'Authorization'] 7 | expose_headers: ['Link', 'X-API-VERSION'] 8 | max_age: 3600 9 | paths: 10 | '^/': null 11 | -------------------------------------------------------------------------------- /config/packages/notifier.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | notifier: 3 | #chatter_transports: 4 | # slack: '%env(SLACK_DSN)%' 5 | # telegram: '%env(TELEGRAM_DSN)%' 6 | #texter_transports: 7 | # twilio: '%env(TWILIO_DSN)%' 8 | # nexmo: '%env(NEXMO_DSN)%' 9 | channel_policy: 10 | # use chat/slack, chat/telegram, sms/twilio or sms/nexmo 11 | urgent: ['email'] 12 | high: ['email'] 13 | medium: ['email'] 14 | low: ['email'] 15 | admin_recipients: 16 | - { email: admin@example.com } 17 | -------------------------------------------------------------------------------- /config/packages/ramsey_uuid_doctrine.yaml: -------------------------------------------------------------------------------- 1 | doctrine: 2 | dbal: 3 | types: 4 | uuid: 'Ramsey\Uuid\Doctrine\UuidType' 5 | uuid_binary: 'Ramsey\Uuid\Doctrine\UuidBinaryType' 6 | uuid_binary_ordered_time: 'Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType' 7 | mapping_types: 8 | uuid_binary: 'binary' 9 | uuid_binary_ordered_time: 'binary' 10 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. 4 | # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands 5 | #default_uri: http://localhost 6 | 7 | when@prod: &prod 8 | framework: 9 | router: 10 | strict_requirements: null 11 | 12 | when@staging: *prod 13 | -------------------------------------------------------------------------------- /config/packages/scheduler.yaml: -------------------------------------------------------------------------------- 1 | # See full configuration at 2 | # https://github.com/Dukecity/CommandSchedulerBundle/wiki/Configuration 3 | dukecity_command_scheduler: 4 | 5 | # Scheduler will write output files here. set false to disable it. 6 | log_path: "%kernel.logs_dir%" 7 | 8 | # Add namespace you don't want to see its Command in the scheduler. 9 | excluded_command_namespaces: 10 | - _global 11 | - scheduler 12 | - server 13 | - container 14 | - config 15 | - generate 16 | - init 17 | - router 18 | - doctrine 19 | - debug 20 | -------------------------------------------------------------------------------- /config/packages/test/systemsdk_easy_log.yaml: -------------------------------------------------------------------------------- 1 | easy_log: 2 | log_path: '%kernel.logs_dir%/%kernel.environment%-readable.log' 3 | max_line_length: 120 4 | prefix_length: 2 5 | ignored_routes: ['_wdt', '_profiler'] 6 | -------------------------------------------------------------------------------- /config/packages/translation.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | default_locale: '%locale%' 3 | translator: 4 | default_path: '%kernel.project_dir%/translations' 5 | fallbacks: 6 | - '%locale%' 7 | # providers: 8 | # crowdin: 9 | # dsn: '%env(CROWDIN_DSN)%' 10 | # loco: 11 | # dsn: '%env(LOCO_DSN)%' 12 | # lokalise: 13 | # dsn: '%env(LOKALISE_DSN)%' 14 | # phrase: 15 | # dsn: '%env(PHRASE_DSN)%' 16 | -------------------------------------------------------------------------------- /config/packages/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | default_path: '%kernel.project_dir%/templates' 3 | file_name_pattern: '*.twig' 4 | 5 | when@test: 6 | twig: 7 | strict_variables: true 8 | -------------------------------------------------------------------------------- /config/packages/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | # Enables validator auto-mapping support. 4 | # For instance, basic validation constraints will be inferred from Doctrine's metadata. 5 | #auto_mapping: 6 | # App\Entity\: [] 7 | 8 | when@test: 9 | framework: 10 | validation: 11 | not_compromised_password: false 12 | -------------------------------------------------------------------------------- /config/packages/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | when@dev: 2 | web_profiler: 3 | toolbar: true 4 | 5 | framework: 6 | profiler: 7 | collect_serializer_data: true 8 | 9 | when@test: 10 | framework: 11 | profiler: { collect: false } 12 | -------------------------------------------------------------------------------- /config/preload.php: -------------------------------------------------------------------------------- 1 | 4 | # 5 | # For the full copyright and license information, please view 6 | # https://symfony.com/doc/current/contributing/code/license.html 7 | 8 | function _sf_console 9 | set sf_cmd (commandline -o) 10 | set c (count (commandline -oc)) 11 | 12 | set completecmd "$sf_cmd[1]" "_complete" "--no-interaction" "-sfish" "-a1" 13 | 14 | for i in $sf_cmd 15 | if [ $i != "" ] 16 | set completecmd $completecmd "-i$i" 17 | end 18 | end 19 | 20 | set completecmd $completecmd "-c$c" 21 | 22 | $completecmd 23 | end 24 | 25 | complete -c 'console' -a '(_sf_console)' -f 26 | -------------------------------------------------------------------------------- /docker/fish/config.fish: -------------------------------------------------------------------------------- 1 | source /home/www-data/.config/fish/completions/sf_console.fish 2 | 3 | if status is-interactive 4 | # Commands to run in interactive sessions can go here 5 | end 6 | -------------------------------------------------------------------------------- /docker/fish/functions/console.fish: -------------------------------------------------------------------------------- 1 | # Defined in - @ line 1 2 | function console --wraps=/var/www/html/bin/console --description 'alias console=/var/www/html/bin/console' 3 | /var/www/html/bin/console $argv; 4 | end 5 | -------------------------------------------------------------------------------- /docker/general/cron: -------------------------------------------------------------------------------- 1 | # Cron use www-data with sudo, because we need to redirect logs into /dev/stdout /dev/stderr for container 2 | * * * * * sudo -u www-data /usr/local/bin/php /var/www/html/bin/console scheduler:execute > /proc/1/fd/1 2>/proc/1/fd/2 3 | -------------------------------------------------------------------------------- /docker/general/do_we_need_xdebug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | if [ "$ENV" == "dev" ] || [ "$ENV" == "test" ]; then 4 | pecl install xdebug-$XDEBUG_VERSION 5 | mv /tmp/xdebug.ini /usr/local/etc/php/conf.d/ 6 | else 7 | rm /tmp/xdebug.ini 8 | fi 9 | -------------------------------------------------------------------------------- /docker/general/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:cron] 5 | command=/usr/sbin/cron -l 2 -f 6 | autostart=true 7 | autorestart=true 8 | 9 | [program:messenger-consume] 10 | directory=/var/www/html/ 11 | command=/usr/local/bin/php bin/console messenger:consume async_priority_high async_priority_low --time-limit=3600 12 | user=www-data 13 | #numprocs=2 14 | autostart=true 15 | autorestart=true 16 | startretries=40 17 | process_name=%(program_name)s_%(process_num)02d 18 | stdout_logfile_maxbytes=0 19 | stdout_logfile=/proc/1/fd/1 20 | stderr_logfile_maxbytes=0 21 | stderr_logfile=/proc/1/fd/2 22 | 23 | [program:messenger-consume-external] 24 | directory=/var/www/html/ 25 | command=/usr/local/bin/php bin/console messenger:consume async_external --time-limit=3600 26 | user=www-data 27 | #numprocs=2 28 | autostart=true 29 | autorestart=true 30 | startretries=40 31 | process_name=%(program_name)s_%(process_num)02d 32 | stdout_logfile_maxbytes=0 33 | stdout_logfile=/proc/1/fd/1 34 | stderr_logfile_maxbytes=0 35 | stderr_logfile=/proc/1/fd/2 36 | -------------------------------------------------------------------------------- /docker/kibana/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG ELK_VERSION=7.10.1 2 | 3 | # https://www.docker.elastic.co/ 4 | FROM docker.elastic.co/kibana/kibana:${ELK_VERSION} 5 | 6 | # Add your kibana plugins setup here 7 | # Example: RUN kibana-plugin install 8 | -------------------------------------------------------------------------------- /docker/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | 3 | # set main params 4 | ARG BUILD_ARGUMENT_ENV=dev 5 | ENV ENV=$BUILD_ARGUMENT_ENV 6 | 7 | RUN ln -sf /dev/stdout /var/log/nginx/access.log && \ 8 | ln -sf /dev/stderr /var/log/nginx/error.log && \ 9 | rm -rf /etc/nginx/conf.d/* 10 | 11 | # install openssl 12 | RUN apk add --update openssl && \ 13 | rm -rf /var/cache/apk/* 14 | 15 | # create folder for certificates 16 | RUN mkdir -p /etc/nginx/certificates 17 | 18 | # generate certificates 19 | # TODO: change it and make additional logic for production environment 20 | RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/certificates/key.pem -out /etc/nginx/certificates/cert.pem -subj "/C=AT/ST=Vienna/L=Vienna/O=Security/OU=Development/CN=example.com" 21 | 22 | # put nginx config 23 | COPY ./$BUILD_ARGUMENT_ENV/nginx.conf /etc/nginx/conf.d/default.conf 24 | -------------------------------------------------------------------------------- /docker/prod/kibana.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ## Default Kibana configuration from Kibana base image. 3 | ## https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/templates/kibana_yml.template.js 4 | # 5 | server.name: kibana 6 | server.host: "0" 7 | elasticsearch.hosts: [ "http://elasticsearch:9200" ] 8 | xpack.monitoring.ui.container.elasticsearch.enabled: true 9 | 10 | ## X-Pack security credentials 11 | # 12 | elasticsearch.username: elastic 13 | elasticsearch.password: changeme 14 | -------------------------------------------------------------------------------- /docker/prod/www.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | user = www-data 3 | group = www-data 4 | listen = *:9000 5 | pm = ondemand 6 | pm.max_children = 150 7 | pm.start_servers = 10 8 | pm.min_spare_servers = 10 9 | pm.max_spare_servers = 20 10 | pm.process_idle_timeout = 60s 11 | pm.max_requests = 10 12 | request_terminate_timeout = 60s 13 | request_slowlog_timeout = 30s 14 | slowlog = /proc/self/fd/2 -------------------------------------------------------------------------------- /docker/rabbitmq/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rabbitmq:4.0-management-alpine 2 | 3 | COPY rabbitmq_delayed_message_exchange-v4.0.7.ez /opt/rabbitmq/plugins/ 4 | RUN rabbitmq-plugins enable --offline rabbitmq_delayed_message_exchange 5 | -------------------------------------------------------------------------------- /docker/rabbitmq/rabbitmq_delayed_message_exchange-v4.0.7.ez: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docker/rabbitmq/rabbitmq_delayed_message_exchange-v4.0.7.ez -------------------------------------------------------------------------------- /docker/redis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM redis:latest 2 | 3 | COPY redis.conf /usr/local/etc/redis/redis.conf 4 | CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ] 5 | -------------------------------------------------------------------------------- /docker/redis/redis.conf: -------------------------------------------------------------------------------- 1 | maxmemory-policy volatile-lru 2 | -------------------------------------------------------------------------------- /docker/staging/kibana.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ## Default Kibana configuration from Kibana base image. 3 | ## https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/templates/kibana_yml.template.js 4 | # 5 | server.name: kibana 6 | server.host: "0" 7 | elasticsearch.hosts: [ "http://elasticsearch:9200" ] 8 | xpack.monitoring.ui.container.elasticsearch.enabled: true 9 | 10 | ## X-Pack security credentials 11 | # 12 | elasticsearch.username: elastic 13 | elasticsearch.password: changeme 14 | -------------------------------------------------------------------------------- /docker/staging/www.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | user = www-data 3 | group = www-data 4 | listen = *:9000 5 | pm = ondemand 6 | pm.max_children = 150 7 | pm.start_servers = 10 8 | pm.min_spare_servers = 10 9 | pm.max_spare_servers = 20 10 | pm.process_idle_timeout = 60s 11 | pm.max_requests = 10 12 | request_terminate_timeout = 60s 13 | request_slowlog_timeout = 30s 14 | slowlog = /proc/self/fd/2 -------------------------------------------------------------------------------- /docker/test/kibana.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ## Default Kibana configuration from Kibana base image. 3 | ## https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/templates/kibana_yml.template.js 4 | # 5 | server.name: kibana 6 | server.host: "0" 7 | elasticsearch.hosts: [ "http://elasticsearch:9200" ] 8 | xpack.monitoring.ui.container.elasticsearch.enabled: true 9 | 10 | ## X-Pack security credentials 11 | # 12 | elasticsearch.username: elastic 13 | elasticsearch.password: changeme 14 | -------------------------------------------------------------------------------- /docker/test/www.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | user = www-data 3 | group = www-data 4 | listen = *:9000 5 | pm = ondemand 6 | pm.max_children = 150 7 | pm.start_servers = 10 8 | pm.min_spare_servers = 10 9 | pm.max_spare_servers = 20 10 | pm.process_idle_timeout = 60s 11 | pm.max_requests = 10 12 | request_terminate_timeout = 60s 13 | request_slowlog_timeout = 30s 14 | slowlog = /proc/self/fd/2 -------------------------------------------------------------------------------- /docs/images/phpstorm_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_00.png -------------------------------------------------------------------------------- /docs/images/phpstorm_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_01.png -------------------------------------------------------------------------------- /docs/images/phpstorm_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_02.png -------------------------------------------------------------------------------- /docs/images/phpstorm_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_03.png -------------------------------------------------------------------------------- /docs/images/phpstorm_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_04.png -------------------------------------------------------------------------------- /docs/images/phpstorm_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_05.png -------------------------------------------------------------------------------- /docs/images/phpstorm_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_06.png -------------------------------------------------------------------------------- /docs/images/phpstorm_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_12.png -------------------------------------------------------------------------------- /docs/images/phpstorm_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_13.png -------------------------------------------------------------------------------- /docs/images/phpstorm_code_style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_code_style.png -------------------------------------------------------------------------------- /docs/images/phpstorm_inspections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_inspections.png -------------------------------------------------------------------------------- /docs/images/phpstorm_php_code_sniffer_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_php_code_sniffer_1.png -------------------------------------------------------------------------------- /docs/images/phpstorm_php_code_sniffer_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_php_code_sniffer_2.png -------------------------------------------------------------------------------- /docs/images/phpstorm_php_cs_fixer_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_php_cs_fixer_1.png -------------------------------------------------------------------------------- /docs/images/phpstorm_php_cs_fixer_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_php_cs_fixer_2.png -------------------------------------------------------------------------------- /docs/images/phpstorm_phpmd_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_phpmd_1.png -------------------------------------------------------------------------------- /docs/images/phpstorm_phpmd_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_phpmd_2.png -------------------------------------------------------------------------------- /docs/images/phpstorm_phpstan_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_phpstan_1.png -------------------------------------------------------------------------------- /docs/images/phpstorm_phpstan_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/phpstorm_phpstan_2.png -------------------------------------------------------------------------------- /docs/images/postman_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/postman_01.png -------------------------------------------------------------------------------- /docs/images/ri_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/ri_01.png -------------------------------------------------------------------------------- /docs/images/ri_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/ri_02.png -------------------------------------------------------------------------------- /docs/images/xdebug_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/xdebug_01.png -------------------------------------------------------------------------------- /docs/images/xdebug_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/docs/images/xdebug_02.png -------------------------------------------------------------------------------- /docs/postman.md: -------------------------------------------------------------------------------- 1 | # Postman 2 | This document describing how you can use [Postman](https://www.getpostman.com/) within this environment. 3 | 4 | ## Using Postman 5 | 1. [Install Postman](https://www.getpostman.com/postman) 6 | 2. [Import all files from "postman" folder](postman) 7 | 3. Select `dev` environment in top right corner 8 | 4. After getting token don't forget to update value for `token` variable in `manage environments` section in order to call protected entry points 9 | 10 | ![Using Postman](images/postman_01.png) 11 | -------------------------------------------------------------------------------- /docs/rdm.md: -------------------------------------------------------------------------------- 1 | # Redis GUI 2 | This document describing how you can use [RedisInsight](https://redis.com/redis-enterprise/redis-insight/) within this environment. 3 | 4 | ## Using RedisInsight 5 | 1. [Install RedisInsight](https://redis.com/redis-enterprise/redis-insight/) via your OS Application Manager or download via official web-site 6 | 2. Create new connection: 7 | 8 | ![Using RDM](images/ri_01.png) 9 | 10 | 3. Select db and choose key: 11 | 12 | ![Using RDM](images/ri_02.png) 13 | -------------------------------------------------------------------------------- /docs/swagger.md: -------------------------------------------------------------------------------- 1 | # Swagger 2 | This document describing how you can use [Swagger](https://swagger.io/) within this environment. 3 | 4 | ## Using Swagger 5 | * [Local Swagger service](http://localhost/api/doc) - Open next url http://localhost/api/doc in order to use Swagger. 6 | -------------------------------------------------------------------------------- /importmap.php: -------------------------------------------------------------------------------- 1 | [ 16 | 'path' => './assets/app.js', 17 | 'entrypoint' => true, 18 | ], 19 | '@hotwired/stimulus' => [ 20 | 'version' => '3.2.2', 21 | ], 22 | '@symfony/stimulus-bundle' => [ 23 | 'path' => './vendor/symfony/stimulus-bundle/assets/dist/loader.js', 24 | ], 25 | '@hotwired/turbo' => [ 26 | 'version' => '7.3.0', 27 | ], 28 | ]; 29 | -------------------------------------------------------------------------------- /migrations/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/migrations/.gitignore -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 9 3 | paths: 4 | - src 5 | - tests 6 | editorUrl: '%%file%%:%%line%%' 7 | symfony: 8 | containerXmlPath: var/cache/dev/App_KernelDevDebugContainer.xml 9 | checkExplicitMixed: false 10 | ignoreErrors: 11 | - identifier: missingType.generics 12 | - '#Trait [a-zA-Z0-9\\_]+ is used zero times and is not analysed.#' 13 | - 14 | messages: 15 | - '#Call to method (.*) on an unknown class PHPUnit\\Framework\\MockObject\\MockObject.#' 16 | paths: 17 | - tests/* 18 | - 19 | messages: 20 | - '#has PHPDoc tag \@method for method (.*)\(\) parameter \#(\d+) \$(.*) with no value type specified in iterable type array#' 21 | paths: 22 | - src/* 23 | includes: 24 | - tools/02_phpstan/vendor/phpstan/phpstan/conf/bleedingEdge.neon 25 | - tools/02_phpstan/vendor/phpstan/phpstan-deprecation-rules/rules.neon 26 | - tools/02_phpstan/vendor/phpstan/phpstan-phpunit/extension.neon 27 | - tools/02_phpstan/vendor/phpstan/phpstan-symfony/extension.neon 28 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | paths([ 11 | __DIR__ . '/config', 12 | __DIR__ . '/migrations', 13 | __DIR__ . '/public', 14 | __DIR__ . '/src', 15 | __DIR__ . '/tests', 16 | ]); 17 | 18 | $rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml'); 19 | 20 | // define sets of rules 21 | $rectorConfig->sets([ 22 | LevelSetList::UP_TO_PHP_84, 23 | SymfonySetList::SYMFONY_71, 24 | SymfonySetList::SYMFONY_CODE_QUALITY, 25 | SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION, 26 | ]); 27 | }; 28 | -------------------------------------------------------------------------------- /reports/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/reports/.gitkeep -------------------------------------------------------------------------------- /src/ApiKey/Application/DTO/ApiKey/ApiKeyCreate.php: -------------------------------------------------------------------------------- 1 | $roles 16 | */ 17 | public function __construct(ApiKey $apiKey, array $roles); 18 | } 19 | -------------------------------------------------------------------------------- /src/ApiKey/Application/Security/Provider/Interfaces/ApiKeyUserProviderInterface.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | protected static array $requestMapperClasses = [ 23 | ApiKeyCreate::class, 24 | ApiKeyUpdate::class, 25 | ApiKeyPatch::class, 26 | ]; 27 | 28 | public function __construct( 29 | RequestMapper $requestMapper, 30 | ) { 31 | parent::__construct($requestMapper); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/ApiKey/Transport/AutoMapper/ApiKey/RequestMapper.php: -------------------------------------------------------------------------------- 1 | 23 | */ 24 | protected static array $properties = [ 25 | 'description', 26 | 'userGroups', 27 | ]; 28 | 29 | public function __construct( 30 | private readonly UserGroupResource $userGroupResource, 31 | ) { 32 | } 33 | 34 | /** 35 | * @param array $userGroups 36 | * 37 | * @return array 38 | * 39 | * @throws Throwable 40 | */ 41 | protected function transformUserGroups(array $userGroups): array 42 | { 43 | return array_map( 44 | fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), 45 | $userGroups, 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/ApiKey/Transport/Command/ApiKey/ApiKeyManagementCommand.php: -------------------------------------------------------------------------------- 1 | setChoices([ 31 | ListApiKeysCommand::NAME => 'List API keys', 32 | CreateApiKeyCommand::NAME => 'Create API key', 33 | EditApiKeyCommand::NAME => 'Edit API key', 34 | ChangeTokenCommand::NAME => 'Change API key token', 35 | RemoveApiKeyCommand::NAME => 'Remove API key', 36 | '0' => 'Exit', 37 | ]); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/ApiKey/Transport/Controller/Api/v2/ApiKey/ApiKeyCountController.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | public function getVisited(): array; 23 | 24 | /** 25 | * Setter for visited data. This is needed for dto patching. 26 | */ 27 | public function setVisited(string $property): self; 28 | 29 | /** 30 | * Method to load DTO data from specified entity. 31 | */ 32 | public function load(EntityInterface $entity): self; 33 | 34 | /** 35 | * Method to update specified entity with DTO data. 36 | */ 37 | public function update(EntityInterface $entity): EntityInterface; 38 | 39 | /** 40 | * Method to patch current dto with another one. 41 | * 42 | * @throws Throwable 43 | */ 44 | public function patch(self $dto): self; 45 | } 46 | -------------------------------------------------------------------------------- /src/General/Application/Exception/Interfaces/ClientErrorInterface.php: -------------------------------------------------------------------------------- 1 | message = $error->getMessage(); 25 | $this->propertyPath = $error->getPropertyPath(); 26 | $this->target = str_replace('\\', '.', $target); 27 | $this->code = $error->getCode(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Interfaces/RestCountResourceInterface.php: -------------------------------------------------------------------------------- 1 | >|null $criteria 18 | * @param array|null $search 19 | * 20 | * @throws Throwable 21 | */ 22 | public function count(?array $criteria = null, ?array $search = null, ?string $entityManagerName = null): int; 23 | } 24 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Interfaces/RestCreateResourceInterface.php: -------------------------------------------------------------------------------- 1 | >|null $criteria 19 | * @param array|null $search 20 | * 21 | * @return array 22 | * 23 | * @throws Throwable 24 | */ 25 | public function getIds(?array $criteria = null, ?array $search = null, ?string $entityManagerName = null): array; 26 | } 27 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Interfaces/RestListResourceInterface.php: -------------------------------------------------------------------------------- 1 | >|null $criteria 22 | * @param array|null $orderBy 23 | * @param array|null $search 24 | * 25 | * @throws Throwable 26 | * 27 | * @return array 28 | */ 29 | public function find( 30 | ?array $criteria = null, 31 | ?array $orderBy = null, 32 | ?int $limit = null, 33 | ?int $offset = null, 34 | ?array $search = null, 35 | ?string $entityManagerName = null 36 | ): array; 37 | } 38 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Interfaces/RestPatchResourceInterface.php: -------------------------------------------------------------------------------- 1 | beforeCount($criteria, $search); 25 | $count = $this->getRepository()->countAdvanced($criteria, $search, $entityManagerName); 26 | // After callback method call 27 | $this->afterCount($criteria, $search, $count); 28 | 29 | return $count; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Traits/Methods/ResourceDeleteMethod.php: -------------------------------------------------------------------------------- 1 | getEntity($id, $entityManagerName); 25 | // Before callback method call 26 | $this->beforeDelete($id, $entity); 27 | // And remove entity from repo 28 | $this->getRepository()->remove($entity, $flush, $entityManagerName); 29 | // After callback method call 30 | $this->afterDelete($id, $entity); 31 | 32 | return $entity; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Traits/Methods/ResourceFindOneByMethod.php: -------------------------------------------------------------------------------- 1 | beforeFindOneBy($criteria, $orderBy); 30 | /** @var EntityInterface|null $entity */ 31 | $entity = $this->getRepository()->findOneBy($criteria, $orderBy, $entityManagerName); 32 | $this->checkThatEntityExists($throwExceptionIfNotFound, $entity); 33 | // After callback method call 34 | $this->afterFindOneBy($criteria, $orderBy, $entity); 35 | 36 | return $entity; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Traits/Methods/ResourceFindOneMethod.php: -------------------------------------------------------------------------------- 1 | beforeFindOne($id); 28 | /** @var EntityInterface|null $entity */ 29 | $entity = $this->getRepository()->findAdvanced(id: $id, entityManagerName: $entityManagerName); 30 | $this->checkThatEntityExists($throwExceptionIfNotFound, $entity); 31 | // After callback method call 32 | $this->afterFindOne($id, $entity); 33 | 34 | return $entity; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Traits/Methods/ResourceIdsMethod.php: -------------------------------------------------------------------------------- 1 | beforeIds($criteria, $search); 25 | // Fetch data 26 | $ids = $this->getRepository()->findIds($criteria, $search, $entityManagerName); 27 | // After callback method call 28 | $this->afterIds($ids, $criteria, $search); 29 | 30 | return $ids; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/General/Application/Rest/Traits/RestResourceCount.php: -------------------------------------------------------------------------------- 1 | id; 19 | } 20 | 21 | /** 22 | * @throws Throwable 23 | */ 24 | protected function createUuid(): UuidInterface 25 | { 26 | return UuidHelper::getFactory()->uuid1(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/General/Domain/Enum/Interfaces/DatabaseEnumInterface.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | public static function getValues(): array; 20 | } 21 | -------------------------------------------------------------------------------- /src/General/Domain/Enum/Language.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | public static function getValues(): array 18 | { 19 | return array_column(self::cases(), 'value'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/General/Domain/Exception/BaseException.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | public function getParameters(): array; 18 | 19 | public function getDomain(): ?string; 20 | } 21 | -------------------------------------------------------------------------------- /src/General/Domain/Message/Interfaces/MessageHighInterface.php: -------------------------------------------------------------------------------- 1 | match(TokenType::T_IDENTIFIER); 26 | $parser->match(TokenType::T_OPEN_PARENTHESIS); 27 | $this->value = $parser->StringPrimary(); 28 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); 29 | } 30 | 31 | public function getSql(SqlWalker $sqlWalker): string 32 | { 33 | return 'BIN_TO_UUID(' . $this->value->dispatch($sqlWalker) . ', 1)'; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/General/Infrastructure/DQL/UuidOTToBin.php: -------------------------------------------------------------------------------- 1 | match(TokenType::T_IDENTIFIER); 26 | $parser->match(TokenType::T_OPEN_PARENTHESIS); 27 | $this->value = $parser->StringPrimary(); 28 | $parser->match(TokenType::T_CLOSE_PARENTHESIS); 29 | } 30 | 31 | public function getSql(SqlWalker $sqlWalker): string 32 | { 33 | return 'UUID_TO_BIN(' . $this->value->dispatch($sqlWalker) . ', 1)'; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/General/Infrastructure/Messenger/Strategy/FailedRetry.php: -------------------------------------------------------------------------------- 1 | isRetryable; 30 | } 31 | 32 | /** 33 | * {@inheritdoc} 34 | */ 35 | public function getWaitingTime(Envelope $message, ?Throwable $throwable = null): int 36 | { 37 | return $this->retryWaitingTime; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/General/Infrastructure/Service/MailerService.php: -------------------------------------------------------------------------------- 1 | from($from) 28 | ->to($to) 29 | ->subject($title) 30 | ->html($body); 31 | 32 | $this->mailer->send($email); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/General/Infrastructure/Service/MessageService.php: -------------------------------------------------------------------------------- 1 | bus->dispatch(new Envelope($message)); 32 | 33 | return $this; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/General/Transport/AutoMapper/RestAutoMapperConfiguration.php: -------------------------------------------------------------------------------- 1 | 22 | */ 23 | protected static array $requestMapperClasses = []; 24 | 25 | public function __construct( 26 | protected readonly MapperInterface $requestMapper, 27 | ) { 28 | } 29 | 30 | /** 31 | * Use this method to register your mappings. 32 | * 33 | * @psalm-suppress UndefinedThisPropertyFetch 34 | */ 35 | #[Override] 36 | public function configure(AutoMapperConfigInterface $config): void 37 | { 38 | foreach (static::$requestMapperClasses as $requestMapperClass) { 39 | $config 40 | ->registerMapping(Request::class, $requestMapperClass) 41 | ->useCustomMapper($this->requestMapper); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/General/Transport/Command/Traits/GetApplicationTrait.php: -------------------------------------------------------------------------------- 1 | write("\033\143"); 29 | } 30 | 31 | return $io; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/General/Transport/EventSubscriber/ResponseSubscriber.php: -------------------------------------------------------------------------------- 1 | [ 30 | 'onKernelResponse', 31 | 10, 32 | ], 33 | ]; 34 | } 35 | 36 | /** 37 | * Subscriber method to attach API version to every response. 38 | */ 39 | public function onKernelResponse(ResponseEvent $event): void 40 | { 41 | // Attach new header 42 | $event->getResponse()->headers->add([ 43 | 'X-API-VERSION' => $this->version->get(), 44 | ]); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/General/Transport/Form/Type/Interfaces/FormTypeLabelInterface.php: -------------------------------------------------------------------------------- 1 | > $fields 18 | */ 19 | protected function addBasicFieldToForm(FormBuilderInterface $builder, array $fields): void 20 | { 21 | foreach ($fields as $params) { 22 | call_user_func_array($builder->add(...), $params); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/General/Transport/Rest/Traits/Actions/Anon/FindAction.php: -------------------------------------------------------------------------------- 1 | findMethod($request); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/General/Transport/Rest/Traits/Actions/Anon/IdsAction.php: -------------------------------------------------------------------------------- 1 | idsMethod($request); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/General/Transport/Rest/Traits/Actions/RestActionBase.php: -------------------------------------------------------------------------------- 1 | $allowedHttpMethods 19 | * 20 | * @throws Throwable 21 | */ 22 | public function getResourceForMethod( 23 | Request $request, 24 | array $allowedHttpMethods 25 | ): RestResourceInterface|RestSmallResourceInterface { 26 | // Make sure that we have everything we need to make this work 27 | $this->validateRestMethod($request, $allowedHttpMethods); 28 | 29 | // Get current resource service 30 | return $this->getResource(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/General/Transport/Rest/Traits/Methods/RestMethodProcessCriteria.php: -------------------------------------------------------------------------------- 1 | > $criteria 18 | */ 19 | public function processCriteria(array &$criteria, Request $request, string $method): void 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Kernel.php: -------------------------------------------------------------------------------- 1 | environment === 'dev') { 26 | $container->addCompilerPass(new StopwatchCompilerPass()); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Log/Application/Service/Interfaces/LoginLoggerServiceInterface.php: -------------------------------------------------------------------------------- 1 | logLoginRepository->cleanHistory(); 28 | $this->logRequestRepository->cleanHistory(); 29 | 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Log/Application/Service/Utils/Interfaces/CleanupLogServiceInterface.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | public function getRoles(): array; 22 | 23 | /** 24 | * Getter method for role label. 25 | */ 26 | public function getRoleLabel(string $role): string; 27 | 28 | /** 29 | * Getter method for short role. 30 | */ 31 | public function getShort(string $role): string; 32 | 33 | /** 34 | * Helper method to get inherited roles for given roles. 35 | * 36 | * @param array $roles 37 | * 38 | * @return array 39 | */ 40 | public function getInheritedRoles(array $roles): array; 41 | } 42 | -------------------------------------------------------------------------------- /src/Role/Application/Service/Role/Interfaces/SyncRolesServiceInterface.php: -------------------------------------------------------------------------------- 1 | 'Logged in users', 24 | self::USER => 'Normal users', 25 | self::ADMIN => 'Admin users', 26 | self::ROOT => 'Root users', 27 | self::API => 'API users', 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Role/Domain/Repository/Interfaces/RoleRepositoryInterface.php: -------------------------------------------------------------------------------- 1 | $roles 16 | */ 17 | public function clearRoles(array $roles): int; 18 | } 19 | -------------------------------------------------------------------------------- /src/Role/Transport/Controller/Api/v1/Role/RoleController.php: -------------------------------------------------------------------------------- 1 | repository->cleanup(); 30 | $this->repository->create(); 31 | 32 | return $this->repository->read(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Tool/Application/Service/Interfaces/HealthServiceInterface.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | public function getNamespaceDirectories(): array; 22 | } 23 | -------------------------------------------------------------------------------- /src/Tool/Application/Service/Utils/Interfaces/MessengerMessagesServiceInterface.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | public function getInfo(): mixed; 22 | } 23 | -------------------------------------------------------------------------------- /src/Tool/Application/Service/Utils/MessengerMessagesService.php: -------------------------------------------------------------------------------- 1 | repository->cleanUp(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Tool/Application/Service/Utils/WaitDatabaseService.php: -------------------------------------------------------------------------------- 1 | checkDatabaseConnectionService->checkConnection(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Tool/Application/Service/Utils/WaitElasticService.php: -------------------------------------------------------------------------------- 1 | elasticsearchService->instantiate(); 26 | 27 | return $this->elasticsearchService->info(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Tool/Application/Validator/Constraints/Language.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | protected const array ERROR_NAMES = [ 31 | self::INVALID_LANGUAGE => 'INVALID_LANGUAGE', 32 | ]; 33 | } 34 | -------------------------------------------------------------------------------- /src/Tool/Application/Validator/Constraints/LanguageValidator.php: -------------------------------------------------------------------------------- 1 | localization->getLanguages(), true) !== true) { 31 | $this->context 32 | ->buildViolation(Language::MESSAGE) 33 | ->setParameter('{{ language }}', (string)$value) 34 | ->setCode(Language::INVALID_LANGUAGE) 35 | ->addViolation(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Tool/Application/Validator/Constraints/Locale.php: -------------------------------------------------------------------------------- 1 | 31 | */ 32 | protected const array ERROR_NAMES = [ 33 | self::INVALID_LOCALE => 'INVALID_LOCALE', 34 | ]; 35 | } 36 | -------------------------------------------------------------------------------- /src/Tool/Application/Validator/Constraints/LocaleValidator.php: -------------------------------------------------------------------------------- 1 | localization->getLocales(), true) !== true) { 31 | $this->context 32 | ->buildViolation(Locale::MESSAGE) 33 | ->setParameter('{{ locale }}', (string)$value) 34 | ->setCode(Locale::INVALID_LOCALE) 35 | ->addViolation(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Tool/Application/Validator/Constraints/Timezone.php: -------------------------------------------------------------------------------- 1 | 31 | */ 32 | protected const array ERROR_NAMES = [ 33 | self::INVALID_TIMEZONE => 'INVALID_TIMEZONE', 34 | ]; 35 | } 36 | -------------------------------------------------------------------------------- /src/Tool/Application/Validator/Constraints/TimezoneValidator.php: -------------------------------------------------------------------------------- 1 | localization->getTimezones(), 'identifier'), true) 35 | ) { 36 | $this->context 37 | ->buildViolation(Timezone::MESSAGE) 38 | ->setParameter('{{ timezone }}', $value) 39 | ->setCode(Timezone::INVALID_TIMEZONE) 40 | ->addViolation(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Tool/Domain/Exception/Crypt/Exception.php: -------------------------------------------------------------------------------- 1 | service; 23 | } 24 | 25 | public function getExternalId(): string 26 | { 27 | return $this->externalId; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Tool/Domain/Message/TestMessage.php: -------------------------------------------------------------------------------- 1 | someId; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Tool/Domain/Repository/Interfaces/HealthRepositoryInterface.php: -------------------------------------------------------------------------------- 1 | 'encrypted text', 'params' => ['iv' => 'hex value', 'tag' => 'hex value']] 18 | * 19 | * @throws Exception 20 | * 21 | * @return array|null> 22 | */ 23 | public function encrypt(string $textForEncrypt): array; 24 | 25 | /** 26 | * Method for decrypt text. 27 | * For decrypt OpenSsl we need params array with iv and tag params, example: 28 | * ['data' => 'encrypted text', 'params' => ['iv' => 'hex value', 'tag' => 'hex value']] 29 | * 30 | * @param array|null> $dataForDecrypt 31 | * 32 | * @throws Exception 33 | * 34 | * @return non-empty-string 35 | */ 36 | public function decrypt(array $dataForDecrypt): string; 37 | } 38 | -------------------------------------------------------------------------------- /src/Tool/Domain/Service/Crypt/Interfaces/OpenSslCryptServiceInterface.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | public function getLanguages(): array; 20 | 21 | /** 22 | * @return array 23 | */ 24 | public function getLocales(): array; 25 | 26 | public function getRequestLocale(): string; 27 | 28 | /** 29 | * @return array 30 | */ 31 | public function getTimezones(): array; 32 | 33 | /** 34 | * @return array 35 | * 36 | * @throws Throwable 37 | */ 38 | public function getFormattedTimezones(): array; 39 | } 40 | -------------------------------------------------------------------------------- /src/Tool/Domain/Service/Utils/Interfaces/CheckDatabaseConnectionServiceInterface.php: -------------------------------------------------------------------------------- 1 | em->getConnection(); 27 | $condition = 'DATE_SUB(NOW(), INTERVAL ' . $this->messengerMessagesHistoryDays . ' DAY)'; 28 | $statement = $connection->prepare('DELETE FROM messenger_messages WHERE created_at < ' . $condition); 29 | 30 | return $statement->executeStatement(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Tool/Infrastructure/Service/Utils/CheckDatabaseConnectionService.php: -------------------------------------------------------------------------------- 1 | em->getConnection(); 26 | $statement = $connection->prepare('SHOW TABLES'); 27 | $statement->executeQuery(); 28 | 29 | return true; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Tool/Transport/Controller/Api/IndexController.php: -------------------------------------------------------------------------------- 1 | handleMessage($message); 31 | } 32 | 33 | /** 34 | * @throws Throwable 35 | */ 36 | private function handleMessage(ExternalMessage $message): void 37 | { 38 | // some actions here 39 | $this->logger->info('Test external message processed'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Tool/Transport/MessageHandler/TestHandler.php: -------------------------------------------------------------------------------- 1 | handleMessage($message); 32 | } 33 | 34 | /** 35 | * @throws Throwable 36 | */ 37 | private function handleMessage(TestMessage $message): void 38 | { 39 | // some actions here 40 | $this->logger->info('Test message processed'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/User/Application/DTO/Traits/PatchUserGroups.php: -------------------------------------------------------------------------------- 1 | $value 21 | */ 22 | protected function updateUserGroups(UserGroupAwareInterface $entity, array $value): self 23 | { 24 | array_map( 25 | static fn (UserGroupEntity $userGroup): UserGroupAwareInterface => $entity->addUserGroup($userGroup), 26 | $value, 27 | ); 28 | 29 | return $this; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/User/Application/DTO/User/UserCreate.php: -------------------------------------------------------------------------------- 1 | 20 | */ 21 | class IsUserHimselfVoter extends Voter 22 | { 23 | private const string ATTRIBUTE = 'IS_USER_HIMSELF'; 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | #[Override] 29 | protected function supports(string $attribute, mixed $subject): bool 30 | { 31 | return $attribute === self::ATTRIBUTE && $subject instanceof User; 32 | } 33 | 34 | /** 35 | * {@inheritdoc} 36 | */ 37 | #[Override] 38 | protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool 39 | { 40 | $user = $token->getUser(); 41 | 42 | return $user instanceof SecurityUser && $subject instanceof User && $user->getUuid() === $subject->getId(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/User/Application/Validator/Constraints/UniqueEmail.php: -------------------------------------------------------------------------------- 1 | 32 | */ 33 | protected const array ERROR_NAMES = [ 34 | self::IS_UNIQUE_EMAIL_ERROR => 'IS_UNIQUE_EMAIL_ERROR', 35 | ]; 36 | 37 | #[Override] 38 | public function getTargets(): string 39 | { 40 | $output = null; 41 | 42 | if (parent::getTargets() !== self::CLASS_CONSTRAINT) { 43 | $output = self::CLASS_CONSTRAINT; 44 | } 45 | 46 | return $output ?? self::CLASS_CONSTRAINT; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/User/Application/Validator/Constraints/UniqueUsername.php: -------------------------------------------------------------------------------- 1 | 32 | */ 33 | protected const array ERROR_NAMES = [ 34 | self::IS_UNIQUE_USERNAME_ERROR => 'IS_UNIQUE_USERNAME_ERROR', 35 | ]; 36 | 37 | #[Override] 38 | public function getTargets(): string 39 | { 40 | $output = null; 41 | 42 | if (parent::getTargets() !== self::CLASS_CONSTRAINT) { 43 | $output = self::CLASS_CONSTRAINT; 44 | } 45 | 46 | return $output ?? self::CLASS_CONSTRAINT; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/User/Domain/Entity/Interfaces/UserGroupAwareInterface.php: -------------------------------------------------------------------------------- 1 | |ArrayCollection 19 | */ 20 | public function getUserGroups(): Collection | ArrayCollection; 21 | 22 | /** 23 | * Method to attach new userGroup to current user OR api key. 24 | */ 25 | public function addUserGroup(UserGroup $userGroup): mixed; 26 | 27 | /** 28 | * Method to remove specified userGroup from current user OR api key. 29 | */ 30 | public function removeUserGroup(UserGroup $userGroup): mixed; 31 | 32 | /** 33 | * Method to remove all many-to-many userGroup relations from current user OR api key. 34 | */ 35 | public function clearUserGroups(): mixed; 36 | } 37 | -------------------------------------------------------------------------------- /src/User/Domain/Entity/Interfaces/UserInterface.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | protected static array $requestMapperClasses = [ 23 | UserCreate::class, 24 | UserUpdate::class, 25 | UserPatch::class, 26 | ]; 27 | 28 | public function __construct( 29 | RequestMapper $requestMapper, 30 | ) { 31 | parent::__construct($requestMapper); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/User/Transport/AutoMapper/UserGroup/AutoMapperConfiguration.php: -------------------------------------------------------------------------------- 1 | 21 | */ 22 | protected static array $requestMapperClasses = [ 23 | UserGroupCreate::class, 24 | UserGroupUpdate::class, 25 | UserGroupPatch::class, 26 | ]; 27 | 28 | public function __construct( 29 | RequestMapper $requestMapper, 30 | ) { 31 | parent::__construct($requestMapper); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/User/Transport/AutoMapper/UserGroup/RequestMapper.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | protected static array $properties = [ 21 | 'name', 22 | 'role', 23 | ]; 24 | 25 | public function __construct( 26 | private readonly RoleResource $roleResource, 27 | ) { 28 | } 29 | 30 | /** 31 | * @throws Throwable 32 | */ 33 | protected function transformRole(string $role): Role 34 | { 35 | return $this->roleResource->getReference($role); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/User/Transport/Command/User/ManagementCommand.php: -------------------------------------------------------------------------------- 1 | setChoices([ 31 | ListUsersCommand::NAME => 'List users', 32 | ListUserGroupsCommand::NAME => 'List user groups', 33 | CreateUserCommand::NAME => 'Create user', 34 | CreateUserGroupCommand::NAME => 'Create user group', 35 | EditUserCommand::NAME => 'Edit user', 36 | EditUserGroupCommand::NAME => 'Edit user group', 37 | RemoveUserCommand::NAME => 'Remove user', 38 | RemoveUserGroupCommand::NAME => 'Remove user group', 39 | '0' => 'Exit', 40 | ]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/User/Transport/EventSubscriber/DoctrineExtensionSubscriber.php: -------------------------------------------------------------------------------- 1 | 29 | */ 30 | #[Override] 31 | public static function getSubscribedEvents(): array 32 | { 33 | return [ 34 | RequestEvent::class => 'onKernelRequest', 35 | ]; 36 | } 37 | 38 | /** 39 | * @throws NonUniqueResultException 40 | */ 41 | public function onKernelRequest(): void 42 | { 43 | $user = $this->userTypeIdentification->getUser(); 44 | 45 | if ($user !== null) { 46 | $this->blameableListener->setUserValue($user); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/User/Transport/Form/Type/Traits/UserGroupChoices.php: -------------------------------------------------------------------------------- 1 | 26 | */ 27 | protected function getUserGroupChoices(): array 28 | { 29 | // Initialize output 30 | $choices = []; 31 | /** 32 | * Lambda function to iterate all user groups and to create necessary choices array. 33 | */ 34 | $iterator = static function (UserGroup $userGroup) use (&$choices): void { 35 | $name = $userGroup->getName() . ' [' . $userGroup->getRole()->getId() . ']'; 36 | $choices[$name] = $userGroup->getId(); 37 | }; 38 | 39 | array_map($iterator, $this->userGroupResource->find()); 40 | 41 | return $choices; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /templates/Emails/error.html.twig: -------------------------------------------------------------------------------- 1 |

Error notification

2 | 3 | Hello
4 | An error has occurred. Message: {{ errorMessage }} 5 |

6 | 7 | Please contact support Team in order to investigate error log. 8 |

9 | 10 | Thanks in Advance! 11 | -------------------------------------------------------------------------------- /templates/Swagger/parameter_criteria.twig: -------------------------------------------------------------------------------- 1 | Used search criteria in request. 2 | 3 |

Usage examples:

4 |
{{ examples | join('
') | raw }}
5 | -------------------------------------------------------------------------------- /templates/Swagger/parameter_limit.twig: -------------------------------------------------------------------------------- 1 | Used limit option in request. 2 | 3 |

Usage examples:

4 |
{{ examples | join('
') | raw }}
5 | -------------------------------------------------------------------------------- /templates/Swagger/parameter_offset.twig: -------------------------------------------------------------------------------- 1 | Used offset option in request. 2 | 3 |

Usage examples:

4 |
{{ examples | join('
') | raw }}
5 | -------------------------------------------------------------------------------- /templates/Swagger/parameter_order.twig: -------------------------------------------------------------------------------- 1 | Used order in request. 2 | 3 |

Usage examples:

4 |
{{ examples | join('
') | raw }}
5 | 6 |

Advanced usage examples:

7 |
{{ advancedExamples | join('
') | raw }}
8 | -------------------------------------------------------------------------------- /templates/Swagger/parameter_populate.twig: -------------------------------------------------------------------------------- 1 | Used populate parts in request. 2 | 3 | {% if associations %} 4 |

Associations that can be used:

5 |
{{ associations | join('
') | raw }}
6 | {% endif %} 7 | 8 |

Usage examples:

9 |
{{ examples | join('
') | raw }}
10 | 11 |
12 | -------------------------------------------------------------------------------- /templates/Swagger/parameter_search.twig: -------------------------------------------------------------------------------- 1 | Used search terms in request. 2 | 3 |

Properties which affected:

4 |
{{ properties | join('
') | raw }}
5 | 6 |

Usage examples:

7 |
{{ examples | join('
') | raw }}
8 | -------------------------------------------------------------------------------- /templates/base.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} 6 | 7 | {% block stylesheets %} 8 | {% endblock %} 9 | 10 | {% block javascripts %} 11 | {% block importmap %}{{ importmap('app') }}{% endblock %} 12 | {% endblock %} 13 | 14 | 15 | {% block body %}{% endblock %} 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/Application/Controller/CommandSchedulerTest.php: -------------------------------------------------------------------------------- 1 | getTestClient(); 24 | $client->request('GET', '/command-scheduler/list'); 25 | 26 | $response = $client->getResponse(); 27 | // check for 401 due to allow only for user with admin role 28 | static::assertSame(Response::HTTP_UNAUTHORIZED, $response->getStatusCode()); 29 | unset($response, $client); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/Application/Controller/DocumentationTest.php: -------------------------------------------------------------------------------- 1 | getTestClient(); 24 | $client->request('GET', '/api/doc'); 25 | 26 | static::assertSame(Response::HTTP_OK, $client->getResponse()->getStatusCode()); 27 | } 28 | 29 | /** 30 | * @throws Throwable 31 | */ 32 | #[TestDox('Test that documentation json (/api/doc.json) is working.')] 33 | public function testThatDocumentationJsonWorks(): void 34 | { 35 | $client = $this->getTestClient(); 36 | $client->request('GET', '/api/doc.json'); 37 | 38 | static::assertSame(Response::HTTP_OK, $client->getResponse()->getStatusCode()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/Application/Tool/Transport/Controller/Api/IndexControllerTest.php: -------------------------------------------------------------------------------- 1 | getTestClient(); 26 | 27 | $client->request('GET', $this->baseUrl); 28 | $response = $client->getResponse(); 29 | static::assertSame(Response::HTTP_OK, $response->getStatusCode(), "Response:\n" . $response); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tests/Integration/General/Application/Validator/Constraints/src/TestEntityReference.php: -------------------------------------------------------------------------------- 1 | throwException ??= false; 21 | } 22 | 23 | #[Override] 24 | public function getId(): string 25 | { 26 | return 'xxx'; 27 | } 28 | 29 | /** 30 | * @throws EntityNotFoundException 31 | */ 32 | #[Override] 33 | public function getCreatedAt(): ?DateTimeImmutable 34 | { 35 | if ($this->throwException) { 36 | throw new EntityNotFoundException('Entity not found'); 37 | } 38 | 39 | return null; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | $input instanceof Stringable ? (string)$input : $input; 25 | 26 | return JSON::encode(array_map($iterator, $this->getArrayCopy())); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tools/01_phpunit/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "phpunit/phpunit": "12.1.*", 9 | "dama/doctrine-test-bundle": "8.3.*", 10 | "symfony/browser-kit": "7.2.*", 11 | "symfony/css-selector": "7.2.*", 12 | "symfony/phpunit-bridge": "7.2.*", 13 | "roave/security-advisories": "dev-latest" 14 | }, 15 | "config": { 16 | "allow-plugins": true, 17 | "platform": { 18 | "php": "8.4.0" 19 | }, 20 | "preferred-install": { 21 | "*": "dist" 22 | }, 23 | "sort-packages": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tools/02_phpstan/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "phpstan/phpstan": "2.1.*", 9 | "phpstan/phpstan-deprecation-rules": "2.0.*", 10 | "phpstan/phpstan-phpunit": "2.0.*", 11 | "phpstan/phpstan-symfony": "2.0.*", 12 | "roave/security-advisories": "dev-latest" 13 | }, 14 | "config": { 15 | "allow-plugins": true, 16 | "platform": { 17 | "php": "8.4.0" 18 | }, 19 | "preferred-install": { 20 | "*": "dist" 21 | }, 22 | "sort-packages": true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tools/03_ecs/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "friendsofphp/php-cs-fixer": "3.75.*", 9 | "squizlabs/php_codesniffer": "3.13.*", 10 | "symplify/easy-coding-standard": "12.5.*", 11 | "roave/security-advisories": "dev-latest" 12 | }, 13 | "config": { 14 | "allow-plugins": true, 15 | "platform": { 16 | "php": "8.4.0" 17 | }, 18 | "preferred-install": { 19 | "*": "dist" 20 | }, 21 | "sort-packages": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tools/04_php-coveralls/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "php-coveralls/php-coveralls": "2.8.*", 9 | "roave/security-advisories": "dev-latest" 10 | }, 11 | "config": { 12 | "allow-plugins": true, 13 | "platform": { 14 | "php": "8.4.0" 15 | }, 16 | "preferred-install": { 17 | "*": "dist" 18 | }, 19 | "sort-packages": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tools/05_phpinsights/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "nunomaduro/phpinsights": "2.13.*", 9 | "roave/security-advisories": "dev-latest" 10 | }, 11 | "config": { 12 | "allow-plugins": true, 13 | "platform": { 14 | "php": "8.4.0" 15 | }, 16 | "preferred-install": { 17 | "*": "dist" 18 | }, 19 | "sort-packages": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tools/06_phpmd/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "phpmd/phpmd": "2.15.*", 9 | "roave/security-advisories": "dev-latest" 10 | }, 11 | "config": { 12 | "allow-plugins": true, 13 | "platform": { 14 | "php": "8.4.0" 15 | }, 16 | "preferred-install": { 17 | "*": "dist" 18 | }, 19 | "sort-packages": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tools/07_phpmetrics/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "phpmetrics/phpmetrics": "2.8.*", 9 | "roave/security-advisories": "dev-latest" 10 | }, 11 | "config": { 12 | "allow-plugins": true, 13 | "platform": { 14 | "php": "8.4.0" 15 | }, 16 | "preferred-install": { 17 | "*": "dist" 18 | }, 19 | "sort-packages": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tools/08_rector/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "rector/rector": "2.0.*", 9 | "roave/security-advisories": "dev-latest" 10 | }, 11 | "config": { 12 | "allow-plugins": true, 13 | "platform": { 14 | "php": "8.4.0" 15 | }, 16 | "preferred-install": { 17 | "*": "dist" 18 | }, 19 | "sort-packages": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tools/09_composer/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "ergebnis/composer-normalize": "^2.47", 9 | "icanhazstring/composer-unused": "^0.9", 10 | "maglnet/composer-require-checker": "^4.16", 11 | "roave/security-advisories": "dev-latest" 12 | }, 13 | "config": { 14 | "allow-plugins": true, 15 | "platform": { 16 | "php": "8.4.0" 17 | }, 18 | "preferred-install": { 19 | "*": "dist" 20 | }, 21 | "sort-packages": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tools/10_phpcpd/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "systemsdk/docker-symfony-api-tools", 3 | "description": "", 4 | "require": { 5 | "php": "^8.4.0" 6 | }, 7 | "require-dev": { 8 | "systemsdk/phpcpd": "8.2.*", 9 | "roave/security-advisories": "dev-latest" 10 | }, 11 | "config": { 12 | "allow-plugins": true, 13 | "platform": { 14 | "php": "8.4.0" 15 | }, 16 | "preferred-install": { 17 | "*": "dist" 18 | }, 19 | "sort-packages": true 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /translations/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/translations/.gitignore -------------------------------------------------------------------------------- /translations/crypt.en.yaml: -------------------------------------------------------------------------------- 1 | OS does not support crypt algorithm: OS does not support crypt algorithm. 2 | Missing or wrong data for decrypt: Missing or wrong data for decrypt. 3 | Can not generate ivLen param for crypt: Can not generate ivLen param for crypt. 4 | Can not generate iv param for crypt: Can not generate iv param for crypt. 5 | Can not encrypt data: Can not encrypt data. 6 | Can not convert iv or tag param for decrypt: Can not convert iv or tag param for decrypt. 7 | Can not decrypt data: Can not decrypt data. 8 | -------------------------------------------------------------------------------- /translations/crypt.ru.yaml: -------------------------------------------------------------------------------- 1 | OS does not support crypt algorithm: OS не поддерживает алгоритм шифрования. 2 | Missing or wrong data for decrypt: Отсутствуют или неверные данные для расшифровки. 3 | Can not generate ivLen param for crypt: Невозможно сгенерировать ivLen параметр для шифрования. 4 | Can not generate iv param for crypt: Невозможно сгенерировать iv параметр для шифрования. 5 | Can not encrypt data: Невозможно зашифровать данные. 6 | Can not convert iv or tag param for decrypt: Невозможно конвертировать iv или tag параметр для расшифровки. 7 | Can not decrypt data: Невозможно расшифровать данные. 8 | -------------------------------------------------------------------------------- /translations/crypt.ua.yaml: -------------------------------------------------------------------------------- 1 | OS does not support crypt algorithm: OS не підтримує алгоритм шифрування. 2 | Missing or wrong data for decrypt: Відсутні або невірні дані для розшифрування. 3 | Can not generate ivLen param for crypt: Неможливо згенерувати ivLen параметр для шифрування. 4 | Can not generate iv param for crypt: Неможливо згенерувати iv параметр для шифрування. 5 | Can not encrypt data: Неможливо зашифрувати дані. 6 | Can not convert iv or tag param for decrypt: Неможливо конвертувати iv або tag параметр для розшифрування. 7 | Can not decrypt data: Неможливо розшифрувати дані. 8 | -------------------------------------------------------------------------------- /translations/security.fi.yaml: -------------------------------------------------------------------------------- 1 | Invalid credentials.: Virheelliset käyttäjätunnukset. 2 | -------------------------------------------------------------------------------- /translations/security.ru.yaml: -------------------------------------------------------------------------------- 1 | Invalid credentials.: Неверные учетные данные. 2 | -------------------------------------------------------------------------------- /translations/security.ua.yaml: -------------------------------------------------------------------------------- 1 | Invalid credentials.: Невірні облікові дані. 2 | -------------------------------------------------------------------------------- /var/elasticsearch-data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systemsdk/docker-symfony-api/b5450b7e251e22aa56e83a9c55378cc2aa661018/var/elasticsearch-data/.gitkeep --------------------------------------------------------------------------------