PHPackages                             myheritage/php-friendly - 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. myheritage/php-friendly

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

myheritage/php-friendly
=======================

A utility for adding non-native class friendship capabilities to PHP applications

v1.1.0(6y ago)7151MITPHPPHP ^7.3CI failing

Since Mar 26Pushed 6y ago17 watchersCompare

[ Source](https://github.com/myheritage/php-friendly)[ Packagist](https://packagist.org/packages/myheritage/php-friendly)[ RSS](/packages/myheritage-php-friendly/feed)WikiDiscussions master Synced 6d ago

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

php-friendly
============

[](#php-friendly)

A utility for adding non-native class friendship capabilities to PHP applications

Overview
--------

[](#overview)

The friend classes [RFC](https://wiki.php.net/rfc/friend-classes) suggested that friend classes would be a php-native feature. Since it was declined we've decided to develop our own non-native solution that solves the same problem - how to make multiple classes under the same namespace "friends", and let them call each-other's protected methods.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.3
- php-unit &gt;= 8.3

Composer Install
----------------

[](#composer-install)

Add the dependency myheritage/php-friendly to your project if you use Composer to manage the dependencies of your project.

```
$ composer require myheritage/php-friendly

```

Usage example
-------------

[](#usage-example)

### Callee

[](#callee)

Shared / Exposed functions must be annotated with the `@friendly` annotation

```
