moderntribe / tribe-libs
A library for use on Modern Tribe service projects.
Installs: 44 795
Dependents: 2
Suggesters: 0
Security: 0
Stars: 13
Watchers: 43
Forks: 5
Open Issues: 10
Requires
- php: >=7.4
- composer-plugin-api: ^1.0 || ^2.0
- ext-dom: *
- ext-json: *
- ext-libxml: *
- ext-simplexml: *
- ext-zlib: *
- enshrined/svg-sanitize: ^0.15
- filp/whoops: ^2.2@dev
- mhcg/monolog-wp-cli: ^2.0
- php-di/php-di: ^6.0
- psr/log: ^1.1 || ^2.0
- spatie/data-transfer-object: ^2.8
- twig/twig: ^3.0
Requires (Dev)
- automattic/phpcs-neutron-standard: ^1.5
- automattic/vipwpcs: ^2.0
- brain/monkey: 2.*
- dealerdirect/phpcodesniffer-composer-installer: ^0.5.0 || ^0.7.0
- fakerphp/faker: ^1.20
- lucatume/wp-browser: ^3.1
- nelexa/zip: ^4.0
- nette/utils: ^3.2 || ^4.0
- phpcompatibility/php-compatibility: 10.x-dev#a726377 as 9.3.5
- phpcompatibility/phpcompatibility-wp: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.8
- phpstan/phpstan-mockery: ^1.1
- phpunit/phpunit: ^8.0 || ^9.0
- sirbrillig/phpcs-variable-analysis: ^2.0
- squizlabs/php_codesniffer: ^3.4.2
- symfony/console: ^5.0 || ^6.0
- symplify/monorepo-builder: 11.1.30.72
- szepeviktor/phpstan-wordpress: ^1.0
- wp-cli/wp-cli: ^2.5
Replaces
- moderntribe/square1-acf: 4.2.1
- moderntribe/square1-assets: 4.2.1
- moderntribe/square1-blog-copier: 4.2.1
- moderntribe/square1-cache: 4.2.1
- moderntribe/square1-cli: 4.2.1
- moderntribe/square1-container: 4.2.1
- moderntribe/square1-field-models: 4.2.1
- moderntribe/square1-generators: 4.2.1
- moderntribe/square1-log: 4.2.1
- moderntribe/square1-media: 4.2.1
- moderntribe/square1-nav: 4.2.1
- moderntribe/square1-object-meta: 4.2.1
- moderntribe/square1-oembed: 4.2.1
- moderntribe/square1-p2p: 4.2.1
- moderntribe/square1-pipeline: 4.2.1
- moderntribe/square1-post-meta: 4.2.1
- moderntribe/square1-post-type: 4.2.1
- moderntribe/square1-queues: 4.2.1
- moderntribe/square1-queues-mysql: 4.2.1
- moderntribe/square1-request: 4.2.1
- moderntribe/square1-required-page: 4.2.1
- moderntribe/square1-routes: 4.2.1
- moderntribe/square1-schema: 4.2.1
- moderntribe/square1-settings: 4.2.1
- moderntribe/square1-taxonomy: 4.2.1
- moderntribe/square1-twig: 4.2.1
- moderntribe/square1-user: 4.2.1
- moderntribe/square1-utils: 4.2.1
- moderntribe/square1-whoops: 4.2.1
- moderntribe/square1-wp-downloader: 4.2.1
- 4.x-dev
- 4.2.1
- 4.2.0
- dev-master / 4.1.x-dev
- 4.1.0
- 4.0.16
- 4.0.15
- 4.0.14
- 4.0.13
- 4.0.12
- 4.0.11
- 4.0.10
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.6.0
- 3.5.1
- 3.5.0
- 3.4.18
- 3.4.17
- 3.4.16
- 3.4.15
- 3.4.14
- 3.4.13
- 3.4.12
- 3.4.11
- 3.4.10
- 3.4.9
- 3.4.8
- 3.4.7
- 3.4.6
- 3.4.5
- v3.4.4
- 3.4.3
- v3.4.2
- v3.4.1
- v3.4.0
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.0
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.0
- v1.0.0
- 0.0.2
- 0.0.1
- dev-branch/2.0.0
- dev-php8-2.x
- dev-feature/SQONE-699/php74-8-upgrade
- dev-feature/basic-php-8-support
- dev-feature/block-generator-default-category
- dev-feature/block-config-templete-category
- dev-feature/global-blocks
- dev-feature/with-get-field-trait
- dev-feature/php-di-extension
- dev-bugfix/block-generator-phpcs-issues
- dev-bugfix/taxonomy-generator-phpcs-issues
- dev-feature/di-container-in-queue-cron
- dev-project/explore-navigation
- dev-fix/router-query-vars
- dev-cleanup/phpcs
- dev-feature/satis-prototype
- dev-bug/cmb2-registration
- dev-feeture/blocks-lib
- dev-feeture/more-tests
- dev-feature/php-di-container
- dev-feature/wp-cron
- dev-feature/add-queues-message
- dev-1.0-acf-gutenblocks
- dev-feature/monorepo
- dev-bug/fix-term-object
- dev-project/boise
- dev-feature/cli
- dev-feature/filterable-meta-boxes
- dev-feature/cmb2-utility-functions
This package is auto-updated.
Last update: 2024-11-07 20:24:43 UTC
README
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
Installation
composer require moderntribe/tribe-libs
Usage
All usage documentation lives in the Square One repository.
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
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. All changes are committed to this, the parent project. Maintenance of the individual packages is managed using the Monorepo Builder utility.
Releasing a new version
IMPORTANT: branches must already exist in the sub-repos, use the Create Sub-Repo Branch GitHub Workflow to create them if they don't already exist.
- 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 the4.x
branch. A release such as5.2.6
should live in the5.x
branch. - Ensure that all updates for the release are logged in
CHANGELOG.md
under## Unreleased
. - Run the release script, with the version number for the release (format:
<major>.<minor>.<patch>
): Dry run example for a4.x
release:git checkout 4.x && git pull && ./monorepo.sh release 4.1.0 --dry-run
Real release example for a4.x
release:git checkout 4.x && git pull && ./monorepo.sh release 4.1.0
- The script will handle several steps for you automatically:
- Set any package interdependencies to the new version.
- Update
CHANGELOG.md
with the appropriate version number. - Create the git tag and push it to GitHub, tagged to the branch you have checked out.
- Bump the current branch you have checked out version's to the next version number
- 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
- Create a new directory for the package in
src
. Create your code there, include an independentcomposer.json
for the package (you can copy the sample), and commit it to tribe-libs. - 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 usertr1b0t
has write access to the repo. Use the scriptdev/monorepo/scripts/create-package-repo.sh
to create the repo and add thetr1b0t
user automatically../dev/monorepo/scripts/create-package-repo.sh square1-my-new-repo
- Add a single commit (a blank readme is fine) and push it up.
- Run the Create Sub-Repo Branch GitHub Workflow to create any missing version branches, e.g.
master
,4.x
,5.x
etc... - Run the script to merge the package
composer.json
files to the rootcomposer.json
file:./monorepo.sh merge
- After the next release, Register the package on Packagist.
Adding Composer Dependencies
- Add the dependency to
composer.json
in the sub-package(s) that needs it. - Run the
merge
command to merge dependencies up to the rootcomposer.json
./monorepo.sh merge
Update the development version
You will rarely need to do this, but it is documented here just in case.
- Set the
master
branch alias for all packages:./monorepo.sh set-alias 5.0
- Bump the interdependencies among the packages to the same version.
./monorepo.sh bump-interdependency "^5.0"