On Fri, Feb 22, 2013 at 3:44 PM, mpalourdio <[email protected]> wrote:
> Thanks a lot for these explanations !
>
> If i well understand what you're saying, The zf2 file location used in my
> project is the one in vendor, because I installed zf2 from composer via the
> skeleton application ? (php composer.phar install)

There are two locations in vendor it can be installed.

Composer will install to vendor/zendframework/zendframework/
(basically, composer uses the package name as the path under vendor).

vendor/ZF2 is the location that the default git submodule we define in
the skeleton app will install to if you use it.

> With auto-installing zf2 with composer, the project considers to use zf2
> files in vendor ?

Yes and no -- what happens is that Composer also installs autoloaders
for the packages it manages. So, if you install ZF2 via Composer, it
will autoload files for ZF2.

> So,
>
> if (file_exists('vendor/autoload.php')) {
>     $loader = include 'vendor/autoload.php';
> }
>
> is the key ? It means 'if this file can't be included', so composer hasn't
> been used, and use user-defined pathes. Am I right ?

Correct.

> To conclude, if I want to achieve my goal, I just have not to install zf2
> files by composer, but manually ?

I'm not entirely sure of your goals, but I think you get it now. :)



-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to