PHPackages                             markhuot/craft-forced-eager - 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. [Database &amp; ORM](/categories/database)
4. /
5. markhuot/craft-forced-eager

ActiveYii2-extension[Database &amp; ORM](/categories/database)

markhuot/craft-forced-eager
===========================

1.0.1(3y ago)012proprietaryPHP

Since Feb 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/markhuot/craft-forced-eager)[ Packagist](https://packagist.org/packages/markhuot/craft-forced-eager)[ RSS](/packages/markhuot-craft-forced-eager/feed)WikiDiscussions main Synced yesterday

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

Forced Eager Loading
====================

[](#forced-eager-loading)

A Yii2 Extension that will throw errors whenever a relationship field is accessed lazily.

[![Forced Eager Loading](forced-eager.png)](forced-eager.png)

Scrolling down the stack trace should show you the exact line of Twig code that prompted the error.

You can prevent exceptions in one of two ways,

1. Use the `.with(['fieldHandle'])` syntax to eager load the field (preferred)
2. Silence the error with `.allowLazyRelations()` on the query, e.g., `craft.entries.allowLazyRelations().limit(10)`.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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 ~0 days

Total

2

Last Release

1239d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48975?v=4)[Mark Huot](/maintainers/markhuot)[@markhuot](https://github.com/markhuot)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/markhuot-craft-forced-eager/health.svg)

```
[![Health](https://phpackages.com/badges/markhuot-craft-forced-eager/health.svg)](https://phpackages.com/packages/markhuot-craft-forced-eager)
```

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

393813.5k10](/packages/spicyweb-craft-neo)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k33](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k69](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)

PHPackages © 2026

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