phactory icon indicating copy to clipboard operation
phactory copied to clipboard

Cant find Phactory error when attempting to use with composer.

Open eko3alpha opened this issue 10 years ago • 1 comments

You cant use this "as is" with composer. This was something I could not find in the documentation. You must have the following "use" keyword

use Phactory\Sql\Phactory;

at the beginning of your file if you want to use it as it is currently documented. You will get the following error otherwise:

Fatal error: Class 'Phactory' not found in ...

I was really excited to use this library in my unit tests... until none of it really worked. The documentation is horribly outdated. I appreciate the attempt made to make this a composer package, however it does not work at all, and I constantly keep getting errors as I "fix" one item after another.

eko3alpha avatar May 29 '15 18:05 eko3alpha

@eko3alpha If you autoload it via composer then just have to.

use \Phactory\Sql\Phactory;

If you are not sure whether it had been autoloaded, check your vendor/composer/autoload_namespaces.php.

Mine looks:

...
'Phactory' => array($vendorDir . '/chriskite/phactory/lib'),
...

yang-wei avatar Jun 08 '15 08:06 yang-wei