From 449718cdf2733af2417ef42f7fa881507e7f231b Mon Sep 17 00:00:00 2001 From: bernard-ng Date: Tue, 7 Oct 2025 00:15:38 +0200 Subject: [PATCH] [backend] accept articles from crawler --- projects/backend/.env | 11 +- projects/backend/.env.test | 2 +- .../backend/api/aggregator/add-article.bru | 32 ++ projects/backend/api/aggregator/folder.bru | 8 + projects/backend/behat.yml | 2 +- projects/backend/bin/console | 2 +- projects/backend/composer.json | 2 +- .../Aggregator/Entity.Article.orm.xml | 14 +- .../doctrine/Aggregator/Entity.Source.orm.xml | 6 +- .../Aggregator/ValueObject.Link.orm.xml | 2 +- .../ValueObject.ReadingTime.orm.xml | 2 +- .../ValueObject.Scoring.Credibility.orm.xml | 8 +- .../FeedManagement/Entity.Bookmark.orm.xml | 8 +- .../FeedManagement/Entity.Comment.orm.xml | 10 +- .../Entity.FollowedSource.orm.xml | 8 +- .../Entity.LoginAttempt.orm.xml | 6 +- .../Entity.LoginHistory.orm.xml | 10 +- .../Entity.RefreshToken.orm.xml | 2 +- .../IdentityAndAccess/Entity.User.orm.xml | 6 +- .../Entity.VerificationToken.orm.xml | 10 +- .../ValueObject.Roles.orm.xml | 2 +- .../ValueObject.Secret.GeneratedToken.orm.xml | 2 +- .../ValueObject.Tracking.Device.orm.xml | 2 +- .../ValueObject.Tracking.GeoLocation.orm.xml | 2 +- .../migrations/Version20250526231341.php | 2 +- .../backend/config/packages/doctrine.yaml | 30 +- .../config/packages/doctrine_migrations.yaml | 2 +- .../packages/gesdinet_jwt_refresh_token.yaml | 2 +- .../backend/config/packages/messenger.yaml | 2 +- projects/backend/config/packages/monolog.yaml | 2 +- .../backend/config/packages/security.yaml | 9 +- projects/backend/config/packages/twig.yaml | 2 +- projects/backend/config/services.yaml | 16 +- projects/backend/public/index.php | 2 +- .../EventListener/SourceCrawledListener.php | 12 +- .../Mailing/SourceCrawledEmail.php | 6 +- .../ReadModel/ArticleForExport.php | 6 +- .../ReadModel/SourceStatistics.php | 6 +- .../ReadModel/SourceStatisticsList.php | 4 +- .../UseCase/Command/CreateArticle.php | 8 +- .../UseCase/Command/CreateSource.php | 4 +- .../UseCase/Command/DeleteArticles.php | 2 +- .../UseCase/Command/ExportArticles.php | 4 +- .../CommandHandler/CreateArticleHandler.php | 16 +- .../CommandHandler/CreateSourceHandler.php | 10 +- .../CommandHandler/DeleteArticlesHandler.php | 8 +- .../CommandHandler/ExportArticlesHandler.php | 16 +- .../UseCase/Query/GetArticlesForExport.php | 4 +- .../Query/GetEarliestPublicationDate.php | 2 +- .../Query/GetLatestPublicationDate.php | 2 +- .../UseCase/Query/GetSourceStatisticsList.php | 2 +- .../GetArticlesForExportHandler.php | 8 +- .../GetEarliestPublicationDateHandler.php | 6 +- .../GetLatestPublicationDateHandler.php | 6 +- .../GetSourceStatisticsListHandler.php | 8 +- .../Aggregator/Domain/Event/SourceCrawled.php | 2 +- .../Domain/Exception/ArticleNotFound.php | 6 +- .../Domain/Exception/ArticleOutOfRange.php | 6 +- .../Domain/Exception/DuplicatedArticle.php | 6 +- .../Domain/Exception/DuplicatedSource.php | 4 +- .../Domain/Exception/SourceNotFound.php | 6 +- .../Domain/Model/Entity/Article.php | 37 +-- .../Domain/Model/Entity/Category.php | 4 +- .../Aggregator/Domain/Model/Entity/Source.php | 6 +- .../Domain/Model/Identity/ArticleId.php | 2 +- .../Domain/Model/Identity/CategoryId.php | 2 +- .../Domain/Model/Identity/SourceId.php | 2 +- .../Model/Repository/ArticleRepository.php | 8 +- .../Model/Repository/SourceRepository.php | 6 +- .../ValueObject/Crawling/CrawlingSettings.php | 26 -- .../Model/ValueObject/Crawling/PageRange.php | 50 ---- .../ValueObject/Crawling/UpdateDirection.php | 16 - .../Domain/Model/ValueObject/Link.php | 4 +- .../ValueObject/{Crawling => }/OpenGraph.php | 2 +- .../Domain/Model/ValueObject/ReadingTime.php | 2 +- .../Domain/Model/ValueObject/Scoring/Bias.php | 2 +- .../Model/ValueObject/Scoring/Credibility.php | 2 +- .../Model/ValueObject/Scoring/Reliability.php | 2 +- .../Model/ValueObject/Scoring/Sentiment.php | 2 +- .../ValueObject/Scoring/Transparency.php | 2 +- .../Domain/Service/Crawling/DateParser.php | 72 ----- .../Crawling/OpenGraph/Elements/Audio.php | 32 -- .../Crawling/OpenGraph/Elements/Image.php | 38 --- .../Crawling/OpenGraph/Elements/Video.php | 36 --- .../Crawling/OpenGraph/Objects/Website.php | 16 - .../Crawling/OpenGraph/OpenGraphConsumer.php | 17 -- .../Crawling/OpenGraph/OpenGraphElement.php | 26 -- .../Crawling/OpenGraph/OpenGraphObject.php | 283 ------------------ .../Crawling/OpenGraph/OpenGraphProperty.php | 75 ----- .../Domain/Service/Crawling/SourceCrawler.php | 22 -- .../Domain/Service/HashCalculator.php | 2 +- .../Service/Scoring/CredibilityAnalyser.php | 10 +- .../Service/Scoring/SentimentAnalyser.php | 4 +- .../Crawler/HttpClientFactory.php | 65 ---- .../Crawler/OpenGraph/DomCrawlerConsumer.php | 128 -------- .../Infrastructure/Crawler/Source/Source.php | 154 ---------- .../Crawler/Source/SourceCrawler.php | 63 ---- .../Crawler/Source/WordPressJson.php | 146 --------- .../Infrastructure/Crawler/UserAgents.php | 31 -- .../DBAL/GetArticlesForExportDbalHandler.php | 10 +- .../GetEarliestPublicationDateDBalHandler.php | 8 +- .../GetLatestPublicationDateDBalHandler.php | 8 +- .../GetSourceStatisticsListDbalHandler.php | 10 +- .../Doctrine/DBAL/Types/ArticleIdType.php | 4 +- .../Doctrine/DBAL/Types/OpenGraphType.php | 4 +- .../Doctrine/DBAL/Types/SourceIdType.php | 4 +- .../Doctrine/ORM/ArticleOrmRepository.php | 12 +- .../Doctrine/ORM/SourceOrmRepository.php | 10 +- .../Console/ConsumeOpenGraphConsole.php | 117 -------- .../Presentation/Console/CrawlConsole.php | 121 -------- .../Console/CreateSourceConsole.php | 16 +- .../Console/DeleteArticlesConsole.php | 6 +- .../Console/ExportArticlesConsole.php | 8 +- .../GetSourceStatisticsListConsole.php | 10 +- .../Presentation/Console/UpdateConsole.php | 90 ------ .../Console/UpdateProxiesConsole.php | 66 ---- .../Web/Controller/AddArticleController.php | 61 ++++ .../WriteModel/AddArticleModel.php | 35 +++ .../Cache/SourceCacheAttributes.php | 2 +- .../Application/ReadModel/ArticleDetails.php | 22 +- .../Application/ReadModel/ArticleOverview.php | 10 +- .../ReadModel/ArticleOverviewList.php | 6 +- .../Application/ReadModel/Bookmark.php | 6 +- .../Application/ReadModel/BookmarkList.php | 6 +- .../Application/ReadModel/CategoryShare.php | 2 +- .../Application/ReadModel/CategoryShares.php | 4 +- .../Application/ReadModel/Comment.php | 8 +- .../Application/ReadModel/CommentList.php | 6 +- .../ReadModel/PublicationEntry.php | 2 +- .../ReadModel/PublicationGraph.php | 4 +- .../Application/ReadModel/SourceDetails.php | 14 +- .../Application/ReadModel/SourceOverview.php | 6 +- .../ReadModel/SourceOverviewList.php | 6 +- .../Application/ReadModel/SourceReference.php | 6 +- .../Application/ReadModel/UserReference.php | 6 +- .../UseCase/Command/AddArticleToBookmark.php | 8 +- .../UseCase/Command/AddCommentToArticle.php | 6 +- .../UseCase/Command/CreateBookmark.php | 4 +- .../UseCase/Command/DeleteBookmark.php | 6 +- .../UseCase/Command/FollowSource.php | 6 +- .../Command/RemoveArticleFromBookmark.php | 8 +- .../Command/RemoveCommentFromArticle.php | 6 +- .../UseCase/Command/UnfollowSource.php | 6 +- .../UseCase/Command/UpdateBookmark.php | 6 +- .../AddArticleToBookmarkHandler.php | 12 +- .../AddCommentToArticleHandler.php | 14 +- .../CommandHandler/CreateBookHandler.php | 12 +- .../CommandHandler/DeleteBookmarkHandler.php | 10 +- .../CommandHandler/FollowSourceHandler.php | 16 +- .../RemoveArticleFromBookmarkHandler.php | 12 +- .../RemoveCommentFromArticleHandler.php | 10 +- .../CommandHandler/UnfollowSourceHandler.php | 12 +- .../CommandHandler/UpdateBookmarkHandler.php | 10 +- .../UseCase/Query/GetArticleCommentList.php | 6 +- .../UseCase/Query/GetArticleDetails.php | 6 +- .../UseCase/Query/GetArticleOverviewList.php | 8 +- .../UseCase/Query/GetBookmarkList.php | 6 +- .../Query/GetBookmarkedArticleList.php | 10 +- .../Query/GetSourceArticleOverviewList.php | 10 +- .../UseCase/Query/GetSourceDetails.php | 6 +- .../UseCase/Query/GetSourceOverviewList.php | 6 +- .../GetArticleCommentListHandler.php | 8 +- .../QueryHandler/GetArticleDetailsHandler.php | 8 +- .../GetArticleOverviewListHandler.php | 8 +- .../QueryHandler/GetBookmarkListHandler.php | 8 +- .../GetBookmarkedArticleListHandler.php | 8 +- .../GetSourceArticleOverviewListHandler.php | 8 +- .../QueryHandler/GetSourceDetailsHandler.php | 8 +- .../GetSourceOverviewListHandler.php | 8 +- .../Exception/ArticleAlreadyBookmarked.php | 8 +- .../Domain/Exception/BookmarkNotFound.php | 6 +- .../Exception/BookmarkedArticleNotFound.php | 8 +- .../Domain/Exception/CommentNotFound.php | 6 +- .../Exception/FollowedSourceNotFound.php | 8 +- .../Exception/SourceAlreadyFollowed.php | 8 +- .../Domain/Model/Entity/Bookmark.php | 14 +- .../Domain/Model/Entity/Comment.php | 10 +- .../Domain/Model/Entity/FollowedSource.php | 8 +- .../Domain/Model/Filters/ArticleFilters.php | 6 +- .../Domain/Model/Identity/BookmarkId.php | 2 +- .../Domain/Model/Identity/CommentId.php | 2 +- .../Model/Identity/FollowedSourceId.php | 2 +- .../Model/Repository/BookmarkRepository.php | 6 +- .../Model/Repository/CommentRepository.php | 6 +- .../Repository/FollowedSourceRepository.php | 8 +- .../DBAL/GetArticleCommentListDbalHandler.php | 14 +- .../DBAL/GetArticleDetailsDbalHandler.php | 18 +- .../GetArticleOverviewListDbalHandler.php | 20 +- .../DBAL/GetBookmarkListDbalHandler.php | 16 +- .../GetBookmarkedArticleListDbalHandler.php | 18 +- ...etSourceArticleOverviewListDbalHandler.php | 20 +- .../DBAL/GetSourceDetailsDbalHandler.php | 26 +- .../DBAL/GetSourceOverviewListDbalHandler.php | 16 +- .../Doctrine/DBAL/Queries/ArticleQuery.php | 6 +- .../Doctrine/DBAL/Queries/BookmarkQuery.php | 2 +- .../Doctrine/DBAL/Queries/SourceQuery.php | 2 +- .../Doctrine/DBAL/Types/BookmarkIdType.php | 4 +- .../Doctrine/DBAL/Types/CommentIdType.php | 4 +- .../DBAL/Types/FollowedSourceIdType.php | 4 +- .../Doctrine/ORM/BookmarkOrmRepository.php | 10 +- .../Doctrine/ORM/CommentOrmRepository.php | 10 +- .../ORM/FollowedSourceOrmRepository.php | 10 +- .../AddArticleToBookmarkController.php | 10 +- .../AddCommentToArticleController.php | 10 +- .../Controller/CreateBookmarkController.php | 8 +- .../Controller/DeleteBookmarkController.php | 8 +- .../Web/Controller/FollowSourceController.php | 8 +- .../GetArticleCommentListController.php | 12 +- .../GetArticleDetailsController.php | 8 +- .../GetArticleOverviewListController.php | 10 +- .../Controller/GetBookmarkListController.php | 8 +- .../GetBookmarkedArticleListController.php | 10 +- ...GetSourceArticleOverviewListController.php | 12 +- .../Controller/GetSourceDetailsController.php | 8 +- .../GetSourceOverviewListController.php | 8 +- .../RemoveArticleFromBookmarkController.php | 10 +- .../RemoveCommentFromArticleController.php | 8 +- .../Controller/UnfollowSourceController.php | 8 +- .../Controller/UpdateBookmarkController.php | 10 +- .../WriteModel/AddCommentToArticleModel.php | 2 +- .../WriteModel/CreateBookmarkModel.php | 2 +- .../WriteModel/UpdateBookmarkModel.php | 2 +- .../AccountConfirmedListener.php | 12 +- .../EventListener/AccountLockedListener.php | 12 +- .../EventListener/AccountUnlockedListener.php | 12 +- .../ConfirmationRequestedListener.php | 12 +- .../LoginProfileChangedListener.php | 12 +- .../EventListener/PasswordCreatedListener.php | 12 +- .../PasswordForgottenListener.php | 12 +- .../EventListener/PasswordResetListener.php | 12 +- .../EventListener/PasswordUpdatedListener.php | 12 +- .../Mailing/AccountConfirmedEmail.php | 6 +- .../Mailing/AccountLockedEmail.php | 8 +- .../Mailing/AccountUnlockedEmail.php | 6 +- .../Mailing/ConfirmationRequestedEmail.php | 8 +- .../Mailing/LoginProfileChangedEmail.php | 10 +- .../Mailing/PasswordCreatedEmail.php | 8 +- .../Mailing/PasswordForgottenEmail.php | 8 +- .../Mailing/PasswordResetEmail.php | 6 +- .../Mailing/PasswordUpdatedEmail.php | 6 +- .../Application/ReadModel/UserProfile.php | 8 +- .../UseCase/Command/ConfirmAccount.php | 4 +- .../UseCase/Command/LockAccount.php | 4 +- .../Application/UseCase/Command/Register.php | 6 +- .../UseCase/Command/RegisterLoginAttempt.php | 4 +- .../UseCase/Command/RegisterLoginSuccess.php | 6 +- .../UseCase/Command/RequestPassword.php | 4 +- .../UseCase/Command/ResetPassword.php | 4 +- .../UseCase/Command/UnlockAccount.php | 4 +- .../UseCase/Command/UpdatePassword.php | 4 +- .../CommandHandler/ConfirmAccountHandler.php | 14 +- .../CommandHandler/LockAccountHandler.php | 20 +- .../CommandHandler/RegisterHandler.php | 24 +- .../RegisterLoginAttemptHandler.php | 16 +- .../RegisterLoginSuccessHandler.php | 18 +- .../CommandHandler/RequestPasswordHandler.php | 22 +- .../CommandHandler/ResetPasswordHandler.php | 16 +- .../CommandHandler/UnlockAccountHandler.php | 16 +- .../CommandHandler/UpdatePasswordHandler.php | 12 +- .../UseCase/Query/GetUserProfile.php | 4 +- .../QueryHandler/GetUserProfileHandler.php | 8 +- .../Domain/Event/AccountConfirmed.php | 4 +- .../Domain/Event/AccountLocked.php | 6 +- .../Domain/Event/AccountUnlocked.php | 4 +- .../Domain/Event/ConfirmationRequested.php | 6 +- .../Domain/Event/EmailUpdated.php | 6 +- .../Domain/Event/LoginProfileChanged.php | 8 +- .../Domain/Event/PasswordCreated.php | 6 +- .../Domain/Event/PasswordForgotten.php | 6 +- .../Domain/Event/PasswordReset.php | 4 +- .../Domain/Event/PasswordUpdated.php | 4 +- .../Domain/Exception/AccountIsLocked.php | 4 +- .../Domain/Exception/AccountNotConfirmed.php | 4 +- .../Domain/Exception/EmailAlreadyUsed.php | 6 +- .../Exception/InvalidCurrentPassword.php | 4 +- .../Exception/InvalidVerificationToken.php | 4 +- .../Exception/PasswordAlreadyDefined.php | 4 +- .../Domain/Exception/PermissionNotGranted.php | 4 +- .../Domain/Exception/UserNotFound.php | 8 +- .../Domain/Model/Entity/LoginAttempt.php | 4 +- .../Domain/Model/Entity/LoginHistory.php | 12 +- .../Domain/Model/Entity/RefreshToken.php | 2 +- .../Domain/Model/Entity/User.php | 36 +-- .../Domain/Model/Entity/VerificationToken.php | 10 +- .../Domain/Model/Identity/LoginAttemptId.php | 2 +- .../Domain/Model/Identity/LoginHistoryId.php | 2 +- .../Domain/Model/Identity/UserId.php | 2 +- .../Model/Identity/VerificationTokenId.php | 2 +- .../Repository/LoginAttemptRepository.php | 6 +- .../Repository/LoginHistoryRepository.php | 6 +- .../Model/Repository/UserRepository.php | 8 +- .../VerificationTokenRepository.php | 8 +- .../Domain/Model/ValueObject/Role.php | 2 +- .../Domain/Model/ValueObject/Roles.php | 4 +- .../ValueObject/Secret/GeneratedCode.php | 4 +- .../ValueObject/Secret/GeneratedToken.php | 4 +- .../Domain/Model/ValueObject/TokenPurpose.php | 2 +- .../Domain/Service/PasswordHasher.php | 4 +- .../Domain/Service/SecretGenerator.php | 6 +- .../EventListener/LoginFailureListener.php | 8 +- .../EventListener/LoginSuccessListener.php | 10 +- .../Symfony/Security/SecurityUser.php | 8 +- .../Symfony/Security/SecurityUserProvider.php | 8 +- .../Symfony/Security/UserChecker.php | 6 +- .../Symfony/Security/UserPasswordHasher.php | 6 +- .../DBAL/GetUserProfileDbalHandler.php | 10 +- .../DBAL/Types/LoginAttemptIdType.php | 4 +- .../DBAL/Types/LoginHistoryIdType.php | 4 +- .../Doctrine/DBAL/Types/UserIdType.php | 4 +- .../DBAL/Types/VerificationTokenIdType.php | 4 +- .../ORM/LoginAttemptOrmRepository.php | 8 +- .../ORM/LoginHistoryOrmRepository.php | 8 +- .../Doctrine/ORM/UserOrmRepository.php | 12 +- .../ORM/VerificationTokenOrmRepository.php | 12 +- .../Secret/RandomizerSecretGenerator.php | 8 +- .../Presentation/Console/RegisterConsole.php | 12 +- .../Controller/ConfirmAccountController.php | 8 +- .../Controller/GetUserProfileController.php | 6 +- .../Web/Controller/RegisterController.php | 10 +- .../Controller/RequestPasswordController.php | 10 +- .../Controller/ResetPasswordController.php | 10 +- .../Controller/UnlockAccountController.php | 8 +- .../Controller/UpdatePasswordController.php | 8 +- .../Presentation/WriteModel/RegisterModel.php | 2 +- .../WriteModel/RequestPasswordModel.php | 2 +- .../WriteModel/ResetPasswordModel.php | 2 +- .../WriteModel/UpdatePasswordModel.php | 2 +- .../Application/Asset/AssetType.php | 2 +- .../Application/Asset/AssetUrlProvider.php | 2 +- .../Application/Mailing/EmailDefinition.php | 4 +- .../Application/Mailing/Mailer.php | 2 +- .../Application/Messaging/AsyncMessage.php | 2 +- .../Application/Messaging/CommandBus.php | 2 +- .../Application/Messaging/CommandHandler.php | 2 +- .../Application/Messaging/MessageBus.php | 2 +- .../Application/Messaging/MessageHandler.php | 2 +- .../Application/Messaging/QueryBus.php | 2 +- .../Application/Messaging/QueryHandler.php | 2 +- .../src/SharedKernel/Domain/Application.php | 2 +- .../src/SharedKernel/Domain/Assert.php | 4 +- .../Domain/DataTransfert/DataExporter.php | 2 +- .../Domain/DataTransfert/DataImporter.php | 2 +- .../Domain/DataTransfert/DataMapping.php | 4 +- .../Domain/DataTransfert/TransfertSetting.php | 2 +- .../EventDispatcher/EventDispatcher.php | 2 +- .../EventDispatcher/EventEmitterTrait.php | 2 +- .../Domain/EventListener/EventListener.php | 2 +- .../Domain/Exception/InvalidArgument.php | 2 +- .../Domain/Exception/InvalidEmailAddress.php | 2 +- .../Domain/Exception/UserFacingError.php | 2 +- .../Domain/Model/Collection/Collection.php | 2 +- .../Model/Collection/DataCollection.php | 2 +- .../Domain/Model/Pagination/Page.php | 4 +- .../Model/Pagination/PaginationCursor.php | 4 +- .../Model/Pagination/PaginationInfo.php | 2 +- .../Model/Pagination/PaginatorKeyset.php | 2 +- .../Domain/Model/ValueObject/DateRange.php | 4 +- .../Domain/Model/ValueObject/EmailAddress.php | 6 +- .../Model/ValueObject/SortDirection.php | 2 +- .../ValueObject/Tracking/ClientProfile.php | 2 +- .../Model/ValueObject/Tracking/Device.php | 2 +- .../ValueObject/Tracking/GeoLocation.php | 4 +- .../Domain/Tracking/ClientProfiler.php | 8 +- .../SymfonyEventDispatcher.php | 4 +- .../Framework/Symfony/Kernel.php | 2 +- .../Symfony/Logging/NormalizerFormatter.php | 2 +- .../Symfony/Logging/TelegramFormatter.php | 2 +- .../Symfony/Mailing/SymfonyMailer.php | 8 +- .../Symfony/Messaging/MessengerCommandBus.php | 4 +- .../Symfony/Messaging/MessengerMessageBus.php | 6 +- .../Symfony/Messaging/MessengerQueryBus.php | 4 +- .../DBAL/Features/PaginationQuery.php | 10 +- .../Persistence/Doctrine/DBAL/NoResult.php | 2 +- .../Doctrine/DBAL/Types/EmailType.php | 4 +- .../Filesystem/Asset/AssetUrlProvider.php | 6 +- .../Persistence/Filesystem/DataTransfert.php | 10 +- .../Tracking/ClientProfiler.php | 12 +- .../Console/AskArgumentFeature.php | 2 +- .../Web/Controller/AbstractController.php | 8 +- .../Web/Controller/DefaultController.php | 2 +- .../EventListener/UserFacingErrorListener.php | 28 +- .../tests/Behat/Context/AbstractContext.php | 4 +- .../Model/ValueObject/PageRangeTest.php | 4 +- .../Domain/Service/DateParserTest.php | 2 +- .../Model/ValueObject/DateRangeTest.php | 4 +- projects/backend/tests/object-manager.php | 2 +- projects/crawler/.env | 9 +- projects/crawler/src/basango/cli.py | 6 +- .../crawler/src/basango/domain/article.py | 11 + .../crawler/src/basango/services/__init__.py | 3 +- .../basango/services/crawler/async/schemas.py | 4 +- .../basango/services/crawler/async/tasks.py | 132 ++++---- .../basango/services/crawler/base_crawler.py | 14 +- .../basango/services/crawler/html_crawler.py | 7 +- .../services/crawler/wordpress_crawler.py | 22 +- .../basango/services/persistence/__init__.py | 2 - .../services/persistence/api_persistor.py | 38 --- 397 files changed, 1490 insertions(+), 3063 deletions(-) create mode 100644 projects/backend/api/aggregator/add-article.bru create mode 100644 projects/backend/api/aggregator/folder.bru delete mode 100644 projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/CrawlingSettings.php delete mode 100644 projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/PageRange.php delete mode 100644 projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/UpdateDirection.php rename projects/backend/src/Aggregator/Domain/Model/ValueObject/{Crawling => }/OpenGraph.php (95%) delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/DateParser.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Audio.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Image.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Video.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Objects/Website.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphConsumer.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphElement.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphObject.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphProperty.php delete mode 100644 projects/backend/src/Aggregator/Domain/Service/Crawling/SourceCrawler.php delete mode 100644 projects/backend/src/Aggregator/Infrastructure/Crawler/HttpClientFactory.php delete mode 100644 projects/backend/src/Aggregator/Infrastructure/Crawler/OpenGraph/DomCrawlerConsumer.php delete mode 100644 projects/backend/src/Aggregator/Infrastructure/Crawler/Source/Source.php delete mode 100644 projects/backend/src/Aggregator/Infrastructure/Crawler/Source/SourceCrawler.php delete mode 100644 projects/backend/src/Aggregator/Infrastructure/Crawler/Source/WordPressJson.php delete mode 100644 projects/backend/src/Aggregator/Infrastructure/Crawler/UserAgents.php delete mode 100644 projects/backend/src/Aggregator/Presentation/Console/ConsumeOpenGraphConsole.php delete mode 100644 projects/backend/src/Aggregator/Presentation/Console/CrawlConsole.php delete mode 100644 projects/backend/src/Aggregator/Presentation/Console/UpdateConsole.php delete mode 100644 projects/backend/src/Aggregator/Presentation/Console/UpdateProxiesConsole.php create mode 100644 projects/backend/src/Aggregator/Presentation/Web/Controller/AddArticleController.php create mode 100644 projects/backend/src/Aggregator/Presentation/WriteModel/AddArticleModel.php delete mode 100644 projects/crawler/src/basango/services/persistence/api_persistor.py diff --git a/projects/backend/.env b/projects/backend/.env index 63d97e0..6471339 100644 --- a/projects/backend/.env +++ b/projects/backend/.env @@ -19,10 +19,11 @@ APP_ENV=dev APP_SECRET=f51bc23b4d778b25fcb9804bb9dfaf39 ###< symfony/framework-bundle ### -CRAWLING_NOTIFICATION_EMAIL= -TIMEZONE=Africa/Lubumbashi -GOOGLE_CUSTOM_SEARCH_API_KEY= -NEWS_DATA_API_KEY= +BASANGO_CRAWLER_TOKEN=dev +BASANGO_NOTIFICATION_EMAIL= +BASANGO_TIMEZONE=Africa/Lubumbashi +BASANGO_GOOGLE_SEARCH_API_KEY= +BASANGO_NEWS_DATA_API_KEY= ###> Devy ### DEVY_TOKEN= @@ -47,7 +48,7 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 # # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" # DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4" -DATABASE_URL="mysql://root:root@database:3306/app?serverVersion=Mariadb-10.11.11&charset=utf8mb4" +DATABASE_URL="mysql://root:root@mariadb:3306/app?serverVersion=Mariadb-10.11.11&charset=utf8mb4" #DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" ###< doctrine/doctrine-bundle ### diff --git a/projects/backend/.env.test b/projects/backend/.env.test index 6846a72..d680de7 100644 --- a/projects/backend/.env.test +++ b/projects/backend/.env.test @@ -1,5 +1,5 @@ # define your env variables for the test env here -KERNEL_CLASS='App\SharedKernel\Infrastructure\Framework\Symfony\Kernel' +KERNEL_CLASS='Basango\SharedKernel\Infrastructure\Framework\Symfony\Kernel' APP_SECRET='$ecretf0rt3st' SYMFONY_DEPRECATIONS_HELPER=999999 PANTHER_APP_ENV=panther diff --git a/projects/backend/api/aggregator/add-article.bru b/projects/backend/api/aggregator/add-article.bru new file mode 100644 index 0000000..5296c3d --- /dev/null +++ b/projects/backend/api/aggregator/add-article.bru @@ -0,0 +1,32 @@ +meta { + name: add-article + type: http + seq: 1 +} + +post { + url: {{baseUrl}}/aggregator/articles?token=dev + body: json + auth: inherit +} + +params:query { + token: dev +} + +body:json { + { + "title": "test", + "body": "hello world", + "link": "https://devscast.tech", + "categories": ["a", "b"], + "source": "radiookapi.net", + "timestamp": 12, + "metadata": { + "title": "test", + "description": "some description", + "image": "https://devscast.tech/logo.svg", + "locale": "fr" + } + } +} diff --git a/projects/backend/api/aggregator/folder.bru b/projects/backend/api/aggregator/folder.bru new file mode 100644 index 0000000..aaca22f --- /dev/null +++ b/projects/backend/api/aggregator/folder.bru @@ -0,0 +1,8 @@ +meta { + name: aggregator + seq: 3 +} + +auth { + mode: inherit +} diff --git a/projects/backend/behat.yml b/projects/backend/behat.yml index 2f21e1c..d1e4a34 100644 --- a/projects/backend/behat.yml +++ b/projects/backend/behat.yml @@ -13,4 +13,4 @@ default: FriendsOfBehat\SymfonyExtension: bootstrap: tests/bootstrap.php kernel: - class: App\SharedKernel\Infrastructure\Framework\Symfony\Kernel + class: Basango\SharedKernel\Infrastructure\Framework\Symfony\Kernel diff --git a/projects/backend/bin/console b/projects/backend/bin/console index 2532dac..2114f1f 100755 --- a/projects/backend/bin/console +++ b/projects/backend/bin/console @@ -3,7 +3,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application; -use App\SharedKernel\Infrastructure\Framework\Symfony\Kernel; +use Basango\SharedKernel\Infrastructure\Framework\Symfony\Kernel; if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); diff --git a/projects/backend/composer.json b/projects/backend/composer.json index 49bdbef..03b5185 100644 --- a/projects/backend/composer.json +++ b/projects/backend/composer.json @@ -73,7 +73,7 @@ }, "autoload": { "psr-4": { - "App\\": "src/" + "Basango\\": "src/" } }, "autoload-dev": { diff --git a/projects/backend/config/doctrine/Aggregator/Entity.Article.orm.xml b/projects/backend/config/doctrine/Aggregator/Entity.Article.orm.xml index 647ef1e..aa714b0 100644 --- a/projects/backend/config/doctrine/Aggregator/Entity.Article.orm.xml +++ b/projects/backend/config/doctrine/Aggregator/Entity.Article.orm.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> @@ -19,22 +19,22 @@ - + - + - - + + - + @@ -15,7 +15,7 @@ - + diff --git a/projects/backend/config/doctrine/Aggregator/ValueObject.Link.orm.xml b/projects/backend/config/doctrine/Aggregator/ValueObject.Link.orm.xml index 9b63302..c54e426 100644 --- a/projects/backend/config/doctrine/Aggregator/ValueObject.Link.orm.xml +++ b/projects/backend/config/doctrine/Aggregator/ValueObject.Link.orm.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + diff --git a/projects/backend/config/doctrine/Aggregator/ValueObject.ReadingTime.orm.xml b/projects/backend/config/doctrine/Aggregator/ValueObject.ReadingTime.orm.xml index 79b06a7..5012976 100644 --- a/projects/backend/config/doctrine/Aggregator/ValueObject.ReadingTime.orm.xml +++ b/projects/backend/config/doctrine/Aggregator/ValueObject.ReadingTime.orm.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + diff --git a/projects/backend/config/doctrine/Aggregator/ValueObject.Scoring.Credibility.orm.xml b/projects/backend/config/doctrine/Aggregator/ValueObject.Scoring.Credibility.orm.xml index 1370fba..b0af076 100644 --- a/projects/backend/config/doctrine/Aggregator/ValueObject.Scoring.Credibility.orm.xml +++ b/projects/backend/config/doctrine/Aggregator/ValueObject.Scoring.Credibility.orm.xml @@ -4,18 +4,18 @@ xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - - + + - + - + diff --git a/projects/backend/config/doctrine/FeedManagement/Entity.Bookmark.orm.xml b/projects/backend/config/doctrine/FeedManagement/Entity.Bookmark.orm.xml index cba7872..1bbb687 100644 --- a/projects/backend/config/doctrine/FeedManagement/Entity.Bookmark.orm.xml +++ b/projects/backend/config/doctrine/FeedManagement/Entity.Bookmark.orm.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> @@ -13,7 +13,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/projects/backend/config/doctrine/FeedManagement/Entity.Comment.orm.xml b/projects/backend/config/doctrine/FeedManagement/Entity.Comment.orm.xml index 195fb24..ce86c1e 100644 --- a/projects/backend/config/doctrine/FeedManagement/Entity.Comment.orm.xml +++ b/projects/backend/config/doctrine/FeedManagement/Entity.Comment.orm.xml @@ -4,23 +4,23 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + - + - + diff --git a/projects/backend/config/doctrine/FeedManagement/Entity.FollowedSource.orm.xml b/projects/backend/config/doctrine/FeedManagement/Entity.FollowedSource.orm.xml index f4cb3f2..85d5b42 100644 --- a/projects/backend/config/doctrine/FeedManagement/Entity.FollowedSource.orm.xml +++ b/projects/backend/config/doctrine/FeedManagement/Entity.FollowedSource.orm.xml @@ -4,18 +4,18 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + - + diff --git a/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginAttempt.orm.xml b/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginAttempt.orm.xml index 8f3b322..4727a29 100644 --- a/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginAttempt.orm.xml +++ b/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginAttempt.orm.xml @@ -4,15 +4,15 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + diff --git a/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginHistory.orm.xml b/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginHistory.orm.xml index b941e0f..23137bf 100644 --- a/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginHistory.orm.xml +++ b/projects/backend/config/doctrine/IdentityAndAccess/Entity.LoginHistory.orm.xml @@ -4,21 +4,21 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + - - + + diff --git a/projects/backend/config/doctrine/IdentityAndAccess/Entity.RefreshToken.orm.xml b/projects/backend/config/doctrine/IdentityAndAccess/Entity.RefreshToken.orm.xml index aa70e52..36e2426 100644 --- a/projects/backend/config/doctrine/IdentityAndAccess/Entity.RefreshToken.orm.xml +++ b/projects/backend/config/doctrine/IdentityAndAccess/Entity.RefreshToken.orm.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> diff --git a/projects/backend/config/doctrine/IdentityAndAccess/Entity.User.orm.xml b/projects/backend/config/doctrine/IdentityAndAccess/Entity.User.orm.xml index ff15e89..983be83 100644 --- a/projects/backend/config/doctrine/IdentityAndAccess/Entity.User.orm.xml +++ b/projects/backend/config/doctrine/IdentityAndAccess/Entity.User.orm.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> @@ -26,7 +26,7 @@ - + diff --git a/projects/backend/config/doctrine/IdentityAndAccess/Entity.VerificationToken.orm.xml b/projects/backend/config/doctrine/IdentityAndAccess/Entity.VerificationToken.orm.xml index 13b4c5c..3680159 100644 --- a/projects/backend/config/doctrine/IdentityAndAccess/Entity.VerificationToken.orm.xml +++ b/projects/backend/config/doctrine/IdentityAndAccess/Entity.VerificationToken.orm.xml @@ -4,19 +4,19 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + - - + + diff --git a/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Roles.orm.xml b/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Roles.orm.xml index ce096c6..d840fb1 100644 --- a/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Roles.orm.xml +++ b/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Roles.orm.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + diff --git a/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Secret.GeneratedToken.orm.xml b/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Secret.GeneratedToken.orm.xml index 4cc375c..0a2068b 100644 --- a/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Secret.GeneratedToken.orm.xml +++ b/projects/backend/config/doctrine/IdentityAndAccess/ValueObject.Secret.GeneratedToken.orm.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + diff --git a/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.Device.orm.xml b/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.Device.orm.xml index 83f319b..e77b059 100644 --- a/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.Device.orm.xml +++ b/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.Device.orm.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + diff --git a/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.GeoLocation.orm.xml b/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.GeoLocation.orm.xml index 2296046..81beb76 100644 --- a/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.GeoLocation.orm.xml +++ b/projects/backend/config/doctrine/SharedKernel/ValueObject.Tracking.GeoLocation.orm.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="https://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + diff --git a/projects/backend/config/migrations/Version20250526231341.php b/projects/backend/config/migrations/Version20250526231341.php index 8fc814f..5fc0f35 100644 --- a/projects/backend/config/migrations/Version20250526231341.php +++ b/projects/backend/config/migrations/Version20250526231341.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace DoctrineMigrations; -use App\Aggregator\Domain\Model\Identity\SourceId; +use Basango\Aggregator\Domain\Model\Identity\SourceId; use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; diff --git a/projects/backend/config/packages/doctrine.yaml b/projects/backend/config/packages/doctrine.yaml index 37b2c42..a0c08f2 100644 --- a/projects/backend/config/packages/doctrine.yaml +++ b/projects/backend/config/packages/doctrine.yaml @@ -11,23 +11,23 @@ doctrine: result_cache: 'cache.dbal' types: # Shared Kernel - email: App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Types\EmailType + email: Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Types\EmailType # Aggregator - article_id: App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\ArticleIdType - source_id: App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\SourceIdType - open_graph: App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\OpenGraphType + article_id: Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\ArticleIdType + source_id: Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\SourceIdType + open_graph: Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\OpenGraphType # Identity and Access - user_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\UserIdType - login_attempt_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\LoginAttemptIdType - login_history_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\LoginHistoryIdType - verification_token_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\VerificationTokenIdType + user_id: Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\UserIdType + login_attempt_id: Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\LoginAttemptIdType + login_history_id: Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\LoginHistoryIdType + verification_token_id: Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\VerificationTokenIdType # FeedManagement - bookmark_id: App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\BookmarkIdType - followed_source_id: App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\FollowedSourceIdType - comment_id: App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\CommentIdType + bookmark_id: Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\BookmarkIdType + followed_source_id: Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\FollowedSourceIdType + comment_id: Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\CommentIdType orm: auto_generate_proxy_classes: true enable_lazy_ghost_objects: true @@ -40,22 +40,22 @@ doctrine: is_bundle: false type: xml dir: '%kernel.project_dir%/config/doctrine/Aggregator' - prefix: 'App\Aggregator\Domain\Model' + prefix: 'Basango\Aggregator\Domain\Model' IdentityAndAccess: is_bundle: false type: xml dir: '%kernel.project_dir%/config/doctrine/IdentityAndAccess' - prefix: 'App\IdentityAndAccess\Domain\Model' + prefix: 'Basango\IdentityAndAccess\Domain\Model' FeedManagement: is_bundle: false type: xml dir: '%kernel.project_dir%/config/doctrine/FeedManagement' - prefix: 'App\FeedManagement\Domain\Model' + prefix: 'Basango\FeedManagement\Domain\Model' SharedKernel: is_bundle: false type: xml dir: '%kernel.project_dir%/config/doctrine/SharedKernel' - prefix: 'App\SharedKernel\Domain\Model' + prefix: 'Basango\SharedKernel\Domain\Model' controller_resolver: auto_mapping: false diff --git a/projects/backend/config/packages/doctrine_migrations.yaml b/projects/backend/config/packages/doctrine_migrations.yaml index ee12422..6577cf6 100644 --- a/projects/backend/config/packages/doctrine_migrations.yaml +++ b/projects/backend/config/packages/doctrine_migrations.yaml @@ -1,6 +1,6 @@ doctrine_migrations: migrations_paths: - # namespace is arbitrary but should be different from App\Migrations + # namespace is arbitrary but should be different from Basango\Migrations # as migrations classes should NOT be autoloaded 'DoctrineMigrations': '%kernel.project_dir%/config/migrations' enable_profiler: false diff --git a/projects/backend/config/packages/gesdinet_jwt_refresh_token.yaml b/projects/backend/config/packages/gesdinet_jwt_refresh_token.yaml index 97aabc3..afd2a71 100644 --- a/projects/backend/config/packages/gesdinet_jwt_refresh_token.yaml +++ b/projects/backend/config/packages/gesdinet_jwt_refresh_token.yaml @@ -1,4 +1,4 @@ gesdinet_jwt_refresh_token: - refresh_token_class: App\IdentityAndAccess\Domain\Model\Entity\RefreshToken + refresh_token_class: Basango\IdentityAndAccess\Domain\Model\Entity\RefreshToken ttl: 2592000 # 1 month ttl_update: true diff --git a/projects/backend/config/packages/messenger.yaml b/projects/backend/config/packages/messenger.yaml index 5e5f19a..56435ee 100644 --- a/projects/backend/config/packages/messenger.yaml +++ b/projects/backend/config/packages/messenger.yaml @@ -21,7 +21,7 @@ framework: sync: 'sync://' routing: - App\SharedKernel\Application\Messaging\AsyncMessage: async + Basango\SharedKernel\Application\Messaging\AsyncMessage: async Symfony\Component\Mailer\Messenger\SendEmailMessage: sync default_bus: command.bus diff --git a/projects/backend/config/packages/monolog.yaml b/projects/backend/config/packages/monolog.yaml index 73c2d44..c33fc5f 100644 --- a/projects/backend/config/packages/monolog.yaml +++ b/projects/backend/config/packages/monolog.yaml @@ -55,7 +55,7 @@ when@prod: disable_webpage_preview: true disable_notification: false split_long_messages: false - formatter: App\SharedKernel\Infrastructure\Framework\Symfony\Logging\TelegramFormatter + formatter: Basango\SharedKernel\Infrastructure\Framework\Symfony\Logging\TelegramFormatter nested: type: rotating_file path: "%kernel.logs_dir%/%kernel.environment%.log" diff --git a/projects/backend/config/packages/security.yaml b/projects/backend/config/packages/security.yaml index c50f1b8..7c32f79 100644 --- a/projects/backend/config/packages/security.yaml +++ b/projects/backend/config/packages/security.yaml @@ -5,7 +5,7 @@ security: # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider providers: app_user_provider: - id: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUserProvider + id: Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUserProvider firewalls: dev: @@ -19,7 +19,7 @@ security: check_path: /api/login_check success_handler: lexik_jwt_authentication.handler.authentication_success failure_handler: lexik_jwt_authentication.handler.authentication_failure - user_checker: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker + user_checker: Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker api: pattern: ^/api @@ -30,12 +30,12 @@ security: check_path: /api/token/refresh logout: path: api_token_invalidate - user_checker: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker + user_checker: Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker main: lazy: true provider: app_user_provider - user_checker: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker + user_checker: Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker # Easy way to control access for large sections of your site # Note: Only the *first* access control that matches will be used @@ -45,6 +45,7 @@ security: - { path: ^/api/token/refresh, roles: PUBLIC_ACCESS } - { path: ^/api/password/(request|reset), roles: PUBLIC_ACCESS } - { path: ^/api/account/(unlock|confirm), roles: PUBLIC_ACCESS } + - { path: ^/api/aggregator/articles, roles: PUBLIC_ACCESS } - { path: ^/api, roles: IS_AUTHENTICATED_FULLY } when@test: diff --git a/projects/backend/config/packages/twig.yaml b/projects/backend/config/packages/twig.yaml index a0b2dad..c3f5500 100644 --- a/projects/backend/config/packages/twig.yaml +++ b/projects/backend/config/packages/twig.yaml @@ -9,7 +9,7 @@ twig: decimal_point: ',' thousands_separator: '.' globals: - 'application': '@App\SharedKernel\Domain\Application' + 'application': '@Basango\SharedKernel\Domain\Application' when@test: twig: diff --git a/projects/backend/config/services.yaml b/projects/backend/config/services.yaml index 53cd7e7..bb6aaea 100644 --- a/projects/backend/config/services.yaml +++ b/projects/backend/config/services.yaml @@ -4,7 +4,7 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: - app_crawling_notification_email: '%env(CRAWLING_NOTIFICATION_EMAIL)%' + basango_notification_email: '%env(BASANGO_NOTIFICATION_EMAIL)%' services: # default configuration for services in *this* file @@ -13,19 +13,19 @@ services: autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. bind: $projectDir: '%kernel.project_dir%' - $crawlingNotificationEmail: '%app_crawling_notification_email%' + $crawlingNotificationEmail: '%basango_notification_email%' _instanceof: - App\SharedKernel\Application\Messaging\CommandHandler: + Basango\SharedKernel\Application\Messaging\CommandHandler: tags: - { name: messenger.message_handler, bus: 'command.bus' } - App\SharedKernel\Application\Messaging\QueryHandler: + Basango\SharedKernel\Application\Messaging\QueryHandler: tags: - { name: messenger.message_handler, bus: 'query.bus' } - App\SharedKernel\Application\Messaging\MessageHandler: + Basango\SharedKernel\Application\Messaging\MessageHandler: tags: - { name: messenger.message_handler, bus: 'message.bus' } - App\SharedKernel\Domain\EventListener\EventListener: + Basango\SharedKernel\Domain\EventListener\EventListener: tags: - { name: kernel.event_listener } @@ -38,13 +38,13 @@ services: Symfony\Bridge\Monolog\Processor\TokenProcessor: tags: - { name: monolog.processor, channel: 'app' } - App\SharedKernel\Infrastructure\Framework\Symfony\Logging\TelegramFormatter: + Basango\SharedKernel\Infrastructure\Framework\Symfony\Logging\TelegramFormatter: tags: - { name: monolog.formatter } # makes classes in src/ available to be used as services # this creates a service per class whose id is the fully-qualified class name - App\: + Basango\: resource: '../src/' exclude: - '../src/SharedKernel/Infrastructure/Framework/Symfony/Kernel.php' diff --git a/projects/backend/public/index.php b/projects/backend/public/index.php index 79ef949..c90daef 100644 --- a/projects/backend/public/index.php +++ b/projects/backend/public/index.php @@ -1,6 +1,6 @@ images[0] ?? null; - $video = $object->videos[0] ?? null; - $audio = $object->audios[0] ?? null; - - $this->metadata = new OpenGraph( - title: $object->title, - description: $object->description, - image: $image->url ?? $image?->secureUrl, - video: $video->url ?? $video?->secureUrl, - audio: $audio->url ?? $audio?->secureUrl, - locale: $object->locale - ); - } + $this->metadata = new OpenGraph( + title: $object->title, + description: $object->description, + image: $object->image, + locale: $object->locale ?? "fr" + ); return $this; } diff --git a/projects/backend/src/Aggregator/Domain/Model/Entity/Category.php b/projects/backend/src/Aggregator/Domain/Model/Entity/Category.php index c67be9f..49eca6b 100644 --- a/projects/backend/src/Aggregator/Domain/Model/Entity/Category.php +++ b/projects/backend/src/Aggregator/Domain/Model/Entity/Category.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\Entity; +namespace Basango\Aggregator\Domain\Model\Entity; -use App\Aggregator\Domain\Model\Identity\CategoryId; +use Basango\Aggregator\Domain\Model\Identity\CategoryId; /** * Class Category. diff --git a/projects/backend/src/Aggregator/Domain/Model/Entity/Source.php b/projects/backend/src/Aggregator/Domain/Model/Entity/Source.php index 0c1b180..8a4eb8d 100644 --- a/projects/backend/src/Aggregator/Domain/Model/Entity/Source.php +++ b/projects/backend/src/Aggregator/Domain/Model/Entity/Source.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\Entity; +namespace Basango\Aggregator\Domain\Model\Entity; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; /** * Class Source. diff --git a/projects/backend/src/Aggregator/Domain/Model/Identity/ArticleId.php b/projects/backend/src/Aggregator/Domain/Model/Identity/ArticleId.php index 2612a0d..82d438a 100644 --- a/projects/backend/src/Aggregator/Domain/Model/Identity/ArticleId.php +++ b/projects/backend/src/Aggregator/Domain/Model/Identity/ArticleId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\Identity; +namespace Basango\Aggregator\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/Aggregator/Domain/Model/Identity/CategoryId.php b/projects/backend/src/Aggregator/Domain/Model/Identity/CategoryId.php index 5cf6f5c..818d6ab 100644 --- a/projects/backend/src/Aggregator/Domain/Model/Identity/CategoryId.php +++ b/projects/backend/src/Aggregator/Domain/Model/Identity/CategoryId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\Identity; +namespace Basango\Aggregator\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/Aggregator/Domain/Model/Identity/SourceId.php b/projects/backend/src/Aggregator/Domain/Model/Identity/SourceId.php index 3c305af..4ec6948 100644 --- a/projects/backend/src/Aggregator/Domain/Model/Identity/SourceId.php +++ b/projects/backend/src/Aggregator/Domain/Model/Identity/SourceId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\Identity; +namespace Basango\Aggregator\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/Aggregator/Domain/Model/Repository/ArticleRepository.php b/projects/backend/src/Aggregator/Domain/Model/Repository/ArticleRepository.php index 785d955..267e11c 100644 --- a/projects/backend/src/Aggregator/Domain/Model/Repository/ArticleRepository.php +++ b/projects/backend/src/Aggregator/Domain/Model/Repository/ArticleRepository.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\Repository; +namespace Basango\Aggregator\Domain\Model\Repository; -use App\Aggregator\Domain\Model\Entity\Article; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\Aggregator\Domain\Model\Entity\Article; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; /** * Interface ArticleRepository. diff --git a/projects/backend/src/Aggregator/Domain/Model/Repository/SourceRepository.php b/projects/backend/src/Aggregator/Domain/Model/Repository/SourceRepository.php index a3a4748..08b4fc4 100644 --- a/projects/backend/src/Aggregator/Domain/Model/Repository/SourceRepository.php +++ b/projects/backend/src/Aggregator/Domain/Model/Repository/SourceRepository.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\Repository; +namespace Basango\Aggregator\Domain\Model\Repository; -use App\Aggregator\Domain\Model\Entity\Source; -use App\Aggregator\Domain\Model\Identity\SourceId; +use Basango\Aggregator\Domain\Model\Entity\Source; +use Basango\Aggregator\Domain\Model\Identity\SourceId; /** * Interface SourceRepository. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/CrawlingSettings.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/CrawlingSettings.php deleted file mode 100644 index c87adbd..0000000 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/CrawlingSettings.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -final readonly class CrawlingSettings -{ - public function __construct( - public string $id, - public ?PageRange $pageRange = null, - public ?DateRange $dateRange = null, - public ?string $category = null, - public bool $notify = false - ) { - Assert::notEmpty($this->id); - } -} diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/PageRange.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/PageRange.php deleted file mode 100644 index 5835b65..0000000 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/PageRange.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -final readonly class PageRange implements \Stringable -{ - public int $start; - - public int $end; - - private function __construct(int $start, int $end) - { - Assert::greaterThanEq($start, 0); - Assert::greaterThanEq($end, 0); - Assert::greaterThan($end, $start); - - $this->start = $start; - $this->end = $end; - } - - #[\Override] - public function __toString(): string - { - return $this->start . ':' . $this->end; - } - - public static function from(string $interval): self - { - [$start, $end] = explode(':', $interval); - - $start = (int) $start; - $end = (int) $end; - - return new self($start, $end); - } - - public function inRange(int $page): bool - { - return $page >= $this->start && $page <= $this->end; - } -} diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/UpdateDirection.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/UpdateDirection.php deleted file mode 100644 index d4f668a..0000000 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/UpdateDirection.php +++ /dev/null @@ -1,16 +0,0 @@ - - */ -enum UpdateDirection: string -{ - case FORWARD = 'forward'; - case BACKWARD = 'backward'; -} diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Link.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Link.php index 76cfe00..04bb3b1 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Link.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Link.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject; +namespace Basango\Aggregator\Domain\Model\ValueObject; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * Class Link. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/OpenGraph.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/OpenGraph.php similarity index 95% rename from projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/OpenGraph.php rename to projects/backend/src/Aggregator/Domain/Model/ValueObject/OpenGraph.php index 3cffdd2..e278c2a 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Crawling/OpenGraph.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/OpenGraph.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject\Crawling; +namespace Basango\Aggregator\Domain\Model\ValueObject; /** * Class OpenGraphMeta. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/ReadingTime.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/ReadingTime.php index 8e54429..410d989 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/ReadingTime.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/ReadingTime.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject; +namespace Basango\Aggregator\Domain\Model\ValueObject; /** * Class ReadingTime. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Bias.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Bias.php index 5a6d08e..eb056a4 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Bias.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Bias.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject\Scoring; +namespace Basango\Aggregator\Domain\Model\ValueObject\Scoring; /** * Class Bias. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Credibility.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Credibility.php index ba9d9d7..eaa1cc7 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Credibility.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Credibility.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject\Scoring; +namespace Basango\Aggregator\Domain\Model\ValueObject\Scoring; /** * Class Credibility. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Reliability.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Reliability.php index 948ce0c..3b880f3 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Reliability.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Reliability.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject\Scoring; +namespace Basango\Aggregator\Domain\Model\ValueObject\Scoring; /** * Class Reliability. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Sentiment.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Sentiment.php index 6fc1896..dabb8da 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Sentiment.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Sentiment.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject\Scoring; +namespace Basango\Aggregator\Domain\Model\ValueObject\Scoring; /** * Enum Sentiment. diff --git a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Transparency.php b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Transparency.php index 4759756..b17e305 100644 --- a/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Transparency.php +++ b/projects/backend/src/Aggregator/Domain/Model/ValueObject/Scoring/Transparency.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Model\ValueObject\Scoring; +namespace Basango\Aggregator\Domain\Model\ValueObject\Scoring; /** * Enum Transparency. diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/DateParser.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/DateParser.php deleted file mode 100644 index f17ec36..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/DateParser.php +++ /dev/null @@ -1,72 +0,0 @@ - - */ -final readonly class DateParser -{ - public const array MONTHS = [ - 'janvier' => '01', - 'février' => '02', - 'mars' => '03', - 'avril' => '04', - 'mai' => '05', - 'juin' => '06', - 'juillet' => '07', - 'août' => '08', - 'septembre' => '09', - 'octobre' => '10', - 'novembre' => '11', - 'décembre' => '12', - ]; - - public const array DAYS = [ - 'dimanche' => '0', - 'lundi' => '1', - 'mardi' => '2', - 'mercredi' => '3', - 'jeudi' => '4', - 'vendredi' => '5', - 'samedi' => '6', - ]; - - public const string DEFAULT_DATE_FORMAT = 'Y-m-d H:i'; - - /** - * @throws \Throwable - */ - public function createTimeStamp( - string $date, - ?string $format = null, - ?string $pattern = null, - ?string $replacement = null - ): string { - /** @var string $date */ - $date = strtr(strtr(strtolower($date), self::DAYS), self::MONTHS); - if ($pattern !== null && $replacement !== null) { - /** @var string $date */ - $date = preg_replace( - pattern: $pattern, - replacement: $replacement, - subject: $date - ); - } - - if ($format === 'c') { - $date = str_replace('t', ' ', $date); - $format = 'Y-m-d H:i:s'; - } - - $datetime = \DateTime::createFromFormat($format ?? self::DEFAULT_DATE_FORMAT, $date); - - return $datetime !== false ? - $datetime->format('U') : - new \DateTime('midnight')->format('U'); - } -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Audio.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Audio.php deleted file mode 100644 index b569b2a..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Audio.php +++ /dev/null @@ -1,32 +0,0 @@ - - */ -final class Audio extends OpenGraphElement -{ - public function __construct( - public ?string $url = null, - public ?string $secureUrl = null, - public ?string $type = null - ) { - } - - public function supportedProperties(): array - { - return [ - OpenGraphProperty::AUDIO_URL => $this->url, - OpenGraphProperty::AUDIO_SECURE_URL => $this->secureUrl, - OpenGraphProperty::AUDIO_TYPE => $this->type, - ]; - } -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Image.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Image.php deleted file mode 100644 index 71c881a..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Image.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -final class Image extends OpenGraphElement -{ - public function __construct( - public ?string $url = null, - public ?string $secureUrl = null, - public ?string $type = null, - public ?int $width = null, - public ?int $height = null, - public ?bool $userGenerated = null - ) { - } - - public function supportedProperties(): array - { - return [ - OpenGraphProperty::IMAGE => $this->url, - OpenGraphProperty::IMAGE_SECURE_URL => $this->secureUrl, - OpenGraphProperty::IMAGE_TYPE => $this->type, - OpenGraphProperty::IMAGE_WIDTH => $this->width, - OpenGraphProperty::IMAGE_HEIGHT => $this->height, - OpenGraphProperty::IMAGE_USER_GENERATED => $this->userGenerated, - ]; - } -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Video.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Video.php deleted file mode 100644 index 8a3f0a3..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Elements/Video.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -final class Video extends OpenGraphElement -{ - public function __construct( - public ?string $url = null, - public ?string $secureUrl = null, - public ?string $type = null, - public ?int $width = null, - public ?int $height = null - ) { - } - - public function supportedProperties(): array - { - return [ - OpenGraphProperty::VIDEO_URL => $this->url, - OpenGraphProperty::VIDEO_SECURE_URL => $this->secureUrl, - OpenGraphProperty::VIDEO_TYPE => $this->type, - OpenGraphProperty::VIDEO_WIDTH => $this->width, - OpenGraphProperty::VIDEO_HEIGHT => $this->height, - ]; - } -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Objects/Website.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Objects/Website.php deleted file mode 100644 index 196ede6..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/Objects/Website.php +++ /dev/null @@ -1,16 +0,0 @@ - - */ -final class Website extends OpenGraphObject -{ -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphConsumer.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphConsumer.php deleted file mode 100644 index 62e3b9c..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphConsumer.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ -interface OpenGraphConsumer -{ - public function consumeUrl(string $url): ?OpenGraphObject; - - public function consumeHtml(string $html, string $fallbackUrl): ?OpenGraphObject; -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphElement.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphElement.php deleted file mode 100644 index e7ee794..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphElement.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -abstract class OpenGraphElement -{ - abstract public function supportedProperties(): array; - - public function getProperties(): array - { - return array_filter( - array_map( - fn (string $key, mixed $value): ?OpenGraphProperty => $value !== null ? new OpenGraphProperty($key, $value) : null, - array_keys($this->supportedProperties()), - array_values($this->supportedProperties()) - ), - ); - } -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphObject.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphObject.php deleted file mode 100644 index 44e9a9b..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphObject.php +++ /dev/null @@ -1,283 +0,0 @@ - - */ -abstract class OpenGraphObject -{ - public function __construct( - public array $audios = [], - public ?string $description = null, - public ?string $determiner = null, - public array $images = [], - public ?string $locale = null, - public array $localeAlternate = [], - public ?bool $richAttachment = null, - public array $seeAlso = [], - public ?string $siteName = null, - public ?string $title = null, - public ?string $type = null, - public ?\DateTimeImmutable $updatedTime = null, - public ?string $url = null, - public array $videos = [] - ) { - } - - public function assignProperties(array $properties, bool $debug = false): void - { - foreach ($properties as $property) { - $name = $property->key; - $value = $property->value; - - switch ($name) { - case OpenGraphProperty::AUDIO: - case OpenGraphProperty::AUDIO_URL: - $this->audios[] = new Audio($value); - break; - case OpenGraphProperty::AUDIO_SECURE_URL: - case OpenGraphProperty::AUDIO_TYPE: - if ($this->audios !== []) { - $this->handleAudioAttribute($this->audios[\count($this->audios) - 1], $name, $value); - } elseif ($debug) { - throw new \UnexpectedValueException( - \sprintf( - "Found '%s' property but no audio was found before.", - $name - ) - ); - } - - break; - case OpenGraphProperty::DESCRIPTION: - if ($this->description === null) { - $this->description = $value; - } - - break; - case OpenGraphProperty::DETERMINER: - if ($this->determiner === null) { - $this->determiner = $value; - } - - break; - case OpenGraphProperty::IMAGE: - case OpenGraphProperty::IMAGE_URL: - $this->images[] = new Image($value); - break; - case OpenGraphProperty::IMAGE_HEIGHT: - case OpenGraphProperty::IMAGE_SECURE_URL: - case OpenGraphProperty::IMAGE_TYPE: - case OpenGraphProperty::IMAGE_WIDTH: - case OpenGraphProperty::IMAGE_USER_GENERATED: - if ($this->images !== []) { - $this->handleImageAttribute($this->images[\count($this->images) - 1], $name, $value); - } elseif ($debug) { - throw new \UnexpectedValueException( - \sprintf( - "Found '%s' property but no image was found before.", - $name - ) - ); - } - - break; - case OpenGraphProperty::LOCALE: - if ($this->locale === null) { - $this->locale = $value; - } - - break; - case OpenGraphProperty::LOCALE_ALTERNATE: - $this->localeAlternate[] = $value; - break; - case OpenGraphProperty::RICH_ATTACHMENT: - $this->richAttachment = $this->convertToBoolean($value); - break; - case OpenGraphProperty::SEE_ALSO: - $this->seeAlso[] = $value; - break; - case OpenGraphProperty::SITE_NAME: - if ($this->siteName === null) { - $this->siteName = $value; - } - - break; - case OpenGraphProperty::TITLE: - if ($this->title === null) { - $this->title = $value; - } - - break; - case OpenGraphProperty::UPDATED_TIME: - if (! $this->updatedTime instanceof \DateTimeImmutable) { - $this->updatedTime = $this->convertToDateTime($value); - } - - break; - case OpenGraphProperty::URL: - if ($this->url === null) { - $this->url = $value; - } - - break; - case OpenGraphProperty::VIDEO: - case OpenGraphProperty::VIDEO_URL: - $this->videos[] = new Video($value); - break; - case OpenGraphProperty::VIDEO_HEIGHT: - case OpenGraphProperty::VIDEO_SECURE_URL: - case OpenGraphProperty::VIDEO_TYPE: - case OpenGraphProperty::VIDEO_WIDTH: - if ($this->videos !== []) { - $this->handleVideoAttribute($this->videos[\count($this->videos) - 1], $name, $value); - } elseif ($debug) { - throw new \UnexpectedValueException(\sprintf( - "Found '%s' property but no video was found before.", - $name - )); - } - } - } - } - - public function getProperties(): array - { - $properties = []; - - foreach ($this->audios as $audio) { - $properties = array_merge($properties, $audio->getProperties()); - } - - if ($this->title !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::TITLE, $this->title); - } - - if ($this->description !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::DESCRIPTION, $this->description); - } - - if ($this->determiner !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::DETERMINER, $this->determiner); - } - - foreach ($this->images as $image) { - $properties = array_merge($properties, $image->getProperties()); - } - - if ($this->locale !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::LOCALE, $this->locale); - } - - foreach ($this->localeAlternate as $locale) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::LOCALE_ALTERNATE, $locale); - } - - if ($this->richAttachment !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::RICH_ATTACHMENT, (int) $this->richAttachment); - } - - foreach ($this->seeAlso as $seeAlso) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::SEE_ALSO, $seeAlso); - } - - if ($this->siteName !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::SITE_NAME, $this->siteName); - } - - if ($this->type !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::TYPE, $this->type); - } - - if ($this->updatedTime instanceof \DateTimeImmutable) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::UPDATED_TIME, $this->updatedTime->format('c')); - } - - if ($this->url !== null) { - $properties[] = new OpenGraphProperty(OpenGraphProperty::URL, $this->url); - } - - foreach ($this->videos as $video) { - $properties = array_merge($properties, $video->getProperties()); - } - - return $properties; - } - - protected function convertToBoolean(string $value): bool - { - return match (strtolower($value)) { - '1', 'true' => true, - default => false, - }; - } - - protected function convertToDateTime(string $value): ?\DateTimeImmutable - { - try { - return new \DateTimeImmutable($value); - } catch (\Throwable) { - return null; - } - } - - private function handleAudioAttribute(Audio $element, string $name, string $value): void - { - switch ($name) { - case OpenGraphProperty::AUDIO_TYPE: - $element->type = $value; - break; - case OpenGraphProperty::AUDIO_SECURE_URL: - $element->secureUrl = $value; - break; - } - } - - private function handleImageAttribute(Image $element, string $name, string $value): void - { - switch ($name) { - case OpenGraphProperty::IMAGE_HEIGHT: - $element->height = (int) $value; - break; - case OpenGraphProperty::IMAGE_WIDTH: - $element->width = (int) $value; - break; - case OpenGraphProperty::IMAGE_TYPE: - $element->type = $value; - break; - case OpenGraphProperty::IMAGE_SECURE_URL: - $element->secureUrl = $value; - break; - case OpenGraphProperty::IMAGE_USER_GENERATED: - $element->userGenerated = $this->convertToBoolean($value); - break; - } - } - - private function handleVideoAttribute(Video $element, string $name, string $value): void - { - switch ($name) { - case OpenGraphProperty::VIDEO_HEIGHT: - $element->height = (int) $value; - break; - case OpenGraphProperty::VIDEO_WIDTH: - $element->width = (int) $value; - break; - case OpenGraphProperty::VIDEO_TYPE: - $element->type = $value; - break; - case OpenGraphProperty::VIDEO_SECURE_URL: - $element->secureUrl = $value; - break; - } - } -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphProperty.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphProperty.php deleted file mode 100644 index 281c864..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/OpenGraph/OpenGraphProperty.php +++ /dev/null @@ -1,75 +0,0 @@ - - */ -final readonly class OpenGraphProperty -{ - public const string AUDIO = 'og:audio'; - - public const string AUDIO_SECURE_URL = 'og:audio:secure_url'; - - public const string AUDIO_TYPE = 'og:audio:type'; - - public const string AUDIO_URL = 'og:audio:url'; - - public const string DESCRIPTION = 'og:description'; - - public const string DETERMINER = 'og:determiner'; - - public const string IMAGE = 'og:image'; - - public const string IMAGE_HEIGHT = 'og:image:height'; - - public const string IMAGE_SECURE_URL = 'og:image:secure_url'; - - public const string IMAGE_TYPE = 'og:image:type'; - - public const string IMAGE_URL = 'og:image:url'; - - public const string IMAGE_WIDTH = 'og:image:width'; - - public const string IMAGE_USER_GENERATED = 'og:image:user_generated'; - - public const string LOCALE = 'og:locale'; - - public const string LOCALE_ALTERNATE = 'og:locale:alternate'; - - public const string RICH_ATTACHMENT = 'og:rich_attachment'; - - public const string SEE_ALSO = 'og:see_also'; - - public const string SITE_NAME = 'og:site_name'; - - public const string TITLE = 'og:title'; - - public const string TYPE = 'og:type'; - - public const string UPDATED_TIME = 'og:updated_time'; - - public const string URL = 'og:url'; - - public const string VIDEO = 'og:video'; - - public const string VIDEO_HEIGHT = 'og:video:height'; - - public const string VIDEO_SECURE_URL = 'og:video:secure_url'; - - public const string VIDEO_TYPE = 'og:video:type'; - - public const string VIDEO_URL = 'og:video:url'; - - public const string VIDEO_WIDTH = 'og:video:width'; - - public function __construct( - public string $key, - public mixed $value, - ) { - } -} diff --git a/projects/backend/src/Aggregator/Domain/Service/Crawling/SourceCrawler.php b/projects/backend/src/Aggregator/Domain/Service/Crawling/SourceCrawler.php deleted file mode 100644 index b928a96..0000000 --- a/projects/backend/src/Aggregator/Domain/Service/Crawling/SourceCrawler.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ -interface SourceCrawler -{ - public function fetch(CrawlingSettings $settings): void; - - public function fetchOne(string $html, ?DateRange $dateRange = null): void; - - public function supports(string $source): bool; -} diff --git a/projects/backend/src/Aggregator/Domain/Service/HashCalculator.php b/projects/backend/src/Aggregator/Domain/Service/HashCalculator.php index e2c5247..e49e63c 100644 --- a/projects/backend/src/Aggregator/Domain/Service/HashCalculator.php +++ b/projects/backend/src/Aggregator/Domain/Service/HashCalculator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Service; +namespace Basango\Aggregator\Domain\Service; /** * Class HashCalculator. diff --git a/projects/backend/src/Aggregator/Domain/Service/Scoring/CredibilityAnalyser.php b/projects/backend/src/Aggregator/Domain/Service/Scoring/CredibilityAnalyser.php index 8da299f..e2de650 100644 --- a/projects/backend/src/Aggregator/Domain/Service/Scoring/CredibilityAnalyser.php +++ b/projects/backend/src/Aggregator/Domain/Service/Scoring/CredibilityAnalyser.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Service\Scoring; +namespace Basango\Aggregator\Domain\Service\Scoring; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Bias; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Bias; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; /** * Interface CredibilityAnalyser. diff --git a/projects/backend/src/Aggregator/Domain/Service/Scoring/SentimentAnalyser.php b/projects/backend/src/Aggregator/Domain/Service/Scoring/SentimentAnalyser.php index 2deac96..20d337c 100644 --- a/projects/backend/src/Aggregator/Domain/Service/Scoring/SentimentAnalyser.php +++ b/projects/backend/src/Aggregator/Domain/Service/Scoring/SentimentAnalyser.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\Aggregator\Domain\Service\Scoring; +namespace Basango\Aggregator\Domain\Service\Scoring; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; /** * Interface SentimentAnalyser. diff --git a/projects/backend/src/Aggregator/Infrastructure/Crawler/HttpClientFactory.php b/projects/backend/src/Aggregator/Infrastructure/Crawler/HttpClientFactory.php deleted file mode 100644 index 43eb699..0000000 --- a/projects/backend/src/Aggregator/Infrastructure/Crawler/HttpClientFactory.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -final readonly class HttpClientFactory -{ - public function __construct( - private string $projectDir, - private Filesystem $filesystem, - private HttpClientInterface $client, - private LoggerInterface $logger - ) { - } - - public function create(): HttpClientInterface - { - $proxy = $this->getProxy(); - - return $this->client->withOptions([ - 'headers' => [ - 'User-Agent' => UserAgents::random(), - ], - 'proxy' => $proxy !== null ? 'https://' . $proxy : null, - ]); - } - - private function getProxy(): ?string - { - $flag = boolval(getenv('USE_PROXY')); - if ($flag === false) { - return null; - } - - try { - $filename = sprintf('%s/data/proxies.txt', $this->projectDir); - $content = $this->filesystem->readFile($filename); - - /** @var list $proxies */ - $proxies = preg_split('/\r\n|\n|\r/', $content); - $proxies = array_filter($proxies, static fn ($proxy): bool => $proxy !== '' && $proxy !== '0'); - - $proxy = $proxies[array_rand($proxies)]; - $this->logger->info('HttpClient is using proxy: ' . $proxy); - - return $proxy; - } catch (\Throwable $e) { - $this->logger->error('Unable to read proxy file', [ - 'exception' => $e, - ]); - - return null; - } - } -} diff --git a/projects/backend/src/Aggregator/Infrastructure/Crawler/OpenGraph/DomCrawlerConsumer.php b/projects/backend/src/Aggregator/Infrastructure/Crawler/OpenGraph/DomCrawlerConsumer.php deleted file mode 100644 index 268e12f..0000000 --- a/projects/backend/src/Aggregator/Infrastructure/Crawler/OpenGraph/DomCrawlerConsumer.php +++ /dev/null @@ -1,128 +0,0 @@ - - */ -final readonly class DomCrawlerConsumer implements OpenGraphConsumer -{ - private HttpClientInterface $client; - - public function __construct( - HttpClientFactory $clientFactory, - private LoggerInterface $logger, - private bool $useFallbackMode = true, - private bool $debug = false, - ) { - $this->client = $clientFactory->create(); - } - - public function consumeUrl(string $url): ?OpenGraphObject - { - try { - $response = $this->client->request('GET', $url, [ - 'headers' => [ - 'User-Agent' => UserAgents::OPEN_GRAPH->value, - ], - ])->getContent(); - - return $this->consumeHtml($response, $url); - } catch (\Throwable $e) { - $this->logger->error( - 'Unable to consume OpenGraph URL', - [ - 'url' => $url, - 'exception' => $e, - ] - ); - - return null; - } - } - - public function consumeHtml(string $html, string $fallbackUrl): ?OpenGraphObject - { - try { - $object = $this->consume($html); - - if ($this->useFallbackMode && $object->url === null) { - $object->url = $fallbackUrl; - } - - return $object; - } catch (\Throwable $e) { - $this->logger->error( - 'Unable to consume OpenGraph HTML', - [ - 'html' => $html, - 'exception' => $e, - ] - ); - - return null; - } - } - - private function consume(string $content): OpenGraphObject - { - $crawler = new Crawler($content); - $object = new Website(type: 'website'); - $properties = []; - - foreach (['name', 'property'] as $t) { - $props = []; - - /** @var \DOMElement $tag */ - foreach ($crawler->filter(sprintf("meta[%s^='og:']", $t)) as $tag) { - $name = strtolower(trim($tag->getAttribute($t))); - $value = trim($tag->getAttribute('content')); - $props[] = new OpenGraphProperty($name, $value); - } - - $properties = array_merge($properties, $props); - } - - $object->assignProperties($properties, $this->debug); - - // Fallback for url - if ($this->useFallbackMode && $object->url === null) { - $urlElement = $crawler->filter("link[rel='canonical']")->first(); - if ($urlElement->count() > 0) { - $object->url = trim($urlElement->attr('href') ?? ''); - } - } - - // Fallback for title - if ($this->useFallbackMode && $object->title === null) { - $titleElement = $crawler->filter('title')->first(); - if ($titleElement->count() > 0) { - $object->title = trim($titleElement->text()); - } - } - - // Fallback for description - if ($this->useFallbackMode && $object->description === null) { - $descriptionElement = $crawler->filter("meta[property='description']")->first(); - if ($descriptionElement->count() > 0) { - $object->description = trim($descriptionElement->attr('content') ?? ''); - } - } - - return $object; - } -} diff --git a/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/Source.php b/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/Source.php deleted file mode 100644 index bdd5017..0000000 --- a/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/Source.php +++ /dev/null @@ -1,154 +0,0 @@ - - */ -#[AutoconfigureTag('app.data_source')] -abstract class Source implements SourceCrawler -{ - protected const string URL = 'url'; - - protected const string ID = 'id'; - - private const string WATCH_EVENT_NAME = 'crawling'; - - protected Stopwatch $stopwatch; - - protected HttpClientInterface $client; - - public function __construct( - HttpClientFactory $clientFactory, - protected EventDispatcherInterface $dispatcher, - protected LoggerInterface $logger, - protected DateParser $dateParser, - protected CommandBus $commandBus, - protected OpenGraphConsumer $openGraphConsumer - ) { - $this->stopwatch = new Stopwatch(); - $this->client = $clientFactory->create(); - } - - #[\Override] - public function supports(string $source): bool - { - return $source === $this->getId(); - } - - abstract public function getPagination(?string $category = null): PageRange; - - protected function getId(): string - { - return static::ID; - } - - protected function getUrl(): string - { - return static::URL; - } - - /** - * @throws \Throwable - */ - protected function crawle(string $url, ?int $page = null): Crawler - { - if ($page !== null) { - $this->logger->notice('> Page ' . $page); - } - - $response = $this->client->request('GET', $url)->getContent(); - return new Crawler($response); - } - - protected function save( - string $title, - string $link, - string $categories, - string $body, - string $timestamp, - ?OpenGraphObject $metadata = null - ): void { - try { - $this->commandBus->handle( - new CreateArticle( - title: $title, - link: Link::from($link, $this->getId()), - categories: $categories, - body: $body, - source: $this->getId(), - timestamp: (int) $timestamp, - metadata: $metadata - ) - ); - $this->logger->notice(sprintf('> %s ✅', $title)); - } catch (\Throwable $e) { - $this->logger->error(sprintf('> %s [Failed] ❌', $e->getMessage())); - } - } - - protected function initialize(): void - { - $this->stopwatch->start(self::WATCH_EVENT_NAME); - $this->logger->notice('Initialized'); - } - - protected function completed(bool $notify = false): void - { - $event = $this->stopwatch->stop(self::WATCH_EVENT_NAME); - $this->dispatcher->dispatch(new SourceCrawled((string) $event, $this->getId(), $notify)); - $this->logger->notice('Done'); - } - - protected function skip(DateRange $dateRange, string $timestamp, string $title, string $date): void - { - if ($dateRange->outRange((int) $timestamp)) { - throw ArticleOutOfRange::with($timestamp, $dateRange); - } - - $this->logger->notice(sprintf('> %s [Skipped %s]', $title, $date)); - } - - /** - * @throws \Throwable - */ - protected function getLastPage(?string $url = null): int - { - $result = []; - - /** @var string $node */ - $node = $this->crawle($url ?? $this->getUrl()) - ->filter('ul.pagination > li a') - ->last() - ->attr('href'); - - /** @var string $query */ - $query = parse_url($node, PHP_URL_QUERY); - parse_str($query, $result); - - return (int) $result['page']; - } -} diff --git a/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/SourceCrawler.php b/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/SourceCrawler.php deleted file mode 100644 index f2924be..0000000 --- a/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/SourceCrawler.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -final readonly class SourceCrawler implements SourceCrawlerInterface -{ - /** - * @var iterable - */ - private iterable $sources; - - public function __construct( - #[AutowireIterator('app.data_source')] \Traversable $sources - ) { - $this->sources = iterator_to_array($sources); - } - - #[\Override] - public function fetch(CrawlingSettings $settings): void - { - foreach ($this->sources as $source) { - if ($source->supports($settings->id)) { - $source->fetch($settings); - } - } - } - - #[\Override] - public function supports(string $source): bool - { - return true; - } - - #[\Override] - public function fetchOne(string $html, ?DateRange $dateRange = null): void - { - throw new \RuntimeException('Not implemented'); - } - - public function get(string $id): Source - { - /** @var Source $source */ - foreach ($this->sources as $source) { - if ($source->supports($id)) { - return $source; - } - } - - throw new \RuntimeException('Source not found'); - } -} diff --git a/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/WordPressJson.php b/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/WordPressJson.php deleted file mode 100644 index c0896d6..0000000 --- a/projects/backend/src/Aggregator/Infrastructure/Crawler/Source/WordPressJson.php +++ /dev/null @@ -1,146 +0,0 @@ - - */ -class WordPressJson extends Source -{ - public const string POST_QUERY = '_fields=date,slug,link,title.rendered,content.rendered,categories&orderby=date&order=desc'; - - public const string CATEGORY_QUERY = '_fields=id,slug,count&orderby=count&order=desc&per_page=100'; - - public const string TOTAL_PAGES_HEADER = 'x-wp-totalpages'; - - public const string TOTAL_POSTS_HEADER = 'x-wp-total'; - - private array $categoryMap = []; - - #[\Override] - public function getPagination(?string $category = null): PageRange - { - $response = $this->client->request('GET', sprintf('%s/wp-json/wp/v2/posts?_fields=id&per_page=100', $this->getUrl())); - $headers = $response->getHeaders(); - $pages = (int) $headers[self::TOTAL_PAGES_HEADER][0]; - $posts = (int) $headers[self::TOTAL_POSTS_HEADER][0]; - - $this->logger->notice(sprintf('WordPressJson %d posts, %d pages', $posts, $pages)); - return PageRange::from(sprintf('1:%d', $pages)); - } - - #[\Override] - public function fetch(CrawlingSettings $settings): void - { - $this->initialize(); - $page = $settings->pageRange ?? $this->getPagination(); - - for ($i = $page->start; $i <= $page->end; $i++) { - try { - $response = $this->client->request( - method: 'GET', - url: sprintf('%s/wp-json/wp/v2/posts?%s&page=%d&per_page=100', $this->getUrl(), self::POST_QUERY, $i) - ); - - /** @var array $articles */ - $articles = json_decode($this->removeMisconfigurationError($response->getContent()), true); - } catch (\Throwable $e) { - $this->logger->error(sprintf('> page %d => %s [Failed] ❌', $i, $e->getMessage())); - continue; - } - - try { - foreach ($articles as $article) { - $this->fetchOne((string) json_encode($article), $settings->dateRange); - } - } catch (ArticleOutOfRange) { - $this->logger->notice('No more articles to fetch in this range.'); - break; - } - } - - $this->completed($settings->notify); - } - - #[\Override] - public function fetchOne(string $html, ?DateRange $dateRange = null): void - { - try { - /** - * @var array{ - * link:string, - * title:array{rendered:string}, - * content:array{rendered:string}, - * date:string, - * categories:int[] - * } $data - */ - $data = json_decode($html, true); - - $link = str_replace($this->getUrl(), '', $data['link']); - $title = strip_tags($data['title']['rendered']); - $body = strip_tags($data['content']['rendered']); - $timestamp = $this->dateParser->createTimeStamp($data['date'], format: 'c'); - $categories = $this->mapCategories($data['categories']); - - if (! $dateRange instanceof DateRange || $dateRange->inRange((int) $timestamp)) { - $metadata = $this->openGraphConsumer->consumeUrl($data['link']); - - $this->save($title, $link, $categories, $body, $timestamp, $metadata); - } else { - $this->skip($dateRange, $timestamp, $title, $data['date']); - } - } catch (ArticleOutOfRange $e) { - throw $e; - } catch (\Throwable $e) { - $this->logger->error(sprintf('> %s [Failed] ❌', $e->getMessage())); - return; - } - } - - /** - * edge case for some politico.cd website - * this invalidates the json, so we have to remove it - */ - private function removeMisconfigurationError(string $content): string - { - $error = '
-Notice: ob_end_flush(): Failed to send buffer of zlib output compression (0) in /home/politico/public_html/wp-includes/functions.php on line 5427
'; - return str_replace($error, '', $content); - } - - private function fetchCategories(): void - { - $response = $this->client->request('GET', sprintf('%s/wp-json/wp/v2/categories?%s', $this->getUrl(), self::CATEGORY_QUERY)); - - /** @var array{id: int, slug: string}[] $categories */ - $categories = json_decode($response->getContent(), true); - - foreach ($categories as $category) { - $this->categoryMap[$category['id']] = $category['slug']; - } - } - - private function mapCategories(array $categories): string - { - if ($this->categoryMap === []) { - $this->fetchCategories(); - } - - return strtolower(implode(',', array_map(fn ($category) => $this->categoryMap[$category], $categories))); - } -} diff --git a/projects/backend/src/Aggregator/Infrastructure/Crawler/UserAgents.php b/projects/backend/src/Aggregator/Infrastructure/Crawler/UserAgents.php deleted file mode 100644 index 20e7b7c..0000000 --- a/projects/backend/src/Aggregator/Infrastructure/Crawler/UserAgents.php +++ /dev/null @@ -1,31 +0,0 @@ - - */ -enum UserAgents: string -{ - case OPEN_GRAPH = 'facebookexternalhit/1.1'; - case IPHONE = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_4_8; like Mac OS X) AppleWebKit/603.39 (KHTML, like Gecko) Chrome/52.0.3638.271 Mobile Safari/537.5'; - case LINUX = 'Mozilla/5.0 (Linux; U; Linux x86_64; en-US) Gecko/20130401 Firefox/52.7'; - case ANDROID = 'Mozilla/5.0 (Linux; U; Android 5.0; SM-P815 Build/LRX22G) AppleWebKit/600.4 (KHTML, like Gecko) Chrome/48.0.1562.260 Mobile Safari/600.0'; - case CHROME_WINDOWS = 'Mozilla/5.0 (Windows; U; Windows NT 6.3;) AppleWebKit/533.34 (KHTML, like Gecko) Chrome/51.0.1883.215 Safari/533'; - case EXPLORER = 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.3; x64; en-US Trident/4.0)'; - case MAC_FIREFOX = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_10_3) Gecko/20100101 Firefox/63.4'; - case CHROME_LINUX = 'Mozilla/5.0 (Linux; Linux x86_64; en-US) AppleWebKit/603.50 (KHTML, like Gecko) Chrome/55.0.2226.116 Safari/601'; - case MAC_FIREFOX_OLD = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 7_8_3; en-US) Gecko/20100101 Firefox/68.9'; - case MOBILE_IPHONE = 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_9_8; like Mac OS X) AppleWebKit/603.34 (KHTML, like Gecko) Chrome/47.0.1126.107 Mobile Safari/602.7'; - case MOBILE_IPOD = 'Mozilla/5.0 (iPod; CPU iPod OS 8_2_0; like Mac OS X) AppleWebKit/601.40 (KHTML, like Gecko) Chrome/47.0.1590.178 Mobile Safari/535.2'; - - public static function random(): string - { - $userAgents = array_map(fn (self $userAgent) => $userAgent->value, self::cases()); - return $userAgents[array_rand($userAgents)]; - } -} diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetArticlesForExportDbalHandler.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetArticlesForExportDbalHandler.php index 3e591b9..434cf49 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetArticlesForExportDbalHandler.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetArticlesForExportDbalHandler.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; -use App\Aggregator\Application\ReadModel\ArticleForExport; -use App\Aggregator\Application\UseCase\Query\GetArticlesForExport; -use App\Aggregator\Application\UseCase\QueryHandler\GetArticlesForExportHandler; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\Aggregator\Application\ReadModel\ArticleForExport; +use Basango\Aggregator\Application\UseCase\Query\GetArticlesForExport; +use Basango\Aggregator\Application\UseCase\QueryHandler\GetArticlesForExportHandler; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; use Doctrine\DBAL\Connection; /** diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetEarliestPublicationDateDBalHandler.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetEarliestPublicationDateDBalHandler.php index 8544241..f5b0012 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetEarliestPublicationDateDBalHandler.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetEarliestPublicationDateDBalHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; -use App\Aggregator\Application\UseCase\Query\GetEarliestPublicationDate; -use App\Aggregator\Application\UseCase\QueryHandler\GetEarliestPublicationDateHandler; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\Aggregator\Application\UseCase\Query\GetEarliestPublicationDate; +use Basango\Aggregator\Application\UseCase\QueryHandler\GetEarliestPublicationDateHandler; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Psr\Log\LoggerInterface; diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetLatestPublicationDateDBalHandler.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetLatestPublicationDateDBalHandler.php index d18f15c..d66c930 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetLatestPublicationDateDBalHandler.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetLatestPublicationDateDBalHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; -use App\Aggregator\Application\UseCase\Query\GetLatestPublicationDate; -use App\Aggregator\Application\UseCase\QueryHandler\GetLatestPublicationDateHandler; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\Aggregator\Application\UseCase\Query\GetLatestPublicationDate; +use Basango\Aggregator\Application\UseCase\QueryHandler\GetLatestPublicationDateHandler; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Psr\Log\LoggerInterface; diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetSourceStatisticsListDbalHandler.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetSourceStatisticsListDbalHandler.php index d1b9b12..3ab8543 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetSourceStatisticsListDbalHandler.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/GetSourceStatisticsListDbalHandler.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL; -use App\Aggregator\Application\ReadModel\SourceStatisticsList; -use App\Aggregator\Application\UseCase\Query\GetSourceStatisticsList; -use App\Aggregator\Application\UseCase\QueryHandler\GetSourceStatisticsListHandler; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\Aggregator\Application\ReadModel\SourceStatisticsList; +use Basango\Aggregator\Application\UseCase\Query\GetSourceStatisticsList; +use Basango\Aggregator\Application\UseCase\QueryHandler\GetSourceStatisticsListHandler; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; /** diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/ArticleIdType.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/ArticleIdType.php index 1ded30b..9e20e1a 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/ArticleIdType.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/ArticleIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/OpenGraphType.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/OpenGraphType.php index eb1f23d..6fe57f5 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/OpenGraphType.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/OpenGraphType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\Aggregator\Domain\Model\ValueObject\Crawling\OpenGraph; +use Basango\Aggregator\Domain\Model\ValueObject\OpenGraph; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\Type; diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/SourceIdType.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/SourceIdType.php index 635f579..9c5b4b8 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/SourceIdType.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/DBAL/Types/SourceIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\Aggregator\Domain\Model\Identity\SourceId; +use Basango\Aggregator\Domain\Model\Identity\SourceId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/ArticleOrmRepository.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/ArticleOrmRepository.php index 526eaaa..9bba48e 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/ArticleOrmRepository.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/ArticleOrmRepository.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\ORM; -use App\Aggregator\Domain\Exception\ArticleNotFound; -use App\Aggregator\Domain\Model\Entity\Article; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\Aggregator\Domain\Model\Repository\ArticleRepository; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\Aggregator\Domain\Exception\ArticleNotFound; +use Basango\Aggregator\Domain\Model\Entity\Article; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\Aggregator\Domain\Model\Repository\ArticleRepository; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/SourceOrmRepository.php b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/SourceOrmRepository.php index e73147b..5ae24ed 100644 --- a/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/SourceOrmRepository.php +++ b/projects/backend/src/Aggregator/Infrastructure/Persistence/Doctrine/ORM/SourceOrmRepository.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\Aggregator\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\Aggregator\Infrastructure\Persistence\Doctrine\ORM; -use App\Aggregator\Domain\Exception\SourceNotFound; -use App\Aggregator\Domain\Model\Entity\Source; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\Aggregator\Domain\Model\Repository\SourceRepository; +use Basango\Aggregator\Domain\Exception\SourceNotFound; +use Basango\Aggregator\Domain\Model\Entity\Source; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\Aggregator\Domain\Model\Repository\SourceRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/Aggregator/Presentation/Console/ConsumeOpenGraphConsole.php b/projects/backend/src/Aggregator/Presentation/Console/ConsumeOpenGraphConsole.php deleted file mode 100644 index 6dd724a..0000000 --- a/projects/backend/src/Aggregator/Presentation/Console/ConsumeOpenGraphConsole.php +++ /dev/null @@ -1,117 +0,0 @@ -io = new SymfonyStyle($input, $output); - } - - #[\Override] - protected function configure(): void - { - $this->addArgument('source', InputArgument::REQUIRED, 'The source to crawl'); - $this->addOption('batch', null, InputOption::VALUE_OPTIONAL, 'Batch size', 50); - } - - #[\Override] - protected function execute(InputInterface $input, OutputInterface $output): int - { - $this->setProcessTitle('[DRC News] OpenGraph Consumer'); - if ($input->getOption('no-interaction') === false && ! $this->io->confirm('This is a long process, do you want to continue ?', false)) { - $this->io->warning('Process aborted'); - return Command::SUCCESS; - } - - $index = 0; - $batchSize = $input->getOption('batch') ?? 50; - $source = $input->getArgument('source'); - - try { - $this->entityManager->getConnection()->executeQuery('SET SESSION interactive_timeout = 86400;'); - $this->entityManager->getConnection()->executeQuery('SET SESSION wait_timeout = 86400;'); - } catch (Exception $e) { - $this->logger->critical('Unable to set session timeout', [ - 'exception' => $e, - ]); - return Command::FAILURE; - } - - $query = $this->entityManager - ->createQuery(<<<'DQL' - SELECT a - FROM App\Aggregator\Domain\Model\Entity\Article a - LEFT JOIN App\Aggregator\Domain\Model\Entity\Source s - WHERE s.name = :source AND a.metadata IS NULL - ORDER BY a.publishedAt DESC - DQL) - ->setParameter('source', $source); - - $this->stopwatch->start(self::WATCH_EVENT_NAME); - - /** @var Article $article */ - foreach ($query->toIterable() as $article) { - $object = $this->openGraphConsumer->consumeUrl((string) $article->link); - - if ($object instanceof OpenGraphObject) { - $article->defineOpenGraph($object); - $this->logger->notice(sprintf('> %s ✅', $article->title)); - } else { - $this->logger->notice(sprintf('> %s ❌', $article->title)); - } - - ++$index; - if ($index % $batchSize === 0) { - $this->entityManager->flush(); - $this->entityManager->clear(); - } - } - - $this->entityManager->flush(); - - $event = $this->stopwatch->stop(self::WATCH_EVENT_NAME); - $this->eventDispatcher->dispatch([new SourceCrawled((string) $event, 'open-graph')]); - $this->logger->notice('OpenGraph data fetched successfully'); - return Command::SUCCESS; - } -} diff --git a/projects/backend/src/Aggregator/Presentation/Console/CrawlConsole.php b/projects/backend/src/Aggregator/Presentation/Console/CrawlConsole.php deleted file mode 100644 index 9c50091..0000000 --- a/projects/backend/src/Aggregator/Presentation/Console/CrawlConsole.php +++ /dev/null @@ -1,121 +0,0 @@ -addArgument('source', InputArgument::REQUIRED, 'the website source to crawle'); - $this->addOption('date', null, InputOption::VALUE_OPTIONAL, 'Date interval to crawle'); - $this->addOption('page', null, InputOption::VALUE_OPTIONAL, 'PageRange interval to crawle'); - $this->addOption('category', null, InputOption::VALUE_OPTIONAL, 'the category to crawle'); - $this->addOption('parallel', null, InputOption::VALUE_OPTIONAL, 'the number of parallel requests', default: 1); - $this->addOption('notify', null, InputOption::VALUE_NONE, 'enable notifications'); - } - - #[\Override] - protected function initialize(InputInterface $input, OutputInterface $output): void - { - $this->io = new SymfonyStyle($input, $output); - } - - #[\Override] - protected function execute(InputInterface $input, OutputInterface $output): int - { - /** @var string $source */ - $source = $input->getArgument('source'); - - /** @var string|null $page */ - $page = $input->getOption('page'); - - /** @var string|null $date */ - $date = $input->getOption('date'); - - /** @var string|null $category */ - $category = $input->getOption('category'); - - /** @var string $parallel */ - $parallel = $input->getOption('parallel'); - $parallel = intval($parallel); - - if ($parallel > 1) { - return $this->parallel($parallel, $source, $category); - } - - $this->sourceCrawler->fetch( - settings: new CrawlingSettings( - id: $source, - pageRange: $page !== null ? PageRange::from($page) : null, - dateRange: $date !== null ? DateRange::from($date) : null, - category: $category, - notify: $input->getOption('notify') !== null - ) - ); - - $this->io->success('website crawled successfully'); - return Command::SUCCESS; - } - - private function parallel(int $workers, string $source, ?string $category): int - { - $fetcher = $this->sourceCrawler->get($source); - $range = $fetcher->getPagination($category); - $workPerWorker = ceil(($range->end - $range->start + 1) / $workers); - - $this->io->title(sprintf('Crawling %d pages with %d workers, %d pages per worker', $range->end - $range->start + 1, $workers, $workPerWorker)); - - $processes = []; - for ($i = 0; $i < $workers; $i++) { - $start = $range->start + ($i * $workPerWorker); - $end = min($range->start + (($i + 1) * $workPerWorker) - 1, $range->end); - - $process = new PhpSubprocess(['bin/console', 'app:crawl', $source, sprintf('--page=%d:%d', $start, $end), '-v']); - $process->start(); - $processes[] = $process; - - if ($start > $range->end) { - break; - } - } - - foreach ($processes as $process) { - while ($process->isRunning()) { - // waiting for process to finish - } - - $this->io->writeln($process->getOutput()); - } - - $this->io->success('Website crawled successfully'); - return Command::SUCCESS; - } -} diff --git a/projects/backend/src/Aggregator/Presentation/Console/CreateSourceConsole.php b/projects/backend/src/Aggregator/Presentation/Console/CreateSourceConsole.php index bb1241e..93777c0 100644 --- a/projects/backend/src/Aggregator/Presentation/Console/CreateSourceConsole.php +++ b/projects/backend/src/Aggregator/Presentation/Console/CreateSourceConsole.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace App\Aggregator\Presentation\Console; +namespace Basango\Aggregator\Presentation\Console; -use App\Aggregator\Application\UseCase\Command\CreateSource; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Bias; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; -use App\SharedKernel\Application\Messaging\CommandBus; -use App\SharedKernel\Presentation\Console\AskArgumentFeature; +use Basango\Aggregator\Application\UseCase\Command\CreateSource; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Bias; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; +use Basango\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Presentation\Console\AskArgumentFeature; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; diff --git a/projects/backend/src/Aggregator/Presentation/Console/DeleteArticlesConsole.php b/projects/backend/src/Aggregator/Presentation/Console/DeleteArticlesConsole.php index 5df94b4..039674d 100644 --- a/projects/backend/src/Aggregator/Presentation/Console/DeleteArticlesConsole.php +++ b/projects/backend/src/Aggregator/Presentation/Console/DeleteArticlesConsole.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\Aggregator\Presentation\Console; +namespace Basango\Aggregator\Presentation\Console; -use App\Aggregator\Application\UseCase\Command\DeleteArticles; -use App\SharedKernel\Application\Messaging\CommandBus; +use Basango\Aggregator\Application\UseCase\Command\DeleteArticles; +use Basango\SharedKernel\Application\Messaging\CommandBus; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; diff --git a/projects/backend/src/Aggregator/Presentation/Console/ExportArticlesConsole.php b/projects/backend/src/Aggregator/Presentation/Console/ExportArticlesConsole.php index f38d1c4..2879fb2 100644 --- a/projects/backend/src/Aggregator/Presentation/Console/ExportArticlesConsole.php +++ b/projects/backend/src/Aggregator/Presentation/Console/ExportArticlesConsole.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\Aggregator\Presentation\Console; +namespace Basango\Aggregator\Presentation\Console; -use App\Aggregator\Application\UseCase\Command\ExportArticles; -use App\SharedKernel\Application\Messaging\CommandBus; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\Aggregator\Application\UseCase\Command\ExportArticles; +use Basango\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; diff --git a/projects/backend/src/Aggregator/Presentation/Console/GetSourceStatisticsListConsole.php b/projects/backend/src/Aggregator/Presentation/Console/GetSourceStatisticsListConsole.php index e898b16..52b8c6a 100644 --- a/projects/backend/src/Aggregator/Presentation/Console/GetSourceStatisticsListConsole.php +++ b/projects/backend/src/Aggregator/Presentation/Console/GetSourceStatisticsListConsole.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\Aggregator\Presentation\Console; +namespace Basango\Aggregator\Presentation\Console; -use App\Aggregator\Application\ReadModel\SourceStatistics; -use App\Aggregator\Application\ReadModel\SourceStatisticsList; -use App\Aggregator\Application\UseCase\Query\GetSourceStatisticsList; -use App\SharedKernel\Application\Messaging\QueryBus; +use Basango\Aggregator\Application\ReadModel\SourceStatistics; +use Basango\Aggregator\Application\ReadModel\SourceStatisticsList; +use Basango\Aggregator\Application\UseCase\Query\GetSourceStatisticsList; +use Basango\SharedKernel\Application\Messaging\QueryBus; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; diff --git a/projects/backend/src/Aggregator/Presentation/Console/UpdateConsole.php b/projects/backend/src/Aggregator/Presentation/Console/UpdateConsole.php deleted file mode 100644 index f7b23dc..0000000 --- a/projects/backend/src/Aggregator/Presentation/Console/UpdateConsole.php +++ /dev/null @@ -1,90 +0,0 @@ -addArgument('source', InputArgument::REQUIRED, 'the website source to crawle'); - $this->addOption('category', null, InputOption::VALUE_OPTIONAL, 'the category to crawle'); - $this->addOption('direction', null, InputOption::VALUE_OPTIONAL, 'the direction to crawle', 'forward', ['forward', 'backward']); - $this->addOption('days', null, InputOption::VALUE_OPTIONAL, 'the number of days to crawle'); - $this->addOption('notify', null, InputOption::VALUE_OPTIONAL, 'enable notifications', default: false); - } - - #[\Override] - protected function initialize(InputInterface $input, OutputInterface $output): void - { - $this->io = new SymfonyStyle($input, $output); - } - - #[\Override] - protected function execute(InputInterface $input, OutputInterface $output): int - { - /** @var int|null $days */ - $days = $input->getOption('days'); - - /** @var string $source */ - $source = $input->getArgument('source'); - - /** @var string|null $category */ - $category = $input->getOption('category'); - - /** @var string $direction */ - $direction = $input->getOption('direction'); - $direction = UpdateDirection::from($direction); - - /** @var \DateTimeImmutable $date */ - $date = $this->queryBus->handle(match ($direction) { - UpdateDirection::FORWARD => new GetLatestPublicationDate($source, $category), - UpdateDirection::BACKWARD => new GetEarliestPublicationDate($source, $category), - }); - - $dateRange = $direction === UpdateDirection::FORWARD ? - DateRange::forward($date) : - DateRange::backward($date, $days); - - $this->io->title(sprintf('[%s] Updating with range %s', $direction->value, $dateRange->format())); - $this->sourceCrawler->fetch(new CrawlingSettings( - $source, - dateRange: $dateRange, - category: $category, - notify: $input->getOption('notify') !== null - )); - $this->io->success('website crawled successfully'); - - return Command::SUCCESS; - } -} diff --git a/projects/backend/src/Aggregator/Presentation/Console/UpdateProxiesConsole.php b/projects/backend/src/Aggregator/Presentation/Console/UpdateProxiesConsole.php deleted file mode 100644 index 879090c..0000000 --- a/projects/backend/src/Aggregator/Presentation/Console/UpdateProxiesConsole.php +++ /dev/null @@ -1,66 +0,0 @@ -io = new SymfonyStyle($input, $output); - } - - #[\Override] - protected function execute(InputInterface $input, OutputInterface $output): int - { - try { - $response = $this->client->request('GET', self::UPDATE_URL); - - $content = $response->getContent(); - $content = preg_replace('/^([0-9\.]+:[0-9]+):.*$/m', '$1', $content); - Assert::string($content); - - $this->filesystem->dumpFile( - filename: $this->projectDir . '/data/proxies.txt', - content: $content - ); - } catch (\Throwable $e) { - $this->logger->critical('Failed to update proxies', [ - 'exception' => $e, - ]); - return Command::FAILURE; - } - - $this->io->success('Proxies updated successfully.'); - return Command::SUCCESS; - } -} diff --git a/projects/backend/src/Aggregator/Presentation/Web/Controller/AddArticleController.php b/projects/backend/src/Aggregator/Presentation/Web/Controller/AddArticleController.php new file mode 100644 index 0000000..fcf9974 --- /dev/null +++ b/projects/backend/src/Aggregator/Presentation/Web/Controller/AddArticleController.php @@ -0,0 +1,61 @@ + + */ +final class AddArticleController extends AbstractController +{ + public function __construct( + #[Autowire(env: "BASANGO_CRAWLER_TOKEN")] private string $token + ) { + } + + #[Route( + path: '/api/aggregator/articles', + name: 'aggregator_add_article', + requirements: [ + 'token' => Requirement::ASCII_SLUG + ], + methods: ['POST'] + )] + public function __invoke( + #[MapQueryParameter] string $token, + #[MapRequestPayload] AddArticleModel $model + ): JsonResponse { + if ($token !== $this->token) { + throw $this->createAccessDeniedException(); + } + + $this->handleCommand(new CreateArticle( + $model->title, + Link::from($model->link), + join(', ', $model->categories), + $model->body, + $model->source, + $model->timestamp, + $model->metadata, + )); + + + return new JsonResponse(status: Response::HTTP_CREATED); + } +} diff --git a/projects/backend/src/Aggregator/Presentation/WriteModel/AddArticleModel.php b/projects/backend/src/Aggregator/Presentation/WriteModel/AddArticleModel.php new file mode 100644 index 0000000..a15a29e --- /dev/null +++ b/projects/backend/src/Aggregator/Presentation/WriteModel/AddArticleModel.php @@ -0,0 +1,35 @@ + + */ +final class AddArticleModel +{ + #[Assert\NotBlank] + public string $title; + + #[Assert\NotBlank] + public string $link; + + #[Assert\NotBlank] + public string $body; + + #[Assert\NotBlank] + public string $source; + + #[Assert\NotBlank] + public int $timestamp; + + public array $categories = []; + + public ?OpenGraph $metadata = null; +} diff --git a/projects/backend/src/FeedManagement/Application/Cache/SourceCacheAttributes.php b/projects/backend/src/FeedManagement/Application/Cache/SourceCacheAttributes.php index 05a23bd..35fd8f5 100644 --- a/projects/backend/src/FeedManagement/Application/Cache/SourceCacheAttributes.php +++ b/projects/backend/src/FeedManagement/Application/Cache/SourceCacheAttributes.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\Cache; +namespace Basango\FeedManagement\Application\Cache; /** * Enum SourceCacheAttributes. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/ArticleDetails.php b/projects/backend/src/FeedManagement/Application/ReadModel/ArticleDetails.php index 2413051..f5f1cf8 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/ArticleDetails.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/ArticleDetails.php @@ -2,18 +2,18 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\Aggregator\Domain\Model\ValueObject\Crawling\OpenGraph; -use App\Aggregator\Domain\Model\ValueObject\Link; -use App\Aggregator\Domain\Model\ValueObject\ReadingTime; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Bias; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\Aggregator\Domain\Model\ValueObject\Link; +use Basango\Aggregator\Domain\Model\ValueObject\OpenGraph; +use Basango\Aggregator\Domain\Model\ValueObject\ReadingTime; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Bias; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class ArticleDetails. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverview.php b/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverview.php index fd6508d..23594b5 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverview.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverview.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\Aggregator\Domain\Model\ValueObject\Link; -use App\Aggregator\Domain\Model\ValueObject\ReadingTime; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\Aggregator\Domain\Model\ValueObject\Link; +use Basango\Aggregator\Domain\Model\ValueObject\ReadingTime; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class ArticleOverview. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverviewList.php b/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverviewList.php index 04426bd..90f4a0e 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverviewList.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/ArticleOverviewList.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\SharedKernel\Domain\Assert; -use App\SharedKernel\Domain\Model\Pagination\PaginationInfo; +use Basango\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Model\Pagination\PaginationInfo; /** * Class ArticleOverviewList. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/Bookmark.php b/projects/backend/src/FeedManagement/Application/ReadModel/Bookmark.php index 91d9c4b..ef0ec8f 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/Bookmark.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/Bookmark.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class Bookmark. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/BookmarkList.php b/projects/backend/src/FeedManagement/Application/ReadModel/BookmarkList.php index 4b40881..acd63da 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/BookmarkList.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/BookmarkList.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\SharedKernel\Domain\Assert; -use App\SharedKernel\Domain\Model\Pagination\PaginationInfo; +use Basango\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Model\Pagination\PaginationInfo; /** * Class BookmarkList. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShare.php b/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShare.php index b19310a..ce799e5 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShare.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShare.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; /** * Class CategoryShare. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShares.php b/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShares.php index 9fd335d..db2cc4e 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShares.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/CategoryShares.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * Class CategoryShares. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/Comment.php b/projects/backend/src/FeedManagement/Application/ReadModel/Comment.php index 2776dc9..1c0d21a 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/Comment.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/Comment.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; -use App\FeedManagement\Domain\Model\Identity\CommentId; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class Comment. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/CommentList.php b/projects/backend/src/FeedManagement/Application/ReadModel/CommentList.php index ab08170..081af23 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/CommentList.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/CommentList.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\SharedKernel\Domain\Assert; -use App\SharedKernel\Domain\Model\Pagination\PaginationInfo; +use Basango\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Model\Pagination\PaginationInfo; /** * Class CommentList. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/PublicationEntry.php b/projects/backend/src/FeedManagement/Application/ReadModel/PublicationEntry.php index 1fc82a7..3059cb5 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/PublicationEntry.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/PublicationEntry.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; /** * Class DallyEntry. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/PublicationGraph.php b/projects/backend/src/FeedManagement/Application/ReadModel/PublicationGraph.php index d3da270..b5a217e 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/PublicationGraph.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/PublicationGraph.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * Class PublicationGraph. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/SourceDetails.php b/projects/backend/src/FeedManagement/Application/ReadModel/SourceDetails.php index 03d8377..64149f6 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/SourceDetails.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/SourceDetails.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Bias; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Bias; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Credibility; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Reliability; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Transparency; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class SourceDetails. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverview.php b/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverview.php index 34b60ec..b36e3ca 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverview.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverview.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class SourceOverview. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverviewList.php b/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverviewList.php index 8e4ed83..4c260b2 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverviewList.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/SourceOverviewList.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\SharedKernel\Domain\Assert; -use App\SharedKernel\Domain\Model\Pagination\PaginationInfo; +use Basango\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Model\Pagination\PaginationInfo; /** * Class SourceOverviewList. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/SourceReference.php b/projects/backend/src/FeedManagement/Application/ReadModel/SourceReference.php index 5d68309..a83061e 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/SourceReference.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/SourceReference.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class SourceReference. diff --git a/projects/backend/src/FeedManagement/Application/ReadModel/UserReference.php b/projects/backend/src/FeedManagement/Application/ReadModel/UserReference.php index 57b9b52..0952f48 100644 --- a/projects/backend/src/FeedManagement/Application/ReadModel/UserReference.php +++ b/projects/backend/src/FeedManagement/Application/ReadModel/UserReference.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\ReadModel; +namespace Basango\FeedManagement\Application\ReadModel; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; /** * Class UserReference. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/AddArticleToBookmark.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/AddArticleToBookmark.php index 6a134ed..0a5c229 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/AddArticleToBookmark.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/AddArticleToBookmark.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class AddArticleToBookmark. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/AddCommentToArticle.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/AddCommentToArticle.php index 9c7774b..4adfe63 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/AddCommentToArticle.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/AddCommentToArticle.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class AddCommentToArticle. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/CreateBookmark.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/CreateBookmark.php index 66508c1..54c6217 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/CreateBookmark.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/CreateBookmark.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class CreateBookmark. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/DeleteBookmark.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/DeleteBookmark.php index 75a8ce5..ca24a84 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/DeleteBookmark.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/DeleteBookmark.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class DeleteBookmark. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/FollowSource.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/FollowSource.php index 6035307..cbfb9b7 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/FollowSource.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/FollowSource.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class FollowSource. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveArticleFromBookmark.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveArticleFromBookmark.php index b009923..dad5322 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveArticleFromBookmark.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveArticleFromBookmark.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class RemoveArticleFromBookmark. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveCommentFromArticle.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveCommentFromArticle.php index 98dc0f9..72e8dd4 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveCommentFromArticle.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/RemoveCommentFromArticle.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\FeedManagement\Domain\Model\Identity\CommentId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class RemoveCommentFromArticle. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/UnfollowSource.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/UnfollowSource.php index 3a23373..ab53164 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/UnfollowSource.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/UnfollowSource.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class UnfollowSource. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Command/UpdateBookmark.php b/projects/backend/src/FeedManagement/Application/UseCase/Command/UpdateBookmark.php index 1415b1b..39c6dc7 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Command/UpdateBookmark.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Command/UpdateBookmark.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Command; +namespace Basango\FeedManagement\Application\UseCase\Command; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class UpdateBookmark. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddArticleToBookmarkHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddArticleToBookmarkHandler.php index 3aa2333..b649dac 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddArticleToBookmarkHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddArticleToBookmarkHandler.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\Aggregator\Domain\Model\Repository\ArticleRepository; -use App\FeedManagement\Application\UseCase\Command\AddArticleToBookmark; -use App\FeedManagement\Domain\Model\Repository\BookmarkRepository; -use App\IdentityAndAccess\Domain\Exception\PermissionNotGranted; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\Aggregator\Domain\Model\Repository\ArticleRepository; +use Basango\FeedManagement\Application\UseCase\Command\AddArticleToBookmark; +use Basango\FeedManagement\Domain\Model\Repository\BookmarkRepository; +use Basango\IdentityAndAccess\Domain\Exception\PermissionNotGranted; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class AddArticleToBookmarkHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddCommentToArticleHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddCommentToArticleHandler.php index c13a31b..039a2e1 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddCommentToArticleHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/AddCommentToArticleHandler.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\Aggregator\Domain\Model\Repository\ArticleRepository; -use App\FeedManagement\Application\UseCase\Command\AddCommentToArticle; -use App\FeedManagement\Domain\Model\Entity\Comment; -use App\FeedManagement\Domain\Model\Repository\CommentRepository; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\Aggregator\Domain\Model\Repository\ArticleRepository; +use Basango\FeedManagement\Application\UseCase\Command\AddCommentToArticle; +use Basango\FeedManagement\Domain\Model\Entity\Comment; +use Basango\FeedManagement\Domain\Model\Repository\CommentRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class AddCommentToArticleHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/CreateBookHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/CreateBookHandler.php index 0740dcd..4e1a555 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/CreateBookHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/CreateBookHandler.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\FeedManagement\Application\UseCase\Command\CreateBookmark; -use App\FeedManagement\Domain\Model\Entity\Bookmark; -use App\FeedManagement\Domain\Model\Repository\BookmarkRepository; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\FeedManagement\Application\UseCase\Command\CreateBookmark; +use Basango\FeedManagement\Domain\Model\Entity\Bookmark; +use Basango\FeedManagement\Domain\Model\Repository\BookmarkRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class CreateBookHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/DeleteBookmarkHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/DeleteBookmarkHandler.php index c2aa8a7..44c2c70 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/DeleteBookmarkHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/DeleteBookmarkHandler.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\FeedManagement\Application\UseCase\Command\DeleteBookmark; -use App\FeedManagement\Domain\Model\Repository\BookmarkRepository; -use App\IdentityAndAccess\Domain\Exception\PermissionNotGranted; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\FeedManagement\Application\UseCase\Command\DeleteBookmark; +use Basango\FeedManagement\Domain\Model\Repository\BookmarkRepository; +use Basango\IdentityAndAccess\Domain\Exception\PermissionNotGranted; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class DeleteBookmarkHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/FollowSourceHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/FollowSourceHandler.php index 2e5aa7c..80b19ec 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/FollowSourceHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/FollowSourceHandler.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\Aggregator\Domain\Model\Repository\SourceRepository; -use App\FeedManagement\Application\UseCase\Command\FollowSource; -use App\FeedManagement\Domain\Exception\SourceAlreadyFollowed; -use App\FeedManagement\Domain\Model\Entity\FollowedSource; -use App\FeedManagement\Domain\Model\Repository\FollowedSourceRepository; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\Aggregator\Domain\Model\Repository\SourceRepository; +use Basango\FeedManagement\Application\UseCase\Command\FollowSource; +use Basango\FeedManagement\Domain\Exception\SourceAlreadyFollowed; +use Basango\FeedManagement\Domain\Model\Entity\FollowedSource; +use Basango\FeedManagement\Domain\Model\Repository\FollowedSourceRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class FollowSourceHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveArticleFromBookmarkHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveArticleFromBookmarkHandler.php index b695336..6ed9b62 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveArticleFromBookmarkHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveArticleFromBookmarkHandler.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\Aggregator\Domain\Model\Repository\ArticleRepository; -use App\FeedManagement\Application\UseCase\Command\RemoveArticleFromBookmark; -use App\FeedManagement\Domain\Model\Repository\BookmarkRepository; -use App\IdentityAndAccess\Domain\Exception\PermissionNotGranted; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\Aggregator\Domain\Model\Repository\ArticleRepository; +use Basango\FeedManagement\Application\UseCase\Command\RemoveArticleFromBookmark; +use Basango\FeedManagement\Domain\Model\Repository\BookmarkRepository; +use Basango\IdentityAndAccess\Domain\Exception\PermissionNotGranted; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class RemoveArticleFromBookmark. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveCommentFromArticleHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveCommentFromArticleHandler.php index 88090ab..128f1ba 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveCommentFromArticleHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/RemoveCommentFromArticleHandler.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\FeedManagement\Application\UseCase\Command\RemoveCommentFromArticle; -use App\FeedManagement\Domain\Model\Repository\CommentRepository; -use App\IdentityAndAccess\Domain\Exception\PermissionNotGranted; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\FeedManagement\Application\UseCase\Command\RemoveCommentFromArticle; +use Basango\FeedManagement\Domain\Model\Repository\CommentRepository; +use Basango\IdentityAndAccess\Domain\Exception\PermissionNotGranted; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class RemoveCommentFromArticleHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UnfollowSourceHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UnfollowSourceHandler.php index e69dfba..ccf5412 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UnfollowSourceHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UnfollowSourceHandler.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\FeedManagement\Application\UseCase\Command\UnfollowSource; -use App\FeedManagement\Domain\Exception\FollowedSourceNotFound; -use App\FeedManagement\Domain\Model\Entity\FollowedSource; -use App\FeedManagement\Domain\Model\Repository\FollowedSourceRepository; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\FeedManagement\Application\UseCase\Command\UnfollowSource; +use Basango\FeedManagement\Domain\Exception\FollowedSourceNotFound; +use Basango\FeedManagement\Domain\Model\Entity\FollowedSource; +use Basango\FeedManagement\Domain\Model\Repository\FollowedSourceRepository; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class UnfollowSourceHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UpdateBookmarkHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UpdateBookmarkHandler.php index 6bed58e..fe3f42b 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UpdateBookmarkHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/CommandHandler/UpdateBookmarkHandler.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\CommandHandler; +namespace Basango\FeedManagement\Application\UseCase\CommandHandler; -use App\FeedManagement\Application\UseCase\Command\UpdateBookmark; -use App\FeedManagement\Domain\Model\Repository\BookmarkRepository; -use App\IdentityAndAccess\Domain\Exception\PermissionNotGranted; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\FeedManagement\Application\UseCase\Command\UpdateBookmark; +use Basango\FeedManagement\Domain\Model\Repository\BookmarkRepository; +use Basango\IdentityAndAccess\Domain\Exception\PermissionNotGranted; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class UpdateBookmarkHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleCommentList.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleCommentList.php index 8451d55..72e72ca 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleCommentList.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleCommentList.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\SharedKernel\Domain\Model\Pagination\Page; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\SharedKernel\Domain\Model\Pagination\Page; /** * Class GetArticleCommentListHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleDetails.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleDetails.php index 5814bb3..61372a4 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleDetails.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleDetails.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class GetArticleDetails. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleOverviewList.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleOverviewList.php index 07406fc..994d6fc 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleOverviewList.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetArticleOverviewList.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\FeedManagement\Domain\Model\Filters\ArticleFilters; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\Pagination\Page; +use Basango\FeedManagement\Domain\Model\Filters\ArticleFilters; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\Pagination\Page; /** * Class GetArticleOverviewList. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkList.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkList.php index 31916d0..70a6d99 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkList.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkList.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\Pagination\Page; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\Pagination\Page; /** * Class GetBookmarkList. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkedArticleList.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkedArticleList.php index 9044044..716bae2 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkedArticleList.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetBookmarkedArticleList.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\FeedManagement\Domain\Model\Filters\ArticleFilters; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\Pagination\Page; +use Basango\FeedManagement\Domain\Model\Filters\ArticleFilters; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\Pagination\Page; /** * Class GetBookmarkedArticleList. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceArticleOverviewList.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceArticleOverviewList.php index dfbf4a2..9ed3d78 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceArticleOverviewList.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceArticleOverviewList.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\FeedManagement\Domain\Model\Filters\ArticleFilters; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\Pagination\Page; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\FeedManagement\Domain\Model\Filters\ArticleFilters; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\Pagination\Page; /** * Class GetArticleOverviewList. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceDetails.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceDetails.php index 04a86b8..9448779 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceDetails.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceDetails.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class GetSourceDetails. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceOverviewList.php b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceOverviewList.php index afc0722..5d49daf 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceOverviewList.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/Query/GetSourceOverviewList.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\Query; +namespace Basango\FeedManagement\Application\UseCase\Query; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\Pagination\Page; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\Pagination\Page; /** * Class GetSourceOverviewList. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleCommentListHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleCommentListHandler.php index 6e85d27..e126aac 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleCommentListHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleCommentListHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\CommentList; -use App\FeedManagement\Application\UseCase\Query\GetArticleCommentList; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\CommentList; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleCommentList; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Class GetArticleCommentListHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleDetailsHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleDetailsHandler.php index f3173bb..8eca1cf 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleDetailsHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleDetailsHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\ArticleDetails; -use App\FeedManagement\Application\UseCase\Query\GetArticleDetails; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\ArticleDetails; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleDetails; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Class GetArticleDetailsDbalHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleOverviewListHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleOverviewListHandler.php index 663eefb..3ae4ddb 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleOverviewListHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetArticleOverviewListHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\ArticleOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetArticleOverviewList; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\ArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleOverviewList; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Class GetArticleOverviewListHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkListHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkListHandler.php index b99b593..411a91e 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkListHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkListHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\BookmarkList; -use App\FeedManagement\Application\UseCase\Query\GetBookmarkList; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\BookmarkList; +use Basango\FeedManagement\Application\UseCase\Query\GetBookmarkList; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Interface GetBookmarkListHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkedArticleListHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkedArticleListHandler.php index 5ec96fc..0f19c5a 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkedArticleListHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetBookmarkedArticleListHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\ArticleOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetBookmarkedArticleList; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\ArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetBookmarkedArticleList; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Interface GetBookmarkedArticleListHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceArticleOverviewListHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceArticleOverviewListHandler.php index 0307044..5b0875a 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceArticleOverviewListHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceArticleOverviewListHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\ArticleOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetSourceArticleOverviewList; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\ArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceArticleOverviewList; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Class GetArticleOverviewListHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceDetailsHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceDetailsHandler.php index a843d9a..febc236 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceDetailsHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceDetailsHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\SourceDetails; -use App\FeedManagement\Application\UseCase\Query\GetSourceDetails; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\SourceDetails; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceDetails; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Interface GetSourceDetailsHandler. diff --git a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceOverviewListHandler.php b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceOverviewListHandler.php index 766714a..6fad62c 100644 --- a/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceOverviewListHandler.php +++ b/projects/backend/src/FeedManagement/Application/UseCase/QueryHandler/GetSourceOverviewListHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Application\UseCase\QueryHandler; +namespace Basango\FeedManagement\Application\UseCase\QueryHandler; -use App\FeedManagement\Application\ReadModel\SourceOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetSourceOverviewList; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\FeedManagement\Application\ReadModel\SourceOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceOverviewList; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Interface GetSourceOverviewListHandler. diff --git a/projects/backend/src/FeedManagement/Domain/Exception/ArticleAlreadyBookmarked.php b/projects/backend/src/FeedManagement/Domain/Exception/ArticleAlreadyBookmarked.php index a7bce7a..13a9de7 100644 --- a/projects/backend/src/FeedManagement/Domain/Exception/ArticleAlreadyBookmarked.php +++ b/projects/backend/src/FeedManagement/Domain/Exception/ArticleAlreadyBookmarked.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Exception; +namespace Basango\FeedManagement\Domain\Exception; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class ArticleAlreadyBookmarked. diff --git a/projects/backend/src/FeedManagement/Domain/Exception/BookmarkNotFound.php b/projects/backend/src/FeedManagement/Domain/Exception/BookmarkNotFound.php index 6b64945..0d6377c 100644 --- a/projects/backend/src/FeedManagement/Domain/Exception/BookmarkNotFound.php +++ b/projects/backend/src/FeedManagement/Domain/Exception/BookmarkNotFound.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Exception; +namespace Basango\FeedManagement\Domain\Exception; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class BookmarkNotFound. diff --git a/projects/backend/src/FeedManagement/Domain/Exception/BookmarkedArticleNotFound.php b/projects/backend/src/FeedManagement/Domain/Exception/BookmarkedArticleNotFound.php index f6f2f76..21e24e7 100644 --- a/projects/backend/src/FeedManagement/Domain/Exception/BookmarkedArticleNotFound.php +++ b/projects/backend/src/FeedManagement/Domain/Exception/BookmarkedArticleNotFound.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Exception; +namespace Basango\FeedManagement\Domain\Exception; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class BookmarkedArticleNotFound. diff --git a/projects/backend/src/FeedManagement/Domain/Exception/CommentNotFound.php b/projects/backend/src/FeedManagement/Domain/Exception/CommentNotFound.php index 4324fe7..5ed3570 100644 --- a/projects/backend/src/FeedManagement/Domain/Exception/CommentNotFound.php +++ b/projects/backend/src/FeedManagement/Domain/Exception/CommentNotFound.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Exception; +namespace Basango\FeedManagement\Domain\Exception; -use App\FeedManagement\Domain\Model\Identity\CommentId; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class BookmarkNotFound. diff --git a/projects/backend/src/FeedManagement/Domain/Exception/FollowedSourceNotFound.php b/projects/backend/src/FeedManagement/Domain/Exception/FollowedSourceNotFound.php index b4e07a4..8eac7ec 100644 --- a/projects/backend/src/FeedManagement/Domain/Exception/FollowedSourceNotFound.php +++ b/projects/backend/src/FeedManagement/Domain/Exception/FollowedSourceNotFound.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Exception; +namespace Basango\FeedManagement\Domain\Exception; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class FollowedSourceNotFound. diff --git a/projects/backend/src/FeedManagement/Domain/Exception/SourceAlreadyFollowed.php b/projects/backend/src/FeedManagement/Domain/Exception/SourceAlreadyFollowed.php index 94b83b1..88a24ed 100644 --- a/projects/backend/src/FeedManagement/Domain/Exception/SourceAlreadyFollowed.php +++ b/projects/backend/src/FeedManagement/Domain/Exception/SourceAlreadyFollowed.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Exception; +namespace Basango\FeedManagement\Domain\Exception; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class SourceAlreadyFollowed. diff --git a/projects/backend/src/FeedManagement/Domain/Model/Entity/Bookmark.php b/projects/backend/src/FeedManagement/Domain/Model/Entity/Bookmark.php index ad3a895..defdb11 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Entity/Bookmark.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Entity/Bookmark.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Entity; +namespace Basango\FeedManagement\Domain\Model\Entity; -use App\Aggregator\Domain\Model\Entity\Article; -use App\FeedManagement\Domain\Exception\ArticleAlreadyBookmarked; -use App\FeedManagement\Domain\Exception\BookmarkedArticleNotFound; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\SharedKernel\Domain\Model\Collection\DataCollection; +use Basango\Aggregator\Domain\Model\Entity\Article; +use Basango\FeedManagement\Domain\Exception\ArticleAlreadyBookmarked; +use Basango\FeedManagement\Domain\Exception\BookmarkedArticleNotFound; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\SharedKernel\Domain\Model\Collection\DataCollection; /** * Class Bookmark. diff --git a/projects/backend/src/FeedManagement/Domain/Model/Entity/Comment.php b/projects/backend/src/FeedManagement/Domain/Model/Entity/Comment.php index e08153a..e2298ba 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Entity/Comment.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Entity/Comment.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Entity; +namespace Basango\FeedManagement\Domain\Model\Entity; -use App\Aggregator\Domain\Model\Entity\Article; -use App\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; -use App\FeedManagement\Domain\Model\Identity\CommentId; -use App\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\Aggregator\Domain\Model\Entity\Article; +use Basango\Aggregator\Domain\Model\ValueObject\Scoring\Sentiment; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; /** * Class Comment. diff --git a/projects/backend/src/FeedManagement/Domain/Model/Entity/FollowedSource.php b/projects/backend/src/FeedManagement/Domain/Model/Entity/FollowedSource.php index e192bc7..938b7c8 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Entity/FollowedSource.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Entity/FollowedSource.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Entity; +namespace Basango\FeedManagement\Domain\Model\Entity; -use App\Aggregator\Domain\Model\Entity\Source; -use App\FeedManagement\Domain\Model\Identity\FollowedSourceId; -use App\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\Aggregator\Domain\Model\Entity\Source; +use Basango\FeedManagement\Domain\Model\Identity\FollowedSourceId; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; /** * Class FollowedSource. diff --git a/projects/backend/src/FeedManagement/Domain/Model/Filters/ArticleFilters.php b/projects/backend/src/FeedManagement/Domain/Model/Filters/ArticleFilters.php index 8582daa..228e98f 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Filters/ArticleFilters.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Filters/ArticleFilters.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Filters; +namespace Basango\FeedManagement\Domain\Model\Filters; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; -use App\SharedKernel\Domain\Model\ValueObject\SortDirection; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\SharedKernel\Domain\Model\ValueObject\SortDirection; /** * Class ArticleFilters. diff --git a/projects/backend/src/FeedManagement/Domain/Model/Identity/BookmarkId.php b/projects/backend/src/FeedManagement/Domain/Model/Identity/BookmarkId.php index 7e10af3..9dfbd2a 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Identity/BookmarkId.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Identity/BookmarkId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Identity; +namespace Basango\FeedManagement\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/FeedManagement/Domain/Model/Identity/CommentId.php b/projects/backend/src/FeedManagement/Domain/Model/Identity/CommentId.php index 25f2364..90e33d5 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Identity/CommentId.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Identity/CommentId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Identity; +namespace Basango\FeedManagement\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/FeedManagement/Domain/Model/Identity/FollowedSourceId.php b/projects/backend/src/FeedManagement/Domain/Model/Identity/FollowedSourceId.php index 1cb2d1d..4847abb 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Identity/FollowedSourceId.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Identity/FollowedSourceId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Identity; +namespace Basango\FeedManagement\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/FeedManagement/Domain/Model/Repository/BookmarkRepository.php b/projects/backend/src/FeedManagement/Domain/Model/Repository/BookmarkRepository.php index 797dcfe..a4b5f96 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Repository/BookmarkRepository.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Repository/BookmarkRepository.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Repository; +namespace Basango\FeedManagement\Domain\Model\Repository; -use App\FeedManagement\Domain\Model\Entity\Bookmark; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\FeedManagement\Domain\Model\Entity\Bookmark; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; /** * Interface BookmarkRepository. diff --git a/projects/backend/src/FeedManagement/Domain/Model/Repository/CommentRepository.php b/projects/backend/src/FeedManagement/Domain/Model/Repository/CommentRepository.php index b6a92fd..d8c27a3 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Repository/CommentRepository.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Repository/CommentRepository.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Repository; +namespace Basango\FeedManagement\Domain\Model\Repository; -use App\FeedManagement\Domain\Model\Entity\Comment; -use App\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\FeedManagement\Domain\Model\Entity\Comment; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; /** * Interface CommentRepository. diff --git a/projects/backend/src/FeedManagement/Domain/Model/Repository/FollowedSourceRepository.php b/projects/backend/src/FeedManagement/Domain/Model/Repository/FollowedSourceRepository.php index 007c99d..4f28fb9 100644 --- a/projects/backend/src/FeedManagement/Domain/Model/Repository/FollowedSourceRepository.php +++ b/projects/backend/src/FeedManagement/Domain/Model/Repository/FollowedSourceRepository.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Domain\Model\Repository; +namespace Basango\FeedManagement\Domain\Model\Repository; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\FeedManagement\Domain\Model\Entity\FollowedSource; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\FeedManagement\Domain\Model\Entity\FollowedSource; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Interface FollowedSourceRepository. diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleCommentListDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleCommentListDbalHandler.php index 9e3f55a..764da11 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleCommentListDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleCommentListDbalHandler.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\FeedManagement\Application\ReadModel\CommentList; -use App\FeedManagement\Application\UseCase\Query\GetArticleCommentList; -use App\FeedManagement\Application\UseCase\QueryHandler\GetArticleCommentListHandler; -use App\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\FeedManagement\Application\ReadModel\CommentList; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleCommentList; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetArticleCommentListHandler; +use Basango\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleDetailsDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleDetailsDbalHandler.php index 83d5ce7..171a1cb 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleDetailsDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleDetailsDbalHandler.php @@ -2,16 +2,16 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\Aggregator\Domain\Exception\ArticleNotFound; -use App\FeedManagement\Application\ReadModel\ArticleDetails; -use App\FeedManagement\Application\UseCase\Query\GetArticleDetails; -use App\FeedManagement\Application\UseCase\QueryHandler\GetArticleDetailsHandler; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\Aggregator\Domain\Exception\ArticleNotFound; +use Basango\FeedManagement\Application\ReadModel\ArticleDetails; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleDetails; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetArticleDetailsHandler; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleOverviewListDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleOverviewListDbalHandler.php index 08273e6..ee57d01 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleOverviewListDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetArticleOverviewListDbalHandler.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\FeedManagement\Application\ReadModel\ArticleOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetArticleOverviewList; -use App\FeedManagement\Application\UseCase\QueryHandler\GetArticleOverviewListHandler; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; -use App\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\FeedManagement\Application\ReadModel\ArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetArticleOverviewListHandler; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; +use Basango\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkListDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkListDbalHandler.php index b44d1b6..a7c24e9 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkListDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkListDbalHandler.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\FeedManagement\Application\ReadModel\BookmarkList; -use App\FeedManagement\Application\UseCase\Query\GetBookmarkList; -use App\FeedManagement\Application\UseCase\QueryHandler\GetBookmarkListHandler; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; -use App\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\FeedManagement\Application\ReadModel\BookmarkList; +use Basango\FeedManagement\Application\UseCase\Query\GetBookmarkList; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetBookmarkListHandler; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; +use Basango\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkedArticleListDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkedArticleListDbalHandler.php index e2d74da..508912c 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkedArticleListDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetBookmarkedArticleListDbalHandler.php @@ -2,16 +2,16 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\FeedManagement\Application\ReadModel\ArticleOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetBookmarkedArticleList; -use App\FeedManagement\Application\UseCase\QueryHandler\GetBookmarkedArticleListHandler; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; -use App\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\FeedManagement\Application\ReadModel\ArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetBookmarkedArticleList; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetBookmarkedArticleListHandler; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; +use Basango\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceArticleOverviewListDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceArticleOverviewListDbalHandler.php index 7e0e728..ce834b5 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceArticleOverviewListDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceArticleOverviewListDbalHandler.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\FeedManagement\Application\ReadModel\ArticleOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetSourceArticleOverviewList; -use App\FeedManagement\Application\UseCase\QueryHandler\GetSourceArticleOverviewListHandler; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; -use App\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\FeedManagement\Application\ReadModel\ArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceArticleOverviewList; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetSourceArticleOverviewListHandler; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\ArticleQuery; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\BookmarkQuery; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; +use Basango\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceDetailsDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceDetailsDbalHandler.php index e28f122..083930a 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceDetailsDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceDetailsDbalHandler.php @@ -2,20 +2,20 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\Aggregator\Domain\Exception\SourceNotFound; -use App\FeedManagement\Application\Cache\SourceCacheAttributes; -use App\FeedManagement\Application\ReadModel\CategoryShare; -use App\FeedManagement\Application\ReadModel\CategoryShares; -use App\FeedManagement\Application\ReadModel\PublicationEntry; -use App\FeedManagement\Application\ReadModel\PublicationGraph; -use App\FeedManagement\Application\ReadModel\SourceDetails; -use App\FeedManagement\Application\UseCase\Query\GetSourceDetails; -use App\FeedManagement\Application\UseCase\QueryHandler\GetSourceDetailsHandler; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\Aggregator\Domain\Exception\SourceNotFound; +use Basango\FeedManagement\Application\Cache\SourceCacheAttributes; +use Basango\FeedManagement\Application\ReadModel\CategoryShare; +use Basango\FeedManagement\Application\ReadModel\CategoryShares; +use Basango\FeedManagement\Application\ReadModel\PublicationEntry; +use Basango\FeedManagement\Application\ReadModel\PublicationGraph; +use Basango\FeedManagement\Application\ReadModel\SourceDetails; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceDetails; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetSourceDetailsHandler; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceOverviewListDbalHandler.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceOverviewListDbalHandler.php index 01e00ec..d7f44f4 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceOverviewListDbalHandler.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/GetSourceOverviewListDbalHandler.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL; -use App\FeedManagement\Application\ReadModel\SourceOverviewList; -use App\FeedManagement\Application\UseCase\Query\GetSourceOverviewList; -use App\FeedManagement\Application\UseCase\QueryHandler\GetSourceOverviewListHandler; -use App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; -use App\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; -use App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; +use Basango\FeedManagement\Application\ReadModel\SourceOverviewList; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceOverviewList; +use Basango\FeedManagement\Application\UseCase\QueryHandler\GetSourceOverviewListHandler; +use Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries\SourceQuery; +use Basango\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features\PaginationQuery; +use Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\NoResult; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/ArticleQuery.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/ArticleQuery.php index a0c88d2..e77c08e 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/ArticleQuery.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/ArticleQuery.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries; -use App\FeedManagement\Domain\Model\Filters\ArticleFilters; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\FeedManagement\Domain\Model\Filters\ArticleFilters; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/BookmarkQuery.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/BookmarkQuery.php index f3f2df3..83c617f 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/BookmarkQuery.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/BookmarkQuery.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/SourceQuery.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/SourceQuery.php index e54c0d2..713eb22 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/SourceQuery.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Queries/SourceQuery.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Queries; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/BookmarkIdType.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/BookmarkIdType.php index 393c28e..7b9c0a9 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/BookmarkIdType.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/BookmarkIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/CommentIdType.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/CommentIdType.php index ed82480..93d0e50 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/CommentIdType.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/CommentIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/FollowedSourceIdType.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/FollowedSourceIdType.php index 2d7f530..c2662f9 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/FollowedSourceIdType.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/DBAL/Types/FollowedSourceIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\FeedManagement\Domain\Model\Identity\FollowedSourceId; +use Basango\FeedManagement\Domain\Model\Identity\FollowedSourceId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/BookmarkOrmRepository.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/BookmarkOrmRepository.php index 9bfb0e0..26fe894 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/BookmarkOrmRepository.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/BookmarkOrmRepository.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\ORM; -use App\FeedManagement\Domain\Exception\BookmarkNotFound; -use App\FeedManagement\Domain\Model\Entity\Bookmark; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\FeedManagement\Domain\Model\Repository\BookmarkRepository; +use Basango\FeedManagement\Domain\Exception\BookmarkNotFound; +use Basango\FeedManagement\Domain\Model\Entity\Bookmark; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\FeedManagement\Domain\Model\Repository\BookmarkRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/CommentOrmRepository.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/CommentOrmRepository.php index 36306f4..0096fa1 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/CommentOrmRepository.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/CommentOrmRepository.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\ORM; -use App\FeedManagement\Domain\Exception\CommentNotFound; -use App\FeedManagement\Domain\Model\Entity\Comment; -use App\FeedManagement\Domain\Model\Identity\CommentId; -use App\FeedManagement\Domain\Model\Repository\CommentRepository; +use Basango\FeedManagement\Domain\Exception\CommentNotFound; +use Basango\FeedManagement\Domain\Model\Entity\Comment; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\FeedManagement\Domain\Model\Repository\CommentRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/FollowedSourceOrmRepository.php b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/FollowedSourceOrmRepository.php index 42b6d84..733ceb5 100644 --- a/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/FollowedSourceOrmRepository.php +++ b/projects/backend/src/FeedManagement/Infrastructure/Persistence/Doctrine/ORM/FollowedSourceOrmRepository.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\FeedManagement\Infrastructure\Persistence\Doctrine\ORM; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\FeedManagement\Domain\Model\Entity\FollowedSource; -use App\FeedManagement\Domain\Model\Repository\FollowedSourceRepository; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\FeedManagement\Domain\Model\Entity\FollowedSource; +use Basango\FeedManagement\Domain\Model\Repository\FollowedSourceRepository; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\DBAL\ParameterType; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddArticleToBookmarkController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddArticleToBookmarkController.php index a97d07d..1c665ca 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddArticleToBookmarkController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddArticleToBookmarkController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Application\UseCase\Command\AddArticleToBookmark; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Application\UseCase\Command\AddArticleToBookmark; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddCommentToArticleController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddCommentToArticleController.php index 93309f2..97e04d3 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddCommentToArticleController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/AddCommentToArticleController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Application\UseCase\Command\AddCommentToArticle; -use App\FeedManagement\Presentation\WriteModel\AddCommentToArticleModel; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Application\UseCase\Command\AddCommentToArticle; +use Basango\FeedManagement\Presentation\WriteModel\AddCommentToArticleModel; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/CreateBookmarkController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/CreateBookmarkController.php index eafeb5f..c3e571f 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/CreateBookmarkController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/CreateBookmarkController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Command\CreateBookmark; -use App\FeedManagement\Presentation\WriteModel\CreateBookmarkModel; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Command\CreateBookmark; +use Basango\FeedManagement\Presentation\WriteModel\CreateBookmarkModel; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/DeleteBookmarkController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/DeleteBookmarkController.php index d810b93..0c6f5cd 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/DeleteBookmarkController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/DeleteBookmarkController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Command\DeleteBookmark; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Command\DeleteBookmark; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/FollowSourceController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/FollowSourceController.php index 5b1e7c3..670ecdb 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/FollowSourceController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/FollowSourceController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\FeedManagement\Application\UseCase\Command\FollowSource; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\FeedManagement\Application\UseCase\Command\FollowSource; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleCommentListController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleCommentListController.php index 280a74d..307eb83 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleCommentListController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleCommentListController.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Application\ReadModel\CommentList; -use App\FeedManagement\Application\UseCase\Query\GetArticleCommentList; -use App\SharedKernel\Domain\Model\Pagination\Page; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Application\ReadModel\CommentList; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleCommentList; +use Basango\SharedKernel\Domain\Model\Pagination\Page; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapQueryString; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleDetailsController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleDetailsController.php index 8fef249..6be1888 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleDetailsController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleDetailsController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Application\UseCase\Query\GetArticleDetails; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleDetails; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Requirement\Requirement; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleOverviewListController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleOverviewListController.php index a984895..33855a8 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleOverviewListController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetArticleOverviewListController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Query\GetArticleOverviewList; -use App\FeedManagement\Domain\Model\Filters\ArticleFilters; -use App\SharedKernel\Domain\Model\Pagination\Page; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Query\GetArticleOverviewList; +use Basango\FeedManagement\Domain\Model\Filters\ArticleFilters; +use Basango\SharedKernel\Domain\Model\Pagination\Page; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapQueryString; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkListController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkListController.php index 0178783..bf4c7d0 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkListController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkListController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Query\GetBookmarkList; -use App\SharedKernel\Domain\Model\Pagination\Page; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Query\GetBookmarkList; +use Basango\SharedKernel\Domain\Model\Pagination\Page; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapQueryString; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkedArticleListController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkedArticleListController.php index 0ba81d3..f88db52 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkedArticleListController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetBookmarkedArticleListController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Query\GetBookmarkedArticleList; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Domain\Model\Pagination\Page; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Query\GetBookmarkedArticleList; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Domain\Model\Pagination\Page; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapQueryString; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceArticleOverviewListController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceArticleOverviewListController.php index 99e1201..6d1025f 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceArticleOverviewListController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceArticleOverviewListController.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\FeedManagement\Application\UseCase\Query\GetSourceArticleOverviewList; -use App\FeedManagement\Domain\Model\Filters\ArticleFilters; -use App\SharedKernel\Domain\Model\Pagination\Page; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceArticleOverviewList; +use Basango\FeedManagement\Domain\Model\Filters\ArticleFilters; +use Basango\SharedKernel\Domain\Model\Pagination\Page; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapQueryString; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceDetailsController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceDetailsController.php index b6430f9..44215df 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceDetailsController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceDetailsController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\FeedManagement\Application\UseCase\Query\GetSourceDetails; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceDetails; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Requirement\Requirement; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceOverviewListController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceOverviewListController.php index b72718e..1d97e3f 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceOverviewListController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/GetSourceOverviewListController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Query\GetSourceOverviewList; -use App\SharedKernel\Domain\Model\Pagination\Page; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Query\GetSourceOverviewList; +use Basango\SharedKernel\Domain\Model\Pagination\Page; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapQueryString; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveArticleFromBookmarkController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveArticleFromBookmarkController.php index 64880b3..81bf7aa 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveArticleFromBookmarkController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveArticleFromBookmarkController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\ArticleId; -use App\FeedManagement\Application\UseCase\Command\RemoveArticleFromBookmark; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\ArticleId; +use Basango\FeedManagement\Application\UseCase\Command\RemoveArticleFromBookmark; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveCommentFromArticleController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveCommentFromArticleController.php index f44673f..07ff9f0 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveCommentFromArticleController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/RemoveCommentFromArticleController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Command\RemoveCommentFromArticle; -use App\FeedManagement\Domain\Model\Identity\CommentId; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Command\RemoveCommentFromArticle; +use Basango\FeedManagement\Domain\Model\Identity\CommentId; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/UnfollowSourceController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/UnfollowSourceController.php index 0d98974..8f6adec 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/UnfollowSourceController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/UnfollowSourceController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\Aggregator\Domain\Model\Identity\SourceId; -use App\FeedManagement\Application\UseCase\Command\UnfollowSource; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\Aggregator\Domain\Model\Identity\SourceId; +use Basango\FeedManagement\Application\UseCase\Command\UnfollowSource; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/FeedManagement/Presentation/Web/Controller/UpdateBookmarkController.php b/projects/backend/src/FeedManagement/Presentation/Web/Controller/UpdateBookmarkController.php index 8d9a5e8..fe141c0 100644 --- a/projects/backend/src/FeedManagement/Presentation/Web/Controller/UpdateBookmarkController.php +++ b/projects/backend/src/FeedManagement/Presentation/Web/Controller/UpdateBookmarkController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\Web\Controller; +namespace Basango\FeedManagement\Presentation\Web\Controller; -use App\FeedManagement\Application\UseCase\Command\UpdateBookmark; -use App\FeedManagement\Domain\Model\Identity\BookmarkId; -use App\FeedManagement\Presentation\WriteModel\UpdateBookmarkModel; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\FeedManagement\Application\UseCase\Command\UpdateBookmark; +use Basango\FeedManagement\Domain\Model\Identity\BookmarkId; +use Basango\FeedManagement\Presentation\WriteModel\UpdateBookmarkModel; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; diff --git a/projects/backend/src/FeedManagement/Presentation/WriteModel/AddCommentToArticleModel.php b/projects/backend/src/FeedManagement/Presentation/WriteModel/AddCommentToArticleModel.php index 0c972b5..f064c61 100644 --- a/projects/backend/src/FeedManagement/Presentation/WriteModel/AddCommentToArticleModel.php +++ b/projects/backend/src/FeedManagement/Presentation/WriteModel/AddCommentToArticleModel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\WriteModel; +namespace Basango\FeedManagement\Presentation\WriteModel; use Symfony\Component\Validator\Constraints as Assert; diff --git a/projects/backend/src/FeedManagement/Presentation/WriteModel/CreateBookmarkModel.php b/projects/backend/src/FeedManagement/Presentation/WriteModel/CreateBookmarkModel.php index 8bd535f..b4efaaf 100644 --- a/projects/backend/src/FeedManagement/Presentation/WriteModel/CreateBookmarkModel.php +++ b/projects/backend/src/FeedManagement/Presentation/WriteModel/CreateBookmarkModel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\WriteModel; +namespace Basango\FeedManagement\Presentation\WriteModel; use Symfony\Component\Validator\Constraints as Assert; diff --git a/projects/backend/src/FeedManagement/Presentation/WriteModel/UpdateBookmarkModel.php b/projects/backend/src/FeedManagement/Presentation/WriteModel/UpdateBookmarkModel.php index 9dcb155..08567f1 100644 --- a/projects/backend/src/FeedManagement/Presentation/WriteModel/UpdateBookmarkModel.php +++ b/projects/backend/src/FeedManagement/Presentation/WriteModel/UpdateBookmarkModel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\FeedManagement\Presentation\WriteModel; +namespace Basango\FeedManagement\Presentation\WriteModel; use Symfony\Component\Validator\Constraints as Assert; diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountConfirmedListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountConfirmedListener.php index 6e93abe..ca0e576 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountConfirmedListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountConfirmedListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\AccountConfirmedEmail; -use App\IdentityAndAccess\Domain\Event\AccountConfirmed; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\AccountConfirmedEmail; +use Basango\IdentityAndAccess\Domain\Event\AccountConfirmed; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class AccountConfirmedListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountLockedListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountLockedListener.php index 3c1b0cf..d50d27c 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountLockedListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountLockedListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\AccountLockedEmail; -use App\IdentityAndAccess\Domain\Event\AccountLocked; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\AccountLockedEmail; +use Basango\IdentityAndAccess\Domain\Event\AccountLocked; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class AccountLockedListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountUnlockedListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountUnlockedListener.php index ec0b924..3b0a8a8 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountUnlockedListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/AccountUnlockedListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\AccountUnlockedEmail; -use App\IdentityAndAccess\Domain\Event\AccountUnlocked; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\AccountUnlockedEmail; +use Basango\IdentityAndAccess\Domain\Event\AccountUnlocked; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class AccountUnlockedListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/ConfirmationRequestedListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/ConfirmationRequestedListener.php index 59973ae..844ea7d 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/ConfirmationRequestedListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/ConfirmationRequestedListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\ConfirmationRequestedEmail; -use App\IdentityAndAccess\Domain\Event\ConfirmationRequested; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\ConfirmationRequestedEmail; +use Basango\IdentityAndAccess\Domain\Event\ConfirmationRequested; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class UserRegisteredListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/LoginProfileChangedListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/LoginProfileChangedListener.php index 1874400..ffd8352 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/LoginProfileChangedListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/LoginProfileChangedListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\LoginProfileChangedEmail; -use App\IdentityAndAccess\Domain\Event\LoginProfileChanged; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\LoginProfileChangedEmail; +use Basango\IdentityAndAccess\Domain\Event\LoginProfileChanged; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class LoginProfileChangedListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordCreatedListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordCreatedListener.php index 3a3f62f..b7cb997 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordCreatedListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordCreatedListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\PasswordCreatedEmail; -use App\IdentityAndAccess\Domain\Event\PasswordCreated; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\PasswordCreatedEmail; +use Basango\IdentityAndAccess\Domain\Event\PasswordCreated; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class PasswordCreatedListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordForgottenListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordForgottenListener.php index 02ed5ef..7bb8261 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordForgottenListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordForgottenListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\PasswordForgottenEmail; -use App\IdentityAndAccess\Domain\Event\PasswordForgotten; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\PasswordForgottenEmail; +use Basango\IdentityAndAccess\Domain\Event\PasswordForgotten; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class PasswordForgottenListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordResetListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordResetListener.php index a165c5e..9e64b84 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordResetListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordResetListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\PasswordResetEmail; -use App\IdentityAndAccess\Domain\Event\PasswordReset; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\PasswordResetEmail; +use Basango\IdentityAndAccess\Domain\Event\PasswordReset; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class PasswordForgottenListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordUpdatedListener.php b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordUpdatedListener.php index 32c7d91..c90d2cf 100644 --- a/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordUpdatedListener.php +++ b/projects/backend/src/IdentityAndAccess/Application/EventListener/PasswordUpdatedListener.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\EventListener; +namespace Basango\IdentityAndAccess\Application\EventListener; -use App\IdentityAndAccess\Application\Mailing\PasswordUpdatedEmail; -use App\IdentityAndAccess\Domain\Event\PasswordUpdated; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\EventListener\EventListener; +use Basango\IdentityAndAccess\Application\Mailing\PasswordUpdatedEmail; +use Basango\IdentityAndAccess\Domain\Event\PasswordUpdated; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\EventListener\EventListener; /** * Class PasswordUpdatedListener. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountConfirmedEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountConfirmedEmail.php index 51da50e..065fb0e 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountConfirmedEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountConfirmedEmail.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class UserConfirmedEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountLockedEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountLockedEmail.php index 4279332..58b3fc8 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountLockedEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountLockedEmail.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class AccountBlockedEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountUnlockedEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountUnlockedEmail.php index 41c5cba..397c3bc 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountUnlockedEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/AccountUnlockedEmail.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class AccountUnlockedEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/ConfirmationRequestedEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/ConfirmationRequestedEmail.php index 19589b4..c126dce 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/ConfirmationRequestedEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/ConfirmationRequestedEmail.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class UserRegisteredEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/LoginProfileChangedEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/LoginProfileChangedEmail.php index 42a9bfd..d61e169 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/LoginProfileChangedEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/LoginProfileChangedEmail.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\Device; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\Device; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; /** * Class LoginProfileChangedEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordCreatedEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordCreatedEmail.php index d90c877..84697e1 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordCreatedEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordCreatedEmail.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class PasswordCreatedEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordForgottenEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordForgottenEmail.php index 5c57b6e..a0ca588 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordForgottenEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordForgottenEmail.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class PasswordForgottenEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordResetEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordResetEmail.php index 64f29d7..4ec5e0e 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordResetEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordResetEmail.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class PasswordResetEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordUpdatedEmail.php b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordUpdatedEmail.php index 38ced63..77d1c0f 100644 --- a/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordUpdatedEmail.php +++ b/projects/backend/src/IdentityAndAccess/Application/Mailing/PasswordUpdatedEmail.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\Mailing; +namespace Basango\IdentityAndAccess\Application\Mailing; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class PasswordUpdatedEmail. diff --git a/projects/backend/src/IdentityAndAccess/Application/ReadModel/UserProfile.php b/projects/backend/src/IdentityAndAccess/Application/ReadModel/UserProfile.php index bc3e182..07c878a 100644 --- a/projects/backend/src/IdentityAndAccess/Application/ReadModel/UserProfile.php +++ b/projects/backend/src/IdentityAndAccess/Application/ReadModel/UserProfile.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\ReadModel; +namespace Basango\IdentityAndAccess\Application\ReadModel; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\DataTransfert\DataMapping; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class UserProfile. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ConfirmAccount.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ConfirmAccount.php index 9d71f97..243272d 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ConfirmAccount.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ConfirmAccount.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; /** * Class ConfirmRegistration. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/LockAccount.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/LockAccount.php index b1f161d..8e13510 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/LockAccount.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/LockAccount.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class LockAccount. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/Register.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/Register.php index 98fafd6..000d6e6 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/Register.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/Register.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\ValueObject\Roles; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Roles; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class Register. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginAttempt.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginAttempt.php index 02628e5..8b912c8 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginAttempt.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginAttempt.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class AddLoginAttempt. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginSuccess.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginSuccess.php index a1703f3..c269dd8 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginSuccess.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RegisterLoginSuccess.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; /** * Class RegisterLogin. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RequestPassword.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RequestPassword.php index 4c6d41b..66de9c9 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RequestPassword.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/RequestPassword.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class RequestPassword. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ResetPassword.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ResetPassword.php index 31a70fd..cfc76c3 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ResetPassword.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/ResetPassword.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; /** * Class ResetPassword. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UnlockAccount.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UnlockAccount.php index 3dc3618..5e093e7 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UnlockAccount.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UnlockAccount.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; /** * Class UnlockAccount. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UpdatePassword.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UpdatePassword.php index e3fd8c1..ca5b444 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UpdatePassword.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Command/UpdatePassword.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Command; +namespace Basango\IdentityAndAccess\Application\UseCase\Command; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class UpdatePassword. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ConfirmAccountHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ConfirmAccountHandler.php index 0094365..8e2fde8 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ConfirmAccountHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ConfirmAccountHandler.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\ConfirmAccount; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\IdentityAndAccess\Application\UseCase\Command\ConfirmAccount; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; /** * Class ConfirmRegistrationHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/LockAccountHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/LockAccountHandler.php index d673831..3d7dcb6 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/LockAccountHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/LockAccountHandler.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\LockAccount; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Entity\VerificationToken; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; -use App\IdentityAndAccess\Domain\Service\SecretGenerator; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\IdentityAndAccess\Application\UseCase\Command\LockAccount; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Entity\VerificationToken; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\IdentityAndAccess\Domain\Service\SecretGenerator; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; /** * Class ResetPasswordHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterHandler.php index a1bf2f2..7888296 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterHandler.php @@ -2,19 +2,19 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\Register; -use App\IdentityAndAccess\Domain\Exception\EmailAlreadyUsed; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Entity\VerificationToken; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; -use App\IdentityAndAccess\Domain\Service\PasswordHasher; -use App\IdentityAndAccess\Domain\Service\SecretGenerator; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\IdentityAndAccess\Application\UseCase\Command\Register; +use Basango\IdentityAndAccess\Domain\Exception\EmailAlreadyUsed; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Entity\VerificationToken; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\IdentityAndAccess\Domain\Service\PasswordHasher; +use Basango\IdentityAndAccess\Domain\Service\SecretGenerator; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; /** * Class RegisterHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginAttemptHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginAttemptHandler.php index 293a694..6c4bcf9 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginAttemptHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginAttemptHandler.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\LockAccount; -use App\IdentityAndAccess\Application\UseCase\Command\RegisterLoginAttempt; -use App\IdentityAndAccess\Domain\Model\Entity\LoginAttempt; -use App\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Messaging\CommandBus; -use App\SharedKernel\Application\Messaging\CommandHandler; +use Basango\IdentityAndAccess\Application\UseCase\Command\LockAccount; +use Basango\IdentityAndAccess\Application\UseCase\Command\RegisterLoginAttempt; +use Basango\IdentityAndAccess\Domain\Model\Entity\LoginAttempt; +use Basango\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Application\Messaging\CommandHandler; /** * Class RegisterLoginAttemptHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginSuccessHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginSuccessHandler.php index 5b6964c..61122bb 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginSuccessHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RegisterLoginSuccessHandler.php @@ -2,16 +2,16 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\RegisterLoginSuccess; -use App\IdentityAndAccess\Domain\Model\Entity\LoginHistory; -use App\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; -use App\IdentityAndAccess\Domain\Model\Repository\LoginHistoryRepository; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; -use App\SharedKernel\Domain\Tracking\ClientProfiler; +use Basango\IdentityAndAccess\Application\UseCase\Command\RegisterLoginSuccess; +use Basango\IdentityAndAccess\Domain\Model\Entity\LoginHistory; +use Basango\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\LoginHistoryRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\SharedKernel\Domain\Tracking\ClientProfiler; /** * Class RegisterLoginSuccessHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RequestPasswordHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RequestPasswordHandler.php index 9eb0b9a..302e641 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RequestPasswordHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/RequestPasswordHandler.php @@ -2,18 +2,18 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\RequestPassword; -use App\IdentityAndAccess\Domain\Exception\UserNotFound; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Entity\VerificationToken; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; -use App\IdentityAndAccess\Domain\Service\SecretGenerator; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\IdentityAndAccess\Application\UseCase\Command\RequestPassword; +use Basango\IdentityAndAccess\Domain\Exception\UserNotFound; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Entity\VerificationToken; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\IdentityAndAccess\Domain\Service\SecretGenerator; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; /** * Class RequestPasswordHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ResetPasswordHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ResetPasswordHandler.php index 03045ea..fec3ad0 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ResetPasswordHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/ResetPasswordHandler.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\ResetPassword; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; -use App\IdentityAndAccess\Domain\Service\PasswordHasher; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\IdentityAndAccess\Application\UseCase\Command\ResetPassword; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\IdentityAndAccess\Domain\Service\PasswordHasher; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; /** * Class ResetPasswordHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UnlockAccountHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UnlockAccountHandler.php index 19fce79..5913c02 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UnlockAccountHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UnlockAccountHandler.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\UnlockAccount; -use App\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\IdentityAndAccess\Application\UseCase\Command\UnlockAccount; +use Basango\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; /** * Class ResetPasswordHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UpdatePasswordHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UpdatePasswordHandler.php index 0a99230..b985c92 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UpdatePasswordHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/CommandHandler/UpdatePasswordHandler.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\CommandHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\CommandHandler; -use App\IdentityAndAccess\Application\UseCase\Command\UpdatePassword; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\IdentityAndAccess\Domain\Service\PasswordHasher; -use App\SharedKernel\Application\Messaging\CommandHandler; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\IdentityAndAccess\Application\UseCase\Command\UpdatePassword; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\IdentityAndAccess\Domain\Service\PasswordHasher; +use Basango\SharedKernel\Application\Messaging\CommandHandler; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; /** * Class UpdatePasswordHandler. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/Query/GetUserProfile.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/Query/GetUserProfile.php index b44cc3e..adaec3b 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/Query/GetUserProfile.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/Query/GetUserProfile.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\Query; +namespace Basango\IdentityAndAccess\Application\UseCase\Query; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class GetUserProfile. diff --git a/projects/backend/src/IdentityAndAccess/Application/UseCase/QueryHandler/GetUserProfileHandler.php b/projects/backend/src/IdentityAndAccess/Application/UseCase/QueryHandler/GetUserProfileHandler.php index 920029f..d9ba2f9 100644 --- a/projects/backend/src/IdentityAndAccess/Application/UseCase/QueryHandler/GetUserProfileHandler.php +++ b/projects/backend/src/IdentityAndAccess/Application/UseCase/QueryHandler/GetUserProfileHandler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Application\UseCase\QueryHandler; +namespace Basango\IdentityAndAccess\Application\UseCase\QueryHandler; -use App\IdentityAndAccess\Application\ReadModel\UserProfile; -use App\IdentityAndAccess\Application\UseCase\Query\GetUserProfile; -use App\SharedKernel\Application\Messaging\QueryHandler; +use Basango\IdentityAndAccess\Application\ReadModel\UserProfile; +use Basango\IdentityAndAccess\Application\UseCase\Query\GetUserProfile; +use Basango\SharedKernel\Application\Messaging\QueryHandler; /** * Interface GetUserProfileHandler. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/AccountConfirmed.php b/projects/backend/src/IdentityAndAccess/Domain/Event/AccountConfirmed.php index 568bba7..67cfc2d 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/AccountConfirmed.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/AccountConfirmed.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class UserConfirmed. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/AccountLocked.php b/projects/backend/src/IdentityAndAccess/Domain/Event/AccountLocked.php index afb1371..0ba4c26 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/AccountLocked.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/AccountLocked.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; /** * Class AccountLocked. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/AccountUnlocked.php b/projects/backend/src/IdentityAndAccess/Domain/Event/AccountUnlocked.php index afa7510..f64bb80 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/AccountUnlocked.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/AccountUnlocked.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class AccountUnlocked. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/ConfirmationRequested.php b/projects/backend/src/IdentityAndAccess/Domain/Event/ConfirmationRequested.php index 65e20bc..145bfba 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/ConfirmationRequested.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/ConfirmationRequested.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; /** * Class AccountConfirmationRequested. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/EmailUpdated.php b/projects/backend/src/IdentityAndAccess/Domain/Event/EmailUpdated.php index cee3936..3d51d35 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/EmailUpdated.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/EmailUpdated.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class EmailUpdated. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/LoginProfileChanged.php b/projects/backend/src/IdentityAndAccess/Domain/Event/LoginProfileChanged.php index 3ae0805..fc85cc9 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/LoginProfileChanged.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/LoginProfileChanged.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\Device; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\Device; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; /** * Class LoginProfileChanged. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordCreated.php b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordCreated.php index d5b2c6a..644f878 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordCreated.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordCreated.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; /** * Class PasswordCreated. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordForgotten.php b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordForgotten.php index 3ae3fc2..db687d4 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordForgotten.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordForgotten.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; /** * Class PasswordForgotten. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordReset.php b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordReset.php index 0f7c395..baeace9 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordReset.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordReset.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class PasswordReset. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordUpdated.php b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordUpdated.php index c722ef6..b98f949 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordUpdated.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Event/PasswordUpdated.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Event; +namespace Basango\IdentityAndAccess\Domain\Event; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; /** * Class PasswordUpdated. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountIsLocked.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountIsLocked.php index e6f740b..c797c3c 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountIsLocked.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountIsLocked.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class TooManyLoginAttempts. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountNotConfirmed.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountNotConfirmed.php index 4ff7158..0786eb7 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountNotConfirmed.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/AccountNotConfirmed.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class UserNotConfirmed. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/EmailAlreadyUsed.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/EmailAlreadyUsed.php index cc18c1b..aaeb448 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/EmailAlreadyUsed.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/EmailAlreadyUsed.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\SharedKernel\Domain\Exception\UserFacingError; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class EmailAlreadyUsed. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidCurrentPassword.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidCurrentPassword.php index 707db97..5093277 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidCurrentPassword.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidCurrentPassword.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class InvalidCurrentPassword. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidVerificationToken.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidVerificationToken.php index e493297..f5bf110 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidVerificationToken.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/InvalidVerificationToken.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class InvalidToken. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/PasswordAlreadyDefined.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/PasswordAlreadyDefined.php index c81947d..58b13b5 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/PasswordAlreadyDefined.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/PasswordAlreadyDefined.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class PasswordAlreadyDefined. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/PermissionNotGranted.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/PermissionNotGranted.php index 84a4d94..c6f93f2 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/PermissionNotGranted.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/PermissionNotGranted.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Exception\UserFacingError; /** * Class PermissionNotGranted. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Exception/UserNotFound.php b/projects/backend/src/IdentityAndAccess/Domain/Exception/UserNotFound.php index 32c7381..f7e1323 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Exception/UserNotFound.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Exception/UserNotFound.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Exception; +namespace Basango\IdentityAndAccess\Domain\Exception; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Exception\UserFacingError; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Exception\UserFacingError; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class UserNotFound. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginAttempt.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginAttempt.php index c7de765..061f122 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginAttempt.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginAttempt.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Entity; +namespace Basango\IdentityAndAccess\Domain\Model\Entity; -use App\IdentityAndAccess\Domain\Model\Identity\LoginAttemptId; +use Basango\IdentityAndAccess\Domain\Model\Identity\LoginAttemptId; /** * Class LoginAttempt. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginHistory.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginHistory.php index 4c781db..0ee8789 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginHistory.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/LoginHistory.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Entity; +namespace Basango\IdentityAndAccess\Domain\Model\Entity; -use App\IdentityAndAccess\Domain\Event\LoginProfileChanged; -use App\IdentityAndAccess\Domain\Model\Identity\LoginHistoryId; -use App\SharedKernel\Domain\EventDispatcher\EventEmitterTrait; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\Device; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; +use Basango\IdentityAndAccess\Domain\Event\LoginProfileChanged; +use Basango\IdentityAndAccess\Domain\Model\Identity\LoginHistoryId; +use Basango\SharedKernel\Domain\EventDispatcher\EventEmitterTrait; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\Device; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; /** * Class LoginHistory. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/RefreshToken.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/RefreshToken.php index 532e904..b9d9660 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/RefreshToken.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/RefreshToken.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Entity; +namespace Basango\IdentityAndAccess\Domain\Model\Entity; use Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken as BaseRefreshToken; diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/User.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/User.php index 2fcc026..17ef363 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/User.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/User.php @@ -2,25 +2,25 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Entity; +namespace Basango\IdentityAndAccess\Domain\Model\Entity; -use App\IdentityAndAccess\Domain\Event\AccountConfirmed; -use App\IdentityAndAccess\Domain\Event\AccountLocked; -use App\IdentityAndAccess\Domain\Event\AccountUnlocked; -use App\IdentityAndAccess\Domain\Event\ConfirmationRequested; -use App\IdentityAndAccess\Domain\Event\EmailUpdated; -use App\IdentityAndAccess\Domain\Event\PasswordCreated; -use App\IdentityAndAccess\Domain\Event\PasswordForgotten; -use App\IdentityAndAccess\Domain\Event\PasswordReset; -use App\IdentityAndAccess\Domain\Event\PasswordUpdated; -use App\IdentityAndAccess\Domain\Exception\InvalidCurrentPassword; -use App\IdentityAndAccess\Domain\Exception\PasswordAlreadyDefined; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\IdentityAndAccess\Domain\Model\ValueObject\Roles; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; -use App\IdentityAndAccess\Domain\Service\PasswordHasher; -use App\SharedKernel\Domain\EventDispatcher\EventEmitterTrait; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Event\AccountConfirmed; +use Basango\IdentityAndAccess\Domain\Event\AccountLocked; +use Basango\IdentityAndAccess\Domain\Event\AccountUnlocked; +use Basango\IdentityAndAccess\Domain\Event\ConfirmationRequested; +use Basango\IdentityAndAccess\Domain\Event\EmailUpdated; +use Basango\IdentityAndAccess\Domain\Event\PasswordCreated; +use Basango\IdentityAndAccess\Domain\Event\PasswordForgotten; +use Basango\IdentityAndAccess\Domain\Event\PasswordReset; +use Basango\IdentityAndAccess\Domain\Event\PasswordUpdated; +use Basango\IdentityAndAccess\Domain\Exception\InvalidCurrentPassword; +use Basango\IdentityAndAccess\Domain\Exception\PasswordAlreadyDefined; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Roles; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; +use Basango\IdentityAndAccess\Domain\Service\PasswordHasher; +use Basango\SharedKernel\Domain\EventDispatcher\EventEmitterTrait; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Class User. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/VerificationToken.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/VerificationToken.php index b9e2643..277f2e1 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/VerificationToken.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Entity/VerificationToken.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Entity; +namespace Basango\IdentityAndAccess\Domain\Model\Entity; -use App\IdentityAndAccess\Domain\Exception\InvalidVerificationToken; -use App\IdentityAndAccess\Domain\Model\Identity\VerificationTokenId; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\IdentityAndAccess\Domain\Exception\InvalidVerificationToken; +use Basango\IdentityAndAccess\Domain\Model\Identity\VerificationTokenId; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; /** * Class VerificationToken. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginAttemptId.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginAttemptId.php index 65d6c4a..1a215c7 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginAttemptId.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginAttemptId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Identity; +namespace Basango\IdentityAndAccess\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginHistoryId.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginHistoryId.php index 7aeda4b..4c530cc 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginHistoryId.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/LoginHistoryId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Identity; +namespace Basango\IdentityAndAccess\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/UserId.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/UserId.php index 1c1fd79..14c4d1e 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/UserId.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/UserId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Identity; +namespace Basango\IdentityAndAccess\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/VerificationTokenId.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/VerificationTokenId.php index ba0c1fd..8a02c3b 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/VerificationTokenId.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Identity/VerificationTokenId.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Identity; +namespace Basango\IdentityAndAccess\Domain\Model\Identity; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginAttemptRepository.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginAttemptRepository.php index 343bc8f..ea5d666 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginAttemptRepository.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginAttemptRepository.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Repository; +namespace Basango\IdentityAndAccess\Domain\Model\Repository; -use App\IdentityAndAccess\Domain\Model\Entity\LoginAttempt; -use App\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Entity\LoginAttempt; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; /** * Interface LoginAttemptRepository. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginHistoryRepository.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginHistoryRepository.php index 93f697d..68ad1ca 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginHistoryRepository.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/LoginHistoryRepository.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Repository; +namespace Basango\IdentityAndAccess\Domain\Model\Repository; -use App\IdentityAndAccess\Domain\Model\Entity\LoginHistory; -use App\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Entity\LoginHistory; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; /** * Interface LoginHistoryRepository. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/UserRepository.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/UserRepository.php index 7a9966f..9387197 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/UserRepository.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/UserRepository.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Repository; +namespace Basango\IdentityAndAccess\Domain\Model\Repository; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Interface UserRepository. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/VerificationTokenRepository.php b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/VerificationTokenRepository.php index 8316e70..9f63d5c 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/VerificationTokenRepository.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/Repository/VerificationTokenRepository.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\Repository; +namespace Basango\IdentityAndAccess\Domain\Model\Repository; -use App\IdentityAndAccess\Domain\Model\Entity\VerificationToken; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\IdentityAndAccess\Domain\Model\Entity\VerificationToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; /** * Interface LoginAttemptRepository. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Role.php b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Role.php index f1b6b77..067dc12 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Role.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Role.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\ValueObject; +namespace Basango\IdentityAndAccess\Domain\Model\ValueObject; /** * Class Role. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Roles.php b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Roles.php index cbf6688..7c1232a 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Roles.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Roles.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\ValueObject; +namespace Basango\IdentityAndAccess\Domain\Model\ValueObject; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * @author bernard-ng diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedCode.php b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedCode.php index ec84c4d..3bd6b2e 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedCode.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedCode.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\ValueObject\Secret; +namespace Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * Class GeneratedCode. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedToken.php b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedToken.php index 5e80938..28fbc81 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedToken.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/Secret/GeneratedToken.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\ValueObject\Secret; +namespace Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * Class GeneratedToken. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/TokenPurpose.php b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/TokenPurpose.php index 1d58972..8695407 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/TokenPurpose.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Model/ValueObject/TokenPurpose.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Model\ValueObject; +namespace Basango\IdentityAndAccess\Domain\Model\ValueObject; /** * Enum TokenPurpose. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Service/PasswordHasher.php b/projects/backend/src/IdentityAndAccess/Domain/Service/PasswordHasher.php index 06ab025..4593a12 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Service/PasswordHasher.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Service/PasswordHasher.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Service; +namespace Basango\IdentityAndAccess\Domain\Service; -use App\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; /** * Interface PasswordHasher. diff --git a/projects/backend/src/IdentityAndAccess/Domain/Service/SecretGenerator.php b/projects/backend/src/IdentityAndAccess/Domain/Service/SecretGenerator.php index 926c2d0..ba00fb7 100644 --- a/projects/backend/src/IdentityAndAccess/Domain/Service/SecretGenerator.php +++ b/projects/backend/src/IdentityAndAccess/Domain/Service/SecretGenerator.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Domain\Service; +namespace Basango\IdentityAndAccess\Domain\Service; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; /** * Class SecretGenerator. diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginFailureListener.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginFailureListener.php index d3890a8..4cd707f 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginFailureListener.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginFailureListener.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Framework\Symfony\EventListener; +namespace Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\EventListener; -use App\IdentityAndAccess\Application\UseCase\Command\RegisterLoginAttempt; -use App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUser; -use App\SharedKernel\Application\Messaging\CommandBus; +use Basango\IdentityAndAccess\Application\UseCase\Command\RegisterLoginAttempt; +use Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUser; +use Basango\SharedKernel\Application\Messaging\CommandBus; use Symfony\Component\EventDispatcher\Attribute\AsEventListener; use Symfony\Component\Security\Core\Exception\BadCredentialsException; use Symfony\Component\Security\Http\Event\LoginFailureEvent; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginSuccessListener.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginSuccessListener.php index 46799d1..6028a07 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginSuccessListener.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/EventListener/LoginSuccessListener.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Framework\Symfony\EventListener; +namespace Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\EventListener; -use App\IdentityAndAccess\Application\UseCase\Command\RegisterLoginSuccess; -use App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUser; -use App\SharedKernel\Application\Messaging\CommandBus; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; +use Basango\IdentityAndAccess\Application\UseCase\Command\RegisterLoginSuccess; +use Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUser; +use Basango\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; use Symfony\Component\EventDispatcher\Attribute\AsEventListener; use Symfony\Component\HttpFoundation\IpUtils; use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUser.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUser.php index 0ce63ba..854e7bd 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUser.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUser.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; +namespace Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; use Symfony\Component\Security\Core\User\EquatableInterface; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\UserInterface; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUserProvider.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUserProvider.php index ffcd34f..53ad895 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUserProvider.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/SecurityUserProvider.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; +namespace Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; use Symfony\Component\Security\Core\Exception\UserNotFoundException; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserProviderInterface; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserChecker.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserChecker.php index 5d5a5bc..a2cc2c5 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserChecker.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserChecker.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; +namespace Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; -use App\IdentityAndAccess\Domain\Exception\AccountIsLocked; -use App\IdentityAndAccess\Domain\Exception\AccountNotConfirmed; +use Basango\IdentityAndAccess\Domain\Exception\AccountIsLocked; +use Basango\IdentityAndAccess\Domain\Exception\AccountNotConfirmed; use Symfony\Component\Security\Core\User\UserCheckerInterface; use Symfony\Component\Security\Core\User\UserInterface; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserPasswordHasher.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserPasswordHasher.php index 8d30d85..a068150 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserPasswordHasher.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Framework/Symfony/Security/UserPasswordHasher.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; +namespace Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Service\PasswordHasher; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Service\PasswordHasher; use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; /** diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/GetUserProfileDbalHandler.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/GetUserProfileDbalHandler.php index 982671b..6e67411 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/GetUserProfileDbalHandler.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/GetUserProfileDbalHandler.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL; -use App\IdentityAndAccess\Application\ReadModel\UserProfile; -use App\IdentityAndAccess\Application\UseCase\Query\GetUserProfile; -use App\IdentityAndAccess\Application\UseCase\QueryHandler\GetUserProfileHandler; -use App\IdentityAndAccess\Domain\Exception\UserNotFound; +use Basango\IdentityAndAccess\Application\ReadModel\UserProfile; +use Basango\IdentityAndAccess\Application\UseCase\Query\GetUserProfile; +use Basango\IdentityAndAccess\Application\UseCase\QueryHandler\GetUserProfileHandler; +use Basango\IdentityAndAccess\Domain\Exception\UserNotFound; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginAttemptIdType.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginAttemptIdType.php index 2641b3a..c890c0d 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginAttemptIdType.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginAttemptIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\IdentityAndAccess\Domain\Model\Identity\LoginAttemptId; +use Basango\IdentityAndAccess\Domain\Model\Identity\LoginAttemptId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginHistoryIdType.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginHistoryIdType.php index ca2f984..aca2a9d 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginHistoryIdType.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/LoginHistoryIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\IdentityAndAccess\Domain\Model\Identity\LoginHistoryId; +use Basango\IdentityAndAccess\Domain\Model\Identity\LoginHistoryId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/UserIdType.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/UserIdType.php index ad4a10f..5db2732 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/UserIdType.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/UserIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/VerificationTokenIdType.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/VerificationTokenIdType.php index 930e43a..18df09e 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/VerificationTokenIdType.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/DBAL/Types/VerificationTokenIdType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\IdentityAndAccess\Domain\Model\Identity\VerificationTokenId; +use Basango\IdentityAndAccess\Domain\Model\Identity\VerificationTokenId; use Symfony\Bridge\Doctrine\Types\AbstractUidType; /** diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginAttemptOrmRepository.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginAttemptOrmRepository.php index 80ce64d..190a6af 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginAttemptOrmRepository.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginAttemptOrmRepository.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; -use App\IdentityAndAccess\Domain\Model\Entity\LoginAttempt; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; +use Basango\IdentityAndAccess\Domain\Model\Entity\LoginAttempt; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Repository\LoginAttemptRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginHistoryOrmRepository.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginHistoryOrmRepository.php index a0a8ce2..d1a5cc7 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginHistoryOrmRepository.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/LoginHistoryOrmRepository.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; -use App\IdentityAndAccess\Domain\Model\Entity\LoginHistory; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Repository\LoginHistoryRepository; +use Basango\IdentityAndAccess\Domain\Model\Entity\LoginHistory; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Repository\LoginHistoryRepository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/UserOrmRepository.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/UserOrmRepository.php index c7a02f3..0196f00 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/UserOrmRepository.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/UserOrmRepository.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; -use App\IdentityAndAccess\Domain\Exception\UserNotFound; -use App\IdentityAndAccess\Domain\Model\Entity\User; -use App\IdentityAndAccess\Domain\Model\Identity\UserId; -use App\IdentityAndAccess\Domain\Model\Repository\UserRepository; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\IdentityAndAccess\Domain\Exception\UserNotFound; +use Basango\IdentityAndAccess\Domain\Model\Entity\User; +use Basango\IdentityAndAccess\Domain\Model\Identity\UserId; +use Basango\IdentityAndAccess\Domain\Model\Repository\UserRepository; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/VerificationTokenOrmRepository.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/VerificationTokenOrmRepository.php index 6319efd..e35bc45 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/VerificationTokenOrmRepository.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Persistence/Doctrine/ORM/VerificationTokenOrmRepository.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; +namespace Basango\IdentityAndAccess\Infrastructure\Persistence\Doctrine\ORM; -use App\IdentityAndAccess\Domain\Exception\InvalidVerificationToken; -use App\IdentityAndAccess\Domain\Model\Entity\VerificationToken; -use App\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; +use Basango\IdentityAndAccess\Domain\Exception\InvalidVerificationToken; +use Basango\IdentityAndAccess\Domain\Model\Entity\VerificationToken; +use Basango\IdentityAndAccess\Domain\Model\Repository\VerificationTokenRepository; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\TokenPurpose; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; diff --git a/projects/backend/src/IdentityAndAccess/Infrastructure/Secret/RandomizerSecretGenerator.php b/projects/backend/src/IdentityAndAccess/Infrastructure/Secret/RandomizerSecretGenerator.php index 3cf3237..5d798ce 100644 --- a/projects/backend/src/IdentityAndAccess/Infrastructure/Secret/RandomizerSecretGenerator.php +++ b/projects/backend/src/IdentityAndAccess/Infrastructure/Secret/RandomizerSecretGenerator.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Infrastructure\Secret; +namespace Basango\IdentityAndAccess\Infrastructure\Secret; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\IdentityAndAccess\Domain\Service\SecretGenerator; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedCode; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Domain\Service\SecretGenerator; use Random\Randomizer; /** diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Console/RegisterConsole.php b/projects/backend/src/IdentityAndAccess/Presentation/Console/RegisterConsole.php index 991c26f..cf2ccbd 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Console/RegisterConsole.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Console/RegisterConsole.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Console; +namespace Basango\IdentityAndAccess\Presentation\Console; -use App\IdentityAndAccess\Application\UseCase\Command\Register; -use App\IdentityAndAccess\Domain\Model\ValueObject\Roles; -use App\SharedKernel\Application\Messaging\CommandBus; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; -use App\SharedKernel\Presentation\Console\AskArgumentFeature; +use Basango\IdentityAndAccess\Application\UseCase\Command\Register; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Roles; +use Basango\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Presentation\Console\AskArgumentFeature; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ConfirmAccountController.php b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ConfirmAccountController.php index 3ed1950..3a6d209 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ConfirmAccountController.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ConfirmAccountController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Web\Controller; +namespace Basango\IdentityAndAccess\Presentation\Web\Controller; -use App\IdentityAndAccess\Application\UseCase\Command\ConfirmAccount; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\IdentityAndAccess\Application\UseCase\Command\ConfirmAccount; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Requirement\Requirement; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/GetUserProfileController.php b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/GetUserProfileController.php index dedf01a..c95d2db 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/GetUserProfileController.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/GetUserProfileController.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Web\Controller; +namespace Basango\IdentityAndAccess\Presentation\Web\Controller; -use App\IdentityAndAccess\Application\UseCase\Query\GetUserProfile; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\IdentityAndAccess\Application\UseCase\Query\GetUserProfile; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RegisterController.php b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RegisterController.php index 344d8fd..8f05ac8 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RegisterController.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RegisterController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Web\Controller; +namespace Basango\IdentityAndAccess\Presentation\Web\Controller; -use App\IdentityAndAccess\Application\UseCase\Command\Register; -use App\IdentityAndAccess\Presentation\WriteModel\RegisterModel; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\IdentityAndAccess\Application\UseCase\Command\Register; +use Basango\IdentityAndAccess\Presentation\WriteModel\RegisterModel; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RequestPasswordController.php b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RequestPasswordController.php index fcdcdc5..ca87294 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RequestPasswordController.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/RequestPasswordController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Web\Controller; +namespace Basango\IdentityAndAccess\Presentation\Web\Controller; -use App\IdentityAndAccess\Application\UseCase\Command\RequestPassword; -use App\IdentityAndAccess\Presentation\WriteModel\RequestPasswordModel; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\IdentityAndAccess\Application\UseCase\Command\RequestPassword; +use Basango\IdentityAndAccess\Presentation\WriteModel\RequestPasswordModel; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ResetPasswordController.php b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ResetPasswordController.php index ffdbf45..2de345e 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ResetPasswordController.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/ResetPasswordController.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Web\Controller; +namespace Basango\IdentityAndAccess\Presentation\Web\Controller; -use App\IdentityAndAccess\Application\UseCase\Command\ResetPassword; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\IdentityAndAccess\Presentation\WriteModel\ResetPasswordModel; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\IdentityAndAccess\Application\UseCase\Command\ResetPassword; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\IdentityAndAccess\Presentation\WriteModel\ResetPasswordModel; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UnlockAccountController.php b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UnlockAccountController.php index 17bc56c..2af42d2 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UnlockAccountController.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UnlockAccountController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Web\Controller; +namespace Basango\IdentityAndAccess\Presentation\Web\Controller; -use App\IdentityAndAccess\Application\UseCase\Command\UnlockAccount; -use App\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\IdentityAndAccess\Application\UseCase\Command\UnlockAccount; +use Basango\IdentityAndAccess\Domain\Model\ValueObject\Secret\GeneratedToken; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Requirement\Requirement; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UpdatePasswordController.php b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UpdatePasswordController.php index 4130ca5..41972eb 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UpdatePasswordController.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/Web/Controller/UpdatePasswordController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\Web\Controller; +namespace Basango\IdentityAndAccess\Presentation\Web\Controller; -use App\IdentityAndAccess\Application\UseCase\Command\UpdatePassword; -use App\IdentityAndAccess\Presentation\WriteModel\UpdatePasswordModel; -use App\SharedKernel\Presentation\Web\Controller\AbstractController; +use Basango\IdentityAndAccess\Application\UseCase\Command\UpdatePassword; +use Basango\IdentityAndAccess\Presentation\WriteModel\UpdatePasswordModel; +use Basango\SharedKernel\Presentation\Web\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Attribute\MapRequestPayload; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RegisterModel.php b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RegisterModel.php index 98b15e3..9e91990 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RegisterModel.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RegisterModel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\WriteModel; +namespace Basango\IdentityAndAccess\Presentation\WriteModel; use Symfony\Component\Validator\Constraints as Assert; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RequestPasswordModel.php b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RequestPasswordModel.php index 7ff5f79..68d0110 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RequestPasswordModel.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/RequestPasswordModel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\WriteModel; +namespace Basango\IdentityAndAccess\Presentation\WriteModel; use Symfony\Component\Validator\Constraints as Assert; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/ResetPasswordModel.php b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/ResetPasswordModel.php index 7aeff90..34f973b 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/ResetPasswordModel.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/ResetPasswordModel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\WriteModel; +namespace Basango\IdentityAndAccess\Presentation\WriteModel; use Symfony\Component\Validator\Constraints as Assert; diff --git a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/UpdatePasswordModel.php b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/UpdatePasswordModel.php index aa38401..b694b73 100644 --- a/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/UpdatePasswordModel.php +++ b/projects/backend/src/IdentityAndAccess/Presentation/WriteModel/UpdatePasswordModel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\IdentityAndAccess\Presentation\WriteModel; +namespace Basango\IdentityAndAccess\Presentation\WriteModel; use Symfony\Component\Validator\Constraints as Assert; diff --git a/projects/backend/src/SharedKernel/Application/Asset/AssetType.php b/projects/backend/src/SharedKernel/Application/Asset/AssetType.php index 25963b2..4739adf 100644 --- a/projects/backend/src/SharedKernel/Application/Asset/AssetType.php +++ b/projects/backend/src/SharedKernel/Application/Asset/AssetType.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Asset; +namespace Basango\SharedKernel\Application\Asset; /** * Enum AssetType. diff --git a/projects/backend/src/SharedKernel/Application/Asset/AssetUrlProvider.php b/projects/backend/src/SharedKernel/Application/Asset/AssetUrlProvider.php index 0f8cddc..7bcfed4 100644 --- a/projects/backend/src/SharedKernel/Application/Asset/AssetUrlProvider.php +++ b/projects/backend/src/SharedKernel/Application/Asset/AssetUrlProvider.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Asset; +namespace Basango\SharedKernel\Application\Asset; /** * Class AssetUrlProvider. diff --git a/projects/backend/src/SharedKernel/Application/Mailing/EmailDefinition.php b/projects/backend/src/SharedKernel/Application/Mailing/EmailDefinition.php index 79d6941..b240f07 100644 --- a/projects/backend/src/SharedKernel/Application/Mailing/EmailDefinition.php +++ b/projects/backend/src/SharedKernel/Application/Mailing/EmailDefinition.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Mailing; +namespace Basango\SharedKernel\Application\Mailing; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; /** * Interface EmailDefinition. diff --git a/projects/backend/src/SharedKernel/Application/Mailing/Mailer.php b/projects/backend/src/SharedKernel/Application/Mailing/Mailer.php index f87d0e0..11eb00f 100644 --- a/projects/backend/src/SharedKernel/Application/Mailing/Mailer.php +++ b/projects/backend/src/SharedKernel/Application/Mailing/Mailer.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Mailing; +namespace Basango\SharedKernel\Application\Mailing; /** * Interface Mailer. diff --git a/projects/backend/src/SharedKernel/Application/Messaging/AsyncMessage.php b/projects/backend/src/SharedKernel/Application/Messaging/AsyncMessage.php index 009291a..2233d70 100644 --- a/projects/backend/src/SharedKernel/Application/Messaging/AsyncMessage.php +++ b/projects/backend/src/SharedKernel/Application/Messaging/AsyncMessage.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Messaging; +namespace Basango\SharedKernel\Application\Messaging; /** * Interface AsyncMessage. diff --git a/projects/backend/src/SharedKernel/Application/Messaging/CommandBus.php b/projects/backend/src/SharedKernel/Application/Messaging/CommandBus.php index 8121f35..867a323 100644 --- a/projects/backend/src/SharedKernel/Application/Messaging/CommandBus.php +++ b/projects/backend/src/SharedKernel/Application/Messaging/CommandBus.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Messaging; +namespace Basango\SharedKernel\Application\Messaging; /** * Interface CommandBus. diff --git a/projects/backend/src/SharedKernel/Application/Messaging/CommandHandler.php b/projects/backend/src/SharedKernel/Application/Messaging/CommandHandler.php index a9cd9ea..c34f1b0 100644 --- a/projects/backend/src/SharedKernel/Application/Messaging/CommandHandler.php +++ b/projects/backend/src/SharedKernel/Application/Messaging/CommandHandler.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Messaging; +namespace Basango\SharedKernel\Application\Messaging; /** * Interface CommandHandler. diff --git a/projects/backend/src/SharedKernel/Application/Messaging/MessageBus.php b/projects/backend/src/SharedKernel/Application/Messaging/MessageBus.php index 81051af..9203dfc 100644 --- a/projects/backend/src/SharedKernel/Application/Messaging/MessageBus.php +++ b/projects/backend/src/SharedKernel/Application/Messaging/MessageBus.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Messaging; +namespace Basango\SharedKernel\Application\Messaging; /** * Interface MessageBus. diff --git a/projects/backend/src/SharedKernel/Application/Messaging/MessageHandler.php b/projects/backend/src/SharedKernel/Application/Messaging/MessageHandler.php index 3e3e446..6d8a7d8 100644 --- a/projects/backend/src/SharedKernel/Application/Messaging/MessageHandler.php +++ b/projects/backend/src/SharedKernel/Application/Messaging/MessageHandler.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Messaging; +namespace Basango\SharedKernel\Application\Messaging; /** * Interface MessageHandler. diff --git a/projects/backend/src/SharedKernel/Application/Messaging/QueryBus.php b/projects/backend/src/SharedKernel/Application/Messaging/QueryBus.php index 1987e89..fb2570d 100644 --- a/projects/backend/src/SharedKernel/Application/Messaging/QueryBus.php +++ b/projects/backend/src/SharedKernel/Application/Messaging/QueryBus.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Messaging; +namespace Basango\SharedKernel\Application\Messaging; /** * Interface QueryBus. diff --git a/projects/backend/src/SharedKernel/Application/Messaging/QueryHandler.php b/projects/backend/src/SharedKernel/Application/Messaging/QueryHandler.php index e88190c..333c250 100644 --- a/projects/backend/src/SharedKernel/Application/Messaging/QueryHandler.php +++ b/projects/backend/src/SharedKernel/Application/Messaging/QueryHandler.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Application\Messaging; +namespace Basango\SharedKernel\Application\Messaging; /** * Interface QueryHandler. diff --git a/projects/backend/src/SharedKernel/Domain/Application.php b/projects/backend/src/SharedKernel/Domain/Application.php index 2f2b1b3..215caaf 100644 --- a/projects/backend/src/SharedKernel/Domain/Application.php +++ b/projects/backend/src/SharedKernel/Domain/Application.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain; +namespace Basango\SharedKernel\Domain; /** * Class Application. diff --git a/projects/backend/src/SharedKernel/Domain/Assert.php b/projects/backend/src/SharedKernel/Domain/Assert.php index 265829d..8f8de44 100644 --- a/projects/backend/src/SharedKernel/Domain/Assert.php +++ b/projects/backend/src/SharedKernel/Domain/Assert.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain; +namespace Basango\SharedKernel\Domain; -use App\SharedKernel\Domain\Exception\InvalidArgument; +use Basango\SharedKernel\Domain\Exception\InvalidArgument; /** * Class Assert. diff --git a/projects/backend/src/SharedKernel/Domain/DataTransfert/DataExporter.php b/projects/backend/src/SharedKernel/Domain/DataTransfert/DataExporter.php index cbcee8a..6c6d46b 100644 --- a/projects/backend/src/SharedKernel/Domain/DataTransfert/DataExporter.php +++ b/projects/backend/src/SharedKernel/Domain/DataTransfert/DataExporter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\DataTransfert; +namespace Basango\SharedKernel\Domain\DataTransfert; /** * Interface DataExporter. diff --git a/projects/backend/src/SharedKernel/Domain/DataTransfert/DataImporter.php b/projects/backend/src/SharedKernel/Domain/DataTransfert/DataImporter.php index 1a0b798..d5360c3 100644 --- a/projects/backend/src/SharedKernel/Domain/DataTransfert/DataImporter.php +++ b/projects/backend/src/SharedKernel/Domain/DataTransfert/DataImporter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\DataTransfert; +namespace Basango\SharedKernel\Domain\DataTransfert; /** * Class DataImporter. diff --git a/projects/backend/src/SharedKernel/Domain/DataTransfert/DataMapping.php b/projects/backend/src/SharedKernel/Domain/DataTransfert/DataMapping.php index 521f3a5..63df3de 100644 --- a/projects/backend/src/SharedKernel/Domain/DataTransfert/DataMapping.php +++ b/projects/backend/src/SharedKernel/Domain/DataTransfert/DataMapping.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\DataTransfert; +namespace Basango\SharedKernel\Domain\DataTransfert; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; use BackedEnum as T; use Symfony\Component\Uid\UuidV7; diff --git a/projects/backend/src/SharedKernel/Domain/DataTransfert/TransfertSetting.php b/projects/backend/src/SharedKernel/Domain/DataTransfert/TransfertSetting.php index a88754a..17dbf0e 100644 --- a/projects/backend/src/SharedKernel/Domain/DataTransfert/TransfertSetting.php +++ b/projects/backend/src/SharedKernel/Domain/DataTransfert/TransfertSetting.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\DataTransfert; +namespace Basango\SharedKernel\Domain\DataTransfert; /** * Class TransfertSetting. diff --git a/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventDispatcher.php b/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventDispatcher.php index 7285dec..0219fcf 100644 --- a/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventDispatcher.php +++ b/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventDispatcher.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\EventDispatcher; +namespace Basango\SharedKernel\Domain\EventDispatcher; /** * Interface EventDispatcher. diff --git a/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventEmitterTrait.php b/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventEmitterTrait.php index 34948e0..dcc03ed 100644 --- a/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventEmitterTrait.php +++ b/projects/backend/src/SharedKernel/Domain/EventDispatcher/EventEmitterTrait.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\EventDispatcher; +namespace Basango\SharedKernel\Domain\EventDispatcher; /** * Trait EventEmitterTrait. diff --git a/projects/backend/src/SharedKernel/Domain/EventListener/EventListener.php b/projects/backend/src/SharedKernel/Domain/EventListener/EventListener.php index 5719b74..ac0d288 100644 --- a/projects/backend/src/SharedKernel/Domain/EventListener/EventListener.php +++ b/projects/backend/src/SharedKernel/Domain/EventListener/EventListener.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\EventListener; +namespace Basango\SharedKernel\Domain\EventListener; /** * Interface EventListener. diff --git a/projects/backend/src/SharedKernel/Domain/Exception/InvalidArgument.php b/projects/backend/src/SharedKernel/Domain/Exception/InvalidArgument.php index b2c77c8..be4a6c1 100644 --- a/projects/backend/src/SharedKernel/Domain/Exception/InvalidArgument.php +++ b/projects/backend/src/SharedKernel/Domain/Exception/InvalidArgument.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Exception; +namespace Basango\SharedKernel\Domain\Exception; /** * Class InvalidArgument. diff --git a/projects/backend/src/SharedKernel/Domain/Exception/InvalidEmailAddress.php b/projects/backend/src/SharedKernel/Domain/Exception/InvalidEmailAddress.php index 9320b00..b25215d 100644 --- a/projects/backend/src/SharedKernel/Domain/Exception/InvalidEmailAddress.php +++ b/projects/backend/src/SharedKernel/Domain/Exception/InvalidEmailAddress.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Exception; +namespace Basango\SharedKernel\Domain\Exception; /** * Class InvalidEmailAddress. diff --git a/projects/backend/src/SharedKernel/Domain/Exception/UserFacingError.php b/projects/backend/src/SharedKernel/Domain/Exception/UserFacingError.php index 894108e..e4ac4eb 100644 --- a/projects/backend/src/SharedKernel/Domain/Exception/UserFacingError.php +++ b/projects/backend/src/SharedKernel/Domain/Exception/UserFacingError.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Exception; +namespace Basango\SharedKernel\Domain\Exception; /** * Interface UserFacingError. diff --git a/projects/backend/src/SharedKernel/Domain/Model/Collection/Collection.php b/projects/backend/src/SharedKernel/Domain/Model/Collection/Collection.php index 59eec20..b22f243 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/Collection/Collection.php +++ b/projects/backend/src/SharedKernel/Domain/Model/Collection/Collection.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\Collection; +namespace Basango\SharedKernel\Domain\Model\Collection; use Doctrine\Common\Collections\Collection as DoctrineCollection; diff --git a/projects/backend/src/SharedKernel/Domain/Model/Collection/DataCollection.php b/projects/backend/src/SharedKernel/Domain/Model/Collection/DataCollection.php index 944f792..6880f31 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/Collection/DataCollection.php +++ b/projects/backend/src/SharedKernel/Domain/Model/Collection/DataCollection.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\Collection; +namespace Basango\SharedKernel\Domain\Model\Collection; use Doctrine\Common\Collections\ArrayCollection as DoctrineArrayCollection; diff --git a/projects/backend/src/SharedKernel/Domain/Model/Pagination/Page.php b/projects/backend/src/SharedKernel/Domain/Model/Pagination/Page.php index 2ff16c2..5c6cc61 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/Pagination/Page.php +++ b/projects/backend/src/SharedKernel/Domain/Model/Pagination/Page.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\Pagination; +namespace Basango\SharedKernel\Domain\Model\Pagination; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * Class Page. diff --git a/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationCursor.php b/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationCursor.php index afe74ab..fe4ba2b 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationCursor.php +++ b/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationCursor.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\Pagination; +namespace Basango\SharedKernel\Domain\Model\Pagination; -use App\SharedKernel\Domain\DataTransfert\DataMapping; +use Basango\SharedKernel\Domain\DataTransfert\DataMapping; use Symfony\Component\Uid\UuidV7; /** diff --git a/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationInfo.php b/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationInfo.php index b0f0e71..3de5e34 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationInfo.php +++ b/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginationInfo.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\Pagination; +namespace Basango\SharedKernel\Domain\Model\Pagination; /** * Class PaginationInfo. diff --git a/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginatorKeyset.php b/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginatorKeyset.php index 47d588d..fdc97aa 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginatorKeyset.php +++ b/projects/backend/src/SharedKernel/Domain/Model/Pagination/PaginatorKeyset.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\Pagination; +namespace Basango\SharedKernel\Domain\Model\Pagination; /** * Class PaginatorKeyset. diff --git a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/DateRange.php b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/DateRange.php index 5e13463..6674387 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/DateRange.php +++ b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/DateRange.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\ValueObject; +namespace Basango\SharedKernel\Domain\Model\ValueObject; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; use DateTime; /** diff --git a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/EmailAddress.php b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/EmailAddress.php index bb6f1e3..19531ff 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/EmailAddress.php +++ b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/EmailAddress.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\ValueObject; +namespace Basango\SharedKernel\Domain\Model\ValueObject; -use App\SharedKernel\Domain\Assert; -use App\SharedKernel\Domain\Exception\InvalidEmailAddress; +use Basango\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Exception\InvalidEmailAddress; /** * Class EmailAddress. diff --git a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/SortDirection.php b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/SortDirection.php index a635462..dc642fe 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/SortDirection.php +++ b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/SortDirection.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\ValueObject; +namespace Basango\SharedKernel\Domain\Model\ValueObject; /** * Enum SortDirection. diff --git a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/ClientProfile.php b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/ClientProfile.php index 9eb55d9..53f9f10 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/ClientProfile.php +++ b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/ClientProfile.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\ValueObject\Tracking; +namespace Basango\SharedKernel\Domain\Model\ValueObject\Tracking; /** * Class ClientProfile. diff --git a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/Device.php b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/Device.php index 39a4b3b..0bb1de6 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/Device.php +++ b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/Device.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\ValueObject\Tracking; +namespace Basango\SharedKernel\Domain\Model\ValueObject\Tracking; /** * Class Device. diff --git a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/GeoLocation.php b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/GeoLocation.php index 468bf44..b75e183 100644 --- a/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/GeoLocation.php +++ b/projects/backend/src/SharedKernel/Domain/Model/ValueObject/Tracking/GeoLocation.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Model\ValueObject\Tracking; +namespace Basango\SharedKernel\Domain\Model\ValueObject\Tracking; -use App\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Assert; /** * Class GeoLocation. diff --git a/projects/backend/src/SharedKernel/Domain/Tracking/ClientProfiler.php b/projects/backend/src/SharedKernel/Domain/Tracking/ClientProfiler.php index c17ec73..a56457f 100644 --- a/projects/backend/src/SharedKernel/Domain/Tracking/ClientProfiler.php +++ b/projects/backend/src/SharedKernel/Domain/Tracking/ClientProfiler.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\SharedKernel\Domain\Tracking; +namespace Basango\SharedKernel\Domain\Tracking; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\Device; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\Device; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; /** * Class ClientProfiler. diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/EventDispatcher/SymfonyEventDispatcher.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/EventDispatcher/SymfonyEventDispatcher.php index d1d8460..1ba8bd8 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/EventDispatcher/SymfonyEventDispatcher.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/EventDispatcher/SymfonyEventDispatcher.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony\EventDispatcher; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony\EventDispatcher; -use App\SharedKernel\Domain\EventDispatcher\EventDispatcher; +use Basango\SharedKernel\Domain\EventDispatcher\EventDispatcher; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Kernel.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Kernel.php index f2b6873..123f505 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Kernel.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Kernel.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Component\HttpKernel\Kernel as BaseKernel; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/NormalizerFormatter.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/NormalizerFormatter.php index a0ecf78..1c624db 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/NormalizerFormatter.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/NormalizerFormatter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony\Logging; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony\Logging; use Monolog\Formatter\FormatterInterface; use Monolog\Formatter\NormalizerFormatter as MonologNormalizerFormatter; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/TelegramFormatter.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/TelegramFormatter.php index a8ce365..5043c53 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/TelegramFormatter.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Logging/TelegramFormatter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony\Logging; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony\Logging; use Monolog\LogRecord; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Mailing/SymfonyMailer.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Mailing/SymfonyMailer.php index 0539cff..67e665f 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Mailing/SymfonyMailer.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Mailing/SymfonyMailer.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony\Mailing; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony\Mailing; -use App\SharedKernel\Application\Mailing\EmailDefinition; -use App\SharedKernel\Application\Mailing\Mailer; -use App\SharedKernel\Domain\Application; +use Basango\SharedKernel\Application\Mailing\EmailDefinition; +use Basango\SharedKernel\Application\Mailing\Mailer; +use Basango\SharedKernel\Domain\Application; use Symfony\Bridge\Twig\Mime\TemplatedEmail; use Symfony\Component\Mailer\Exception\TransportExceptionInterface; use Symfony\Component\Mailer\MailerInterface; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerCommandBus.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerCommandBus.php index 3d058ca..f1fd3f1 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerCommandBus.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerCommandBus.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony\Messaging; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony\Messaging; -use App\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Application\Messaging\CommandBus; use Symfony\Component\Messenger\Exception\HandlerFailedException; use Symfony\Component\Messenger\HandleTrait; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerMessageBus.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerMessageBus.php index 5ff2272..75e4e64 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerMessageBus.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerMessageBus.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony\Messaging; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony\Messaging; -use App\SharedKernel\Application\Messaging\AsyncMessage; -use App\SharedKernel\Application\Messaging\MessageBus; +use Basango\SharedKernel\Application\Messaging\AsyncMessage; +use Basango\SharedKernel\Application\Messaging\MessageBus; use Symfony\Component\Messenger\Exception\ExceptionInterface; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerQueryBus.php b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerQueryBus.php index 82b05ce..ead69e5 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerQueryBus.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Framework/Symfony/Messaging/MessengerQueryBus.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Framework\Symfony\Messaging; +namespace Basango\SharedKernel\Infrastructure\Framework\Symfony\Messaging; -use App\SharedKernel\Application\Messaging\QueryBus; +use Basango\SharedKernel\Application\Messaging\QueryBus; use Symfony\Component\Messenger\Exception\HandlerFailedException; use Symfony\Component\Messenger\HandleTrait; use Symfony\Component\Messenger\MessageBusInterface; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Features/PaginationQuery.php b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Features/PaginationQuery.php index 1d3ba05..cee12b3 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Features/PaginationQuery.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Features/PaginationQuery.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features; +namespace Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Features; -use App\SharedKernel\Domain\Model\Pagination\Page; -use App\SharedKernel\Domain\Model\Pagination\PaginationCursor; -use App\SharedKernel\Domain\Model\Pagination\PaginationInfo; -use App\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; +use Basango\SharedKernel\Domain\Model\Pagination\Page; +use Basango\SharedKernel\Domain\Model\Pagination\PaginationCursor; +use Basango\SharedKernel\Domain\Model\Pagination\PaginationInfo; +use Basango\SharedKernel\Domain\Model\Pagination\PaginatorKeyset; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/NoResult.php b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/NoResult.php index 354623f..569fbe3 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/NoResult.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/NoResult.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL; +namespace Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL; /** * Class NoResult. diff --git a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Types/EmailType.php b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Types/EmailType.php index aa4eb09..d72be3a 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Types/EmailType.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Doctrine/DBAL/Types/EmailType.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Types; +namespace Basango\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Types; -use App\SharedKernel\Domain\Model\ValueObject\EmailAddress; +use Basango\SharedKernel\Domain\Model\ValueObject\EmailAddress; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Types\ConversionException; use Doctrine\DBAL\Types\Type; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/Asset/AssetUrlProvider.php b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/Asset/AssetUrlProvider.php index 2d10ce0..eabdef2 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/Asset/AssetUrlProvider.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/Asset/AssetUrlProvider.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Persistence\Filesystem\Asset; +namespace Basango\SharedKernel\Infrastructure\Persistence\Filesystem\Asset; -use App\SharedKernel\Application\Asset\AssetType; -use App\SharedKernel\Application\Asset\AssetUrlProvider as AssetUrlProviderInterface; +use Basango\SharedKernel\Application\Asset\AssetType; +use Basango\SharedKernel\Application\Asset\AssetUrlProvider as AssetUrlProviderInterface; use Symfony\Component\DependencyInjection\Attribute\Autowire; /** diff --git a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/DataTransfert.php b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/DataTransfert.php index 46f9e40..2500978 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/DataTransfert.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Persistence/Filesystem/DataTransfert.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Persistence\Filesystem; +namespace Basango\SharedKernel\Infrastructure\Persistence\Filesystem; -use App\SharedKernel\Domain\Assert; -use App\SharedKernel\Domain\DataTransfert\DataExporter; -use App\SharedKernel\Domain\DataTransfert\DataImporter; -use App\SharedKernel\Domain\DataTransfert\TransfertSetting; +use Basango\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\DataTransfert\DataExporter; +use Basango\SharedKernel\Domain\DataTransfert\DataImporter; +use Basango\SharedKernel\Domain\DataTransfert\TransfertSetting; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Serializer\SerializerInterface; diff --git a/projects/backend/src/SharedKernel/Infrastructure/Tracking/ClientProfiler.php b/projects/backend/src/SharedKernel/Infrastructure/Tracking/ClientProfiler.php index cd2e012..46d2982 100644 --- a/projects/backend/src/SharedKernel/Infrastructure/Tracking/ClientProfiler.php +++ b/projects/backend/src/SharedKernel/Infrastructure/Tracking/ClientProfiler.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace App\SharedKernel\Infrastructure\Tracking; +namespace Basango\SharedKernel\Infrastructure\Tracking; -use App\SharedKernel\Domain\Assert; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\Device; -use App\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; -use App\SharedKernel\Domain\Tracking\ClientProfiler as ClientProfilerInterface; +use Basango\SharedKernel\Domain\Assert; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\ClientProfile; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\Device; +use Basango\SharedKernel\Domain\Model\ValueObject\Tracking\GeoLocation; +use Basango\SharedKernel\Domain\Tracking\ClientProfiler as ClientProfilerInterface; use DeviceDetector\ClientHints; use DeviceDetector\DeviceDetector; use DeviceDetector\Parser\Client\Browser; diff --git a/projects/backend/src/SharedKernel/Presentation/Console/AskArgumentFeature.php b/projects/backend/src/SharedKernel/Presentation/Console/AskArgumentFeature.php index 6441d46..848a2c2 100644 --- a/projects/backend/src/SharedKernel/Presentation/Console/AskArgumentFeature.php +++ b/projects/backend/src/SharedKernel/Presentation/Console/AskArgumentFeature.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Presentation\Console; +namespace Basango\SharedKernel\Presentation\Console; use Symfony\Component\Console\Input\InputInterface; diff --git a/projects/backend/src/SharedKernel/Presentation/Web/Controller/AbstractController.php b/projects/backend/src/SharedKernel/Presentation/Web/Controller/AbstractController.php index 9332826..21f57b0 100644 --- a/projects/backend/src/SharedKernel/Presentation/Web/Controller/AbstractController.php +++ b/projects/backend/src/SharedKernel/Presentation/Web/Controller/AbstractController.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace App\SharedKernel\Presentation\Web\Controller; +namespace Basango\SharedKernel\Presentation\Web\Controller; -use App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUser; -use App\SharedKernel\Application\Messaging\CommandBus; -use App\SharedKernel\Application\Messaging\QueryBus; +use Basango\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUser; +use Basango\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Application\Messaging\QueryBus; use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as SymfonyController; use Symfony\Component\HttpFoundation\Response; diff --git a/projects/backend/src/SharedKernel/Presentation/Web/Controller/DefaultController.php b/projects/backend/src/SharedKernel/Presentation/Web/Controller/DefaultController.php index c191fa1..af99a74 100644 --- a/projects/backend/src/SharedKernel/Presentation/Web/Controller/DefaultController.php +++ b/projects/backend/src/SharedKernel/Presentation/Web/Controller/DefaultController.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\SharedKernel\Presentation\Web\Controller; +namespace Basango\SharedKernel\Presentation\Web\Controller; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\Routing\Attribute\Route; diff --git a/projects/backend/src/SharedKernel/Presentation/Web/EventListener/UserFacingErrorListener.php b/projects/backend/src/SharedKernel/Presentation/Web/EventListener/UserFacingErrorListener.php index 3792610..5ab987c 100644 --- a/projects/backend/src/SharedKernel/Presentation/Web/EventListener/UserFacingErrorListener.php +++ b/projects/backend/src/SharedKernel/Presentation/Web/EventListener/UserFacingErrorListener.php @@ -2,18 +2,19 @@ declare(strict_types=1); -namespace App\SharedKernel\Presentation\Web\EventListener; +namespace Basango\SharedKernel\Presentation\Web\EventListener; -use App\Aggregator\Domain\Exception\ArticleNotFound; -use App\Aggregator\Domain\Exception\SourceNotFound; -use App\FeedManagement\Domain\Exception\BookmarkedArticleNotFound; -use App\FeedManagement\Domain\Exception\BookmarkNotFound; -use App\FeedManagement\Domain\Exception\CommentNotFound; -use App\FeedManagement\Domain\Exception\FollowedSourceNotFound; -use App\IdentityAndAccess\Domain\Exception\PermissionNotGranted; -use App\IdentityAndAccess\Domain\Exception\UserNotFound; -use App\SharedKernel\Domain\Exception\InvalidArgument; -use App\SharedKernel\Domain\Exception\UserFacingError; +use Basango\Aggregator\Domain\Exception\ArticleNotFound; +use Basango\Aggregator\Domain\Exception\DuplicatedArticle; +use Basango\Aggregator\Domain\Exception\SourceNotFound; +use Basango\FeedManagement\Domain\Exception\BookmarkedArticleNotFound; +use Basango\FeedManagement\Domain\Exception\BookmarkNotFound; +use Basango\FeedManagement\Domain\Exception\CommentNotFound; +use Basango\FeedManagement\Domain\Exception\FollowedSourceNotFound; +use Basango\IdentityAndAccess\Domain\Exception\PermissionNotGranted; +use Basango\IdentityAndAccess\Domain\Exception\UserNotFound; +use Basango\SharedKernel\Domain\Exception\InvalidArgument; +use Basango\SharedKernel\Domain\Exception\UserFacingError; use Symfony\Component\EventDispatcher\Attribute\AsEventListener; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; @@ -47,6 +48,10 @@ final readonly class UserFacingErrorListener PermissionNotGranted::class, ]; + private const array CONFLICT_EXCEPTIONS = [ + DuplicatedArticle::class, + ]; + public function __construct( private TranslatorInterface $translator ) { @@ -80,6 +85,7 @@ final readonly class UserFacingErrorListener in_array($exception::class, self::NOT_FOUND_EXCEPTIONS) => Response::HTTP_NOT_FOUND, in_array($exception::class, self::BAD_REQUEST_EXCEPTIONS) => Response::HTTP_BAD_REQUEST, in_array($exception::class, self::FORBIDDEN_EXCEPTIONS) => Response::HTTP_FORBIDDEN, + in_array($exception::class, self::CONFLICT_EXCEPTIONS) => Response::HTTP_CONFLICT, default => Response::HTTP_UNPROCESSABLE_ENTITY }; } diff --git a/projects/backend/tests/Behat/Context/AbstractContext.php b/projects/backend/tests/Behat/Context/AbstractContext.php index ad7a689..cf19bf5 100644 --- a/projects/backend/tests/Behat/Context/AbstractContext.php +++ b/projects/backend/tests/Behat/Context/AbstractContext.php @@ -4,8 +4,8 @@ declare(strict_types=1); namespace Tests\Behat\Context; -use App\SharedKernel\Application\Messaging\CommandBus; -use App\SharedKernel\Application\Messaging\QueryBus; +use Basango\SharedKernel\Application\Messaging\CommandBus; +use Basango\SharedKernel\Application\Messaging\QueryBus; use Behat\Behat\Context\Context; use Symfony\Contracts\Service\ServiceMethodsSubscriberTrait; use Symfony\Contracts\Service\ServiceSubscriberInterface; diff --git a/projects/backend/tests/Unit/Aggregator/Domain/Model/ValueObject/PageRangeTest.php b/projects/backend/tests/Unit/Aggregator/Domain/Model/ValueObject/PageRangeTest.php index 582e7c7..a698a5f 100644 --- a/projects/backend/tests/Unit/Aggregator/Domain/Model/ValueObject/PageRangeTest.php +++ b/projects/backend/tests/Unit/Aggregator/Domain/Model/ValueObject/PageRangeTest.php @@ -4,8 +4,8 @@ declare(strict_types=1); namespace Tests\Unit\Aggregator\Domain\Model\ValueObject; -use App\Aggregator\Domain\Model\ValueObject\Crawling\PageRange; -use App\SharedKernel\Domain\Exception\InvalidArgument; +use Basango\Aggregator\Domain\Model\ValueObject\Crawling\PageRange; +use Basango\SharedKernel\Domain\Exception\InvalidArgument; use PHPUnit\Framework\TestCase; /** diff --git a/projects/backend/tests/Unit/Aggregator/Domain/Service/DateParserTest.php b/projects/backend/tests/Unit/Aggregator/Domain/Service/DateParserTest.php index dcc04b3..0350701 100644 --- a/projects/backend/tests/Unit/Aggregator/Domain/Service/DateParserTest.php +++ b/projects/backend/tests/Unit/Aggregator/Domain/Service/DateParserTest.php @@ -4,7 +4,7 @@ declare(strict_types=1); namespace Tests\Unit\Aggregator\Domain\Service; -use App\Aggregator\Domain\Service\Crawling\DateParser; +use Basango\Aggregator\Domain\Service\Crawling\DateParser; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; diff --git a/projects/backend/tests/Unit/SharedKernel/Domain/Model/ValueObject/DateRangeTest.php b/projects/backend/tests/Unit/SharedKernel/Domain/Model/ValueObject/DateRangeTest.php index 6905bd8..f67d99e 100644 --- a/projects/backend/tests/Unit/SharedKernel/Domain/Model/ValueObject/DateRangeTest.php +++ b/projects/backend/tests/Unit/SharedKernel/Domain/Model/ValueObject/DateRangeTest.php @@ -4,8 +4,8 @@ declare(strict_types=1); namespace Tests\Unit\SharedKernel\Domain\Model\ValueObject; -use App\SharedKernel\Domain\Exception\InvalidArgument; -use App\SharedKernel\Domain\Model\ValueObject\DateRange; +use Basango\SharedKernel\Domain\Exception\InvalidArgument; +use Basango\SharedKernel\Domain\Model\ValueObject\DateRange; use PHPUnit\Framework\TestCase; /** diff --git a/projects/backend/tests/object-manager.php b/projects/backend/tests/object-manager.php index 451d163..cdd4389 100644 --- a/projects/backend/tests/object-manager.php +++ b/projects/backend/tests/object-manager.php @@ -2,7 +2,7 @@ declare(strict_types=1); -use App\SharedKernel\Infrastructure\Framework\Symfony\Kernel; +use Basango\SharedKernel\Infrastructure\Framework\Symfony\Kernel; use Symfony\Component\Dotenv\Dotenv; require __DIR__ . '/../vendor/autoload.php'; diff --git a/projects/crawler/.env b/projects/crawler/.env index 139597f..741a97d 100644 --- a/projects/crawler/.env +++ b/projects/crawler/.env @@ -1,2 +1,7 @@ - - +BASANGO_CRAWLER_TOKEN=some-token +BASANGO_API_ENDPOINT=http://localhost:8000/api/aggregator/articles?token=dev +BASANGO_REDIS_URL=redis://localhost:6379/0 +BASANGO_QUEUE_PREFIX=basango +BASANGO_QUEUE_TIMEOUT=30 +BASANGO_QUEUE_RESULT_TTL=3600 +BASANGO_QUEUE_FAILURE_TTL=86400 diff --git a/projects/crawler/src/basango/cli.py b/projects/crawler/src/basango/cli.py index 5d18132..bebaac1 100644 --- a/projects/crawler/src/basango/cli.py +++ b/projects/crawler/src/basango/cli.py @@ -26,7 +26,7 @@ import typer from basango.core.config import CrawlerConfig from basango.core.config_manager import ConfigManager from basango.domain import DateRange, PageRange, UpdateDirection -from basango.services import CsvPersistor, JsonPersistor +from basango.services import JsonPersistor from basango.services.crawler.async_api import ( QueueSettings, schedule_async_crawl, @@ -109,10 +109,6 @@ def crawl_cmd( source_identifier = getattr(source, "source_id", source_id) or source_id persistors = [ - CsvPersistor( - data_dir=pipeline.paths.data, - source_id=str(source_identifier), - ), JsonPersistor( data_dir=pipeline.paths.data, source_id=str(source_identifier), diff --git a/projects/crawler/src/basango/domain/article.py b/projects/crawler/src/basango/domain/article.py index 439ae68..7ad2f26 100644 --- a/projects/crawler/src/basango/domain/article.py +++ b/projects/crawler/src/basango/domain/article.py @@ -12,3 +12,14 @@ class Article(BaseModel): source: str timestamp: datetime metadata: Optional[dict[str, Any]] = None + + def to_dict(self) -> dict[str, Any]: + return { + "title": self.title, + "link": str(self.link), + "body": self.body, + "categories": self.categories, + "source": self.source, + "timestamp": int(self.timestamp.timestamp()), + "metadata": self.metadata, + } diff --git a/projects/crawler/src/basango/services/__init__.py b/projects/crawler/src/basango/services/__init__.py index 6dee296..bc33387 100644 --- a/projects/crawler/src/basango/services/__init__.py +++ b/projects/crawler/src/basango/services/__init__.py @@ -1,7 +1,7 @@ from .date_parser import DateParser from .http_client import BaseHttpClient, SyncHttpClient, AsyncHttpClient from .open_graph import OpenGraphProvider -from .persistence import BasePersistor, CsvPersistor, JsonPersistor, ApiPersistor +from .persistence import BasePersistor, CsvPersistor, JsonPersistor from .user_agents import UserAgentProvider HttpClient = SyncHttpClient @@ -17,5 +17,4 @@ __all__ = [ "BasePersistor", "CsvPersistor", "JsonPersistor", - "ApiPersistor", ] diff --git a/projects/crawler/src/basango/services/crawler/async/schemas.py b/projects/crawler/src/basango/services/crawler/async/schemas.py index 43be121..ca78cb2 100644 --- a/projects/crawler/src/basango/services/crawler/async/schemas.py +++ b/projects/crawler/src/basango/services/crawler/async/schemas.py @@ -10,6 +10,8 @@ Notes from dataclasses import asdict, dataclass, fields from typing import Any, Mapping +from basango.domain.article import Article + def _coerce_kwargs(cls, data: Mapping[str, Any]) -> dict[str, Any]: return {field.name: data.get(field.name) for field in fields(cls)} @@ -51,8 +53,8 @@ class ArticleTaskPayload: @dataclass(slots=True) class ProcessedTaskPayload: source_id: str + article: Article env: str = "development" - article: Mapping[str, Any] | None = None def to_dict(self) -> dict[str, Any]: return asdict(self) diff --git a/projects/crawler/src/basango/services/crawler/async/tasks.py b/projects/crawler/src/basango/services/crawler/async/tasks.py index 135a9e5..f1f99db 100644 --- a/projects/crawler/src/basango/services/crawler/async/tasks.py +++ b/projects/crawler/src/basango/services/crawler/async/tasks.py @@ -13,13 +13,16 @@ Rationale - Persist locally (CSV/JSON) before forwarding to decouple pipelines. """ +import os import logging from typing import Any +from basango.domain.article import Article +from basango.services import SyncHttpClient from basango.core.config import CrawlerConfig from basango.core.config_manager import ConfigManager from basango.domain import DateRange, PageRange, SourceKind, UpdateDirection -from basango.services import CsvPersistor, JsonPersistor, ApiPersistor +from basango.services import JsonPersistor from basango.services.crawler.html_crawler import HtmlCrawler from basango.services.crawler.wordpress_crawler import WordpressCrawler @@ -95,7 +98,7 @@ def collect_listing(payload: dict[str, Any]) -> int: return queued -def collect_article(payload: dict[str, Any]) -> dict[str, Any] | None: +def collect_article(payload: dict[str, Any]) -> Article | None: data = ArticleTaskPayload.from_dict(payload) manager = ConfigManager() pipeline = manager.get(data.env) @@ -112,82 +115,85 @@ def collect_article(payload: dict[str, Any]) -> dict[str, Any] | None: direction=UpdateDirection.FORWARD, ) - source_identifier = getattr(source, "source_id", data.source_id) or data.source_id # Persist locally first to keep an auditable trail and enable # replay/recovery independent of downstream availability. persistors = [ - CsvPersistor( - data_dir=pipeline.paths.data, - source_id=str(source_identifier), - ), JsonPersistor( data_dir=pipeline.paths.data, - source_id=str(source_identifier), + source_id=str(source.source_id), ), ] - queue_manager = QueueManager() + try: + if source.source_kind == SourceKind.HTML: + article = _collect_html_article( + HtmlCrawler( + crawler_config, pipeline.fetch.client, persistors=persistors + ), + data, + ) + else: + article = _collect_wordpress_article( + WordpressCrawler( + crawler_config, pipeline.fetch.client, persistors=persistors + ), + data, + ) - if source.source_kind == SourceKind.HTML: - article = _collect_html_article( - HtmlCrawler(crawler_config, pipeline.fetch.client, persistors=persistors), - data, + queue_manager = QueueManager() + queue_manager.enqueue_processed( + ProcessedTaskPayload( + source_id=data.source_id, + env=data.env, + article=article, + ) ) - elif source.source_kind == SourceKind.WORDPRESS: - article = _collect_wordpress_article( - WordpressCrawler( - crawler_config, pipeline.fetch.client, persistors=persistors - ), - data, - ) - else: - logger.warning( - "Async crawling not supported for source kind %s", source.source_kind - ) - article = None - queue_manager.enqueue_processed( - ProcessedTaskPayload( - source_id=data.source_id, - env=data.env, - article=article, - ) - ) - if article: logger.info( - "Persisted article %s and forwarded to processed queue", - article.get("link"), + "Persisted article %s and forwarded to processed queue", article.link ) - else: - logger.info("Persisted article and forwarded to processed queue") - - return article + return article + except Exception as exc: # noqa: BLE001 + logger.error( + "Failed to collect article for source %s url %s: %s", + data.source_id, + data.url, + exc, + ) + return None -def forward_for_processing(payload: dict[str, Any]) -> dict[str, Any] | None: +def forward_for_processing(payload: dict[str, Any]) -> Article | None: data = ProcessedTaskPayload.from_dict(payload) manager = ConfigManager() pipeline = manager.get(data.env) - article = dict(data.article) if data.article is not None else None - if article is None: - logger.info( - "Ready for downstream processing: source=%s (no article)", data.source_id - ) - return None + article = data.article logger.info( "Ready for downstream processing: source=%s link=%s", data.source_id, - article.get("link"), + article.link, ) - # TODO: externalise endpoint into config; hardcoded for now during bring-up. - persistor = ApiPersistor( - endpoint="http://localhost:8000/api/articles", - client_config=pipeline.fetch.client, - ) - persistor.persist(article) - logger.info("Forwarded article %s to API", article.get("link")) + try: + client = SyncHttpClient(client_config=pipeline.fetch.client) + client.post( + os.getenv( + "BASANGO_API_ENDPOINT", + "http://localhost:8000/api/aggregator/articles?token=dev", + ), + json=article.to_dict(), + ) + + logger.info("Forwarded article %s to API", article.link) + return article + except Exception as exc: # noqa: BLE001 + logger.error( + "Failed to forward article %s to API: %s", + article.link, + exc, + ) + return None def _collect_html_listing( @@ -273,31 +279,27 @@ def _collect_wordpress_listing( def _collect_html_article( crawler: HtmlCrawler, payload: ArticleTaskPayload, -) -> dict[str, Any] | None: +) -> Article: if not payload.url: logger.warning("Missing article url for HTML source %s", payload.source_id) - return None + raise ValueError("Missing article url") crawler._current_article_url = payload.url # type: ignore[attr-defined] try: soup = crawler.crawl(payload.url) except Exception as exc: # noqa: BLE001 logger.exception("Failed to crawl article %s: %s", payload.url, exc) - return None + raise exc - crawler.fetch_one(str(soup), crawler.config.date_range) - crawler.completed(False) - return None + return crawler.fetch_one(str(soup), crawler.config.date_range) def _collect_wordpress_article( crawler: WordpressCrawler, payload: ArticleTaskPayload, -) -> dict[str, Any] | None: +) -> Article: if payload.data is None: logger.warning("Missing WordPress payload for source %s", payload.source_id) - return None + raise ValueError("Missing WordPress payload") - crawler.fetch_one(payload.data, crawler.config.date_range) - crawler.completed(False) - return None + return crawler.fetch_one(payload.data, crawler.config.date_range) diff --git a/projects/crawler/src/basango/services/crawler/base_crawler.py b/projects/crawler/src/basango/services/crawler/base_crawler.py index 3f2c65b..9241722 100644 --- a/projects/crawler/src/basango/services/crawler/base_crawler.py +++ b/projects/crawler/src/basango/services/crawler/base_crawler.py @@ -3,6 +3,7 @@ from abc import ABC, abstractmethod from dataclasses import asdict, is_dataclass from typing import Optional, Any, Dict, List, Sequence +from basango.domain.article import Article from bs4 import BeautifulSoup from basango.core.config import CrawlerConfig, ClientConfig @@ -46,7 +47,7 @@ class BaseCrawler(ABC): response = self.client.get(url).text return BeautifulSoup(response, "html.parser") - def record_article( + def save_article( self, *, title: str, @@ -55,7 +56,7 @@ class BaseCrawler(ABC): categories: List[str], timestamp: int, metadata: Any = None, - ) -> None: + ) -> Article: if metadata is None: metadata_value = None elif is_dataclass(metadata) and not isinstance(metadata, type): @@ -72,11 +73,16 @@ class BaseCrawler(ABC): "timestamp": timestamp, "metadata": metadata_value, } + self._persist(article) - logging.info(f"> {title} [saved]") + logging.info(f"> {article['title']} [saved]") + + return Article(**article) @abstractmethod - def fetch_one(self, html: str, date_range: Optional[DateRange] = None) -> None: + def fetch_one( + self, html: str, date_range: Optional[DateRange] = None + ) -> Article | None: pass @abstractmethod diff --git a/projects/crawler/src/basango/services/crawler/html_crawler.py b/projects/crawler/src/basango/services/crawler/html_crawler.py index 4d4837e..1011798 100644 --- a/projects/crawler/src/basango/services/crawler/html_crawler.py +++ b/projects/crawler/src/basango/services/crawler/html_crawler.py @@ -4,6 +4,7 @@ from datetime import datetime, timezone from typing import Optional, cast, override, Sequence from urllib.parse import parse_qs, urljoin, urlparse +from basango.domain.article import Article from bs4 import BeautifulSoup, Tag from basango.core.config import CrawlerConfig, ClientConfig @@ -116,7 +117,7 @@ class HtmlCrawler(BaseCrawler): self.completed(self.config.notify) @override - def fetch_one(self, html: str, date_range: Optional[DateRange] = None) -> None: + def fetch_one(self, html: str, date_range: Optional[DateRange] = None) -> Article: soup = BeautifulSoup(html, "html.parser") selectors = self.source.source_selectors @@ -124,7 +125,7 @@ class HtmlCrawler(BaseCrawler): link = self._current_article_url or self._extract_link(soup) if not link: logging.warning("Skipping article '%s' without link", title) - return + raise ValueError("Missing article link") body = self._extract_body(soup, selectors.article_body) categories = self._extract_categories(soup, selectors.article_categories) @@ -139,7 +140,7 @@ class HtmlCrawler(BaseCrawler): metadata = self.open_graph.consume_html(html) - self.record_article( + return self.save_article( title=title, link=link, body=body, diff --git a/projects/crawler/src/basango/services/crawler/wordpress_crawler.py b/projects/crawler/src/basango/services/crawler/wordpress_crawler.py index 8de2920..821c5f6 100644 --- a/projects/crawler/src/basango/services/crawler/wordpress_crawler.py +++ b/projects/crawler/src/basango/services/crawler/wordpress_crawler.py @@ -3,6 +3,7 @@ import logging from datetime import datetime, timezone from typing import Optional, override, cast, Final, Any, Sequence +from basango.domain.article import Article from bs4 import BeautifulSoup from basango.core.config import WordPressSourceConfig, CrawlerConfig, ClientConfig @@ -83,28 +84,27 @@ class WordpressCrawler(BaseCrawler): self.completed(self.config.notify) @override - def fetch_one(self, html: Any, date_range: Optional[DateRange] = None) -> None: + def fetch_one(self, html: Any, date_range: Optional[DateRange] = None) -> Article: try: data = json.loads(html) if isinstance(html, str) else html except json.JSONDecodeError as exc: logging.error("Failed to decode WordPress payload: %s", exc) - return + raise exc if not isinstance(data, dict): logging.error("Skipping unexpected WordPress payload: %s", type(data)) - return + raise ValueError("Unexpected WordPress payload type") link = data.get("link") if not link: logging.error("Skipping WordPress article without link") - return + raise ValueError("WordPress article without link") - title = BeautifulSoup( - data.get("title", {}).get("rendered", ""), "html.parser" - ).get_text(" ", strip=True) - body = BeautifulSoup( - data.get("content", {}).get("rendered", ""), "html.parser" - ).get_text(" ", strip=True) + title_html = data.get("title", {}).get("rendered", "") + body_html = data.get("content", {}).get("rendered", "") + + title = BeautifulSoup(title_html, "html.parser").get_text(" ", strip=True) + body = BeautifulSoup(body_html, "html.parser").get_text(" ", strip=True) timestamp = self._compute_timestamp(data.get("date")) categories_value = self._map_categories(data.get("categories", [])) @@ -115,7 +115,7 @@ class WordpressCrawler(BaseCrawler): metadata = self.open_graph.consume_url(link) - self.record_article( + return self.save_article( title=title or data.get("slug", "Untitled"), link=link, body=body, diff --git a/projects/crawler/src/basango/services/persistence/__init__.py b/projects/crawler/src/basango/services/persistence/__init__.py index 5e4bb1f..a529a77 100644 --- a/projects/crawler/src/basango/services/persistence/__init__.py +++ b/projects/crawler/src/basango/services/persistence/__init__.py @@ -1,11 +1,9 @@ from .base_persistor import BasePersistor from .csv_persistor import CsvPersistor from .json_persistor import JsonPersistor -from .api_persistor import ApiPersistor __all__ = [ "BasePersistor", "CsvPersistor", "JsonPersistor", - "ApiPersistor", ] diff --git a/projects/crawler/src/basango/services/persistence/api_persistor.py b/projects/crawler/src/basango/services/persistence/api_persistor.py deleted file mode 100644 index 2326126..0000000 --- a/projects/crawler/src/basango/services/persistence/api_persistor.py +++ /dev/null @@ -1,38 +0,0 @@ -import logging -from dataclasses import dataclass -from typing import Any, Mapping - -from basango.core.config import ClientConfig -from basango.services.http_client import SyncHttpClient - -from .base_persistor import BasePersistor - - -@dataclass -class ApiPersistor(BasePersistor): - endpoint: str - client_config: ClientConfig - raise_for_status: bool = True - - def __post_init__(self) -> None: - self.client = SyncHttpClient(client_config=self.client_config) - - def persist(self, article: Mapping[str, Any]) -> None: - """POST the article payload to an HTTP endpoint. - - By default `raise_for_status` is enabled so worker failures surface - quickly. Disable when using a fire-and-forget pipeline and rely on - logs/monitoring instead. - """ - try: - response = self.client.post(self.endpoint, json=article) - if self.raise_for_status: - response.raise_for_status() - except Exception as exc: # noqa: BLE001 - logging.exception( - "[ApiPersistor] Failed to persist article at %s: %s", - self.endpoint, - exc, - ) - if self.raise_for_status: - raise