jeremykendall / php-domain-parser

Public Suffix List based domain parsing implemented in PHP
MIT License
1.16k stars 128 forks source link

require dirname(__DIR__).'/vendor/autoload.php' leads to wrong directory #265

Closed rayrigam closed 4 years ago

rayrigam commented 4 years ago

Line 21 in the file /myProjectDirectory/vendor/jeremykendall/php-domain-parser/bin/update-psl require dirname(__DIR__).'/vendor/autoload.php'; throws

PHP Fatal error: require(): Failed opening required '/myProjectDirectory/vendor/jeremykendall/php-domain-parser/vendor/autoload.php'

It should direct to /myProjectDirectory/vendor/autoload.php . Shouldn't it use this line:?

require dirname(__DIR__, 4).'/vendor/autoload.php'; (it looks like this works for PHP 7.2+)

nyamsprod commented 4 years ago

@rayrigam a bugfix has been applied on the following branch. Of note, this bugfix will only be applicable on a version of the library that will only support PH7.2+ . If necessary I'll backport this bug fix on a previous patch version but only if deemed necessary.

In previous version using the Installer class directly should be enough to resolve the issue.