PHPackages                             thewildfields/tavriia - 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. thewildfields/tavriia

ActiveLibrary[Framework](/categories/framework)

thewildfields/tavriia
=====================

A reusable PHP framework providing a clean, typed, PSR-compliant OOP abstraction layer over WordPress core functions.

v1.0.0(today)00MITPHPPHP ^8.2

Since Apr 3Pushed todayCompare

[ Source](https://github.com/thewildfields/tavriia)[ Packagist](https://packagist.org/packages/thewildfields/tavriia)[ RSS](/packages/thewildfields-tavriia/feed)WikiDiscussions main Synced today

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

Tavriia
=======

[](#tavriia)

A clean, typed, PSR-compliant OOP abstraction layer over WordPress core functions. Ships as a Composer package consumed by WordPress plugins.

[![PHP 8.2+](https://camo.githubusercontent.com/187240af044d09d5b14a1d9d9ebdf3f7a993e4c7bc09bdb46b4ba661a891bf5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c7565)](https://www.php.net/)[![PSR-12](https://camo.githubusercontent.com/f5517c4a8a2438b2152b62762e852385c588ff2c1d8a028ba56d0626e1151e94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d31322d627269676874677265656e)](https://www.php-fig.org/psr/psr-12/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)

---

What is Tavriia?
----------------

[](#what-is-tavriia)

Tavriia is a framework that provides typed wrappers, contracts, and DTOs over raw WordPress APIs. It is **not a plugin**. It is a Composer library you pull into your plugin projects.

**Without Tavriia:**

```
$post = get_post($id);
if (!$post instanceof \WP_Post) {
    // handle missing
}
$meta = get_post_meta($id, 'some_field', true);
$result = wp_insert_post($args);
if (is_wp_error($result)) {
    // handle error
}
```

**With Tavriia:**

```
$post = $this->postRepository->findById($id); // throws PostNotFoundException or returns PostDTO
$meta = $this->postRepository->metaFor($id)->getString('some_field');
$newId = $this->postFactory->create($dto); // throws or returns int
```

---

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

[](#installation)

```
composer require thewildfields/tavriia
```

Requires PHP 8.2+ and WordPress (no minimum version enforced).

---

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

[](#quick-start)

### 1. Create a module

[](#1-create-a-module)

```
use TheWildFields\Tavriia\AbstractModule;
use TheWildFields\Tavriia\Post\PostFactory;
use TheWildFields\Tavriia\Post\PostRepository;

final class EventsModule extends AbstractModule
{
    public function __construct(
        private readonly PostFactory $postFactory,
        private readonly PostRepository $postRepository,
    ) {}

    public function register_hooks(): void
    {
        add_action('init', [$this, 'registerPostType']);
        add_action('save_post_event', [$this, 'onSaveEvent'], 10, 2);
    }
}
```

### 2. Create posts with typed DTOs

[](#2-create-posts-with-typed-dtos)

```
use TheWildFields\Tavriia\DTO\PostDTO;

$dto = new PostDTO(
    title: 'Summer Concert',
    content: 'Annual summer concert in the park.',
    status: 'publish',
    postType: 'event',
    meta: ['venue_id' => 42],
);

$eventId = $this->postFactory->create($dto);
```

### 3. Query posts fluently

[](#3-query-posts-fluently)

```
use TheWildFields\Tavriia\Query\QueryBuilder;

$results = (new QueryBuilder())
    ->postType('event')
    ->metaQuery('venue_id', 42)
    ->orderBy('date', 'DESC')
    ->limit(10)
    ->get();

foreach ($results as $post) {
    echo $post->title;
}
```

### 4. Make HTTP requests

[](#4-make-http-requests)

```
use TheWildFields\Tavriia\Http\RequestBuilder;
use TheWildFields\Tavriia\Http\HttpClient;
use TheWildFields\Tavriia\Http\ResponseProcessor;

$client = new HttpClient(new ResponseProcessor());

$response = $client->get('https://api.example.com/events');
$data = $response->json();
```

---

Features
--------

[](#features)

AreaClassesWraps**Posts**`PostFactory`, `PostRepository`, `MetaManager``wp_insert_post`, `wp_update_post`, `get_post`, `get_post_meta`**Taxonomy**`TermFactory`, `TermRepository`, `TermMetaManager``wp_insert_term`, `get_terms`, `wp_get_object_terms`**Queries**`QueryBuilder`, `QueryResult``WP_Query`, `get_posts`**HTTP**`HttpClient`, `RequestBuilder`, `ResponseProcessor``wp_remote_get`, `wp_remote_post`, `wp_remote_request`**Admin**`AdminMenuPage`, `AdminNotice``add_menu_page`, `admin_notices`**Modules**`AbstractModule`WordPress hooks lifecycle---

Design Principles
-----------------

[](#design-principles)

**WP\_Error never escapes the framework.** Every wrapper converts `WP_Error` into a typed exception at the WordPress boundary. Plugin code never calls `is_wp_error()`.

**Factories return IDs, repositories return DTOs.** `PostFactory::create()` returns `int`. `PostRepository::findById()` returns `PostDTO` or throws `PostNotFoundException`.

**All concrete classes are `final`.** Only `AbstractModule` and abstract base classes are non-final.

**All DTOs are `readonly`.** Immutable value objects with named constructors where appropriate.

**Typed meta accessors.** `MetaManager::getString()`, `::getInt()`, `::getBool()`, `::getArray()` — never raw meta values.

---

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

[](#documentation)

- [Getting Started](docs/getting-started.md)
- [Core Concepts](docs/core-concepts.md)
- [Modules](docs/modules.md)
- [Posts &amp; Meta](docs/posts.md)
- [Taxonomy &amp; Terms](docs/taxonomy.md)
- [Query Builder](docs/query-builder.md)
- [HTTP Client](docs/http-client.md)
- [Admin Helpers](docs/admin.md)
- [Exception Handling](docs/exceptions.md)
- [API Reference](docs/api-reference/index.md)

---

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

[](#contributing)

This is a private framework package for The Wild Fields. See [CLAUDE.md](CLAUDE.md) for architectural guidelines.

---

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64299719?v=4)[Oleksii Tsioma](/maintainers/kartvli)[@kartvli](https://github.com/kartvli)

---

Top Contributors

[![kartvli](https://avatars.githubusercontent.com/u/64299719?v=4)](https://github.com/kartvli "kartvli (4 commits)")

---

Tags

pluginframeworkwordpressabstractionwp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thewildfields-tavriia/health.svg)

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

###  Alternatives

[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)[alleyinteractive/pest-plugin-wordpress

WordPress Pest Integration

263.7k1](/packages/alleyinteractive-pest-plugin-wordpress)

PHPackages © 2026

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