PHPackages                             jeffkarney/phar-install - 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. jeffkarney/phar-install

ActiveLibrary

jeffkarney/phar-install
=======================

v1.2.1(6y ago)09MITShell

Since Oct 22Pushed 6y agoCompare

[ Source](https://github.com/jeffkarney/phar-install)[ Packagist](https://packagist.org/packages/jeffkarney/phar-install)[ Docs](https://github.com/dxw/phar-install)[ RSS](/packages/jeffkarney-phar-install/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (9)Used By (0)

phar-install
============

[](#phar-install)

Tool to bundle up contents of `vendor/` into `vendor.phar` file.

This may be useful if you want to put your project in a web-readable directory but you don't want to trawl through all the files in `vendor/` to make sure none of them could allow an attacker to do something they shouldn't be able to do.

Usage
-----

[](#usage)

Add the following to `composer.json`:

```
  "scripts": {
    "post-update-cmd": "vendor/bin/phar-install"
  },

```

Add phar-install:

```
composer require --dev jeffkarney/phar-install

```

`vendor.phar` will be rebuilt automatically every time `composer update` or `composer require` is run.

Now just replace `require(__DIR__.'/vendor/autoload.php');` with `require(__DIR__.'/vendor.phar');`.

### Get composer's autoloader

[](#get-composers-autoloader)

You can also get access to the autoloader object if needed. The phar file will return the autoloader. With this functionality you can add on your own project's namespaced files into the autoloader.

```
$autoload = require_once __DIR__ . '/vendor.phar';
$autoload->add('MyNamespace', __DIR__ . '/src');
```

Copyright
---------

[](#copyright)

Copyright dxw 2015 - see [COPYING.md](COPYING.md)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 72% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~358 days

Total

5

Last Release

2301d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66706418?v=4)[Old Jeff K](/maintainers/jeffk)[@jeffk](https://github.com/jeffk)

---

Top Contributors

[![mallorydxw](https://avatars.githubusercontent.com/u/2256130?v=4)](https://github.com/mallorydxw "mallorydxw (18 commits)")[![jeffkarney](https://avatars.githubusercontent.com/u/201882?v=4)](https://github.com/jeffkarney "jeffkarney (6 commits)")[![rjw1](https://avatars.githubusercontent.com/u/46021?v=4)](https://github.com/rjw1 "rjw1 (1 commits)")

### Embed Badge

![Health badge](/badges/jeffkarney-phar-install/health.svg)

```
[![Health](https://phpackages.com/badges/jeffkarney-phar-install/health.svg)](https://phpackages.com/packages/jeffkarney-phar-install)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
