PHPackages                             cemerson/trespass - 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. cemerson/trespass

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

cemerson/trespass
=================

A library for modifying private properties of PHP 7 classes from an external context

v1.2(3y ago)02.1kMITPHPPHP ^7.0|^8.0

Since Oct 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/chrisemerson/trespass)[ Packagist](https://packagist.org/packages/cemerson/trespass)[ RSS](/packages/cemerson-trespass/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

cemerson/trespass
=================

[](#cemersontrespass)

A library for modifying private properties of PHP 7 classes from an external context.

Whether it's a good idea to trample all over private properties or not, I don't know, but there may be several reasons you would want to. My use case was providing a database layer with the opportunity to inject insert IDs, current dates etc into an entity class without providing setters which user-land code could abuse or misuse.

Usage is very simple - simply call the static method `Trespass::setProperties()` and pass in the object and an array of property values you want to set.

Future versions of this library may offer more options such as the ability to not overwrite non-empty properties, or checking for the existence of them before setting. Suggestions, Issues &amp; Pull Requests all welcome!

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

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

Total

3

Last Release

1319d ago

PHP version history (2 changes)v1.0PHP ^7.0

v1.2PHP ^7.0|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1080397?v=4)[EM3R50N](/maintainers/cemerson)[@cemerson](https://github.com/cemerson)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cemerson-trespass/health.svg)

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

###  Alternatives

[bostondv/acf-ninja-forms

Adds an Advanced Custom Fields field to select one or many Ninja Forms.

1525.1k](/packages/bostondv-acf-ninja-forms)

PHPackages © 2026

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