when I execute a PHP script which runs a cURL request to a .test domain that is setup on my Mac with Laravel Valet/dnsmasq, I get this error printed :
I solved this by adding domain.test to /etc/hosts
domain.test
/etc/hosts
i.e., in the hosts file add: 127.0.0.1 domain.test
127.0.0.1 domain.test