PHPackages                             rareform/craft-prune - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rareform/craft-prune

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rareform/craft-prune
====================

A package for Craft CMS to prune objects

0.4.1(9mo ago)12141MITPHPPHP &gt;=8.2

Since Mar 24Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/RareFormLabs/craft-prune)[ Packagist](https://packagist.org/packages/rareform/craft-prune)[ RSS](/packages/rareform-craft-prune/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (10)Used By (1)

Craft Prune
===========

[](#craft-prune)

A simple Composer package for the Craft CMS ecosystem to prune fields or property values from objects.

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

[](#installation)

You can install the package via composer:

```
composer require rareform/craft-prune
```

Usage
-----

[](#usage)

```
use rareform\Prune;

// Basic usage: simply pass an array of fields
$prunedData = new Prune($data, ["title", "author", "body", "url", "featuredImage"]);

// Advanced object syntax
$prunedData = new Prune($data, [
    'title' => true,
    'id' => true,
    'uri' => true,
    // Related fields simple array syntax
    'author' => ['username', 'email'],
    // Related fields object syntax
    'mainImage' => [
        'url' => true,
        'uploader' => [
            // Nested related fields
            'email' => true,
            'username' => true,
        ],
    ],
    // Matrix fields
    'contentBlocks' => [
        // Denote query traits with $ prefix
        '$limit' => 10,
        // Designate distinct prune fields per type with _ prefix
        '_body' => [
            'body' => true,
            'intro' => true,
        ],
        '_fullWidthImage' => [
            'image' => ['url', 'alt'],
        ],
    ],
]);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance58

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Recently: every ~15 days

Total

7

Last Release

289d ago

### Community

Maintainers

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

---

Top Contributors

[![chasegiunta](https://avatars.githubusercontent.com/u/1377169?v=4)](https://github.com/chasegiunta "chasegiunta (10 commits)")

### Embed Badge

![Health badge](/badges/rareform-craft-prune/health.svg)

```
[![Health](https://phpackages.com/badges/rareform-craft-prune/health.svg)](https://phpackages.com/packages/rareform-craft-prune)
```

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

395798.1k10](/packages/spicyweb-craft-neo)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[verbb/vizy

A flexible visual editor field for Craft.

4348.6k](/packages/verbb-vizy)[verbb/social-poster

Automatically post entries to social media.

918.5k](/packages/verbb-social-poster)

PHPackages © 2026

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