PHPackages                             atheon/proxy-manager - 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. atheon/proxy-manager

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

atheon/proxy-manager
====================

A library providing utilities to generate, instantiate and generally operate with Object Proxies

2.15.0(3y ago)016MITPHPPHP ^8.0

Since Mar 23Pushed 3y agoCompare

[ Source](https://github.com/Atheon/ProxyManager)[ Packagist](https://packagist.org/packages/atheon/proxy-manager)[ Docs](https://github.com/Ocramius/ProxyManager)[ GitHub Sponsors](https://github.com/Ocramius)[ Fund](https://tidelift.com/funding/github/packagist/ocramius/proxy-manager)[ RSS](/packages/atheon-proxy-manager/feed)WikiDiscussions 2.15.x Synced 1mo ago

READMEChangelog (1)Dependencies (10)Versions (91)Used By (0)

Proxy Manager
=============

[](#proxy-manager)

A message to Russian 🇷🇺 people
------------------------------

[](#a-message-to-russian--people)

If you currently live in Russia, please read [this message](./ToRussianPeople.md).

Purpose
-------

[](#purpose)

This library aims to provide abstraction for generating various kinds of [proxy classes](http://ocramius.github.io/presentations/proxy-pattern-in-php/).

[![ProxyManager](https://raw.githubusercontent.com/Ocramius/ProxyManager/917bf1698243a1079aaa27ed8ea08c2aef09f4cb/proxy-manager.png)](https://raw.githubusercontent.com/Ocramius/ProxyManager/917bf1698243a1079aaa27ed8ea08c2aef09f4cb/proxy-manager.png)

[![Mutation testing badge](https://camo.githubusercontent.com/11960363a7e8c7b03b649042c54cae74dc7190c9009d701060dcf3fe61a99b75/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532464f6372616d69757325324650726f78794d616e616765722532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/Ocramius/ProxyManager/master)[![Type Coverage](https://camo.githubusercontent.com/18f5ece3a7568f5630d399b7eb79b0db2037f50ce4fd3fea0e01317f12553ea2/68747470733a2f2f73686570686572642e6465762f6769746875622f4f6372616d6975732f50726f78794d616e616765722f636f7665726167652e737667)](https://shepherd.dev/github/Ocramius/ProxyManager)

[![Total Downloads](https://camo.githubusercontent.com/46a9e62eb92c0e95995a5f21ce35c9cfa72168babb2c37f75857029050a149a0/68747470733a2f2f706f7365722e707567782e6f72672f6f6372616d6975732f70726f78792d6d616e616765722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/ocramius/proxy-manager)[![Latest Stable Version](https://camo.githubusercontent.com/142f9254b07a0a57b10d89b8738d0ef4170ceb50a0cd43e12b9f114a4bd5b1b2/68747470733a2f2f706f7365722e707567782e6f72672f6f6372616d6975732f70726f78792d6d616e616765722f762f737461626c652e706e67)](https://packagist.org/packages/ocramius/proxy-manager)[![Latest Unstable Version](https://camo.githubusercontent.com/a962bf5b9b5722c05ea997778d03a97ee55b15da2bda372799c92aff2c6e19e6/68747470733a2f2f706f7365722e707567782e6f72672f6f6372616d6975732f70726f78792d6d616e616765722f762f756e737461626c652e706e67)](https://packagist.org/packages/ocramius/proxy-manager)

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

[](#documentation)

You can learn about the proxy pattern and how to use the **ProxyManager** in the [docs](docs).

ocramius/proxy-manager for enterprise
-------------------------------------

[](#ocramiusproxy-manager-for-enterprise)

Available as part of the Tidelift Subscription.

The maintainer of ocramius/proxy-manager and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-ocramius-proxy-manager?utm_source=packagist-ocramius-proxy-manager&utm_medium=referral&utm_campaign=enterprise&utm_term=repo).

You can also contact the maintainer at  for looking into issues related to this package in your private projects.

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

[](#installation)

The suggested installation method is via [composer](https://getcomposer.org/):

```
php composer.phar require ocramius/proxy-manager
```

Proxy example
-------------

[](#proxy-example)

Here's how you build a lazy loadable object with ProxyManager using a *Virtual Proxy*

```
$factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory();

$proxy = $factory->createProxy(
    \MyApp\HeavyComplexObject::class,
    function (& $wrappedObject, $proxy, $method, $parameters, & $initializer) {
        $wrappedObject = new \MyApp\HeavyComplexObject(); // instantiation logic here
        $initializer   = null; // turning off further lazy initialization

        return true; // report success
    }
);

$proxy->doFoo();
```

See the [documentation](docs) for more supported proxy types and examples.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 87.4% 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 ~41 days

Recently: every ~58 days

Total

86

Last Release

1301d ago

Major Versions

0.5.2 → 1.0.0-beta12014-10-08

1.0.2 → 2.0.0-BETA12016-01-23

PHP version history (12 changes)0.1.0PHP &gt;=5.3.3

2.0.0-BETA1PHP ~7.0

2.0.2PHP 7.0.0 - 7.0.5 || ^7.0.7

2.1.0PHP ^7.1.0

2.2.0PHP ^7.2.0

2.3.0PHP ^7.4.0

2.6.0PHP 7.4.\*

2.7.1PHP 7.4.0

2.8.0PHP ~7.4.1

2.11.0PHP ~7.4.1 || ~8.0.0

2.14.0PHP ~8.0.0

2.15.x-devPHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (2361 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (109 commits)")[![blanchonvincent](https://avatars.githubusercontent.com/u/1580512?v=4)](https://github.com/blanchonvincent "blanchonvincent (86 commits)")[![malukenho](https://avatars.githubusercontent.com/u/3275172?v=4)](https://github.com/malukenho "malukenho (31 commits)")[![pedro-stanaka](https://avatars.githubusercontent.com/u/2609731?v=4)](https://github.com/pedro-stanaka "pedro-stanaka (15 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (10 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (10 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (6 commits)")[![martinssipenko](https://avatars.githubusercontent.com/u/598744?v=4)](https://github.com/martinssipenko "martinssipenko (6 commits)")[![greg0ire](https://avatars.githubusercontent.com/u/657779?v=4)](https://github.com/greg0ire "greg0ire (6 commits)")[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (5 commits)")[![fmasa](https://avatars.githubusercontent.com/u/5658260?v=4)](https://github.com/fmasa "fmasa (5 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (5 commits)")[![hultberg](https://avatars.githubusercontent.com/u/1257913?v=4)](https://github.com/hultberg "hultberg (5 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (5 commits)")[![muglug](https://avatars.githubusercontent.com/u/2292638?v=4)](https://github.com/muglug "muglug (5 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (4 commits)")[![Ludo444](https://avatars.githubusercontent.com/u/7080959?v=4)](https://github.com/Ludo444 "Ludo444 (4 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (3 commits)")[![orklah](https://avatars.githubusercontent.com/u/9605520?v=4)](https://github.com/orklah "orklah (3 commits)")

---

Tags

aopproxyproxy patternservice proxieslazy loading

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/atheon-proxy-manager/health.svg)

```
[![Health](https://phpackages.com/badges/atheon-proxy-manager/health.svg)](https://phpackages.com/packages/atheon-proxy-manager)
```

###  Alternatives

[ocramius/proxy-manager

A library providing utilities to generate, instantiate and generally operate with Object Proxies

5.0k82.4M230](/packages/ocramius-proxy-manager)[friendsofphp/proxy-manager-lts

Adding support for a wider range of PHP versions to ocramius/proxy-manager

1.2k139.1M104](/packages/friendsofphp-proxy-manager-lts)[symfony/var-exporter

Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects

2.1k378.1M441](/packages/symfony-var-exporter)[fideloper/proxy

Set trusted proxies for Laravel

7.3k174.4M559](/packages/fideloper-proxy)[vkartaviy/retry

The library for repeatable and retryable operations

29227.2k2](/packages/vkartaviy-retry)[magepal/magento2-cataloglazyload

Improve the load time of your Magento 2 categories pages by loading your images on demand with our Lazy Load Extension

5563.9k](/packages/magepal-magento2-cataloglazyload)

PHPackages © 2026

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