PHPackages                             pollen/entity - 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. pollen/entity

ActiveLibrary

pollen/entity
=============

A modern PHP package for WordPress custom post types and taxonomies

1.1(7mo ago)2126[1 issues](https://github.com/Pollora/WordPressEntity/issues)GPL-2.0-or-laterPHPPHP ^8.1CI failing

Since Oct 21Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/Pollora/WordPressEntity)[ Packagist](https://packagist.org/packages/pollen/entity)[ RSS](/packages/pollen-entity/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (6)Used By (0)

Pollora Entity WordPress Package
================================

[](#pollora-entity-wordpress-package)

A modern PHP 8.2+ library for easily managing WordPress custom post types and taxonomies with a fluent interface and hexagonal architecture.

Features
--------

[](#features)

- 🚀 Modern PHP 8.2+ with type declarations
- 🏗️ Fluent interface for easy configuration
- 🔧 Built on top of [Extended CPTs](https://github.com/johnbillion/extended-cpts) library
- 📐 Hexagonal architecture for better separation of concerns
- 🧪 Fully tested with PestPHP
- 💡 Intuitive method naming with dedicated methods for boolean properties

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

[](#installation)

```
composer require pollora/entity
```

Documentation
-------------

[](#documentation)

- [Post Types Documentation](docs/post-types.md) - Complete guide for creating and configuring custom post types
- [Taxonomies Documentation](docs/taxonomies.md) - Complete guide for creating and configuring custom taxonomies

Quick Start
-----------

[](#quick-start)

### Post Types

[](#post-types)

```
use Pollora\Entity\PostType;

PostType::make('book', 'Book', 'Books')
    ->public()
    ->showInRest()
    ->hasArchive()
    ->supports(['title', 'editor', 'thumbnail'])
    ->menuIcon('dashicons-book-alt');
```

### Taxonomies

[](#taxonomies)

```
use Pollora\Entity\Taxonomy;

Taxonomy::make('genre', 'book', 'Genre', 'Genres')
    ->hierarchical()
    ->showInRest()
    ->showInQuickEdit();
```

Architecture
------------

[](#architecture)

This package follows hexagonal architecture principles:

1. **Domain Layer**: Core business logic (Entity, PostType, Taxonomy)
2. **Application Layer**: Services that orchestrate operations
3. **Adapter Layer**: WordPress integration adapters

The Domain layer remains independent of external dependencies, defining interfaces (ports) that adapters implement.

Testing
-------

[](#testing)

The package includes comprehensive unit tests using PestPHP with WordPress function mocks:

```
composer test
```

### Test Structure

[](#test-structure)

- `tests/helpers.php`: Global WordPress function mocks
- `tests/ext_cpts_helpers.php`: Extended CPTs namespace function mocks
- `tests/bootstrap.php`: Test environment setup

License
-------

[](#license)

This package is open-source software licensed under the MIT license.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance56

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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 ~339 days

Total

2

Last Release

234d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8435080f3e74b629258f291a62cb72aa9d63ee44d74e588f594dc6378c328fa2?d=identicon)[amphibee](/maintainers/amphibee)

---

Top Contributors

[![ogorzalka](https://avatars.githubusercontent.com/u/149651?v=4)](https://github.com/ogorzalka "ogorzalka (18 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[log1x/poet

Configuration-based post type, taxonomy, editor color palette, block category, and block registration for Sage 10.

218280.1k1](/packages/log1x-poet)[altis/aws-analytics

AWS Pinpoint Analytics integration for WordPress

19144.1k4](/packages/altis-aws-analytics)[roots/acorn-post-types

Simple post types and taxonomies using Extended CPTs for Acorn.

1221.8k](/packages/roots-acorn-post-types)[pollora/query

Create WP Query in a fluent way.

182.9k](/packages/pollora-query)

PHPackages © 2026

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