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)324.9k↑40.7%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 yesterday

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

36

—

LowBetter than 79% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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

885d 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

[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136406.3k14](/packages/rector-rector-src)[sulu/sulu

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

1.3k1.4M203](/packages/sulu-sulu)[sylius/sylius

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

8.5k5.9M736](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)

PHPackages © 2026

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