PHPackages                             johnpbloch/invade - 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. johnpbloch/invade

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

johnpbloch/invade
=================

A copy of the invade function from Livewire

v1.0.0(4y ago)121.5k↓43.5%1MITPHPPHP &gt;7.4.0

Since Feb 11Pushed 4y ago1 watchersCompare

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

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

Invade
======

[](#invade)

Invade is a utility library shamelessly stolen from [Livewire for Laravel](https://github.com/livewire/livewire). Using `invade()`, you can easily access all private and protected properties and methods of a class. This is nothing revolutionary or complicated, but it is *terribly* convenient. I created this as its own package for two reasons:

1. I wanted to be able to require this function as a dev dependency, since I don't love the idea of this function being available in non-dev installations
2. I wanted to use it in non-Laravel codebases

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

[](#installation)

```
composer require --dev johnpbloch/invade
```

Usage
-----

[](#usage)

```
# supposing there is a class like this:
class StateManager {
    private $dataYouAreDebugging = [];
    /* ... */
}

# and supposing you have an instance of StateManager and you need to see that data:
/** @var StateManager $instance */
\var_dump(\invade($instance)->dataYouAreDebugging);
```

`invade()` will also give you the ability to set non-public properties and to call non-public methods.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

1557d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/044e10bd302ddb296511f2a463f61314bc17338c34fc0d292d05a425c655bc34?d=identicon)[johnpbloch](/maintainers/johnpbloch)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/johnpbloch-invade/health.svg)

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

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[bestmomo/laravel5-3-installer

Helper for Laravel 5.3 application installation

174.7k](/packages/bestmomo-laravel5-3-installer)

PHPackages © 2026

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