Skip to content

Commit

Permalink
Merge pull request doctrine#519 from danmarinescu79/master
Browse files Browse the repository at this point in the history
using https for YumController
  • Loading branch information
TomHAnderson committed Jan 13, 2017
2 parents 4d0412e + 20f8eff commit 74376f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/DoctrineORMModule/Yuml/YumlController.php
Expand Up @@ -19,9 +19,9 @@

namespace DoctrineORMModule\Yuml;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\Http\Client;
use Zend\Http\Request;
use Zend\Mvc\Controller\AbstractActionController;

/**
* Utility to generate Yuml compatible strings from metadata graphs
Expand Down Expand Up @@ -57,7 +57,7 @@ public function indexAction()
/* @var $request \Zend\Http\Request */
$request = $this->getRequest();
$this->httpClient->setMethod(Request::METHOD_POST);
$this->httpClient->setParameterPost(array('dsl_text' => $request->getPost('dsl_text')));
$this->httpClient->setParameterPost(['dsl_text' => $request->getPost('dsl_text')]);
$response = $this->httpClient->send();

if (!$response->isSuccess()) {
Expand All @@ -67,6 +67,6 @@ public function indexAction()
/* @var $redirect \Zend\Mvc\Controller\Plugin\Redirect */
$redirect = $this->plugin('redirect');

return $redirect->toUrl('http://yuml.me/' . $response->getBody());
return $redirect->toUrl('https://yuml.me/' . $response->getBody());
}
}
2 changes: 1 addition & 1 deletion src/DoctrineORMModule/Yuml/YumlControllerFactory.php
Expand Up @@ -71,7 +71,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
}

return new YumlController(
new Client('http://yuml.me/diagram/plain/class/', ['timeout' => 30])
new Client('https://yuml.me/diagram/plain/class/', ['timeout' => 30])
);
}
}
2 changes: 1 addition & 1 deletion tests/DoctrineORMModuleTest/Yuml/YumlControllerTest.php
Expand Up @@ -83,7 +83,7 @@ public function testIndexActionWillRedirectToYuml()
$redirect
->expects($this->any())
->method('toUrl')
->with('http://yuml.me/short-url')
->with('https://yuml.me/short-url')
->will($this->returnValue($controllerResponse));

$this->assertSame($controllerResponse, $this->controller->indexAction());
Expand Down

0 comments on commit 74376f1

Please sign in to comment.