PHPackages                             vinny/spv - 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. [CLI &amp; Console](/categories/cli)
4. /
5. vinny/spv

ActiveProject[CLI &amp; Console](/categories/cli)

vinny/spv
=========

phpBB Style Pre-Validator (SPV) - A CLI tool for validating phpBB 3.3.x styles.

v1.0.0(3mo ago)11↓90.9%GPL-2.0-onlyPHPPHP &gt;=8.2CI passing

Since Mar 31Pushed 3mo agoCompare

[ Source](https://github.com/vinny/spv)[ Packagist](https://packagist.org/packages/vinny/spv)[ RSS](/packages/vinny-spv/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependencies (9)Versions (2)Used By (0)

phpBB Style Pre-Validator
=========================

[](#phpbb-style-pre-validator)

A CLI tool designed for validating phpBB 3.3.x styles against official standards and best practices. It mirrors the functionality of the official EPV but is specifically tailored for style development, ensuring security, proper file structure, and adherence to extension compatibility requirements.

Features
--------

[](#features)

- **Configuration Validation:** Validates `style.cfg` metadata, inheritance rules, and required versions.
- **Structural Integrity Check:** Validates mandatory files and paths based on the inheritance hierarchy (Standalone vs. Child Style).
- **Twig AST Syntax Engine:** Thoroughly parses `.html` templates using strict Twig environments. Includes a powerful pre-processor that natively handles legacy phpBB logic (``, strict operators, `$VARIABLES`) preventing false positives.
- **HTMLHint Integration:** Validates the underlying HTML structure of templates after Twig tag stripping to ensure valid DOM syntax, while gracefully ignoring Twig conditional tags.
- **Stylelint Integration:** Automated CSS code-style checking enforcing the official phpBB `.stylelintrc` configuration with deprecation-safe rules.
- **Baseline Integration:** Automatically queries, downloads, and caches the exact `prosilver` baseline to map, index, and check `` hooks seamlessly.
- **Remote Extraction:** Allows downloading and testing directly from a GitHub repository dynamically.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- Composer
- Node.js &gt;= 18 &amp; NPM (for Stylelint and HTMLHint dependencies)
- Git (Optional, but recommended)

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

[](#installation)

This package is intended to be installed as a global development requirement or locally inside a specific workflow.

### Global Installation (Recommended)

[](#global-installation-recommended)

```
composer global require vinny/spv
```

*(Make sure your global Composer `vendor/bin` directory is in your system's `$PATH` environment variable.)*

### Local Installation

[](#local-installation)

```
composer require --dev vinny/spv
```

Usage
-----

[](#usage)

### Validating a Local Style

[](#validating-a-local-style)

Use the `--dir` option to pass the absolute or relative path to your style directory containing the `style.cfg`.

```
# Using global alias:
spv validate --dir=/path/to/my_style

# Or local binary:
php bin/spv validate --dir=../styles/my_custom_style
```

### Validating from a GitHub Repository

[](#validating-from-a-github-repository)

The tool can query GitHub, download, and extract a specific branch internally into a temporary directory to perform a fast remote inspection.

```
php bin/spv validate --github="username/my-style-repo" --branch="master"
```

#### Options Overview

[](#options-overview)

- `--dir="/path/to/style"`: Local path to validate.
- `--github="author/repo"`: Validates a remote style directly from a GitHub repository.
- `--branch="master"`: Used alongside `--github` to target a specific branch.
- `--target-prosilver`: Bypasses your style and fetches the official PHPBB prosilver baseline for internal validation.
- `--phpbb-version="3.3.15"`: Overrides checking against the style target `style.cfg` to explicitly run validation against a defined version of prosilver (Used heavily with `--target-prosilver`).
- `--html-report`: Exports the terminal output to an automatically opening HTML local page.

CI/CD Validation for Style Authors (GitHub Actions)
---------------------------------------------------

[](#cicd-validation-for-style-authors-github-actions)

You can automatically protect your style repository so no invalid code is shipped! SPV is specifically engineered to run in GitHub Actions validating every commit or Pull Request.

A complete ready-to-use pipeline is available at [`resources/github-actions-example.yml`](resources/github-actions-example.yml). Simply copy the contents of that file into your style's `.github/workflows/validate.yml` repository folder. SPV will boot up seamlessly, fetch all necessary dependencies natively within Ubuntu-latest runners, and check your style continuously.

### Generating Visual Reports

[](#generating-visual-reports)

If you prefer a structured browser reading experience (e.g., examining a heavy PR audit with descriptions on fixing them), you can export the output to HTML:

```
php bin/spv validate --dir=/path/to/my_style --html-report
```

*This command parses your entire style and immediately opens your default browser with a formatted HTML document reporting your validation score and issues.*

Testing &amp; Architecture
--------------------------

[](#testing--architecture)

This tool was designed following Clean Architecture principles, ensuring modular Checkers and abstracted reporting interfaces. We use PHPUnit for robust test coverage and PHPStan (Level 8) to ensure the highest code quality standards.

To run the internal testing suite:

```
composer test
composer analyse
```

License
-------

[](#license)

**GPL-2.0**

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance82

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/474938?v=4)[Vinícius](/maintainers/vinny)[@vinny](https://github.com/vinny)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vinny-spv/health.svg)

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

###  Alternatives

[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M526](/packages/shopware-core)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54642.4k4](/packages/jolicode-castor)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M398](/packages/drupal-core-recommended)

PHPackages © 2026

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