PHPackages                             zero-to-prod/omdb-models - 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. [API Development](/categories/api)
4. /
5. zero-to-prod/omdb-models

ActiveLibrary[API Development](/categories/api)

zero-to-prod/omdb-models
========================

Data Models and Factories for the OMDB API

v1.1.0(8mo ago)33421MITPHPPHP &gt;=8.1.0CI passing

Since Dec 31Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/zero-to-prod/omdb-models)[ Packagist](https://packagist.org/packages/zero-to-prod/omdb-models)[ Docs](https://github.com/zero-to-prod/omdb-models)[ Fund](https://github.com/sponsors/zero-to-prod)[ RSS](/packages/zero-to-prod-omdb-models/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (7)Versions (9)Used By (1)

Zerotoprod\\OmdbModels
======================

[](#zerotoprodomdbmodels)

[![](art/logo.png)](art/logo.png)

[![Repo](https://camo.githubusercontent.com/9a90a3efeee26aed7d7f2feee9cd84566a26f9c362cc773b184d076210906e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746875622d677261793f6c6f676f3d676974687562)](https://github.com/zero-to-prod/omdb)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/af587a0371f2a7c13437e80d42dfef4c7b976474a25a5304f756c64303d31497/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f6f6d64622f746573742e796d6c3f6c6162656c3d74657374)](https://github.com/zero-to-prod/omdb/actions)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/4429fe80eac828ef2db837dc1d919594787f53832532200ac415f1d64bf470d2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7a65726f2d746f2d70726f642f6f6d64622f6261636b77617264735f636f6d7061746962696c6974792e796d6c3f6c6162656c3d6261636b77617264735f636f6d7061746962696c697479)](https://github.com/zero-to-prod/omdb/actions)[![Packagist Downloads](https://camo.githubusercontent.com/c9b67164866e3fc4f01b54efd9d3ad85b49279abbe9ccc659f320e532468c887/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a65726f2d746f2d70726f642f6f6d64623f636f6c6f723d626c7565)](https://packagist.org/packages/zero-to-prod/omdb/stats)[![Packagist Version](https://camo.githubusercontent.com/9b750f2ea0410325369b6e331bdc69e52d599e4fbc999264f0eb7861ed8947d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a65726f2d746f2d70726f642f6f6d64623f636f6c6f723d663238643161)](https://packagist.org/packages/zero-to-prod/omdb)[![License](https://camo.githubusercontent.com/41c22ecd1781e197d896054fcfcd6b3cca8c08f926a102c7be539d6c6cd03dde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7a65726f2d746f2d70726f642f6f6d64623f636f6c6f723d726564)](https://github.com/zero-to-prod/omdb-models/blob/main/LICENSE.md)[![wakatime](https://camo.githubusercontent.com/5faf71686ec58460a451d6e6dace0093f8b8a7b15bc26f50a0747ff087bba5d7/68747470733a2f2f77616b6174696d652e636f6d2f62616467652f6769746875622f7a65726f2d746f2d70726f642f6f6d64622d6d6f64656c732e737667)](https://wakatime.com/badge/github/zero-to-prod/omdb-models)[![Hits-of-Code](https://camo.githubusercontent.com/e1e7fd1bb397e949b2e34b4b5cd1b07ab7bceb904e57d976d1086d88848f0e70/68747470733a2f2f686974736f66636f64652e636f6d2f6769746875622f7a65726f2d746f2d70726f642f6f6d64622d6d6f64656c733f6272616e63683d6d61696e)](https://hitsofcode.com/github/zero-to-prod/omdb-models/view?branch=main)

Contents
--------

[](#contents)

- [Introduction](#introduction)
- [Requirements](#requirements)
- [Installation](#installation)
- [Documentation Publishing](#documentation-publishing)
    - [Automatic Documentation Publishing](#automatic-documentation-publishing)
- [Usage](#usage)
- [Factories](#factories)
- [Publishing DataModels](#publishing-datamodels)
- [Local Development](./LOCAL_DEVELOPMENT.md)
- [Contributing](#contributing)

Introduction
------------

[](#introduction)

Data Models and factories for the [OMDB API](https://www.omdbapi.com/).

This works well when hydrating results from the [OmdbApi](https://github.com/zero-to-prod/omdb-api) package.

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

[](#requirements)

- PHP 8.1 or higher.

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

[](#installation)

Install `Zerotoprod\OmdbModels` via [Composer](https://getcomposer.org/):

```
composer require zero-to-prod/omdb-models
```

This will add the package to your project's dependencies and create an autoloader entry for it.

Documentation Publishing
------------------------

[](#documentation-publishing)

You can publish this README to your local documentation directory.

This can be useful for providing documentation for AI agents.

This can be done using the included script:

```
# Publish to default location (./docs/zero-to-prod/omdb-models)
vendor/bin/zero-to-prod-omdb-models

# Publish to custom directory
vendor/bin/zero-to-prod-omdb-models /path/to/your/docs
```

### Automatic Documentation Publishing

[](#automatic-documentation-publishing)

You can automatically publish documentation by adding the following to your `composer.json`:

```
{
    "scripts": {
        "post-install-cmd": [
            "zero-to-prod-omdb-models"
        ],
        "post-update-cmd": [
            "zero-to-prod-omdb-models"
        ]
    }
}
```

### Publishing Files

[](#publishing-files)

You can directly import these files into your project like this:

```
./vendor/bin/omdb-models ./app/OmdbModels
```

Usage
-----

[](#usage)

This package has the following models:

```
\Zerotoprod\OmdbModels\Error::from();
\Zerotoprod\OmdbModels\Rating::from();
\Zerotoprod\OmdbModels\SearchItem::from();
\Zerotoprod\OmdbModels\SearchResults::from();
\Zerotoprod\OmdbModels\Title::from();

// Enums
\Zerotoprod\OmdbModels\ErrorType::from();
\Zerotoprod\OmdbModels\Type::from();
```

Factories
---------

[](#factories)

This package uses [Data Model Factories](https://github.com/zero-to-prod/data-model-factory) and has the following factories:

```
\Zerotoprod\OmdbModels\Factories\ErrorFactory::factory()->setMessage('message')->make();
\Zerotoprod\OmdbModels\Factories\RatingFactory::factory()->setValue('2')->make();
\Zerotoprod\OmdbModels\Factories\SearchItemFactory::factory()->setTitle('Avatar')->make();
\Zerotoprod\OmdbModels\Factories\SearchResultsFactory::factory()->setTotalResults(2)->make();
\Zerotoprod\OmdbModels\Factories\TitleFactory::factory()->setTitle('Avatar')->make();
```

Publishing DataModels
---------------------

[](#publishing-datamodels)

You can directly import these files into your project like this:

```
./vendor/bin/omdb-models app/OmdbModels
```

The first argument is the destination of where the files are copied to.

Contributing
------------

[](#contributing)

Contributions, issues, and feature requests are welcome! Feel free to check the [issues](https://github.com/zero-to-prod/omdb-models/issues) page if you want to contribute.

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit changes (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance64

Regular maintenance activity

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~34 days

Recently: every ~58 days

Total

8

Last Release

250d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/502649f05d36c87d494988bd99193a4d908d345335d99c080928a726277371f5?d=identicon)[zero-to-prod](/maintainers/zero-to-prod)

---

Top Contributors

[![zero-to-prod](https://avatars.githubusercontent.com/u/61474950?v=4)](https://github.com/zero-to-prod "zero-to-prod (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

data-modelomdbomdb-apiphpDataModelzero-to-prodOpen Movie Databaseomdb-models

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zero-to-prod-omdb-models/health.svg)

```
[![Health](https://phpackages.com/badges/zero-to-prod-omdb-models/health.svg)](https://phpackages.com/packages/zero-to-prod-omdb-models)
```

###  Alternatives

[zero-to-prod/data-model

Transforms Data into Type-Safe DTOs.

14226.2k32](/packages/zero-to-prod-data-model)

PHPackages © 2026

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