Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Difference between /fuel/vendor and /fiel/app/vendor ?!
  • Hello, 
    I ran into some issues as i tried to install Dwoo templates via composer.
    composer require "Dwoo/dwoo:*" has successefully installed Dwoo templates into /fuel/vendor directory but in /fuel/packages/parser/config/parser.php i found this .

    'View_Dwoo' => array(
    'include' => APPPATH.'vendor'.DS.'Dwoo'.DS.'dwooAutoload.php',
    'auto_encode' => true,
    'delimiters' => array('left' => '{{', 'right' => '}}'),
    'environment' => array(
    'autoescape'       => false,
    'nested_comments'  => false,
    'allow_spaces'     => false,
    'cache_dir'        => APPPATH.'cache'.DS.'dwoo'.DS,
    'compile_dir'      => APPPATH.'cache'.DS.'dwoo'.DS.'compiled'.DS,
    'cache_time'       => 0,

    // Set what parser should do with PHP tags
    // 1 - Encode tags | 2 - Remove tags | 3 - Allow tags
    'allow_php_tags'   => 2,

    // Which PHP functions should be accessible through Parser
    'allow_php_func'   => array(),

    why  APPPATH.'vendor' and not VENDORPATH ?! what's the difference ? Why APPPATH.'vendor' at all?

    P.S. I think both packages/parser/config/parser.php and packages/parser/classes/view/dwoo.php are out of least for Dwoo v2. May be you should specify "dwoo/dwoo:1.*" in the suggestions area of composer.json
  • vendor folders are there to install third party code.

    VENDORPATH is where composer installs it's packages.You're not suppose to do anything in there manually.

    There are two other vendor folders, in APPPATH and in COREPATH. External non-composer dependencies are installed in COREPATH./vendor. This is where you'll find framework dependencies like Htmlawed. You can install your app's external dependencies in APPPATH./vendor.

    You're probably right, Parser has had Dwoo support for quite some time. I personally have never used it, so if you can modify it to support both v1 and v2, and send in a pull request?
  • I don't realy get it :( So, for instance, I'd like to use Guzzle HTTP Client in my App... If I've understood you correctly, the Guzzle should be installed into APPPATH/vendor folder and NOT in VENDORPATH, right ?!

    How do I do it ? If I'll run composer require "guzzle/guzzle" comopoeser will install it into VENDORPATH

    P.S. I would like send you a pull request, but it seems, that I'm not so far yet. I have to play around with Dwoo v1.x (which ist not on packagelist for composer) and with Dwoo v2.x (which ist currently alpha)
  • HarroHarro
    Accepted Answer
    No, you misunderstood me.

    Guzzle is available as a composer package, and composer will install it in ./fuel/vendor (aka VENDORPATH).

    Both the vendor folder in APPPATH and COREPATH are for MANUAL installation of external packages or libraries. Stuff that can not be installed by composer, but you have to copy in yourself. LIke a class you found on or something.

    COREPATH./vendor is limited to third party stuff that comes with the framework, you NEVER do anything in there. APPPATH./vendor is where you can install third party stuff.
  • ok, now I got it, thanks :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion