PHPackages                             lag/colonel-smoker-bundle - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. lag/colonel-smoker-bundle

ActiveSymfony-bundle[Testing &amp; Quality](/categories/testing)

lag/colonel-smoker-bundle
=========================

The Colonel helps you to check the smoke in your application

v1.0(6y ago)34.3k[2 issues](https://github.com/larriereguichet/colonel-smoker-bundle/issues)[4 PRs](https://github.com/larriereguichet/colonel-smoker-bundle/pulls)MITPHPPHP ^7.2

Since Mar 1Pushed 3y agoCompare

[ Source](https://github.com/larriereguichet/colonel-smoker-bundle)[ Packagist](https://packagist.org/packages/lag/colonel-smoker-bundle)[ RSS](/packages/lag-colonel-smoker-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (17)Versions (9)Used By (0)

Colonel Smoker Bundle
=====================

[](#colonel-smoker-bundle)

[![Build Status](https://camo.githubusercontent.com/09707a678ac9f8f5a2e562dd0c063739abd2bb18f8c78f2251d61e73fdd8ad0f/68747470733a2f2f7472617669732d63692e6f72672f6c61727269657265677569636865742f636f6c6f6e656c2d736d6f6b65722d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/larriereguichet/colonel-smoker-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/079b67329b1f6f91bde8570368965d4a82930b8cf262cb6701099f169ec22877/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c61727269657265677569636865742f636f6c6f6e656c2d736d6f6b65722d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/larriereguichet/colonel-smoker-bundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/9094568b1c5ea4f2fdef4f846bf10079098c3cc3a996482a70e12ff2f85da7ba/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c61727269657265677569636865742f636f6c6f6e656c2d736d6f6b65722d62756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/larriereguichet/colonel-smoker-bundle/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/875dac3f6dd8f89c795b3293d65d8a9e6188078f3cb5f29b61bee25512bc1999/68747470733a2f2f706f7365722e707567782e6f72672f6c61672f636f6c6f6e656c2d736d6f6b65722d62756e646c652f762f737461626c65)](https://packagist.org/packages/lag/colonel-smoker-bundle)[![License](https://camo.githubusercontent.com/9eb5184ea64ed39c28e16651e0939908b459339597bc74413a0f74796613523e/68747470733a2f2f706f7365722e707567782e6f72672f6c61672f636f6c6f6e656c2d736d6f6b65722d62756e646c652f6c6963656e7365)](https://packagist.org/packages/lag/colonel-smoker-bundle)

[![logo](https://camo.githubusercontent.com/1d79fd71ae671d7165583a26ff15bce912ebd9a277b9536b001865c8931dfdd1/68747470733a2f2f7669676e657474652e77696b69612e6e6f636f6f6b69652e6e65742f6f6e6570696563652f696d616765732f312f31632f536d6f6b65725f416e696d655f5072655f54696d65736b69705f496e666f626f782e706e672f7265766973696f6e2f6c61746573742f7363616c652d746f2d77696474682d646f776e2f313530)](https://camo.githubusercontent.com/1d79fd71ae671d7165583a26ff15bce912ebd9a277b9536b001865c8931dfdd1/68747470733a2f2f7669676e657474652e77696b69612e6e6f636f6f6b69652e6e65742f6f6e6570696563652f696d616765732f312f31632f536d6f6b65725f416e696d655f5072655f54696d65736b69705f496e666f626f782e706e672f7265766973696f6e2f6c61746573742f7363616c652d746f2d77696474682d646f776e2f313530)

The **Colonel Smoker** is an expert in smoke. He can even tell if your application is smoking before deploying it to production.

The **Colonel Smoker** find the URLs of your Symfony application (only Symfony is supported now) and looks for `500` errors.

Main features :

- helps providing requirements parameters for your dynamic URLs
- uses the routes declared in the Symfony routing by default
- check for response code
- check if the resulted html contains dynamic data from your entity

The goal is to ensure that each urls in your application does not contains critical errors. It is especially designed for application which have pages with complex and dynamic data to display.

> This bundle relies on Symfony service injection. If your are not familiar with this, you can read documentation [here](https://symfony.com/doc/current/service_container.html)

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

[](#installation)

```
composer require --dev lag/colonel-smoker-bundle
```

Configuration
-------------

[](#configuration)

```
# config/packages/test/lag_smoker.yaml
lag_smoker:
    host: 'http://127.0.0.1:8000/' # This is the default configuration
    # This route will be used to generated urls to test against
    routes:
        # The homepage route has no parameters and expect a 200 OK response code
        app.homepage: ~
        # The show article requires parameters. They will be provided by the mapping "article"
        app.show_article:
            mapping: article
    # The mapping will be used to generated urls with dynamic parameters
    mapping:
        # This name can be anything, but it has to be unique
        article:
            # This mapping will be used with the Article entity of your application
            entity: App\JK\CmsBundle\Entity\Article
            # The property id in the route parameters (/articles/{id} for example) will be mapped with id property of your entity
            requirements:
                id: id
```

Usage
-----

[](#usage)

1. First generate the URL cache :

```
bin/console smoker:generate-cache
```

2. Then run the smoke tests :

```
bin/console smoker:smoke
```

> If you use the Symfony WebServer bundle, dont forget to run `bin/console server:start --env=test`.

How it works
------------

[](#how-it-works)

The **Colonel Smoker** will read the configuration and use the Symfony routing to build the urls of your application. Urls are stored in a cache. Then he calls each urls and analyze the response to find 500 errors. But it can tests more like if the html contains some static or dynamic values.

For example, if your application handles articles, the **Colonel Smoker** can check if the page displaying the article contains the article title.

Documentation
-------------

[](#documentation)

1. [Getting started](https://github.com/larriereguichet/colonel-smoker-bundle/tree/master/src/Resources/docs/1.GettingStarted.md)
2. [Build Urls](https://github.com/larriereguichet/colonel-smoker-bundle/tree/master/src/Resources/docs/2.BuildUrls.md)
3. [ResponseHandlers](https://github.com/larriereguichet/colonel-smoker-bundle/tree/master/src/Resources/docs/3.ResponseHandlers.md)

Reference Configuration
-----------------------

[](#reference-configuration)

```
lag_smoker:
    routes:
        app.homepage:
            mapping: null
            provider: symfony
            handlers:
                response_code: 200
        app.show_articles_redirection:
            mapping: article
            provider: my_custom_requirements_provider
            handlers:
                response_code: 302
     mapping:
        article:
            entity: App\JK\CmsBundle\Entity\Article
            provider: symfony
            pattern: 'app.article_'
            excludes:
                - app.article.excluded_routes
            requirements:
                id: id
                categorySlug: category.slug

```

> The **Colonel** relies on the Symfony [DomCrawler](https://symfony.com/doc/current/components/dom_crawler.html) component and the [Goutte](https://github.com/FriendsOfPHP/Goutte) client.

Known Issues
------------

[](#known-issues)

In dev environment, we call the Symfony Client to many times when having the server on the same machine (when using the Symfony web server for example), the cache miss to retrieve value and throws an exception. It causes some build failures. A patch is in progress to avoid this.

\## Road map

- Add an option to set a timeout in tests to avoid error with the cache
- Add a check to see if the web server is running

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96.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 ~259 days

Total

2

Last Release

2366d ago

Major Versions

v0.1 → v1.02019-11-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a911c960bb7ac86a4ae9c323f1492bc3644f296abc9b370cde0c55407b40a1e?d=identicon)[JohnKrovitch](/maintainers/JohnKrovitch)

---

Top Contributors

[![johnkrovitch](https://avatars.githubusercontent.com/u/1202965?v=4)](https://github.com/johnkrovitch "johnkrovitch (82 commits)")[![lutangar](https://avatars.githubusercontent.com/u/568769?v=4)](https://github.com/lutangar "lutangar (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

testing-tools

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lag-colonel-smoker-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/lag-colonel-smoker-bundle/health.svg)](https://phpackages.com/packages/lag-colonel-smoker-bundle)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M647](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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