Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All absolute url generation should include ports #361

Conversation

rakelley
Copy link

The port support added in #320 currently only works when the route has a host token that differs from the provided context. In reality, if we need a port, we need it whenever an absolute URL is generated.

Note: I don't care for the repeated ternary concatenation and would change it, but @emulienfou made specific emphasis on this in the original PR comments, so I preserved it.

@tobias-93 tobias-93 merged commit 47554a9 into FriendsOfSymfony:master Dec 1, 2019
@tobias-93
Copy link
Collaborator

Thanks @rakelley

@wadjeroudi
Copy link

@tobias-93 I think this PR should be reverted because of #379.
The test is not correct, the host already includes non standard ports so in the test the host should be localhost:1234
https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/blob/master/Extractor/ExposedRoutesExtractor.php#L137
So the port was already present with non standard ports, and if you need to include it for standard ports, you should tweak the getPort function.
https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/blob/master/Extractor/ExposedRoutesExtractor.php#L146

@dew326
Copy link
Contributor

dew326 commented Apr 15, 2020

Hi @tobias-93, I created PR for the issue with non standards ports (#381). Could you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants