Hi,
As you probably know IPv6 addresses with ports are wrapped in square brackets (because the colon sign also appears in the IP address itself).
These brackets are not treated (removed) in any way currently, what leads to an behaviour I didn't expect.
I'd expect getHost() to return only the IP address, without brackets, as the port is stored seperately and obtainable via getPort().
Consider this example:
$ipv4Port = new \Zend\Uri\Uri('http://192.168.0.1:8080');
$ipv6Port = new \Zend\Uri\Uri('http://[fe80::240:63ff:fede:3c19]:8080');
echo $ipv4Port->getHost(); // -> 192.168.0.1 - expected
echo $ipv6Port->getHost(); // -> [fe80::240:63ff:fede:3c19] - unexpected
Is this intended behaviour, though, or just not yet adjusted to IPv6?