PHPackages                             rdm/phpspec-customsuffix - 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. rdm/phpspec-customsuffix

ActiveLibrary[Testing &amp; Quality](/categories/testing)

rdm/phpspec-customsuffix
========================

PHPSpec extension to allow custom class file suffixes ie. MyClass.class.php

018PHP

Since Oct 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/svetzal/rdm-phpspec-customsuffix)[ Packagist](https://packagist.org/packages/rdm/phpspec-customsuffix)[ RSS](/packages/rdm-phpspec-customsuffix/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

rdm-phpspec-customsuffix
========================

[](#rdm-phpspec-customsuffix)

PHPSpec is a highly opinionated tool, and is hard-coded to deal with class files that use only the .php filename extension. While this may be a good practice, it keeps people from adopting it as a test framework if their existing code-base doesn't exactly follow it's recommended practices, without a tremendous amount of disruptive change.

And, disruptive change to an untested code-base is bad, yeah?

Within the PHP community, different conventions have been used over the years for filenames. Different communities have different opinions on PHP class file naming conventions, for better or worse. Some communities use suffixes like `*.class.php`, some use `*.inc.php`, some even use prefixes like `class-*.php` (although this plugin doesn't support prefixes at this time).

In order to add a little flexibility to PHPSpec, this plugin allows you to specify on a suite-by-suite basis different filename suffix/extension conventions.

Configuring custom suffixes in `phpspec.yml`:

```
suites:
  really_old_stuff:
    src_path: thing/includes
    spec_path: thing
    src_extension: .inc.php
  old_stuff:
    src_path: newer_thing/classes
    spec_path: newer_thing
    src_extension: .class.php
extensions: [RDM\CustomSuffix\Extension]
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b8a453cbe4769e9463d5c6735dc7286b2d2f7c2b9a34f15c8aa0068078021b66?d=identicon)[svetzal](/maintainers/svetzal)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/rdm-phpspec-customsuffix/health.svg)

```
[![Health](https://phpackages.com/badges/rdm-phpspec-customsuffix/health.svg)](https://phpackages.com/packages/rdm-phpspec-customsuffix)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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