underscore-php icon indicating copy to clipboard operation
underscore-php copied to clipboard

Use Underscore outside of Composer / Laravel

Open owenkavanagh opened this issue 9 years ago • 1 comments

Is it possible to use this library without installing it through composer / Laravel?

Tried using it in a project but getting lots of namespace errors

Fatal error: Class 'Underscore\Traits\Repository' not found in /project/underscore/src/Underscore.php on line 12

I included it at the start of my project

include('underscore_newer/src/Underscore.php');

class MyProject {

Including the helpers.php file has the same issues, can't find Underscore/Underscore this time.

Using PHP 5.4

owenkavanagh avatar Jun 23 '15 12:06 owenkavanagh

Without Laravel yes, without Composer no. If you include a class you need to include all of them. Not sure it's worth the hassle to be honest, what is your use case for not using Composer?

Anahkiasen avatar Jun 23 '15 12:06 Anahkiasen