PHPackages                             felixdorn/property-accessor - 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. felixdorn/property-accessor

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

felixdorn/property-accessor
===========================

Read an unaccessible property with a nice helper

1.0.1(4y ago)025MITPHPPHP ^8.0

Since Mar 29Pushed 4y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Property Accessor
=================

[](#property-accessor)

[![Tests](https://github.com/felixdorn/property-accessor/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/felixdorn/property-accessor/actions/workflows/tests.yml)[![Formats](https://github.com/felixdorn/property-accessor/actions/workflows/formats.yml/badge.svg?branch=master)](https://github.com/felixdorn/property-accessor/actions/workflows/formats.yml)[![Version](https://camo.githubusercontent.com/c8add315825f22157639498a3777c3eca4a7b52ecda4f637e44e57d9a3657fee/68747470733a2f2f706f7365722e707567782e6f72672f66656c6978646f726e2f70726f70657274792d6163636573736f722f76657273696f6e)](//packagist.org/packages/felixdorn/property-accessor)[![Total Downloads](https://camo.githubusercontent.com/41e7a802ac2075ed4b8ac4222e74219287fc6491c0015253b0f9fadcc27b9a65/68747470733a2f2f706f7365722e707567782e6f72672f66656c6978646f726e2f70726f70657274792d6163636573736f722f646f776e6c6f616473)](//packagist.org/packages/felixdorn/property-accessor)[![License](https://camo.githubusercontent.com/2e3956c408667c8d4de479a32c738bb4d6adf88347e4f3922952eb1a885b90b3/68747470733a2f2f706f7365722e707567782e6f72672f66656c6978646f726e2f70726f70657274792d6163636573736f722f6c6963656e7365)](//packagist.org/packages/felixdorn/property-accessor)

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

[](#installation)

> Requires [PHP 8.0.0+](https://php.net/releases)

You can install the package via composer:

```
composer require felixdorn/property-accessor
```

Usage
-----

[](#usage)

```
use function \Felix\PropertyAccessor\access;

class Book {
    protected string $name = 'Harry Potter';
    protected int $isbn = 44081224;
}

$object = new Book();
access($object, 'isbn');  // returns 44081224

// Properties are injected based on the parameter name passed to the function.
access($object, function ($isbn, $name) {
    return $isbn . ' - ' . $name;
}); // returns '44081124 - Harry Potter'

access($object, ['isbn', 'name']); // returns ['isbn' => 44081224, 'name' => 'Harry Potter']
```

Testing
-------

[](#testing)

```
composer test
```

**Property Accessor** was created by **[Félix Dorn](https://twitter.com/afelixdorn)** under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~24 days

Total

3

Last Release

1820d ago

Major Versions

0.1.0 → 1.0.02021-05-16

PHP version history (2 changes)0.1.0PHP ^7.4

1.0.0PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![felixdorn](https://avatars.githubusercontent.com/u/55788595?v=4)](https://github.com/felixdorn "felixdorn (7 commits)")

---

Tags

package

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/felixdorn-property-accessor/health.svg)

```
[![Health](https://phpackages.com/badges/felixdorn-property-accessor/health.svg)](https://phpackages.com/packages/felixdorn-property-accessor)
```

###  Alternatives

[laracademy/generators

This package will generate a Laravel Model based on your database table itself, filling in the required fields automatically.

355346.4k4](/packages/laracademy-generators)[beyondcode/laravel-vouchers

Allow users to redeem vouchers that are bound to models..

70763.4k2](/packages/beyondcode-laravel-vouchers)[sixlive/nova-text-copy-field

Laravel Nova text field with click to copy support

70708.2k2](/packages/sixlive-nova-text-copy-field)[happyr/message-serializer

Serialize classes the good way.

80491.3k](/packages/happyr-message-serializer)[percymamedy/laravel-dev-booter

Boost your Laravel app by registering Prod services only on Prod.

35320.7k1](/packages/percymamedy-laravel-dev-booter)[h4kuna/number-format

Object wrapper above number\_format

1889.3k2](/packages/h4kuna-number-format)

PHPackages © 2026

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