PHPackages                             danslo/magento2-module-protected-interceptors - 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. danslo/magento2-module-protected-interceptors

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

danslo/magento2-module-protected-interceptors
=============================================

Allows you to create Magento 2 plugins for protected methods.

1.0.0(8y ago)175.7k1[1 issues](https://github.com/danslo/ProtectedInterceptors/issues)MITPHP

Since Mar 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/danslo/ProtectedInterceptors)[ Packagist](https://packagist.org/packages/danslo/magento2-module-protected-interceptors)[ RSS](/packages/danslo-magento2-module-protected-interceptors/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Protected Interceptors for Magento 2
====================================

[](#protected-interceptors-for-magento-2)

With the addition of [interceptors](http://devdocs.magento.com/guides/v2.2/extension-dev-guide/plugins.html), we have a powerful tool to modify the behavior of almost any component in Magento 2.

The core developers have very good reasons to disallow interception of non-public methods. In an ideal world, we would have small classes with minimal inheritance ([composite reuse principle](https://en.wikipedia.org/wiki/Composition_over_inheritance)) with easy to modify public interfaces. In practice, we're still often forced to use [preferences](https://alanstorm.com/magento_2_object_manager_preferences/).

This module modifies the code generator to also generate interceptors for protected methods. That's quite probably a bad thing, and you **should not install** this at all. But maybe you like to learn a bit more about how interception is implemented in Magento 2 and don't mind breaking things. Then go right ahead :)

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

[](#installation)

```
$ composer require danslo/magento2-module-protected-interceptors
```

License
-------

[](#license)

Copyright 2018 Daniel Sloof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

2987d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/743661?v=4)[Daniel Sloof](/maintainers/danslo)[@danslo](https://github.com/danslo)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/danslo-magento2-module-protected-interceptors/health.svg)

```
[![Health](https://phpackages.com/badges/danslo-magento2-module-protected-interceptors/health.svg)](https://phpackages.com/packages/danslo-magento2-module-protected-interceptors)
```

###  Alternatives

[joaopaulolndev/filament-edit-env

Package to edit env file

322.5k](/packages/joaopaulolndev-filament-edit-env)[skovachev/fakefactory

A model factory package for Laravel 4 with expressive API for creating custom tailored dummy objects

291.1k](/packages/skovachev-fakefactory)

PHPackages © 2026

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