PHPackages                             jmf/twig-spaceless - 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. jmf/twig-spaceless

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

jmf/twig-spaceless
==================

Twig extension providing a "spaceless" filter to strip whitespace between HTML tags.

1.0.0(1mo ago)0171mitPHPPHP ^8.3CI passing

Since May 31Pushed 1mo agoCompare

[ Source](https://github.com/jmfeurprier/twig-spaceless)[ Packagist](https://packagist.org/packages/jmf/twig-spaceless)[ RSS](/packages/jmf-twig-spaceless/feed)WikiDiscussions 1.0 Synced 1w ago

READMEChangelogDependencies (7)Versions (2)Used By (1)

Twig extension : spaceless
==========================

[](#twig-extension--spaceless)

Installation &amp; Requirements
-------------------------------

[](#installation--requirements)

Install with [Composer](https://getcomposer.org):

```
composer require jmf/twig-spaceless
```

Usage in Twig templates
-----------------------

[](#usage-in-twig-templates)

### spaceless

[](#spaceless)

Strips whitespace between HTML tags (a replacement for the removed Twig `spaceless` tag/filter).

As a filter:

```
{{ '\n    foo\n'|spaceless }}
{# => foo #}
```

Applied to a block:

```
{% apply spaceless %}

        foo

{% endapply %}
{# => foo #}
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance89

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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 ~0 days

Total

2

Last Release

54d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b08b8105ec8bc88d1c911e10dbf156814769650a67960e2f3d71ed6d2417f0d?d=identicon)[jmfeurprier](/maintainers/jmfeurprier)

---

Top Contributors

[![jmfeurprier](https://avatars.githubusercontent.com/u/8434690?v=4)](https://github.com/jmfeurprier "jmfeurprier (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jmf-twig-spaceless/health.svg)

```
[![Health](https://phpackages.com/badges/jmf-twig-spaceless/health.svg)](https://phpackages.com/packages/jmf-twig-spaceless)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.2k](/packages/craftcms-cms)

PHPackages © 2026

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