PHPackages                             moderntribe/tribe-libs - 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/tribe-libs

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

moderntribe/tribe-libs
======================

A library for use on Modern Tribe service projects.

4.2.3(7mo ago)1349.8k—4.3%5[4 issues](https://github.com/moderntribe/tribe-libs/issues)[8 PRs](https://github.com/moderntribe/tribe-libs/pulls)2GPL-2.0-onlyPHPPHP &gt;=7.4CI failing

Since Oct 27Pushed 7mo ago41 watchersCompare

[ Source](https://github.com/moderntribe/tribe-libs)[ Packagist](https://packagist.org/packages/moderntribe/tribe-libs)[ RSS](/packages/moderntribe-tribe-libs/feed)WikiDiscussions 4.x Synced 3d ago

READMEChangelogDependencies (28)Versions (91)Used By (2)

Tribe Libs is a collection of libraries created by Modern Tribe for use with Square One-based WordPress projects. It is required by the Square One core plugin.

Versions
--------

[](#versions)

Tribe Libs VersionPHP ConstraintsNotes3.x7.2-7.4Master branch. No longer maintained.4.x7.4+For use in legacy Square One PHP 7.4 projects where the host is upgrading to PHP 8.0.5.x+8.0+For use in new Square One projects.Installation
------------

[](#installation)

```
composer require moderntribe/tribe-libs

```

Usage
-----

[](#usage)

All usage documentation lives in the [Square One repository](https://github.com/moderntribe/square-one/tree/master/docs).

Support
-------

[](#support)

Usage of Tribe Libs is not actively supported by Modern Tribe outside of client contracts. Pull requests and suggestions are welcome and will be addressed based on business need.

Release Process
---------------

[](#release-process)

This library comprises a large collection of smaller libraries that can be included in whole or in part on Square One projects. These libraries are developed following the [monorepo model](https://gomonorepo.org/). All changes are committed to this, the parent project. Maintenance of the individual packages is managed using the [Monorepo Builder](https://github.com/Symplify/MonorepoBuilder) utility.

### Releasing a new version

[](#releasing-a-new-version)

> **IMPORTANT:** branches must already exist in the sub-repos, use the [Create Sub-Repo Branch GitHub Workflow](https://github.com/moderntribe/tribe-libs/actions/workflows/sub-repo-branch-create.yml) to create them if they don't already exist.

1. Ensure that all code for the release is merged to the branch that matches the release number, e.g. if you're planning to release an update `4.1.0`, that code should live in the `4.x` branch. A release such as `5.2.6` should live in the `5.x` branch.
2. Ensure that all updates for the release are logged in `CHANGELOG.md` under `## Unreleased`.
3. Run the release script, with the version number for the release (format: `..`): Dry run example for a `4.x` release: ```
    git checkout 4.x && git pull && ./monorepo.sh release 4.1.0 --dry-run
    ```

    Real release example for a `4.x` release: ```
    git checkout 4.x && git pull && ./monorepo.sh release 4.1.0
    ```
4. The script will handle several steps for you automatically:
    1. Set any package interdependencies to the new version.
    2. Update `CHANGELOG.md` with the appropriate version number.
    3. Create the git tag and push it to GitHub, tagged to the branch you have checked out.
    4. Bump the **current branch you have checked out** version's to the next version number
5. When the tag is pushed to GitHub, an Action there will automatically split the monorepo and deploy the tag to all of the package repos. (Note: The GH Action will run as a bot user with appropriate permissions to write to all of the package repositories. Those repositories are read-only for normal usage.)

### Adding Packages

[](#adding-packages)

1. Create a new directory for the package in `src`. Create your code there, include an independent `composer.json` for the package (you can [copy the sample](dev/monorepo/samples/composer.json)), and commit it to tribe-libs.
2. Create an empty public GitHub repository for the package (you probably need to be an org admin to complete this step). Follow the naming convention `moderntribe/square1-*`. Ensure that the user `tr1b0t`has write access to the repo. Use the script `dev/monorepo/scripts/create-package-repo.sh`to create the repo and add the `tr1b0t` user automatically. ```
    ./dev/monorepo/scripts/create-package-repo.sh square1-my-new-repo
    ```
3. Add a single commit (a blank readme is fine) and push it up.
4. Run the [Create Sub-Repo Branch GitHub Workflow](https://github.com/moderntribe/tribe-libs/actions/workflows/sub-repo-branch-create.yml) to create any missing version branches, e.g. `master`,`4.x`, `5.x` etc...
5. Run the script to merge the package `composer.json` files to the root `composer.json` file: ```
    ./monorepo.sh merge
    ```
6. After the next release, Register the package on [Packagist](https://packagist.org/packages/submit).

### Adding Composer Dependencies

[](#adding-composer-dependencies)

1. Add the dependency to `composer.json` in the sub-package(s) that needs it.
2. Run the `merge` command to merge dependencies up to the root `composer.json````
    ./monorepo.sh merge
    ```

### Update the development version

[](#update-the-development-version)

You will rarely need to do this, but it is documented here just in case.

1. Set the `master` branch alias for all packages: ```
    ./monorepo.sh set-alias 5.0
    ```
2. Bump the interdependencies among the packages to the same version. ```
    ./monorepo.sh bump-interdependency "^5.0"

    ```

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance59

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community32

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 54.2% 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 ~40 days

Recently: every ~283 days

Total

59

Last Release

214d ago

Major Versions

0.0.2 → v2.0.02019-10-07

v2.1.2 → v3.0.02020-09-01

3.6.0 → 4.0.02022-08-17

PHP version history (4 changes)v1.0.0PHP &gt;=5.5.0

0.0.1PHP ^7.0

v3.1.0PHP ^7.2

4.0.0PHP &gt;=7.4

### Community

Maintainers

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

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

![](https://www.gravatar.com/avatar/6aa10556f9e67f0a27a22542d7baab7914c2dae633502bf25fcc877e62bb19c5?d=identicon)[jbrinley](/maintainers/jbrinley)

---

Top Contributors

[![defunctl](https://avatars.githubusercontent.com/u/1066195?v=4)](https://github.com/defunctl "defunctl (441 commits)")[![jbrinley](https://avatars.githubusercontent.com/u/288845?v=4)](https://github.com/jbrinley "jbrinley (226 commits)")[![mmcachran](https://avatars.githubusercontent.com/u/375068?v=4)](https://github.com/mmcachran "mmcachran (43 commits)")[![dpellenwood](https://avatars.githubusercontent.com/u/1151082?v=4)](https://github.com/dpellenwood "dpellenwood (29 commits)")[![speerface](https://avatars.githubusercontent.com/u/6209061?v=4)](https://github.com/speerface "speerface (18 commits)")[![lucatume](https://avatars.githubusercontent.com/u/2749650?v=4)](https://github.com/lucatume "lucatume (15 commits)")[![tarecord](https://avatars.githubusercontent.com/u/6947218?v=4)](https://github.com/tarecord "tarecord (13 commits)")[![lipemat](https://avatars.githubusercontent.com/u/1688181?v=4)](https://github.com/lipemat "lipemat (6 commits)")[![nickpelton](https://avatars.githubusercontent.com/u/289422?v=4)](https://github.com/nickpelton "nickpelton (6 commits)")[![lindseyolson](https://avatars.githubusercontent.com/u/25675147?v=4)](https://github.com/lindseyolson "lindseyolson (5 commits)")[![ChrisFlannagan](https://avatars.githubusercontent.com/u/14016454?v=4)](https://github.com/ChrisFlannagan "ChrisFlannagan (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![binarygary](https://avatars.githubusercontent.com/u/16279215?v=4)](https://github.com/binarygary "binarygary (2 commits)")[![clontztopher](https://avatars.githubusercontent.com/u/14989492?v=4)](https://github.com/clontztopher "clontztopher (2 commits)")[![ryanurban](https://avatars.githubusercontent.com/u/840559?v=4)](https://github.com/ryanurban "ryanurban (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/moderntribe-tribe-libs/health.svg)

```
[![Health](https://phpackages.com/badges/moderntribe-tribe-libs/health.svg)](https://phpackages.com/packages/moderntribe-tribe-libs)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

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