Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service refactoring #779

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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
169 changes: 36 additions & 133 deletions config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
parameters:
mailer_transport: sendmail
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
mailer_port: null
locale: de
secret: '%env(APP_SECRET)%'
kernel.secret: '%env(APP_SECRET)%'
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: '%env(DATABASE_NAME)%'
database_user: '%env(DATABASE_USER)%'
database_password: '%env(DATABASE_PASSWORD)%'
track.gap_width: 10
strava.client_id: '%env(STRAVA_CLIENT_ID)%'
strava.token: '%env(STRAVA_TOKEN)%'
strava.secret: '%env(STRAVA_SECRET)%'
facebook.app_id: '%env(FACEBOOK_APP_ID)%'
facebook.app_secret: '%env(FACEBOOK_APP_SECRET)%'
facebook.default_token: '%env(FACEBOOK_DEFAULT_TOKEN)%'
runkeeper.client_id: '%env(RUNKEEPER_CLIENT_ID)%'
runkeeper.secret: '%env(RUNKEEPER_SECRET)%'
twitter.client_id: '%env(TWITTER_CLIENT_ID)%'
twitter.token: '%env(TWITTER_TOKEN)%'
twitter.secret: '%env(TWITTER_SECRET)%'
photo_tsv.access_key: '%env(PHOTO_TSV_ACCESS_KEY)%'
timeline.ttl: 60
notification.mail.sender_address: [email protected]
request_listener.http_port: 80
request_listener.https_port: 443
upload_destination.track: '%kernel.project_dir%/public/tracks'
upload_destination.photo: '%kernel.project_dir%/public/photos'
upload_destination.city_photo: '%kernel.project_dir%/public/cities'
upload_destination.ride_photo: '%kernel.project_dir%/public/rides'
upload_destination.frontpage_teaser: '%kernel.project_dir%/public/teaser'
upload_destination.user_photo: '%kernel.project_dir%/public/users'
staticmaps.host: '%env(STATICMAPS_HOST)%'
assets_version: '%env(ASSETS_VERSION)%'

services:
_defaults:
autowire: true
Expand Down Expand Up @@ -80,42 +39,6 @@ services:
Sonata\SeoBundle\Seo\SeoPageInterface:
alias: sonata.seo.page.default

App\Criticalmass\Image\ExifWrapper\ExifWrapper:
arguments:
$flysystemFilesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Image\PhotoManipulator\Storage\PhotoStorage:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Image\PhotoUploader\PhotoUploader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Geo\GpxReader\GpxReader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\Geo\GpxReader\TrackReader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\Geo\GpxWriter\GpxWriter:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\ProfilePhotoGenerator\ProfilePhotoGenerator:
arguments:
$filesystem: '@oneup_flysystem.flysystem_user_photo_filesystem'

App\Criticalmass\UploadableDataHandler\UploadableDataHandler:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\UploadValidator\TrackValidator:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\Geocoding\ReverseGeocoderInterface:
alias: App\Criticalmass\Geocoding\CachedReverseGeocoder

Expand All @@ -129,62 +52,6 @@ services:
App\Criticalmass\Geo\Loop\LoopInterface:
alias: App\Criticalmass\Geo\Loop\TrackLoop

App\Request\ParamConverter\RideParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: ride_converter }

App\Request\ParamConverter\RegionParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: region_converter }

App\Request\ParamConverter\CityParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: city_converter }

App\Request\ParamConverter\CityCycleParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: citycycle_converter }

App\Request\ParamConverter\LocationParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: location_converter }

App\Request\ParamConverter\BoardParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: board_converter }

App\Request\ParamConverter\ThreadParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: thread_converter }

App\Request\ParamConverter\ParticipationParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: participation_converter }

App\Request\ParamConverter\PhotoParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: photo_converter }

App\Request\ParamConverter\PromotionParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: promotion_converter }

App\Request\ParamConverter\UserParamConverter:
tags:
- { name: request.param_converter, priority: 10, converter: user_converter }

App\Request\ParamConverter\SocialNetworkProfileParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: socialnetworkprofile_converter }

App\Request\ParamConverter\SocialNetworkFeedItemParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: socialnetworkfeeditem_converter }

App\Request\ParamConverter\TrackParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: track_converter }

App\Criticalmass\Imagine\DataLoader\RemoteStreamLoader:
arguments: ['@liip_imagine']
tags:
Expand Down Expand Up @@ -244,3 +111,39 @@ services:
arguments:
$cityFinder: '@fos_elastica.finder.criticalmass_city'
$rideFinder: '@fos_elastica.finder.criticalmass_ride'

