Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
bernard-ng committed Aug 27, 2023
1 parent 1413de2 commit 94dc86a
Show file tree
Hide file tree
Showing 14 changed files with 582 additions and 681 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author bernard-ng <[email protected]>
*/
final class EmailQrCode
final class DashliteEmailQrCode
{
public string $title = '';
public string $src = '';
Expand Down
1,019 changes: 517 additions & 502 deletions composer.lock

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions config/domains/content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ services:
Domain\Content\Repository\CategoryRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\CategoryRepository'
Domain\Content\Repository\CommentRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\CommentRepository'
Domain\Content\Repository\ContentRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\ContentRepository'
Domain\Content\Repository\PodcastEpisodeRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\PodcastEpisodeRepository'
Domain\Content\Repository\PodcastSeasonRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\PodcastSeasonRepository'
Domain\Content\Repository\PodcastEpisodeRepositoryInterface: '@EpisodeRepository'
Domain\Content\Repository\PodcastSeasonRepositoryInterface: '@SeasonRepository'
Domain\Content\Repository\PostRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\PostRepository'
Domain\Content\Repository\PostListRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\PostListRepository'
Domain\Content\Repository\PostSeriesRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\PostSeriesRepository'
Domain\Content\Repository\ProgressionRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\ProgressionRepository'
Domain\Content\Repository\RatingRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\RatingRepository'
Domain\Content\Repository\SubjectProposalRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\SubjectProposalRepository'
Domain\Content\Repository\SubjectProposalVoteRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\SubjectProposalVoteRepository'
Domain\Content\Repository\TagRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\TagRepository'
Domain\Content\Repository\TechnologyRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\TechnologyRepository'
Domain\Content\Repository\VideoRepositoryInterface: '@Infrastructure\Content\Doctrine\Repository\VideoRepository'
Expand Down
2 changes: 1 addition & 1 deletion config/packages/devscast_dashlite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ devscast_dashlite:
application:
name: Devscast Community
title: devscast.org
logo_path: '/images/logo.webp'
logo_path: '/images/logo-full.png'
icon_path: '/images/favicon.webp'
version: 1.0.0
copyrights: Devscast Community Plateforme
Expand Down
16 changes: 13 additions & 3 deletions config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,20 @@ doctrine:
dir: '%kernel.project_dir%/src/Infrastructure/Content/Doctrine/Mapping/Entity'
prefix: 'Domain\Content\Entity'
is_bundle: false
Domain\Content\ValueObject:
Domain\Content\Entity\Blog:
type: xml
dir: '%kernel.project_dir%/src/Infrastructure/Content/Doctrine/Mapping/ValueObject'
prefix: 'Domain\Content\ValueObject'
dir: '%kernel.project_dir%/src/Infrastructure/Content/Doctrine/Mapping/Entity/Blog'
prefix: 'Domain\Content\Entity\Blog'
is_bundle: false
Domain\Content\Entity\Podcast:
type: xml
dir: '%kernel.project_dir%/src/Infrastructure/Content/Doctrine/Mapping/Entity/Podcast'
prefix: 'Domain\Content\Entity\Podcast'
is_bundle: false
Domain\Content\Entity\Training:
type: xml
dir: '%kernel.project_dir%/src/Infrastructure/Content/Doctrine/Mapping/Entity/Training'
prefix: 'Domain\Content\Entity\Training'
is_bundle: false
dql:
numeric_functions:
Expand Down
6 changes: 3 additions & 3 deletions config/packages/knpu_oauth2_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ knpu_oauth2_client:
type: github
client_id: '%env(GITHUB_OAUTH_ID)%'
client_secret: '%env(GITHUB_OAUTH_SECRET)%'
redirect_route: authentication_oauth_check
redirect_route: auth_oauth_check
redirect_params:
service: github
google:
type: google
client_id: '%env(GOOGLE_OAUTH_ID)%'
client_secret: '%env(GOOGLE_OAUTH_SECRET)%'
redirect_route: authentication_oauth_check
redirect_route: auth_oauth_check
redirect_params:
service: google
facebook:
type: facebook
client_id: '%env(FACEBOOK_OAUTH_ID)%'
client_secret: '%env(FACEBOOK_OAUTH_SECRET)%'
redirect_route: authentication_oauth_check
redirect_route: auth_oauth_check
redirect_params:
service: facebook
graph_api_version: v2.12
6 changes: 3 additions & 3 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ security:

form_login:
post_only: true
login_path: authentication_login
failure_path: authentication_login
login_path: auth_login
failure_path: auth_login
username_parameter: identifier
password_parameter: password
csrf_parameter: _token
Expand All @@ -44,7 +44,7 @@ security:

logout:
invalidate_session: true
path: authentication_logout
path: auth_logout
target: authentication_login

remember_me:
Expand Down
47 changes: 25 additions & 22 deletions config/packages/vich_uploader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ vich_uploader:
}

mappings:
authentication_user_avatar:
auth_user_avatar:
uri_prefix: '/uploads/authentication/user/avatar'
upload_destination: '%kernel.project_dir%/public/uploads/authentication/user/avatar'
namer: Vich\UploaderBundle\Naming\UniqidNamer

