Hi,
Working on this PR #17440 https://github.com/php/php-src/pull/17440, I
wanted to ask if the BC from these two calls
were ok because :
Before
function socket_getsockname(Socket $socket, &$address, &$port = null):
bool {}
After
function socket_getsockname(Socket $socket, &$address, ?int &$objint =
null): bool {}
As it is no longer only used for port but also for. interface address index
in the case of AF_PACKET.
Thanks.
Regards.
Am 29.01.2025 um 04:20 schrieb David CARLIER devnexen@gmail.com:
Working on this PR #17440, I wanted to ask if the BC from these two calls were ok because :
Before
function socket_getsockname(Socket $socket, &$address, &$port = null): bool {}After
function socket_getsockname(Socket $socket, &$address, ?int &$objint = null): bool {}As it is no longer only used for port but also for. interface address index in the case of AF_PACKET.
Personally I would leave it at $port for two reasons:
- BC break without a big benefit
- I don't think $objint is a meaningful name
While it might not be 100% accurate for AF_PACKET I think the concept of a port is well enough established in the networking word and the more common usage (AF_INET*) makes me think this inconsistency with AF_PACKET is not a real problem.
Regards,
- Chris
Hi,
Working on this PR #17440 https://github.com/php/php-src/pull/17440, I
wanted to ask if the BC from these two calls
were ok because :Before
function socket_getsockname(Socket $socket, &$address, &$port = null):
bool {}After
function socket_getsockname(Socket $socket, &$address, ?int &$objint =
null): bool {}As it is no longer only used for port but also for. interface address
index in the case of AF_PACKET.
Please no BC break. It's really not worth it.
Cheers
Jakub
Ok fair enough, will revert it.
Cheers.
Hi,
Working on this PR #17440, I wanted to ask if the BC from these two calls
were ok because :Before
function socket_getsockname(Socket $socket, &$address, &$port = null): bool {}
After
function socket_getsockname(Socket $socket, &$address, ?int &$objint = null): bool {}
As it is no longer only used for port but also for. interface address index in the case of AF_PACKET.
Please no BC break. It's really not worth it.
Cheers
Jakub