# This file is the entry point to configure your own services. # Files in the packages/ subdirectory configure your dependencies. # 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: encryption_key: '%env(APP_ENCRYPTION_KEY)%' nsec: '%env(APP_NSEC)%' services: # default configuration for services in *this* file _defaults: autowire: true # Automatically injects dependencies in your services. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. # 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\: resource: '../src/' exclude: - '../src/DependencyInjection/' - '../src/Entity/' - '../src/Kernel.php' # add more service definitions when explicit configuration is needed # please note that last definitions always *replace* previous ones Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler: arguments: - '%env(DATABASE_URL)%' # FOS\ElasticaBundle\Finder\FinderInterface: alias: fos_elastica.finder.articles # Redis Symfony\Component\Cache\Adapter\RedisAdapter: arguments: - '@Redis' Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler: arguments: - '@Redis' # you can optionally pass an array of options. The only options are 'prefix' and 'ttl', # which define the prefix to use for the keys to avoid collision on the Redis server # and the expiration time for any given entry (in seconds), defaults are 'sf_s' and null: # - { 'prefix': 'my_prefix', 'ttl': 600 } Redis: # you can also use \RedisArray, \RedisCluster, \Relay\Relay or \Predis\Client classes class: Redis calls: - connect: - '%env(REDIS_HOST)%' - auth: - '%env(REDIS_PASSWORD)%' App\Service\LnBitsService: arguments: $lnbitsUrl: '%env(LNBITS_URL)%' $apiKey: '%env(LNBITS_API_KEY)%' App\Provider\ArticleProvider: tags: - { name: fos_elastica.pager_provider, index: articles, type: article } App\EventListener\PopulateListener: tags: - { name: kernel.event_listener, event: 'FOS\ElasticaBundle\Event\PostIndexPopulateEvent', method: 'postIndexPopulate' } App\Command\IndexArticlesCommand: arguments: $itemPersister: '@fos_elastica.object_persister.articles'