Open SamvelG opened 8 years ago
Add to your composer.json "mso/idna-convert": "~0.9"
The latest version mso/idna-convert v1.1.0, that uses namespaces, requires php >=5.6.0, but the min version of php in phpWhois is >=5.3.0
More details - https://github.com/phpWhois/phpWhois/pull/60
+1
I received the same error, I used the IdnaConvert class provided in the required packages by changing line 78 on vendor/phpwhois/phpwhois/src/Whois.php
The first line is the original code, the second is the updated code
$idn = new \idna_convert();
$idn = new \Algo26\IdnaConvert\IdnaConvert();
~$ composer require algo26-matthias/idna-convert and patch changing line 78 on vendor/phpwhois/phpwhois/src/Whois.php
The first line is the original code, the second is the updated code $idn = new \idna_convert(); to $idn = new \Algo26\IdnaConvert\IdnaConvert();
Came across the same issue. As editing the original code is bad + there was an additional issue, I've put this one into a non-namespaced place:
class idna_convert extends \Algo26\IdnaConvert\ToIdn
{
public function encode(...$params)
{
return $this->convert(...$params);
}
}
It'll still different errors, but at least it runs :)
Dear all,
I think this repo is officially abandoned.
I took this repository by the hand, creating a new fork packagist: kevinoo/phpwhois.
Whois.php on line 78 $idn = new \idna_convert(); should be changed to $idn = new \Mso\IdnaConvert\IdnaConvert();