|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace Symfony\Component\DependencyInjection\Loader\Configurator; |
| 6 | + |
| 7 | +return static function (ContainerConfigurator $container) { |
| 8 | + $services = $container->services(); |
| 9 | + |
| 10 | + $services->defaults() |
| 11 | + ->autowire() |
| 12 | + ->autoconfigure(); |
| 13 | + |
| 14 | + $services->set(\Shopware\AppBundle\DependencyInjection\AppConfigurationFactory::class) |
| 15 | + ->args([ |
| 16 | + // Will be filled by \Shopware\AppBundle\DependencyInjection\ShopwareAppExtension::load |
| 17 | + '', |
| 18 | + '', |
| 19 | + '', |
| 20 | + service(\Symfony\Component\Routing\Generator\UrlGeneratorInterface::class), |
| 21 | + ]); |
| 22 | + |
| 23 | + $services->set(\Shopware\App\SDK\HttpClient\ClientFactory::class); |
| 24 | + |
| 25 | + $services->set(\Shopware\App\SDK\AppConfiguration::class) |
| 26 | + ->factory([service(\Shopware\AppBundle\DependencyInjection\AppConfigurationFactory::class), 'newConfiguration']); |
| 27 | + |
| 28 | + $services->set(\Shopware\App\SDK\AppLifecycle::class) |
| 29 | + ->args([ |
| 30 | + service(\Shopware\App\SDK\Registration\RegistrationService::class), |
| 31 | + service(\Shopware\App\SDK\Shop\ShopResolver::class), |
| 32 | + service(\Shopware\App\SDK\Shop\ShopRepositoryInterface::class), |
| 33 | + service(\Psr\Log\LoggerInterface::class), |
| 34 | + service(\Psr\EventDispatcher\EventDispatcherInterface::class), |
| 35 | + ]); |
| 36 | + |
| 37 | + $services->set(\Shopware\App\SDK\Authentication\RequestVerifier::class); |
| 38 | + |
| 39 | + $services->set(\Shopware\App\SDK\Authentication\ResponseSigner::class); |
| 40 | + |
| 41 | + $services->set(\Symfony\Component\Cache\Psr16Cache::class) |
| 42 | + ->args([service('cache.app')]); |
| 43 | + |
| 44 | + $services->set(\Shopware\App\SDK\Context\InAppPurchase\SBPStoreKeyFetcher::class) |
| 45 | + ->args([ |
| 46 | + service(\Psr\Http\Client\ClientInterface::class), |
| 47 | + service(\Symfony\Component\Cache\Psr16Cache::class), |
| 48 | + service(\Psr\Log\LoggerInterface::class), |
| 49 | + ]); |
| 50 | + |
| 51 | + $services->set(\Shopware\App\SDK\Context\InAppPurchase\InAppPurchaseProvider::class) |
| 52 | + ->args([ |
| 53 | + service(\Shopware\App\SDK\Context\InAppPurchase\SBPStoreKeyFetcher::class), |
| 54 | + service(\Psr\Log\LoggerInterface::class), |
| 55 | + ]); |
| 56 | + |
| 57 | + $services->set(\Shopware\App\SDK\Context\ContextResolver::class) |
| 58 | + ->args([service(\Shopware\App\SDK\Context\InAppPurchase\InAppPurchaseProvider::class)]); |
| 59 | + |
| 60 | + $services->set(\Shopware\App\SDK\Shop\ShopResolver::class) |
| 61 | + ->args([service(\Shopware\App\SDK\Shop\ShopRepositoryInterface::class)]); |
| 62 | + |
| 63 | + $services->set(\Shopware\App\SDK\Registration\RegistrationService::class) |
| 64 | + ->args([ |
| 65 | + service(\Shopware\App\SDK\AppConfiguration::class), |
| 66 | + service(\Shopware\App\SDK\Shop\ShopRepositoryInterface::class), |
| 67 | + service(\Shopware\App\SDK\Authentication\RequestVerifier::class), |
| 68 | + service(\Shopware\App\SDK\Authentication\ResponseSigner::class), |
| 69 | + service(\Shopware\App\SDK\Registration\ShopSecretGeneratorInterface::class), |
| 70 | + service(\Psr\Log\LoggerInterface::class), |
| 71 | + service(\Psr\EventDispatcher\EventDispatcherInterface::class), |
| 72 | + ]); |
| 73 | + |
| 74 | + $services->set(\Shopware\App\SDK\Registration\ShopSecretGeneratorInterface::class, \Shopware\App\SDK\Registration\RandomStringShopSecretGenerator::class); |
| 75 | + |
| 76 | + $services->set(\Shopware\App\SDK\Shop\ShopRepositoryInterface::class, \Shopware\AppBundle\Entity\ShopRepositoryBridge::class) |
| 77 | + ->args([ |
| 78 | + '', |
| 79 | + service(\Doctrine\Persistence\ManagerRegistry::class), |
| 80 | + ]); |
| 81 | + |
| 82 | + $services->set(\Shopware\AppBundle\Controller\LifecycleController::class) |
| 83 | + ->public() |
| 84 | + ->args([service(\Shopware\App\SDK\AppLifecycle::class)]) |
| 85 | + ->tag('controller.service_arguments'); |
| 86 | + |
| 87 | + $services->set(\Shopware\AppBundle\Controller\WebhookController::class) |
| 88 | + ->public() |
| 89 | + ->args([service('event_dispatcher')]) |
| 90 | + ->tag('controller.service_arguments'); |
| 91 | + |
| 92 | + $services->set(\Shopware\AppBundle\ArgumentValueResolver\ContextArgumentResolver::class); |
| 93 | + |
| 94 | + $services->set(\Shopware\AppBundle\EventListener\ResponseSignerListener::class); |
| 95 | + |
| 96 | + $services->set(\Shopware\AppBundle\EventListener\BeforeRegistrationStartsListener::class) |
| 97 | + ->args([ |
| 98 | + service(\Symfony\Contracts\HttpClient\HttpClientInterface::class), |
| 99 | + '%shopware_app.check_if_shop_url_is_reachable%', |
| 100 | + ]); |
| 101 | + |
| 102 | + $services->set(\Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface::class, \Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory::class); |
| 103 | + |
| 104 | + $services->set(\Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface::class, \Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory::class); |
| 105 | + |
| 106 | + $services->set(\Symfony\Bridge\PsrHttpMessage\EventListener\PsrResponseListener::class); |
| 107 | +}; |
0 commit comments