Tags: DigitalOceanPHP/Client
Tags
Fixed hydration of the Network class with IPv6 addresses (#339) * IPv6 the CIDR field assigned with wrong type and notation. For IPv6 networks the netmask is integer and the CIDR field is assigned with `int` to a field with `string` constraint. The netmask in this case represents the number for allow networks. The IPv6 address `2b03:b0c0:2:d0::102e:d001` should have the CIDR notation `2b03:b0c0:2:d0::102e:d001/64` or `2b03:b0c0:0002:00d0:0000:0000:0000:0000/64`. I'm not 100% sure what the netmask value can be on the api die, is it always int? or can it come as string? that's why the check for int. * Added 'networks' to droplet test fully checking build() logic. * Refactoring the networks fix code to comply with phpstan rules. * Tested multiple solutions, this is the nicest and most minimal one, and probably more correct since we are not manipulating values we iterate on. * This also this resulted some cleanup on the baseline rules file. * Cleanup * Fixed code style * Update CHANGELOG.md * IPv6 netmasks are always integers --------- Co-authored-by: alkavan <igal@alkontek.com> Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
PreviousNext