mmerian/phpcrawl

Call to undefined method PHPCrawlerUtils::getURIContent()

Closed this issue · 2 comments

Framework: Laravel
PHPCrawl version: 0.83

Issue:
I'm trying to set the obeyRobotsTxt but it uses the wrong PHPCrawlerUtils. obeyRobotsTxt calls PHPCrawlerRobotsTxtParser::parseRobotsTxt which in turn calls PHPCrawlerUtils::getURIContent but it doesn't find it, reason why is because it uses this Class:

vendor/mmerian/phpcrawl/libs/PHPCrawlerUtils.class.php //Doesn't contain getURIContent

Instead of this one, which it should use.

vendor/mmerian/phpcrawl/libs/Utils/PHPCrawlerUtils.class.php ////Does contain getURIContent

error:

Call to undefined method PHPCrawlerUtils::getURIContent()

autoload warning:

Warning: Ambiguous class resolution, "PHPCrawlerUtils" was found in both "/Users/macmini2/securityscan/vendor/mmerian/phpcrawl/libs/PHPCrawlerUtils.class.php" and "/Users/macmini2/securityscan/vendor/mmerian/phpcrawl/libs/Utils/PHPCrawlerUtils.class.php", the first will be used.

Hi !

Thanks for the report. This issue is a duplicate of #1

Do you still have the problem with this fix ?

Thanks for your reply! and thank you for making this awesome lib.
No problem, I solved it by forking your repo and using the fork as a dependancy in composer.
The version that I'm using now doesn't have this class:

vendor/mmerian/phpcrawl/libs/PHPCrawlerUtils.class.php