Symfony 2 fixes

This commit is contained in:
Ghislain Loaec 2018-04-06 11:21:50 +02:00
parent 63111261e7
commit 0748b23630
3 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ class SoapWebServiceController extends ContainerAware
$this->serviceBinder = $webServiceContext->getServiceBinder(); $this->serviceBinder = $webServiceContext->getServiceBinder();
$this->soapRequest = SoapRequest::createFromHttpRequest($this->container->get('request')); $this->soapRequest = SoapRequest::createFromHttpRequest($this->container->get('request_stack')->getCurrentRequest());
$this->soapServer = $webServiceContext $this->soapServer = $webServiceContext
->getServerBuilder() ->getServerBuilder()
->withSoapVersion11() ->withSoapVersion11()

View File

@ -4,13 +4,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd"> xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<route id="_webservice_call" pattern="/{webservice}"> <route id="_webservice_call" path="/{webservice}">
<default key="_controller">BeSimpleSoapBundle:SoapWebService:Call</default> <default key="_controller">BeSimpleSoapBundle:SoapWebService:Call</default>
<default key="_format">xml</default> <default key="_format">xml</default>
<requirement key="_method">POST</requirement> <requirement key="_method">POST</requirement>
</route> </route>
<route id="_webservice_definition" pattern="/{webservice}"> <route id="_webservice_definition" path="/{webservice}">
<default key="_controller">BeSimpleSoapBundle:SoapWebService:Definition</default> <default key="_controller">BeSimpleSoapBundle:SoapWebService:Definition</default>
<default key="_format">xml</default> <default key="_format">xml</default>
<requirement key="_method">GET</requirement> <requirement key="_method">GET</requirement>

View File

@ -44,7 +44,7 @@ class WebServiceContext
if (null === $this->serviceDefinition) { if (null === $this->serviceDefinition) {
$cache = new ConfigCache(sprintf('%s/%s.definition.php', $this->options['cache_dir'], $this->options['name']), $this->options['debug']); $cache = new ConfigCache(sprintf('%s/%s.definition.php', $this->options['cache_dir'], $this->options['name']), $this->options['debug']);
if ($cache->isFresh()) { if ($cache->isFresh()) {
$this->serviceDefinition = include (string) $cache; $this->serviceDefinition = include $cache->getPath();
} else { } else {
if (!$this->loader->supports($this->options['resource'], $this->options['resource_type'])) { if (!$this->loader->supports($this->options['resource'], $this->options['resource_type'])) {
throw new \LogicException(sprintf('Cannot load "%s" (%s)', $this->options['resource'], $this->options['resource_type'])); throw new \LogicException(sprintf('Cannot load "%s" (%s)', $this->options['resource'], $this->options['resource_type']));