PHPackages                             yii-extension/simple-model - 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. [Framework](/categories/framework)
4. /
5. yii-extension/simple-model

ActiveLibrary[Framework](/categories/framework)

yii-extension/simple-model
==========================

Simple model for Yii3.

14.7k1[1 PRs](https://github.com/yii-extension/simple-model/pulls)PHP

Since Apr 12Pushed 2y ago2 watchersCompare

[ Source](https://github.com/yii-extension/simple-model)[ Packagist](https://packagist.org/packages/yii-extension/simple-model)[ RSS](/packages/yii-extension-simple-model/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

 [ ![](https://camo.githubusercontent.com/a0490717fe146673d59ea92904448f8f09cb798f4900d7c63a043d623cc93db4/68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f65685354506e5871726b6b304d33552d5550436a4330667479394b366c67796b4b32574f5541326e5548703867496b526a65544e387a385341426c6b766376522d39504972626f7849765047756a50675765624c51654848675837794c556f7846536475695a72546f6736576f5a4c694176716354523151545056526d6e733274596a414370703745513d7732343030) ](https://github.com/yii-extension)

Simple Model
============

[](#simple-model)

[![Total Downloads](https://camo.githubusercontent.com/d3f25a2d2e1c2be4c0998db3bdaa2d0544e1bc8db6eb505603805bbc5b22fb95/68747470733a2f2f706f7365722e707567782e6f72672f7969692d657874656e73696f6e2f73696d706c652d6d6f64656c2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yii-extension/simple-model)[![Build Status](https://github.com/yii-extension/simple-model/workflows/build/badge.svg)](https://github.com/yii-extension/simple-model/actions?query=workflow%3Abuild)[![codecov](https://camo.githubusercontent.com/bdda5fa343b4754dcc3c6ee22db5dd4cbc05e9799203627a874f75d996727fb3/68747470733a2f2f636f6465636f762e696f2f67682f7969692d657874656e73696f6e2f73696d706c652d6d6f64656c2f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d5751493235796f346433)](https://codecov.io/gh/yii-extension/simple-model)[![Mutation testing badge](https://camo.githubusercontent.com/90cb93b5516e2ba2e4134d433d8571785848dea04a673619df71662b9e914a7b/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d68747470733a2f2f62616467652d6170692e737472796b65722d6d757461746f722e696f2f6769746875622e636f6d2f7969692d657874656e73696f6e2f73696d706c652d6d6f64656c2f6d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/yii-extension/simple-model/master)[![static analysis](https://github.com/yii-extension/simple-model/workflows/static%20analysis/badge.svg)](https://github.com/yii-extension/simple-model/actions?query=workflow%3A%22static+analysis%22)[![type-coverage](https://camo.githubusercontent.com/7dc1469a8daae99d62afe1cda1e172908c32ba3b5777719f7a9975ce494c80d3/68747470733a2f2f73686570686572642e6465762f6769746875622f7969692d657874656e73696f6e2f73696d706c652d6d6f64656c2f636f7665726167652e737667)](https://shepherd.dev/github/yii-extension/simple-model)

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

[](#installation)

```
composer require yii-extension/simple-model
```

Usage
-----

[](#usage)

You can create two types of classes, they are `Model::class` and `FormModel::class` through inheritance.

[Model::class](/docs/Model.md) is the base class for all models.

[FormModel::class](/docs/FormModel.md) is the base class for all form models, defined methods are:

### Unit testing

[](#unit-testing)

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

```
./vendor/bin/phpunit
```

### Mutation testing

[](#mutation-testing)

The package tests are checked with [Infection](https://infection.github.io/) mutation framework. To run it:

```
./vendor/bin/roave-infection-static-analysis-plugin -j2 --ignore-msi-with-no-mutations --only-covered
```

Static analysis
---------------

[](#static-analysis)

The code is statically analyzed with [Psalm](https://psalm.dev/docs). To run static analysis:

```
./vendor/bin/psalm
```

### License

[](#license)

The `yii-extension/simple-model` is free software. It is released under the terms of the BSD License. Please see [`LICENSE`](./LICENSE.md) for more information.

Maintained by [Yii Extension](https://github.com/yii-extension).

Support the project
-------------------

[](#support-the-project)

[![Open Collective](https://camo.githubusercontent.com/a2b15f8e2268d4e3842e00d41ff7a57cce2ad8bd8d8769c5dc4fa05a546a4f62/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e253230436f6c6c6563746976652d73706f6e736f722d3765616466313f6c6f676f3d6f70656e253230636f6c6c656374697665266c6f676f436f6c6f723d376561646631266c6162656c436f6c6f723d353535353535)](https://opencollective.com/yiisoft)

Powered by Yii Framework
------------------------

[](#powered-by-yii-framework)

[![Official website](https://camo.githubusercontent.com/d6b0929173e28cc627430d2519ca1853466a70f37395877eaf4820cb3e1e1909/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f77657265645f62792d5969695f4672616d65776f726b2d677265656e2e7376673f7374796c653d666c6174)](https://www.yiiframework.com/)

###  Health Score

21

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 87% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/524d2b46690f41fce7188d369488a35e7624e6c5a264d82aacd08548bfd156ab?d=identicon)[terabytesoftw](/maintainers/terabytesoftw)

---

Top Contributors

[![terabytesoftw](https://avatars.githubusercontent.com/u/42547589?v=4)](https://github.com/terabytesoftw "terabytesoftw (67 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![machour](https://avatars.githubusercontent.com/u/304450?v=4)](https://github.com/machour "machour (1 commits)")

---

Tags

formmodelmodelphpyii2yii3

### Embed Badge

![Health badge](/badges/yii-extension-simple-model/health.svg)

```
[![Health](https://phpackages.com/badges/yii-extension-simple-model/health.svg)](https://phpackages.com/packages/yii-extension-simple-model)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k65.4M154](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k11.6M74](/packages/spiral-roadrunner)[composer/installers

A multi-framework Composer library installer

1.4k133.5M5.5k](/packages/composer-installers)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k35.9M222](/packages/laravel-dusk)[laravel/fortify

Backend controllers and scaffolding for Laravel authentication.

1.7k38.8M190](/packages/laravel-fortify)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.0M101](/packages/cakephp-chronos)

PHPackages © 2026

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