Search by

dirthara / collection

bricknpc

Collections for the Dirthara framework

Package info

github.com/dirthara/collection

pkg:composer/dirthara/collection

Statistics

Installs: 34

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-09-12 07:00 UTC

This package is auto-updated.

Last update: 2026-09-12 07:05:09 UTC


README

Dirthara

Dirthara Collection

Mutable and immutable keyed collections for the Dirthara framework.

Usage guides and API documentation live in docs, starting with getting started. An external package builds these Markdown pages into the shared Docusaurus site.

Installation

Requires PHP ^8.5 (PHP 8.5 or a later PHP 8 release), with no additional runtime Composer dependencies. Install with:

composer require dirthara/collection

Docker development environment

Requires Docker with Docker Compose. The development image provides PHP 8.5 CLI, Composer 2.10.3, Mago 1.47.3, and Xdebug. No database services are needed.

git clone git@github.com:dirthara/collection.git
cd collection
LOCAL_UID=$(id -u) LOCAL_GID=$(id -g) docker compose up -d --build php
docker compose exec php composer install

The container runs as the non-root developer user. The build arguments LOCAL_UID and LOCAL_GID default to 1000; the command above uses your host IDs so generated files remain editable. Set PHP_VERSION to override the default 8.5 image. Rebuild when the Dockerfile or build arguments change.

Open a shell or stop the environment with:

docker compose exec php bash
docker compose down

Tests

docker compose exec php composer test

Code quality

Run the same checks as CI:

docker compose exec php composer ci

Run individual checks:

docker compose exec php composer fmt-check
docker compose exec php composer lint
docker compose exec php composer analyze
docker compose exec php composer guard

composer mago runs the formatting, import-order, lint, analysis, and configured architecture checks. composer ci also runs tooling tests, unit tests, and the coverage gate.

Apply formatting and import sorting with composer fmt, or include automatic lint fixes with composer cs:

docker compose exec php composer fmt
docker compose exec php composer cs

composer cs includes potentially unsafe lint fixes; review its changes.

Run coverage separately with:

docker compose exec php composer test-coverage
docker compose exec php composer coverage

Xdebug is inactive by default and enabled for the coverage run. The report is written to build/coverage/clover.xml. The gate requires 100% line coverage of src and lists uncovered lines.

Contributing

Each supported version has its own branch, beginning with 0.1; there is no main. See CONTRIBUTING.md for branching, release, and pull request requirements, and AGENTS.md for agent instructions.

Security

Report vulnerabilities through GitHub's private advisory form. See SECURITY.md for the reporting process and scope.

License

Copyright (c) 2026 Dirthara. Released under the MIT License.