PHPackages                             fastbolt/entity-archiver-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. fastbolt/entity-archiver-bundle

ActiveSymfony-bundle

fastbolt/entity-archiver-bundle
===============================

Archives Doctrine entities

0473PHP

Since Oct 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fastbolt/entity-archiver)[ Packagist](https://packagist.org/packages/fastbolt/entity-archiver-bundle)[ RSS](/packages/fastbolt-entity-archiver-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

EntityArchiverBundle handles automatic archiving or removal of doctrine entities in the application.

Installation:

```
composer require fastbolt/entity-archiver-bundle
```

You will need to create an entity-archiver.yaml file in your config directory. See 'Configuration' below.

To use the command, you will need to add the following line to the bundles.php:

```
Fastbolt\EntityArchiverBundle\EntityArchiverBundle::class => ['all' => true]
```

Execute by using this command:

```
php bin/console entity-archiver:run
```

**Options:**

*--dry-run*Will only display the results table, showing all entities from entity-archiver.yaml, the total number of entries in the origin table and the number of entities selected for archiving

*--update-schema*Will update the archive tables based on the configuration in entity-archiver.yaml

***Configuration***

Example:

```
#entity-archiver.yaml
entity_archiver:
    table_suffix: archive
    entities:
        -   entity: App\Entity\Log
            strategy: archive
            filters:
                - {
                    type: age,
                    age: 1,
                    unit: months,
                    field: created_at
                }
            archivingDateFieldName: archived_at
            fields: [
                'id',
                'item_type',
                'item_id',
                'item_description',
                'item_action',
                'fk_client_id',
                'fk_user_id'
        ]
```

```
table_suffix           Suffix of the tables created by the bundle to hold the archived entities

addArchivedAt          Wether to add a field for the archiving date in the archive table
archivingDateFieldName Field name of the generated date field holding the date when the archiving was done, default 'archived_at'
strategy               What to do with the entity when it is selected to be archived
    - remove           Deletes the enitity using the 'id'-column
    - archive          Removes it from the original table and pastes a non-unique copy to the archive table
filters:
    - type: age
        - age          integer
        - unit         ("days"/"months"/"years")
        - field        Entity field that is used to determin the age of the entry (Datetime)

```

***Adding new Filters and Strategies:***New filters need to implement the EntityArchivingFilterInterface, while strategies will need to implement the ArchivingStrategyInterface. Add the corresponding tag in the services.yaml.

```
Fastbolt\EntityArchiverBundle\Filter\AgeArchivingFilter:
tags: [ 'fastbolt.archiver.filter' ]

Fastbolt\EntityArchiverBundle\Strategy\ArchiveStrategy:
    tags: [ 'fastbolt.archiver.strategy' ]
```

***Make doctrine ignore archive Tables:***Doctrine will generate migrations to delete the generated archive tables, as they are not connected to an entity. To prevent that, add an exception to your doctrine configuration (replace '\_archive' if you changed the table suffix):

```
#doctrine.yaml
doctrine:
    dbal:
        schema_filter: ~^(?!.*_archive$)~
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 97.4% 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.

### Community

Maintainers

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

---

Top Contributors

[![StvL97](https://avatars.githubusercontent.com/u/95848687?v=4)](https://github.com/StvL97 "StvL97 (74 commits)")[![dhirtzbruch](https://avatars.githubusercontent.com/u/426308?v=4)](https://github.com/dhirtzbruch "dhirtzbruch (2 commits)")

### Embed Badge

![Health badge](/badges/fastbolt-entity-archiver-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/fastbolt-entity-archiver-bundle/health.svg)](https://phpackages.com/packages/fastbolt-entity-archiver-bundle)
```

PHPackages © 2026

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