# Dedicated services for OAuth app services: _defaults: public: false autowire: true autoconfigure: true PrestaShopBundle\EventListener\API\AdminAPIFeatureListener: autowire: true tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 8 } # CRITICAL this listener must have a priority greater than ApiPlatform ReadListener (which has a priority of 4) # but it must be run AFTER the Firewall listener or the Security token won't be initialized yet (which has a # priority of 8) PrestaShopBundle\EventListener\API\ScopeCheckerListener: autowire: true tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 7 } # We set a high priority so this listener has a bigger one than ReadListener ApiPlatform (which has a priority of 4) PrestaShopBundle\EventListener\API\Context\ApiClientContextListener: tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 7 } # We set a high priority so this listener has a bigger one than ReadListener ApiPlatform (which has a priority of 4) # but lower than the ApiClientListener because the listener depends on it PrestaShopBundle\EventListener\API\Context\ShopContextListener: tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 6 } # We set a high priority so this listener has a bigger one than ReadListener ApiPlatform (which has a priority of 4) # but lower than the ShopContextListener because the listener depends on it PrestaShopBundle\EventListener\API\Context\LanguageContextListener: tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 5 } # We set a high priority so this listener has a bigger one than ReadListener ApiPlatform (which has a priority of 4) # but lower than the ShopContextListener because the listener depends on it PrestaShopBundle\EventListener\API\Context\CurrencyContextListener: tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 5 } # We need to leave this under the LanguageContextListener for priorities. PrestaShopBundle\EventListener\API\Context\ApiLegacyContextListener: arguments: $legacyBuilders: - '@PrestaShop\PrestaShop\Core\Context\LanguageContextBuilder' - '@PrestaShop\PrestaShop\Core\Context\CurrencyContextBuilder' tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 5 } # SSL middleware PrestaShopBundle\EventListener\API\SSLMiddlewareListener: autowire: true arguments: $isDebug: '%kernel.debug%' tags: - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest } # Serializer modifications, the following services are automatically injected in the serializer Symfony service, # to limit their impact on the Admin they are only defined for the API context. # This normalizer disables the denormalization process of File fields PrestaShopBundle\ApiPlatform\Normalizer\UploadedFileNormalizer: autowire: true autoconfigure: true # Tag to be injected in the DomainSerializer tags: [ 'prestashop.api.normalizers' ] # This is the encoder to handle multipart requests for API PrestaShopBundle\ApiPlatform\Encoder\MultipartDecoder: autowire: true autoconfigure: true