PHPackages                             tomasvotruba/torch - 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. [Templating &amp; Views](/categories/templating)
4. /
5. tomasvotruba/torch

ActiveLibrary[Templating &amp; Views](/categories/templating)

tomasvotruba/torch
==================

Smoke testing of TWIG templates

0.3.9(2y ago)219.8k—5.9%MITPHPPHP ^8.1

Since May 2Pushed 1y ago2 watchersCompare

[ Source](https://github.com/TomasVotruba/torch)[ Packagist](https://packagist.org/packages/tomasvotruba/torch)[ RSS](/packages/tomasvotruba-torch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (13)Versions (49)Used By (0)

Torch
=====

[](#torch)

...when you need to cover your Twig with smoke.

[![Downloads](https://camo.githubusercontent.com/f817a3f6f2184bd645f30d5e4bdf9ba0b29d752d6baa05c0c60c109bc2b926aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6d6173766f74727562612f746f7263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tomasvotruba/torch/stats)

Install
-------

[](#install)

```
composer require tomasvotruba/torch --dev
```

Usage
-----

[](#usage)

1. Create `torch.php` in your project root:

```
use Twig\Environment;

require_once __DIR__ . '/vendor/autoload.php';

// create instance of Environment with everything needed for smoke render
$environment = new Environment(...);

return $environment;
```

In this file, you can override existing twig functions:

```
// override twig functions you need
StaticParameterProvider::set('overrideFunctions', [
    // provide static value for dynamic function
    'baseTemplate' => function () {
        return DummyTheme::LAYOUT_NAME;
    },
]);
```

2. Run torch your twig files directories:

```
vendor/bin/torch run templates
```

Behind Scenes
-------------

[](#behind-scenes)

-
-
-

Happy coding!

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Recently: every ~0 days

Total

47

Last Release

840d ago

PHP version history (2 changes)0.1.0PHP ^8.1

0.2.7.72PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (83 commits)")

---

Tags

phpstatic-analysissymfonytemplatestwig

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tomasvotruba-torch/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)

PHPackages © 2026

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