Download the PHP package barefootjs/twig without Composer
On this page you can find all versions of the php package barefootjs/twig. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download barefootjs/twig
More information about barefootjs/twig
Files in barefootjs/twig
Package twig
Short Description Twig rendering backend for the BarefootJS PHP runtime (barefootjs/php) -- TwigBackend implements the engine backend contract on an autoescaping Twig\Environment, ported from packages/adapter-perl/lib/BarefootJS/Backend/*.pm (see also the packages/adapter-jinja/python port's JinjaBackend).
License MIT
Informations about the package twig
barefootjs/twig
Twig rendering backend (Barefoot\TwigBackend) for the BarefootJS PHP
runtime.
This package targets twig/twig and pairs with the @barefootjs/twig
compile-time adapter, which emits .twig templates that call the runtime as
a bf object ({{ bf.scope_attr() }}, {{ bf.json(x) }},
{{ bf.spread_attrs(bag) }}).
The engine-agnostic runtime itself (Barefoot\BarefootJS, Evaluator,
SearchParams, Json) lives in a separate package,
packages/adapter-php (barefootjs/php on
Composer) -- see that package's README for the backend contract every PHP
engine adapter (Twig, Blade, ...) implements.
This package is maintained in the BarefootJS monorepo and is mirrored to a Packagist-facing repository only for Composer distribution.
- Source of truth: https://github.com/piconic-ai/barefootjs/tree/main/packages/adapter-twig/php
- Monorepo: https://github.com/piconic-ai/barefootjs
- npm adapter:
@barefootjs/twig - Runtime dependency:
barefootjs/php(packages/adapter-php)
Do not send implementation pull requests to the Packagist mirror. Send changes to the monorepo path above; the release workflow splits this directory and pushes the mirror automatically.
Tests
A live end-to-end Twig render (scope markers, hydration attrs, text slots,
autoescaping, spread_attrs, reserved-word mangling). Needs twig/twig
installed (composer install); skips gracefully with a notice (not a
failure) when vendor/autoload.php is absent. The engine-agnostic runtime's
own test suite (golden helper vectors, evaluator vectors, spread_attrs,
omit, render_child, ...) lives in
packages/adapter-php/tests — run with
php packages/adapter-php/tests/run.php.