PHPackages                             hostnet/path-composer-plugin-lib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hostnet/path-composer-plugin-lib

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

hostnet/path-composer-plugin-lib
================================

Publish vendor\_dir and base\_dir as constants

1.0.6(1y ago)1251.8k↓11.7%52MITPHPPHP ^7.3||^8.0CI passing

Since Feb 22Pushed 1y ago4 watchersCompare

[ Source](https://github.com/hostnet/path-composer-plugin-lib)[ Packagist](https://packagist.org/packages/hostnet/path-composer-plugin-lib)[ RSS](/packages/hostnet-path-composer-plugin-lib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (9)Used By (2)

README
======

[](#readme)

When do I need this?
--------------------

[](#when-do-i-need-this)

If you are developing a composer package, and you want to know the location of the project root and/or the vendor directory.

Can I do without?
-----------------

[](#can-i-do-without)

Sometimes you will work on your package stand alone, for instance on the unit tests. In that case your vendor directory can be determined relatively to a file.

You of course want your package to function when included via composer. Usually you can determine the vendor directory by going up a couple of directories. But don't forget to take the \[vendor-dir\] () config option into account.

This package takes care of that. Even better: it calculates the directory during composer install. So it's faster.

How do I use it?
----------------

[](#how-do-i-use-it)

```
