PHPackages                             ali-eltaweel/computed-properties - 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. ali-eltaweel/computed-properties

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

ali-eltaweel/computed-properties
================================

A PHP library for computed properties.

1.0.1(11mo ago)01433PHPPHP ^8.1

Since Jun 15Pushed 11mo agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (3)Used By (3)

Computed-Properties
===================

[](#computed-properties)

- [Computed-Properties](#computed-properties)
    - [Installation](#installation)
    - [Usage](#usage)
        - [Declaring Computed Properties](#declaring-computed-properties)
            - [Dynamic Properties](#dynamic-properties)

---

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

[](#installation)

Install *computed-properties* via Composer:

```
composer require ali-eltaweel/computed-properties
```

Usage
-----

[](#usage)

### Declaring Computed Properties

[](#declaring-computed-properties)

```
use Lang\{ Annotations\Computes, ComputedProperties };

class User {

    use ComputedProperties;

    #[Computes('fullName')]
    public function getFullName(): string {

        return $this->firstName . ' ' . $this->lastName;
    }
}
```

#### Dynamic Properties

[](#dynamic-properties)

```
use Lang\{ Annotations\Computes, ComputedProperties };

class Config {

    use ComputedProperties;

    private array $config;

    #[Computes(provider: 'getConfigKeys')]
    public function getConfigValue(string $key) {

        return $this->config[$key];
    }

    function getConfigKeys(): array {

        return array_keys($this->config);
    }
}
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance52

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

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 ~4 days

Total

2

Last Release

332d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7564e10ba11b25d8700726a92f669e38be2ff9191e8f6ccdfafc36678ffab2b8?d=identicon)[ali-eltaweel](/maintainers/ali-eltaweel)

---

Top Contributors

[![ali-eltaweel](https://avatars.githubusercontent.com/u/45892756?v=4)](https://github.com/ali-eltaweel "ali-eltaweel (3 commits)")

### Embed Badge

![Health badge](/badges/ali-eltaweel-computed-properties/health.svg)

```
[![Health](https://phpackages.com/badges/ali-eltaweel-computed-properties/health.svg)](https://phpackages.com/packages/ali-eltaweel-computed-properties)
```

###  Alternatives

[riipandi/laravel-optikey

Use UUID, Ulid, or nanoid as optional or primary key in Laravel.

429.1k](/packages/riipandi-laravel-optikey)

PHPackages © 2026

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