PHPackages                             duncan3dc/object-intruder - 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. duncan3dc/object-intruder

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

duncan3dc/object-intruder
=========================

A small library to access private/protected properties/methods of objects

1.2.0(1mo ago)5373.6k↓68%320Apache-2.0PHPPHP ^7.4 || ^8.0CI passing

Since Oct 30Pushed 3w ago1 watchersCompare

[ Source](https://github.com/duncan3dc/object-intruder)[ Packagist](https://packagist.org/packages/duncan3dc/object-intruder)[ Docs](https://github.com/duncan3dc/object-intruder)[ RSS](/packages/duncan3dc-object-intruder/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (11)Versions (10)Used By (20)

object-intruder
===============

[](#object-intruder)

A small PHP library to access private/protected properties/methods of objects

[![release](https://camo.githubusercontent.com/c0bf4d94ec33728443a3f1d78a21bd5e5fcc9000552a9a061119f614213e70b7/68747470733a2f2f706f7365722e707567782e6f72672f64756e63616e3364632f6f626a6563742d696e7472756465722f76657273696f6e2e737667)](https://packagist.org/packages/duncan3dc/object-intruder)[![build](https://github.com/duncan3dc/object-intruder/workflows/buildcheck/badge.svg?branch=main)](https://github.com/duncan3dc/object-intruder/actions?query=branch%3Amain+workflow%3Abuildcheck)[![coverage](https://camo.githubusercontent.com/f82125a879219dce5163b1c3f30ef6a38766b14d61d6c7d041fdf264ef1bb681/68747470733a2f2f636f6465636f762e696f2f67682f64756e63616e3364632f6f626a6563742d696e7472756465722f67726170682f62616467652e737667)](https://codecov.io/gh/duncan3dc/object-intruder)

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

[](#installation)

The recommended method of installing this library is via [Composer](//getcomposer.org/).

Run the following command from your project root:

```
$ composer require duncan3dc/object-intruder
```

Usage
-----

[](#usage)

```
use duncan3dc\ObjectIntruder\Intruder;

$table = new Intruder(new Table);
$table->secretMethodNotPublic("Hello", "World");
$table->privateStuff = "modified";
```

Unfortunatly due to a limitation of [\_\_call](http://php.net/manual/en/language.oop5.overloading.php#object.call) methods with parameters passed by reference are not supported. However there is a workaround available using the `_call()` method:

```
$stuff = "start";

$table = new Intruder(new Table);
$table->_call("secretMethod", $stuff, Table::MODIFY);
```

Changelog
---------

[](#changelog)

A [Changelog](CHANGELOG.md) has been available since the beginning of time

Where to get help
-----------------

[](#where-to-get-help)

Found a bug? Got a question? Just not sure how something works?
Please [create an issue](//github.com/duncan3dc/object-intruder/issues) and I'll do my best to help out.
Alternatively you can catch me on [Twitter](https://twitter.com/duncan3dc)

###  Health Score

62

↑

FairBetter than 99% of packages

Maintenance95

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 98.1% 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 ~700 days

Recently: every ~815 days

Total

6

Last Release

30d ago

Major Versions

0.3.0 → 1.0.02020-12-10

PHP version history (2 changes)0.1.0PHP ^5.6|^7.0

1.0.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/11dc66042513f11d1c99b1e6763f25dca84a3ff31cdbea3972b9b804a3d3d5e9?d=identicon)[duncan3dc](/maintainers/duncan3dc)

---

Top Contributors

[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (51 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

phpreflectionreflectionprivatepublicprotected

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/duncan3dc-object-intruder/health.svg)

```
[![Health](https://phpackages.com/badges/duncan3dc-object-intruder/health.svg)](https://phpackages.com/packages/duncan3dc-object-intruder)
```

###  Alternatives

[phpdocumentor/reflection-common

Common reflection classes used by phpdocumentor to reflect the code structure

9.1k736.5M37](/packages/phpdocumentor-reflection-common)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k317.3M3.2k](/packages/symfony-property-access)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12525.9M149](/packages/phpdocumentor-reflection)[php-di/phpdoc-reader

PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)

7733.3M58](/packages/php-di-phpdoc-reader)[ffraenz/private-composer-installer

A composer install helper for private packages

2321.7M5](/packages/ffraenz-private-composer-installer)[spatie/php-attribute-reader

A clean API for working with PHP attributes

891.4M17](/packages/spatie-php-attribute-reader)

PHPackages © 2026

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