PHPackages                             wpjscc/entity-behavior - 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. [Database &amp; ORM](/categories/database)
4. /
5. wpjscc/entity-behavior

ActiveLibrary[Database &amp; ORM](/categories/database)

wpjscc/entity-behavior
======================

Provides a collection of attributes that add behaviors to Cycle ORM entities

1.x-dev(1mo ago)03↓100%MITPHPPHP &gt;=8.0

Since May 1Pushed 1mo agoCompare

[ Source](https://github.com/wpjscc/entity-behavior)[ Packagist](https://packagist.org/packages/wpjscc/entity-behavior)[ Docs](https://cycle-orm.dev)[ GitHub Sponsors](https://github.com/sponsors/cycle)[ RSS](/packages/wpjscc-entity-behavior/feed)WikiDiscussions 1.x Synced 1w ago

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

Cycle ORM Entity Behavior
=========================

[](#cycle-orm-entity-behavior)

[![Latest Stable Version](https://camo.githubusercontent.com/9839a76b0a6d25343495f38162e94469331c38906322ff28e34256ab279bf773/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f656e746974792d6265686176696f722f76657273696f6e)](https://packagist.org/packages/cycle/entity-behavior)[![Build Status](https://github.com/cycle/entity-behavior/workflows/build/badge.svg)](https://github.com/cycle/entity-behavior/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cf13ccfd964484c093de153d518526987c5d86930d4d51c0ac2a6446d4b424ca/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6379636c652f656e746974792d6265686176696f722f6261646765732f7175616c6974792d73636f72652e706e673f623d312e78)](https://scrutinizer-ci.com/g/cycle/entity-behavior/?branch=1.x)[![Codecov](https://camo.githubusercontent.com/df025b8d56c0feaeafccf85991533b243b31ee17b3059978af40b9e521cb0bf9/68747470733a2f2f636f6465636f762e696f2f67682f6379636c652f656e746974792d6265686176696f722f67726170682f62616467652e737667)](https://codecov.io/gh/cycle/entity-behavior)[![](https://camo.githubusercontent.com/4442b73a11753b80fdd7b442ddbfaf8383902c8b9ffa66ed1718e8c62e102f2e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d636861742d6d6167656e74612e737667)](https://discord.gg/TFeEmCs)

The package provides a collection of attributes that add behaviors to Cycle ORM entities. It also provides a convenient API to create custom behavior attributes.

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

[](#installation)

The package is available via composer and can be installed using the following command:

```
composer require cycle/entity-behavior
```

Configuration
-------------

[](#configuration)

After installation the package you need to create `Cycle\ORM\ORM` object with passing `\Cycle\ORM\Entity\Behavior\EventDrivenCommandGenerator` generator object as third (`commandGenerator`) argument.

**Example**

```
use Cycle\ORM\ORM;
use Cycle\ORM\Entity\Behavior\EventDrivenCommandGenerator;

// Application container (PSR-11 compatible).
// https://www.php-fig.org/psr/psr-11/
$container = new Container();
$commandGenerator = new EventDrivenCommandGenerator($schema, $container);

$orm = new ORM(
    factory: $factory,
    schema: $schema,
    commandGenerator: $commandGenerator,
);
```

That's it. Now you can use all benefits of this package.

### Available behaviors

[](#available-behaviors)

- [UUID](https://cycle-orm.dev/docs/entity-behaviors-uuid)
- [CreatedAt and UpdatedAt](https://cycle-orm.dev/docs/entity-behaviors-timestamps)
- [SoftDelete](https://cycle-orm.dev/docs/entity-behaviors-soft-delete)
- [OptimisticLock](https://cycle-orm.dev/docs/entity-behaviors-optimistic-lock)
- [Hook](https://cycle-orm.dev/docs/entity-behaviors-hooks)
- [EventListener](https://cycle-orm.dev/docs/entity-behaviors-event-listener)

License:
--------

[](#license)

The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com).

###  Health Score

33

—

LowBetter than 73% of packages

Maintenance92

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

39d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76907477?v=4)[wpjscc](/maintainers/wpjscc)[@wpjscc](https://github.com/wpjscc)

---

Top Contributors

[![roxblnfk](https://avatars.githubusercontent.com/u/4152481?v=4)](https://github.com/roxblnfk "roxblnfk (31 commits)")[![msmakouz](https://avatars.githubusercontent.com/u/67324318?v=4)](https://github.com/msmakouz "msmakouz (19 commits)")[![puzzledpolymath](https://avatars.githubusercontent.com/u/162779269?v=4)](https://github.com/puzzledpolymath "puzzledpolymath (9 commits)")[![wpjscc](https://avatars.githubusercontent.com/u/76907477?v=4)](https://github.com/wpjscc "wpjscc (2 commits)")[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (2 commits)")[![gam6itko](https://avatars.githubusercontent.com/u/3841197?v=4)](https://github.com/gam6itko "gam6itko (1 commits)")[![wpdmitry](https://avatars.githubusercontent.com/u/30390500?v=4)](https://github.com/wpdmitry "wpdmitry (1 commits)")[![norets](https://avatars.githubusercontent.com/u/3883595?v=4)](https://github.com/norets "norets (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wpjscc-entity-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/wpjscc-entity-behavior/health.svg)](https://phpackages.com/packages/wpjscc-entity-behavior)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[testo/testo

A lightweight PHP testing framework.

1843.4k30](/packages/testo-testo)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M395](/packages/drupal-core-recommended)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[kimai/kimai

Kimai - Time Tracking

4.7k8.7k1](/packages/kimai-kimai)[patchlevel/event-sourcing

A lightweight but also all-inclusive event sourcing library with a focus on developer experience

202332.6k11](/packages/patchlevel-event-sourcing)

PHPackages © 2026

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