App\Criticalmass\Image\ExifWrapper\ExifWrapper:
arguments:
$flysystemFilesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Image\PhotoManipulator\Storage\PhotoStorage:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Image\PhotoUploader\PhotoUploader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Geo\GpxReader\GpxReader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\Geo\GpxReader\TrackReader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\Geo\GpxWriter\GpxWriter:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\ProfilePhotoGenerator\ProfilePhotoGenerator:
arguments:
$filesystem: '@oneup_flysystem.flysystem_user_photo_filesystem'

App\Criticalmass\UploadableDataHandler\UploadableDataHandler:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\UploadValidator\TrackValidator:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'
40 changes: 40 additions & 0 deletions config/services/1_parameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
parameters:
mailer_transport: sendmail
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
mailer_port: null
locale: de
secret: '%env(APP_SECRET)%'
kernel.secret: '%env(APP_SECRET)%'
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: '%env(DATABASE_NAME)%'
database_user: '%env(DATABASE_USER)%'
database_password: '%env(DATABASE_PASSWORD)%'
track.gap_width: 10
strava.client_id: '%env(STRAVA_CLIENT_ID)%'
strava.token: '%env(STRAVA_TOKEN)%'
strava.secret: '%env(STRAVA_SECRET)%'
facebook.app_id: '%env(FACEBOOK_APP_ID)%'
facebook.app_secret: '%env(FACEBOOK_APP_SECRET)%'
facebook.default_token: '%env(FACEBOOK_DEFAULT_TOKEN)%'
runkeeper.client_id: '%env(RUNKEEPER_CLIENT_ID)%'
runkeeper.secret: '%env(RUNKEEPER_SECRET)%'
twitter.client_id: '%env(TWITTER_CLIENT_ID)%'
twitter.token: '%env(TWITTER_TOKEN)%'
twitter.secret: '%env(TWITTER_SECRET)%'
photo_tsv.access_key: '%env(PHOTO_TSV_ACCESS_KEY)%'
timeline.ttl: 60
notification.mail.sender_address: [email protected]
request_listener.http_port: 80
request_listener.https_port: 443
upload_destination.track: '%kernel.project_dir%/public/tracks'
upload_destination.photo: '%kernel.project_dir%/public/photos'
upload_destination.city_photo: '%kernel.project_dir%/public/cities'
upload_destination.ride_photo: '%kernel.project_dir%/public/rides'
upload_destination.frontpage_teaser: '%kernel.project_dir%/public/teaser'
upload_destination.user_photo: '%kernel.project_dir%/public/users'
staticmaps.host: '%env(STATICMAPS_HOST)%'
assets_version: '%env(ASSETS_VERSION)%'
36 changes: 36 additions & 0 deletions config/services/flysystem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
services:
App\Criticalmass\Image\ExifWrapper\ExifWrapper:
arguments:
$flysystemFilesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Image\PhotoManipulator\Storage\PhotoStorage:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Image\PhotoUploader\PhotoUploader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\Geo\GpxReader\GpxReader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\Geo\GpxReader\TrackReader:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\Geo\GpxWriter\GpxWriter:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'

App\Criticalmass\ProfilePhotoGenerator\ProfilePhotoGenerator:
arguments:
$filesystem: '@oneup_flysystem.flysystem_user_photo_filesystem'

App\Criticalmass\UploadableDataHandler\UploadableDataHandler:
arguments:
$filesystem: '@oneup_flysystem.flysystem_photo_photo_filesystem'

App\Criticalmass\UploadValidator\TrackValidator:
arguments:
$filesystem: '@oneup_flysystem.flysystem_track_track_filesystem'
56 changes: 56 additions & 0 deletions config/services/param_converter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
services:
App\Request\ParamConverter\RideParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: ride_converter }

App\Request\ParamConverter\RegionParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: region_converter }

App\Request\ParamConverter\CityParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: city_converter }

App\Request\ParamConverter\CityCycleParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: citycycle_converter }

App\Request\ParamConverter\LocationParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: location_converter }

App\Request\ParamConverter\BoardParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: board_converter }

App\Request\ParamConverter\ThreadParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: thread_converter }

App\Request\ParamConverter\ParticipationParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: participation_converter }

App\Request\ParamConverter\PhotoParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: photo_converter }

App\Request\ParamConverter\PromotionParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: promotion_converter }

App\Request\ParamConverter\UserParamConverter:
tags:
- { name: request.param_converter, priority: 10, converter: user_converter }

App\Request\ParamConverter\SocialNetworkProfileParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: socialnetworkprofile_converter }

App\Request\ParamConverter\SocialNetworkFeedItemParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: socialnetworkfeeditem_converter }

App\Request\ParamConverter\TrackParamConverter:
tags:
- { name: request.param_converter, priority: 0, converter: track_converter }