content_attachment:
uri_prefix: '/uploads/content/attachment'
upload_destination: '%kernel.project_dir%/public/uploads/content/attachment'
# Blog
content_blog_attachment:
uri_prefix: '/uploads/content/blog/attachment'
upload_destination: '%kernel.project_dir%/public/uploads/content/blog/attachment'
namer: Vich\UploaderBundle\Naming\SmartUniqueNamer
directory_namer:
service: Vich\UploaderBundle\Naming\CurrentDateTimeDirectoryNamer
Expand All @@ -32,44 +33,46 @@ vich_uploader:
delete_on_update: true
delete_on_remove: true

content_podcast_season_thumbnail:
uri_prefix: '/uploads/content/podcast_season/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/podcast_season/thumbnail'
content_blog_post_thumbnail:
uri_prefix: '/uploads/content/blog/post/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/blog/post/thumbnail'
namer:
service: Vich\UploaderBundle\Naming\PropertyNamer
options: { property: 'slug', transliterate: true }

content_podcast_episode_audio:
uri_prefix: '/streaming/podcasts'
upload_destination: '%kernel.project_dir%/uploads/content/podcast_episode/audio'
# Podcast
content_podcast_season_thumbnail:
uri_prefix: '/uploads/content/podcast/season/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/podcast/season/thumbnail'
namer:
service: Vich\UploaderBundle\Naming\PropertyNamer
options: { property: 'slug', transliterate: true }

content_video_video:
uri_prefix: '/streaming/videos'
upload_destination: '%kernel.project_dir%/uploads/content/video'
content_podcast_episode_thumbnail:
uri_prefix: '/uploads/content/podcast/episode/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/podcast/episode/thumbnail'
namer:
service: Vich\UploaderBundle\Naming\PropertyNamer
options: { property: 'slug', transliterate: true }

content_post_series_thumbnail:
uri_prefix: '/uploads/content/post_series/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/post_series/thumbnail'
content_podcast_episode_audio:
uri_prefix: '/streaming/podcasts'
upload_destination: '%kernel.project_dir%/public/uploads/content/podcast/episode/audio'
namer:
service: Vich\UploaderBundle\Naming\PropertyNamer
options: { property: 'slug', transliterate: true }

content_technology_thumbnail:
uri_prefix: '/uploads/content/technology/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/technology/thumbnail'
# Training
content_training_video_thumbnail:
uri_prefix: '/uploads/content/video/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/video/thumbnail'
namer:
service: Vich\UploaderBundle\Naming\PropertyNamer
options: { property: 'slug', transliterate: true }

content_content_thumbnail:
uri_prefix: '/uploads/content/content/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/content/thumbnail'
content_training_technology_thumbnail:
uri_prefix: '/uploads/content/technology/thumbnail'
upload_destination: '%kernel.project_dir%/public/uploads/content/technology/thumbnail'
namer:
service: Vich\UploaderBundle\Naming\PropertyNamer
options: { property: 'slug', transliterate: true }
34 changes: 6 additions & 28 deletions fixtures/data/content/fixtures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,36 @@ include:
Domain\Content\Entity\Tag:
tag{1..10} (extends tag):

Domain\Content\Entity\Technology:
Domain\Content\Entity\Training\Technology:
technology{1..30} (extends technology):

Domain\Content\Entity\Category:
Domain\Content\Entity\Blog\Category:
category{1..5} (extends category):

Domain\Content\Entity\Post:
Domain\Content\Entity\Blog\Post:
post_{1..500} (extends post):
tags: [ '@tag*' ]
technologies: [ '@technology*' ]
category: '@category*'
owner: '@user*'

Domain\Content\Entity\PostSeries:
postSeries{1..10} (extends post_series):
technology: '@technology*'
owner: '@user_admin'
posts: [ '@post_*' ]

Domain\Content\Entity\PostList:
postList{1..45} (extends post_list):
owner: '@user*'
posts: [ '@post_*' ]
is_public: <randomElement([0, 1])>

Domain\Content\Entity\PodcastEpisode:
Domain\Content\Entity\Podcast\Episode:
podcastEpisode{1..50} (extends podcast_episode):
owner: '@user_admin'
tags: [ '@tag*' ]
technologies: [ '@technology*' ]

Domain\Content\Entity\PodcastSeason:
Domain\Content\Entity\Podcast\Season:
podcastSeason{1..10} (extends podcast_season):
episodes: [ '@podcastEpisode*' ]

Domain\Content\Entity\SubjectProposal:
subjectProposal{1..35} (extends subject_proposal):
owner: '@user*'

Domain\Content\Entity\Video:
Domain\Content\Entity\Training\Video:
video{1..500} (extends video):
owner: '@user_admin'
tags: [ '@tag*' ]
technologies: [ '@technology*' ]
source_url: 'https://www.youtube.com/watch?v=zaqoGWp2GMo'

Domain\Content\Entity\Training:
training_{1..5} (extends training):
owner: '@user*'
videos: [ '@video*' ]
chapters: []

Domain\Content\Entity\Comment:
comment{1..500} (extends comment):
owner: '@user*'
Expand Down
Loading

0 comments on commit 94dc86a

Please sign in to comment.