PHPackages                             ornj/archive-bundle - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. ornj/archive-bundle

ActiveSymfony-bundle[File &amp; Storage](/categories/file-storage)

ornj/archive-bundle
===================

Symfony2 bundle providing a service for archiving/compressing files

0123PHP

Since May 18Pushed 13y ago1 watchersCompare

[ Source](https://github.com/ornj/archive-bundle)[ Packagist](https://packagist.org/packages/ornj/archive-bundle)[ RSS](/packages/ornj-archive-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Ornj ArchiveBundle

This bundle provides a service for creating a zip archive of files on the filesystem. This is useful for delivering multiple files as a single download. At the moment the only supported compression type is Zip through PHP's [ZipArchive](http://php.net/manual/en/class.ziparchive.php) although I indend to expand it to support other formats.

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

[](#installation)

Install this bundle in your Symfony2 project by adding it to your `composer.json`.

```
{
    "require": {
        "ornj/archive-bundle": "dev-master"
    }
}
```

After updating composer, register the bundle in `app/AppKernel.php`.

```
$bundles = array(
   // ...
   new Ornj\Bundle\OrnjArchiveBundle\OrnjArchiveBundle(),
);
```

Usage
-----

[](#usage)

The service currently has a single method `create` which takes an array containing the following parameters:

- `string` **filename**: the name of the resulting archive
- `array` **files**: paths to the files that should be contained in the archive
- `string` **destination**: where to write the archive (if none is supplied, web/uploads will be used)
- `bool` **overwrite**: if the service should write over any archive with the same file name

```
$archive = $this->get('ornj_archive.zip');
$created = $archive->create(array(
    'files'         => $files,
    'filename'      => $entity->getId() . '.zip',
    'destination'   => $basePath. '/archives/',
    'overwrite'     => false
));

if ($created === true) {
    return $this->redirect($webPath. '/archives/' . $entity->getId() . '.zip');
}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/199645?v=4)[Stephen Hurwitz](/maintainers/ornj)[@ornj](https://github.com/ornj)

### Embed Badge

![Health badge](/badges/ornj-archive-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ornj-archive-bundle/health.svg)](https://phpackages.com/packages/ornj-archive-bundle)
```

PHPackages © 2026

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