Alright I got it sorted out.
I was getting connection timeouts on both getcomposer.org and packagist.org.
It seems like it’s an ISP issue with IPv6.
I followed Composer’s official instructions to disable IPv6 and force IPv4 by running: sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
That didn’t do the trick for me, but this did–
Workaround for Mac OS X:
Get name of your network device:
networksetup -listallnetworkservices
Disable IPv6 on that device (in my case “Wi-Fi”)
networksetup -setv6off Wi-Fi
Update composer.
You can enable IPv6 again with:
networksetup -setv6automatic Wi-Fi