php-deal / framework

Design by Contract framework for PHP
MIT License
252 stars 22 forks source link

PathResolver' not found #27

Closed mpijierro closed 5 years ago

mpijierro commented 6 years ago

Hi,

today I tried to install php-deal and I had the following error:

Fatal error: Uncaught Error: Class 'Go\ParserReflection\Instrument\PathResolver' not found in /var/www/html/...../vendor/goaop/parser-reflection/src/ReflectionEngine.php on line 218

I solved it by excluding the vendor folder in the config as it is said here: https://github.com/Codeception/AspectMock/issues/112

I added 'excludePaths' to configuration: ContractApplication::getInstance()->init(array( 'debug' => true, 'appDir' => __DIR__, 'cacheDir' => __DIR__.'/cache/', 'excludePaths' => [__DIR__.'/vendor/'] ));

PhpDeal is great!

icanhazstring commented 6 years ago

Hi @mpijierro,

thanks for reporting. Since this problem is solvable using a simple configuration, I would add a small section in the README like Common Issues to point out the solution.

panosru commented 5 years ago

That is happening only when you use __DIR__ as your appDir, which basically means that you use that at the root of your project there where you keep your vendor files and other files which should not be messed with your src since it's a bad practice, nevertheless a Common Issues on README would be good to have.