Skip to content

Commit

Permalink
EZP-30546: Take advantage of Symfony 3.4 lazy console command feature
Browse files Browse the repository at this point in the history
While not the bug itself, these commands where loading cache before siteaccess where set worsening the issue with cache pool not being right instance.
Make them lazy to avoid similar issues for other services, and avoid having to load them unless used.
  • Loading branch information
andrerom committed May 11, 2019
1 parent 549a896 commit ab66994
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions eZ/Bundle/EzPublishCoreBundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ services:
arguments:
- '@ezpublish.api.repository'
tags:
- { name: console.command }
- { name: console.command, command: ezplatform:delete-content-translation }

ezplatform.core.command.cleanup_versions:
class: eZ\Bundle\EzPublishCoreBundle\Command\CleanupVersionsCommand
Expand All @@ -257,7 +257,7 @@ services:
- "@ezpublish.api.repository_configuration_provider"
- "@ezpublish.persistence.connection"
tags:
- { name: console.command }
- { name: console.command, command: ezplatform:content:cleanup-versions }

ezplatform.core.session.handler.native_redis:
class: eZ\Bundle\EzPublishCoreBundle\Session\Handler\NativeSessionHandler
Expand All @@ -269,6 +269,8 @@ services:
class: eZ\Bundle\EzPublishCoreBundle\Command\CopySubtreeCommand
autowire: true
autoconfigure: true
tags:
- { name: console.command, command: ezplatform:copy-subtree }

ezplatform.core.command.resize_original_images:
class: eZ\Bundle\EzPublishCoreBundle\Command\ResizeOriginalImagesCommand
Expand All @@ -277,3 +279,5 @@ services:
arguments:
$ioService: '@ezpublish.fieldType.ezimage.io_service.published'
$imagine: '@liip_imagine'
tags:
- { name: console.command, command: ezplatform:images:resize-original }
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ services:
- '@ezpublish.cache_pool'
- "%kernel.environment%"
tags:
- { name: console.command }
- { name: console.command, command: ezplatform:install }

0 comments on commit ab66994

Please # to comment.