PHPackages                             slothsoft/farah - 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. [Admin Panels](/categories/admin)
4. /
5. slothsoft/farah

ActiveLibrary[Admin Panels](/categories/admin)

slothsoft/farah
===============

Files and Resources and Hypertext: A content management system.

1.28.4(1mo ago)020.6k—9.1%10MITPHPPHP &gt;=8.2CI failing

Since Aug 10Pushed 3w ago1 watchersCompare

[ Source](https://github.com/Faulo/slothsoft-farah)[ Packagist](https://packagist.org/packages/slothsoft/farah)[ Docs](http://farah.slothsoft.net/modules/farah)[ RSS](/packages/slothsoft-farah/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (51)Versions (165)Used By (10)

Slothsoft Farah
===============

[](#slothsoft-farah)

[![Packagist Version](https://camo.githubusercontent.com/93e8a38ff3f7d083a86ecb1966d5db6772c3a4c8efb7250e1a79e4b661b78d81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736c6f7468736f66742f6661726168)](https://packagist.org/packages/slothsoft/farah)[![PHP Version Support](https://camo.githubusercontent.com/6cddf02badc8a94ceca8dd53e050597ab9697f6358ffeca263c058c51b47b3ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f736c6f7468736f66742f6661726168)](https://www.php.net/)[![Documentation](https://camo.githubusercontent.com/8b4f00897d4a92553f8ba26e6165107c99d8570c592028bc4b07a3bcdc85225a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d7265666572656e63652d626c75652e737667)](https://faulo.github.io/slothsoft-farah/)[![Test Status](https://github.com/Faulo/slothsoft-farah/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/Faulo/slothsoft-farah/actions/workflows/ci-tests.yml)[![license badge](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

Files and Resources and Hypertext: a manifest-driven content management and asset delivery package for slothsoft modules.

Farah resolves `farah://vendor@module/path?arguments#stream` URLs through XML manifests, turns assets into executable results, and exposes those results as PSR-7 responses, DOM writers, file writers, stream writers, or chunk writers. It also ships the XML schemas, XSLT assets, JavaScript helpers, and small command-line tools used by existing Farah modules.

This is an older slothsoft package with active infrastructure and historical compatibility code. The package is kept installable for existing consumers, but not every namespace is recommended for new code.

Compatibility Policy
--------------------

[](#compatibility-policy)

Semantic versioning is in effect. Public classes are public API, including public constructors, methods, constants, and properties. Public signatures must remain backward-compatible unless an API-breaking change is specifically requested for a major release.

All code in this package must remain syntactically valid on the PHP version declared by `PHP_VERSION` in `.env` and behaviorally compatible with every PHP version covered by CI.

Bug fixes are allowed in every area of the package, including deprecated and historical APIs. Deprecated APIs should not be used for new code, but they are still expected to keep working for existing consumers, including compatibility fixes for newer PHP versions.

Adding dependencies is acceptable when the dependency is justified by the change and remains compatible with this package's supported PHP versions.

Current / Supported Areas
-------------------------

[](#current--supported-areas)

These parts are suitable for use in new or maintained Farah code:

- `Slothsoft\Farah\Kernel`
    - Request/response orchestration for Farah page and asset lookups.
    - Process-wide current request, page, sitemap, and tracking configuration.
- `Slothsoft\Farah\FarahUrl`
    - Immutable Farah URL value objects for authorities, paths, query arguments, and stream identifiers.
    - PSR-7 `UriInterface` integration for the `farah://vendor@module/path?arguments#stream` URL format.
- `Slothsoft\Farah\Module`
    - Module registration and resolution from manifest to asset, executable, result, and writer interfaces.
    - File-system cache/data path helpers scoped by Farah URL.
- `Slothsoft\Farah\Module\Manifest`
    - XML manifest loading and asset construction.
    - Strategy interfaces for tree loading and asset building.
- `Slothsoft\Farah\Module\Asset`
    - Asset lookup, path resolution, manifest instructions, parameter filtering, parameter suppliers, and executable builders.
    - Built-in instruction strategies for imports, links, templates, documents, manifests, scripts, stylesheets, and dictionaries.
- `Slothsoft\Farah\Module\Executable`
    - Executable lookup and result building.
    - Result builders for DOM writers, file writers, streams, chunk writers, transformations, maps, proxies, and CLI delegation.
- `Slothsoft\Farah\Module\Result`
    - Result lookup and conversion into DOM, file, stream, string, and chunk writer forms.
- `Slothsoft\Farah\RequestStrategy` and `Slothsoft\Farah\ResponseStrategy`
    - Page, asset, and route lookup strategies.
    - Header/body response sending strategies.
- `Slothsoft\Farah\Http`
    - Namespaced HTTP helpers for PSR-7 messages, status codes, content coding, transfer coding, and identity encoding.
- `Slothsoft\Farah\LinkDecorator`
    - HTML, SVG, and Farah link decoration for generated DOM output.
- `Slothsoft\Farah\StreamWrapper`
    - Stream wrapper factory and wrappers for Farah document and string resources.
- `Slothsoft\Farah\Schema`
    - Schema lookup for bundled Farah XML schemas.
- `Slothsoft\Farah\Exception`
    - Package-specific exception types and DOM-serializable exception context.
- `Slothsoft\Farah\Internal`
    - Built-in executable builders for Farah's bundled module assets, such as sitemap, request, phpinfo, and font-face generation.
- `Slothsoft\Farah\Dictionary`
    - Dictionary loading and transformation helpers used by older XML/XSLT workflows.
- `Slothsoft\Farah\Sites`
    - Domain and sitemap lookup model for page routing.
- `Slothsoft\Farah\Configuration`
    - Mutable configuration field wrappers for Farah URLs and assets.
- `assets/`
    - Farah's own module manifest, XML schemas, XSLT templates, sitemap generator assets, and JavaScript helper assets.
- `scripts/farah-asset` and `scripts/farah-page`
    - Composer binaries for resolving a Farah asset URL or page URL from the command line.

Historical / Deprecated
-----------------------

[](#historical--deprecated)

These components are included for historical reasons only. Do not use them for new code.

- `Slothsoft\Farah\Cache`
    - Small cache helpers retained for existing module behavior.
- `Slothsoft\Farah\Container`
    - Minimal container interface used by existing code.
- `Slothsoft\Farah\Daemon`
    - Socket-based daemon server/client helpers for long-running executable builders.
- `Slothsoft\Farah\Security`
    - Banned-user/session helper retained for existing deployments.
- `Slothsoft\Farah\Session`
    - Legacy session persistence helper.
- `Slothsoft\Farah\Tracking`
    - Request tracking, log table, archive, tick, and view helpers.
- `Slothsoft\Farah\HTTPClosure`, `HTTPCommand`, `HTTPEvent`, `HTTPRequest`, and `HTTPResponse`
    - Legacy root-level HTTP classes predating the current PSR-7 request/response flow.
    - Prefer `Slothsoft\Farah\Http`, `Slothsoft\Farah\RequestStrategy`, `Slothsoft\Farah\ResponseStrategy`, and PSR-7 message interfaces for new code.
- `Slothsoft\Farah\PThreads` in `src-pthreads/`
    - Deprecated pthreads integration retained for old consumers.
    - New code should avoid `ext-pthreads` and use maintained process, queue, or async infrastructure instead.
- The `/sites` asset in `assets/manifest.xml`
    - Deprecated alias for `/current-sitemap`.

Farah Modules
-------------

[](#farah-modules)

A Farah module is registered with a vendor/module authority and an asset directory:

```
use Slothsoft\Farah\Module\Module;

Module::registerWithXmlManifestAndDefaultAssets(
    'slothsoft@farah',
    __DIR__ . '/assets'
);
```

The module manifest describes resources, directories, fragments, custom assets, imports, links, templates, parameter filters, and executable builders. Farah then resolves URLs through the pipeline:

```
FarahUrl -> Manifest -> Asset -> Executable -> Result -> Writer/Response

```

Example URLs:

```
farah://slothsoft@farah/schema/module/1.1#file
farah://slothsoft@farah/current-sitemap#xml
farah://slothsoft@farah/sitemap-generator#html

```

See `assets/manifest.xml`, `assets/example-domain.xml`, and `test-files/` for canonical examples of manifests, domains, dictionaries, transformations, and path resolution behavior.

Command-Line Usage
------------------

[](#command-line-usage)

Install dependencies first:

```
composer install
```

Retrieve an asset by Farah URL:

```
composer exec farah-asset "farah://vendor@module/path/to/asset?arguments#stream-type"
```

Retrieve a page by URL path:

```
composer exec farah-page "/path/to/page?arguments#stream-type"
```

Development Notes
-----------------

[](#development-notes)

Some APIs use global or static process state, especially `Kernel`, `Module`, configuration fields, stream wrappers, session/tracking helpers, and request/page/sitemap state. Tests that exercise stateful behavior should isolate side effects with `@runInSeparateProcess`.

Tests may create temporary files through `temp_file`, `temp_dir`, or `Slothsoft\Core\IO\FileInfoFactory::createTempFile`; those helpers do not require manual cleanup. Files in `test-files/` are canonical fixtures.

The local development environment should provide the Composer development extensions. If an optional extension or platform feature is unavailable, affected tests may be skipped or impossible to run locally. Skipped tests should be treated as intentionally skipped unless the task is specifically about test skipping.

Use `.editorconfig` for coding style. Additional formatter or static-analysis tooling may be added later, but none is required right now.

Run tests with:

```
vendor/bin/phpunit
```

The full suite can take up to 600 seconds. Some API tests use browser mocking to validate the bundled JavaScript assets, including the first-run browser driver detection/download step.

Generate API documentation with:

```
vendor/bin/phpdoc
```

Installation
------------

[](#installation)

```
composer require slothsoft/farah
```

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

[](#requirements)

See `composer.json` for required PHP extensions and optional development extensions.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity94

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.5% 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 ~18 days

Recently: every ~23 days

Total

163

Last Release

44d ago

PHP version history (8 changes)1.0.0PHP ^7.2

1.1.3PHP 7.2 - 7.4

1.4.1PHP 7.2 - 8.0

1.6.0PHP 7.4 - 8.0

1.11.0PHP &gt;=7.4

1.28.0PHP &gt;=8.0

1.28.1PHP &gt;=8.3

1.28.2PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/51c81b91e75fb40c6ac3edaca9a3d086351c79e1ca146017968db999c42e4271?d=identicon)[Faulo](/maintainers/Faulo)

---

Top Contributors

[![Faulo](https://avatars.githubusercontent.com/u/7897059?v=4)](https://github.com/Faulo "Faulo (914 commits)")[![SlothsoftCI](https://avatars.githubusercontent.com/u/188984765?v=4)](https://github.com/SlothsoftCI "SlothsoftCI (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

farahplugindocsslothsoftfarah-module

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/slothsoft-farah/health.svg)

```
[![Health](https://phpackages.com/badges/slothsoft-farah/health.svg)](https://phpackages.com/packages/slothsoft-farah)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.4M2.2k](/packages/symfony-symfony)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)[google/auth

Google Auth Library for PHP

1.4k302.1M240](/packages/google-auth)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k6.0M777](/packages/sylius-sylius)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k555.0M2.8k](/packages/aws-aws-sdk-php)

PHPackages © 2026

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