PHPackages                             mvccore/packager - 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. [Framework](/categories/framework)
4. /
5. mvccore/packager

ActiveLibrary[Framework](/categories/framework)

mvccore/packager
================

Library to pack any type of app into PHAR archive or any MvcCore app into single PHP super fast result file.

v2.5.1(2y ago)320412BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jan 5Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (24)Used By (2)

Packager
========

[](#packager)

[![Latest Stable Version](https://camo.githubusercontent.com/8d37e3a176953121684a691d678813a6ec8ff87385fab6c4fb8133e5f9131d28/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537461626c652d76322e352e312d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://github.com/mvccore/packager/releases)[![License](https://camo.githubusercontent.com/53baed538c1c87a033a212f6f4acce684d36137f8622307643ab25e08118452e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)

Features
--------

[](#features)

- pack PHP MvcCore application into single PHP file
- pack any PHP application into PHAR archive

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

[](#installation)

```
composer require mvccore/packager
```

Configuration
-------------

[](#configuration)

- directory with whole app source to pack (`/development/...`)
- result `index.php` file where to store packed result
- no needs to define PHP scripts order anymore - automatic order detecting by reading PHP scripts
- exclude patterns by regular expressions to exclude any files or folders from app source
- string replacements applied on every packed PHP file before minimalization
- minimalizing PHTML templates
- minimalizing PHP scripts
- PHP packing has now 4 options, how implemented file system wrapping functions could behave:
    - strict package mode (`\Packager_Php::FS_MODE_STRICT_PACKAGE`) (everything is only possible to get from `index.php`, very fast for specific application types in **IIS/PHP/op\_cache**)
    - strict hard drive mode (`\Packager_Php::FS_MODE_STRICT_HDD`) (no file system wrapping functions)
    - php library mode (`\Packager_Php::FS_MODE_PHP_LIBRARY`) (no file system wrapping functions, no PHP code replacements except namespace merge)
    - preserve php package mode (`\Packager_Php::FS_MODE_PRESERVE_PACKAGE`) (first there is check if it is possible to get anything from `index.php`, then from hard drive)
    - preserve hard drive mode (`\Packager_Php::FS_MODE_PRESERVE_HDD`) (first there is check if it is possible to get anything from hard drive, then from `index.php`)
- there are implemented those file system wrapping functions and constants:
    - `__DIR__` and `__FILE__`
    - `require_once();`, `include_once();`, `require();`, `include();`
    - `new DirectoryIterator();`, `new SplFileInfo();`
    - `readfile();`, `file_get_contents();`
    - `file_exists();`, `is_file();`, `is_dir();`, `mkdir()`, `filemtime();`, `filesize();`
    - `simplexml_load_file();`, `parse_ini_file();`, `md5_file();`
- possibility to define which file system wrapping functions should be keeped and not wrapped
- for PHP packing - possibility to define files by extension how to store them inside `index.php` result
    - pure text
    - php code
    - binary
    - gzipped content
    - base64 encoded content

Examples
--------

[](#examples)

- [**Example Hallo World (mvccore/example-helloworld)**](https://github.com/mvccore/example-helloworld)
- [**Example Pig Latin Translator (example-translator)**](https://github.com/mvccore/example-translator)
- [**Example CD Collection (mvccore/example-cdcol)**](https://github.com/mvccore/example-cdcol)
- [**Application XML Documents (mvccore/app-xmldocs)**](https://github.com/mvccore/app-xmldocs)
- [**Application Questionnaires (mvccore/app-questionnaires)**](https://github.com/mvccore/app-questionnaires)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~115 days

Recently: every ~449 days

Total

23

Last Release

884d ago

PHP version history (2 changes)v2.0.1PHP &gt;=5.3.0

v2.3.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a68d9cd696ed584a9ee742fa089d0650f4f7a95754bf5d9ee301e6c9013df3fd?d=identicon)[tomFlidr](/maintainers/tomFlidr)

---

Top Contributors

[![tomFlidr](https://avatars.githubusercontent.com/u/1833722?v=4)](https://github.com/tomFlidr "tomFlidr (120 commits)")

---

Tags

frameworkmvcpackagerpackingmvccorepacked apppacking to pharpacking to phpsuper fast php appsingle file app

### Embed Badge

![Health badge](/badges/mvccore-packager/health.svg)

```
[![Health](https://phpackages.com/badges/mvccore-packager/health.svg)](https://phpackages.com/packages/mvccore-packager)
```

PHPackages © 2026

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