PHPackages                             sunnysideup/silverstripe-garbage-collector - 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. [Database &amp; ORM](/categories/database)
4. /
5. sunnysideup/silverstripe-garbage-collector

ActiveLibrary[Database &amp; ORM](/categories/database)

sunnysideup/silverstripe-garbage-collector
==========================================

SilverStripe Garbage Collector module

2.0.1(2mo ago)01321MITPHP

Since Jul 27Pushed 2mo agoCompare

[ Source](https://github.com/sunnysideup/silverstripe-garbage-collector)[ Packagist](https://packagist.org/packages/sunnysideup/silverstripe-garbage-collector)[ RSS](/packages/sunnysideup-silverstripe-garbage-collector/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (7)Versions (12)Used By (1)

SilverStripe Garbage Collection Module
======================================

[](#silverstripe-garbage-collection-module)

[![PHPUnit](https://github.com/brettt89/silverstripe-garbage-collector/actions/workflows/php.yml/badge.svg)](https://github.com/brettt89/silverstripe-garbage-collector/actions/workflows/php.yml) [![codecov](https://camo.githubusercontent.com/ca5d050a0dab28ef32f9ec4d64a3e852c7730b971077d20a20f5add34a66df5f/68747470733a2f2f636f6465636f762e696f2f67682f62726574747438392f73696c7665727374726970652d676172626167652d636f6c6c6563746f722f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d464545454a5038333737)](https://codecov.io/gh/brettt89/silverstripe-garbage-collector)

Overview
--------

[](#overview)

SilverStripe Module for defining and processing Garbage Collection on SilverStripe Applications.

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

[](#installation)

```
composer require brettt89/silverstripe-garbage-collector

```

Basic Usage
-----------

[](#basic-usage)

The below example shows how you can enable and configure the VersionedCollector and ChangeSetCollector for your application.

```
---
Name: GarbageCollectors
---
SilverStripe\GarbageCollector\Collectors\VersionedCollector:
  # Increase Versioned keep limit to 10 records
  keep_limit: 10
  # Define base classes to collect versions for
  base_classes:
    - SilverStripe\CMS\Model\SiteTree

SilverStripe\GarbageCollector\Collectors\ChangeSetCollector:
  # Reduce Changeset Lifetime to 10 days
  deletion_lifetime: 10

# Register collectors with service
SilverStripe\GarbageCollector\GarbageCollectorService:
  collectors:
    - 'SilverStripe\GarbageCollector\Collectors\VersionedCollector'
    - 'SilverStripe\GarbageCollector\Collectors\ChangeSetCollector'

#Queue a RecurringAllGarbageCollectorJob if there isn't one already. It will then re-queue itself to run once a day.
Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor:
  extensions:
    - 'SilverStripe\GarbageCollector\Extensions\QueuedJobDescriptorExtension'
```

The example setup will create a job that run all garbadge collectors every day after running dev build. It does this by calling `GarbageCollectorService::inst()->process();`.

You also may decide to do this with some other process (BuildTask with Crontab that calls `GarbageCollectorService::inst()->process();`)

Documentation
-------------

[](#documentation)

Garbage Collection is based on the idea of removal/processing of records and items that may not have native garbage collection. This should be extendable to work with any type of data set as long as there are corresponding processors.

### Components

[](#components)

- [Collectors](./docs/en/Collectors.md)
- [Processors](./docs/en/Processors.md)
- [Garbage Collector Service](./docs/en/Garbage-Collector-Service.md)

### Guides

[](#guides)

- [Advanced Usage](./docs/en/Advanced-Usage.md)

Reporting Issues
----------------

[](#reporting-issues)

Please [create an issue](https://github.com/brettt89/silverstripe-garbage-collector/issues) for any bugs you've found, or features you're missing.

License
-------

[](#license)

This module is released under the [MIT License](LICENSE)

Credits
-------

[](#credits)

This project is made possible by the community surrounding it and especially the wonderful people and projects listed in this document.

### Contributors

[](#contributors)

- Brett Tasker ()
- Mojmir Fendek ()

### Libraries

[](#libraries)

- [silverstripe/framework](https://github.com/silverstripe/silverstripe-framework)

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance88

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~249 days

Recently: every ~162 days

Total

8

Last Release

60d ago

Major Versions

1.2.1 → 5.x-dev2026-04-28

5.x-dev → 6.x-dev2026-04-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/167154?v=4)[Sunny Side Up](/maintainers/sunnysideup)[@sunnysideup](https://github.com/sunnysideup)

---

Top Contributors

[![brettt89](https://avatars.githubusercontent.com/u/4122344?v=4)](https://github.com/brettt89 "brettt89 (34 commits)")[![sunnysideup](https://avatars.githubusercontent.com/u/167154?v=4)](https://github.com/sunnysideup "sunnysideup (22 commits)")[![michalkleiner](https://avatars.githubusercontent.com/u/233342?v=4)](https://github.com/michalkleiner "michalkleiner (8 commits)")[![edwilde](https://avatars.githubusercontent.com/u/415374?v=4)](https://github.com/edwilde "edwilde (8 commits)")[![jamesLiAKQA](https://avatars.githubusercontent.com/u/87284202?v=4)](https://github.com/jamesLiAKQA "jamesLiAKQA (5 commits)")[![mfendeksilverstripe](https://avatars.githubusercontent.com/u/26395487?v=4)](https://github.com/mfendeksilverstripe "mfendeksilverstripe (1 commits)")[![elliot-sawyer](https://avatars.githubusercontent.com/u/354793?v=4)](https://github.com/elliot-sawyer "elliot-sawyer (1 commits)")

---

Tags

databaseversionssilverstripeversioningcollectorgarbageobsoletepruningstalepruner

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sunnysideup-silverstripe-garbage-collector/health.svg)

```
[![Health](https://phpackages.com/badges/sunnysideup-silverstripe-garbage-collector/health.svg)](https://phpackages.com/packages/sunnysideup-silverstripe-garbage-collector)
```

###  Alternatives

[brettt89/silverstripe-garbage-collector

SilverStripe Garbage Collector module

1010.7k](/packages/brettt89-silverstripe-garbage-collector)[silverstripe/postgresql

SilverStripe now has tentative support for PostgreSQL ('Postgres')

16258.7k2](/packages/silverstripe-postgresql)[silverstripe/mssql

Adds MSSQL support to SilverStripe

157.8k1](/packages/silverstripe-mssql)

PHPackages © 2026

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