Description
I am testing PHP-PM with Symfony Framework, however I got into a problem with the Symfony Router. Whenever the first page loaded via PHP-PM is a HTTPS call, all routes to http pages will have a ":0" port at the end. For example, links on https://www.example.com/user-dashboard will create links to http pages that look like: http://www.example.com:0/.
I tried to find out why this was happening and apparently the Symfony\Component\Routing\RequestContext has a property called $httpPort that somehow is set to 0 instead of the default 80 if the first call is a HTTPs call.
I patched this in an ugly way in the Symfony.php by adding the following 2 lines:
$app->handle($request);
if ($app->getContainer()->has('router.request_context'))
$app->getContainer()->get('router.request_context')->setHttpPort(80);
$this->postHandle($app);
I am not sure what the correct way to handle this problem is, nor do I know why it becomes a "0" in the first place (whereas normally that doesn't happen in Symfony).