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

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

moderntribe/square1-field-models
================================

Data Transfer Objects (models) and Collections for ACF

5.0.0(2w ago)12.4kGPL-2.0-onlyPHPPHP ^8.1

Since May 9Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/moderntribe/square1-field-models)[ Packagist](https://packagist.org/packages/moderntribe/square1-field-models)[ RSS](/packages/moderntribe-square1-field-models/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)Dependencies (1)Versions (24)Used By (0)

SquareOne Field Models
======================

[](#squareone-field-models)

Utilizes [Spatie Data Transfer Objects v2](https://github.com/spatie/data-transfer-object/tree/v2) to provide models for ACF fields that support arrays, avoiding needing to remember these field structures and providing autocompletion for your IDE.

Usage
-----

[](#usage)

Simply create a class that extends [Field\_Model](Field_Model.php), set your properties and types to match what ACF returns when it fetches the array of field data, pass that array to your model and it will get automatically populated, allowing you to use the class properties to access the data.

Examples
--------

[](#examples)

Imagine you have an [ACF User Field](https://www.advancedcustomfields.com/resources/user/). Simply pass the ACF field data to the existing [User Model](Models/User.php), for example:

```
$user = new \Tribe\Libs\Field_Models\Models\User( (array) get_field( 'user_field' ) );

echo $user->ID; // e.g. 22
echo $user->user_firstname; // e.g. Steve
// etc...
```

You can also make Collections, which will take [ACF Repeater](https://www.advancedcustomfields.com/resources/repeater/) data. Expanding on the User example above, imagine you have a repeater of User fields, simply pass the repeater data directly to the collection's create method:

```
$user_collection = \Tribe\Libs\Field_Models\Collections\User_Collection::create( (array) get_field( 'user_repeater' ) );

foreach ( $user_collection as $user ) {
    echo $user->ID;
}
```

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

[](#requirements)

- PHP 7.4+
- Advanced Custom Fields Or, the PRO version for repeaters

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance76

Regular maintenance activity

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~73 days

Recently: every ~344 days

Total

22

Last Release

15d ago

Major Versions

1.2.0 → 4.0.32022-08-17

4.2.3 → 5.x-dev2026-08-03

PHP version history (3 changes)1.0.0PHP ^7.4

4.0.3PHP &gt;=7.4

5.x-devPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a11f5bee6606989680c8f81b921f8a8e2e75bfd5190cb001812ed615d032a5e?d=identicon)[tribejustin](/maintainers/tribejustin)

![](https://www.gravatar.com/avatar/7f24821ddc28f26fff6b85940d5c65cf179e7487695383944b80f2e5257db6a0?d=identicon)[nickpelton](/maintainers/nickpelton)

---

Top Contributors

[![defunctl](https://avatars.githubusercontent.com/u/1066195?v=4)](https://github.com/defunctl "defunctl (3 commits)")[![tr1b0t](https://avatars.githubusercontent.com/u/14128420?v=4)](https://github.com/tr1b0t "tr1b0t (2 commits)")

### Embed Badge

![Health badge](/badges/moderntribe-square1-field-models/health.svg)

```
[![Health](https://phpackages.com/badges/moderntribe-square1-field-models/health.svg)](https://phpackages.com/packages/moderntribe-square1-field-models)
```

###  Alternatives

[nfse-nacional/nfse-php

This is my package nfse

1648.4k](/packages/nfse-nacional-nfse-php)[moderntribe/tribe-libs

A library for use on Modern Tribe service projects.

1350.2k2](/packages/moderntribe-tribe-libs)

PHPackages © 2026

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