Skip to content

Commit

Permalink
config update
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyvastis committed Apr 13, 2021
1 parent 31dc619 commit 687f74f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/Command/RefreshWsdlCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class RefreshWsdlCommand extends Command
/** @var Client */
private $soapClient;

private const COMMAND_NAME = 'arsenal:refresh-wsdl';
private const COMMAND_NAME = 'salesforce:wsdl:refresh';

/**
* RefreshWsdlCommand constructor.
Expand Down Expand Up @@ -95,7 +95,7 @@ public function downloadWsdl(): void
]
]);

$wsdlFile = $this->getContainer()->getParameter('arsenal.soap_client.wsdl');
$wsdlFile = $this->getContainer()->getParameter('salesforce.soap_client.wsdl');

if(!\simplexml_load_string((string)$response->getBody())) {
throw new \Exception('The downloaded WSDL is invalid. ' . sprintf('`%s`', (string)$response->getBody()));
Expand Down
6 changes: 3 additions & 3 deletions src/DependencyInjection/SalesforceExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('soap_client.xml');
$loader->load('rest_client.xml');
foreach ($processedConfiguration['soap_client'] as $key => $value) {
$container->setParameter('arsenal_salesforce.soap_client.' . $key, $value);
$container->setParameter('salesforce.soap_client.' . $key, $value);
}

if (true == $processedConfiguration['soap_client']['logging']) {
$builder = $container->getDefinition('arsenal_salesforce.soap_client.builder');
// $builder->addMethodCall('withLog', array(new Reference('arsenal_salesforce.logger')));
$builder = $container->getDefinition('salesforce.soap_client.builder');
// $builder->addMethodCall('withLog', array(new Reference('salesforce.logger')));
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Resources/config/rest_client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<services>

<service id="arsenal_salesforce.rest_client"
<service id="salesforce.rest_client"
class="PhpArsenal\RestClient\Client">
<argument type="service" id="arsenal.soap_client" />
<argument type="service" id="salesforce.soap_client" />
</service>

</services>
Expand Down
18 changes: 9 additions & 9 deletions src/Resources/config/soap_client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@

<services>

<service id="arsenal.soap_client" class="PhpArsenal\SoapClient\Client">
<factory service="arsenal.soap_client.builder" method="build" />
<service id="salesforce.soap_client" class="PhpArsenal\SoapClient\Client">
<factory service="salesforce.soap_client.builder" method="build" />
</service>

<service id="arsenal.soap_client.bulk_saver"
<service id="salesforce.soap_client.bulk_saver"
class="PhpArsenal\SoapClient\BulkSaver">
<argument type="service" id="arsenal.soap_client" />
<argument type="service" id="salesforce.soap_client" />
</service>

<service id="arsenal.soap_client.builder"
<service id="salesforce.soap_client.builder"
class="PhpArsenal\SoapClient\ClientBuilder">
<argument>%arsenal.soap_client.wsdl%</argument>
<argument>%arsenal.soap_client.username%</argument>
<argument>%arsenal.soap_client.password%</argument>
<argument>%arsenal.soap_client.token%</argument>
<argument>%salesforce.soap_client.wsdl%</argument>
<argument>%salesforce.soap_client.username%</argument>
<argument>%salesforce.soap_client.password%</argument>
<argument>%salesforce.soap_client.token%</argument>
<argument type="collection">
</argument>
<argument>%kernel.environment%</argument>
Expand Down

0 comments on commit 687f74f

Please sign in to comment.