Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
/build

.php-cs-fixer.cache

.idea/
4 changes: 4 additions & 0 deletions apps/mooc/backend/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ services:

# -- IMPLEMENTATIONS SELECTOR --
CodelyTv\Shared\Domain\Bus\Event\EventBus: '@CodelyTv\Shared\Infrastructure\Bus\Event\WithMonitoring\WithPrometheusMonitoringEventBus'

CodelyTv\Mooc\Notifications\Application\PublishInSocialMediaOnNewVideo:
arguments:
courseRepository: '@CodelyTv\Mooc\Courses\Infrastructure\Persistence'
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"elasticsearch/elasticsearch": "^7",
"monolog/monolog": "^3",

"endclothing/prometheus_client_php": "^1"
"endclothing/prometheus_client_php": "^1",
"ext-http": "*",
"symfony/http-client": "^6.1",
"abraham/twitteroauth": "^4.0"
},
"require-dev": {
"ext-xdebug": "*",
Expand Down
308 changes: 306 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@

use CodelyTv\Backoffice\Courses\Domain\BackofficeCourse;
use CodelyTv\Backoffice\Courses\Domain\BackofficeCourseRepository;
use CodelyTv\Mooc\Courses\Domain\CourseDuration;
use CodelyTv\Mooc\Courses\Domain\CourseName;
use CodelyTv\Mooc\Shared\Domain\Courses\CourseId;

final class BackofficeCourseCreator
{
public function __construct(private readonly BackofficeCourseRepository $repository)
{
}

public function create(string $id, string $name, string $duration): void
public function create(CourseId $id, CourseName $name, CourseDuration $duration): void
{
$this->repository->save(new BackofficeCourse($id, $name, $duration));
$this->repository->save(BackofficeCourse::create($id, $name, $duration));
}
}
Loading