PHPackages                             jengo/schema - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jengo/schema

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jengo/schema
============

A schema package for CodeIgniter 4 applications.

v1.0.14(3w ago)053MITPHP

Since Feb 3Pushed 3w agoCompare

[ Source](https://github.com/lipex-org/jengo-schema)[ Packagist](https://packagist.org/packages/jengo/schema)[ RSS](/packages/jengo-schema/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (11)Versions (17)Used By (0)

Jengo Schema
============

[](#jengo-schema)

Declarative schema-driven querying for CodeIgniter 4

Jengo Schema is an experimental package that brings structured, schema-based querying, relationship derivation, and entity hydration to CodeIgniter 4 applications.

Development Status
------------------

[](#development-status)

This package is currently in active development (dev version). APIs may change

Behavior is still being validated Not recommended for production yet

That said, it is already usable for: Local development Prototyping Internal tools Early adopters who want to help test We are targeting a beta release shortly, followed by a stable v1.0 once the fluent query builder is finalized.

Key Features
------------

[](#key-features)

- Schema-first design using PHP attributes
- Declarative relationships (BelongsTo, HasMany)
- Automatic join resolution
- Nested derivation (derive('members.user'))
- Request-aware query options (OPEN mode)
- Inline programmatic queries (INLINE mode)
- Deterministic query planning
- Entity hydration
- Debug tools (Explain, QueryLogger)

Core Concepts
-------------

[](#core-concepts)

### Schema

[](#schema)

A schema describes: The CI4 model The entity Fields and relationships How data should be derived Schemas are the source of truth for queries.

### Query Modes

[](#query-modes)

INLINE — programmatic, explicit options OPEN — request-driven, REST-friendly

#### Example Usage

[](#example-usage)

```
use Jengo\Schema\Query\Query;
use Jengo\Schema\Query\DTO\QueryOptions;

$result = Query::run(
    schema: UserSchema::class,
    options: new QueryOptions(
        derive: ['profile'],
        pagination: new PaginationOptions(limit: 10),
    )
);
```

`Fluent API (coming soon)`

```
query(UserSchema::class)
    ->inline()
    ->where('id', 1)
    ->derive('profile')
    ->first();
```

### Debugging

[](#debugging)

#### Explain

[](#explain)

Inspect how a query is planned before execution.

```
Explain::for(UserSchema::class)
    ->derive(['profile'])
    ->dump();
```

#### Query Logger

[](#query-logger)

Track executed queries, joins, and execution time.

```
config('Schema')->logger = true;
```

### Testing

[](#testing)

This package includes:

- Unit tests for schema reflection
- Relationship graph validation
- Query plan tests
- Integration tests with CI4’s testing database

Contributions that improve test coverage are welcome.

Roadmap
-------

[](#roadmap)

- Schema reflection
- Relationship graph
- Query planning
- Hydration
- Fluent query builder
- Better error messages
- Performance benchmarks
- Beta release
- Stable v1.0

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

[](#contributing)

This project is still evolving. Feedback, issues, and ideas are welcome.

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Every ~12 days

Recently: every ~0 days

Total

15

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a00939d7e5422a294a7b9b186f29116de3dca2d793453c8c58c0293bd2346b2?d=identicon)[gilads-otiannoh254](/maintainers/gilads-otiannoh254)

---

Top Contributors

[![gilads-otiannoh24](https://avatars.githubusercontent.com/u/180090128?v=4)](https://github.com/gilads-otiannoh24 "gilads-otiannoh24 (23 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jengo-schema/health.svg)

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

###  Alternatives

[codeigniter4/appstarter

CodeIgniter4 starter app

1811.8M](/packages/codeigniter4-appstarter)[abydahana/aksara

Aksara is a modern, developer-friendly framework and CMS built on CodeIgniter 4, featuring rapid CRUD development, modular architecture, smart routing, flexible access control, API integration, and an AI assistant to make content management faster and smarter.

1141.2k](/packages/abydahana-aksara)[hermawan/codeigniter4-datatables

Serverside Datatables library for CodeIgniter4

10949.8k4](/packages/hermawan-codeigniter4-datatables)[jason-napolitano/codeigniter4-cart-module

A basic port of the codeigniter 3 cart module for CodeIgniter 4.

5915.6k](/packages/jason-napolitano-codeigniter4-cart-module)[maniaba/asset-connect

AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application

1016.0k](/packages/maniaba-asset-connect)

PHPackages © 2026

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