diff --git a/Controller/SoapWebServiceController.php b/Controller/SoapWebServiceController.php index 29d08c3..afdf9f0 100644 --- a/Controller/SoapWebServiceController.php +++ b/Controller/SoapWebServiceController.php @@ -16,20 +16,23 @@ use BeSimple\SoapBundle\Soap\SoapRequest; use BeSimple\SoapBundle\Soap\SoapResponse; use BeSimple\SoapServer\SoapServerBuilder; -use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\FlattenException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; +use Symfony\Component\Routing\Generator\UrlGeneratorInterface; /** * @author Christian Kerl * @author Francis Besset */ -class SoapWebServiceController extends ContainerAware +class SoapWebServiceController extends Controller { + use ContainerAwareTrait; /** * @var \SoapServer */ @@ -64,7 +67,7 @@ public function callAction($webservice) $this->serviceBinder = $webServiceContext->getServiceBinder(); - $this->soapRequest = SoapRequest::createFromHttpRequest($this->container->get('request')); + $this->soapRequest = SoapRequest::createFromHttpRequest($this->container->get('request_stack')->pop()); $this->soapServer = $webServiceContext ->getServerBuilder() ->withSoapVersion11() @@ -91,11 +94,11 @@ public function definitionAction($webservice) $this->container->get('router')->generate( '_webservice_call', array('webservice' => $webservice), - true + UrlGeneratorInterface::ABSOLUTE_URL ) )); - $request = $this->container->get('request'); + $request = $this->container->get('request_stack')->pop(); $query = $request->query; if ($query->has('wsdl') || $query->has('WSDL')) { $request->setRequestFormat('wsdl'); diff --git a/WebServiceContext.php b/WebServiceContext.php index dce81a7..81d5957 100644 --- a/WebServiceContext.php +++ b/WebServiceContext.php @@ -44,7 +44,7 @@ public function getServiceDefinition() if (null === $this->serviceDefinition) { $cache = new ConfigCache(sprintf('%s/%s.definition.php', $this->options['cache_dir'], $this->options['name']), $this->options['debug']); if ($cache->isFresh()) { - $this->serviceDefinition = include (string) $cache; + $this->serviceDefinition = include (string) $cache->getPath(); } else { 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'])); @@ -82,7 +82,7 @@ public function getWsdlFile($endpoint = null) $cache->write($dumper->dump()); } - return (string) $cache; + return (string) $cache->getPath(); } public function getServiceBinder() diff --git a/composer.json b/composer.json index d9eecb2..eeb5f73 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { - "name": "besimple/soap-bundle", + "name": "awelara/besimple-soap-bundle", "type": "symfony-bundle", - "description": "Build and consume SOAP and WSDL based web services with Symfony2", + "description": "Build and consume SOAP and WSDL based web services with Symfony4", "keywords": [ "soap", "soap-bundle" ], "homepage": "https://github.com/BeSimple/BeSimpleSoapBundle", "license": "MIT", @@ -20,18 +20,18 @@ } ], "require": { - "php": ">=5.3.0", + "php": ">=7.0", "ext-soap": "*", - "besimple/soap-common": "0.3.*", - "besimple/soap-wsdl": "0.3.*", + "besimple/soap-common": "0.2.*", + "besimple/soap-wsdl": "0.2.*", "ass/xmlsecurity": "~1.0", - "symfony/framework-bundle": "~2.6", - "symfony/twig-bundle": "~2.6", + "symfony/twig-bundle": "*", + "symfony/framework-bundle": "^4.1", "zendframework/zend-mime": "2.1.*" }, "suggest": { - "besimple/soap-client": "0.3.*", - "besimple/soap-server": "0.3.*" + "besimple/soap-client": "0.2.*", + "besimple/soap-server": "0.2.*" }, "autoload": { "psr-0": { "BeSimple\\SoapBundle": "" } @@ -39,7 +39,7 @@ "target-dir": "BeSimple/SoapBundle", "extra": { "branch-alias": { - "dev-master": "0.3-dev" + "dev-master": "0.4-dev" } } }