PHPackages                             danelsan/pharven - 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. danelsan/pharven

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

danelsan/pharven
================

Pharven bundles your vendor directory into a PHP Archive (PHAR)

0.1.1(9y ago)010MITPHPPHP &gt;=7.1

Since May 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/danelsan/pharven)[ Packagist](https://packagist.org/packages/danelsan/pharven)[ Docs](https://github.com/cdtweb/pharven)[ RSS](/packages/danelsan-pharven/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Pharven
=======

[](#pharven)

[![Build Status](https://camo.githubusercontent.com/1ff14ec6387abbed7212931a7b52b46c436fcc17374ece972259125ac0242cac/68747470733a2f2f7472617669732d63692e6f72672f6364747765622f7068617276656e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cdtweb/pharven)

If you have ever needed to commit your `vendor/` directory into your project repository then Pharven was built for you.

Pharven bundles your vendor directory into a single PHP Archive (PHAR) and allows you to commit and deploy a single file instead of your entire `vendor/` directory.

Installation
------------

[](#installation)

Add Pharven to your project using Composer:

```
composer require cdtweb/pharven

```

Usage
-----

[](#usage)

Add `pharven.json` to your project root with the following content:

```
{
    "mount_dirs": [
        "src"
    ]
}

```

**mount\_dirs** are important if you are using Composer to autoload your project classes. `.phar` files act as their own file system, so if your classes aren't mounted, they won't be visible to the Composer autoloader.

Run Pharven to create/update your PHAR file:

```
php vendor/bin/pharven

```

A new file named `pharven.phar` will be added to the working directory. Update your bootstrap to include `./pharven.phar` instead of `vendor/autoload.php` and you're good to go.

```
