HelgeSverre / Domain-Availability

A PHP Class used to check if a domain has been registered
MIT License
266 stars 137 forks source link

Fatal error: Interface 'Helge\Client\WhoisClientInterface' not found in /home/xxx/domainchecker/vendor/helgesverre/domain-availability/src/Client/SimpleWhoisClient.php on line 13 #18

Closed quebecblogue closed 8 years ago

quebecblogue commented 9 years ago

Hi Helge,

I'm trying to use your domain checker and I'm pretty sure it's the best open-source checker out there. However, I can't get it to work...

I'm using this test code : <?php ini_set("display_errors", 1); error_reporting(E_ALL);

require '/home/qcblog/domainchecker/vendor/autoload.php';

use Helge\Loader\JsonLoader; use Helge\Client\SimpleWhoisClient; use Helge\Service\DomainAvailability;

$whoisClient = new SimpleWhoisClient();

$dataLoader = new JsonLoader("/home/qcblog/domainchecker/vendor/helgesverre/domain-availability/src/data/servers.json");

$service = new DomainAvailability($whoisClient, $dataLoader);

if ($service->isAvailable("helgesverre.com")) { echo "Domain is available"; } else { echo "Domain is already taken!"; }

?>

and I get this error Fatal error: Interface 'Helge\Client\WhoisClientInterface' not found in /home/xxx/domainchecker/vendor/helgesverre/domain-availability/src/Client/SimpleWhoisClient.php on line 13

Thanks to help me

WilliamPearce commented 8 years ago

I installed domain-availability today and tried as you to run a simple test, only to get the same error as you. The solution I found is that the file that should be named vendor/helgesverre/domain-availability/src/Client/WhoisClientInterface.php is, in fact, named wHOISClientInterface.php. Renaming this got things moving.

I installed from Composer.

HelgeSverre commented 8 years ago

I thought I had fixed that issue, the problem with that was that I was renaming the file and somehow the casing got screwed up and I wrongfully commited the file in git, then changed the casing and commited it again, only Git did not track the change in filename, I will fix it.

HelgeSverre commented 8 years ago

This seems to be a problem where packagist did not include my fix, I will commit a new "version" to fix the issue.

lordcris commented 8 years ago

Hi, I still have this problem.

HelgeSverre commented 8 years ago

This has now been resolved.

Let it be know for anyone who is having an issue with packagist.org not updating the version number after creating a tag on github, that the problem is most likely that you have explicitly assigned a version in your composer.json file by using the versions key.

If you remove this key from your composer.json file, it will start working again.

More info here: https://github.com/composer/packagist/issues/434#issuecomment-51940322