Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Peridot Laravel Package

peridot-php/peridot

Peridot is a lightweight, extensible PHP testing framework with a descriptive BDD-style syntax. Write expressive specs using describe/it blocks, custom DSLs, and plugins, with clear reporting for readable, maintainable test suites.

Deep Wiki
Context7

Peridot is a modern, event-driven testing framework for PHP that makes writing and running specs flexible and enjoyable. It provides a BDD-style describe/it syntax, a powerful event system, and an extensible architecture that lets you tailor tests, reporters, and workflows to your project.

  • Event-driven core for hooking into every stage of the test lifecycle
  • BDD-style specs with readable describe/it syntax
  • Extensible plugins for custom reporters, DSLs, and behavior
  • Flexible output and reporter support
  • Lightweight with no heavy dependencies
Frequently asked questions about Peridot
What is Peridot and how does it differ from PHPUnit?
Peridot is a lightweight, event-driven BDD test framework for PHP that uses describe/it specs with $this-bound context, beforeEach/afterEach hooks, and focused or pending specs. Unlike PHPUnit's xUnit conventions, it emphasizes RSpec/Jasmine-style syntax and a decoupled reporter and plugin system. That makes it familiar to teams coming from Ruby or JavaScript testing, but it is not a drop-in replacement for PHPUnit's assertion and tooling ecosystem.
Does Peridot work with Laravel?
Peridot can be installed in a Laravel project, but there is no first-class integration such as an Artisan command or a RefreshDatabase-equivalent trait. You would need to write and maintain your own bootstrap for the application container and database lifecycle. That integration tax is the main reason Laravel teams should pilot it carefully rather than assume it is a drop-in test runner.
Is Peridot compatible with PHP 8?
Peridot's last release was in January 2017 and targeted PHP 5.x and 7.x-era language and dependency constraints. Running it on PHP 8.x is unverified and likely to require patching for deprecations, reserved-word collisions, and transitive dependency pins such as evenement and symfony/console. Treat PHP 8 compatibility as a hard gate and validate it in a spike before committing.
How do I install Peridot with Composer?
Install it as a development dependency with composer require --dev peridot-php/peridot. It exposes a vendor/bin/peridot entry point and uses a peridot.php configuration file plus CLI flags. Because the package is old, check the PHP and dependency constraints during installation and confirm the runner exits with standard non-zero codes in CI.
Can I run Peridot alongside PHPUnit?
Yes, Peridot and PHPUnit can technically coexist in the same pipeline against the same codebase. That makes it possible to pilot Peridot incrementally without rewriting existing tests. The tradeoff is two runners, two assertion idioms, and two CI configurations to maintain, so the additive complexity should be justified by a clear readability benefit.
Is Peridot still maintained?
No. Peridot has had no releases in roughly eight years, has about 325 stars, and shows no maintainer response path or security patching. Any defect or PHP version incompatibility becomes an internal fork obligation for your team. That abandonment risk is high and should be a primary factor in adoption decisions.
How do I write BDD-style tests with Peridot?
You write specs using describe and it blocks, with $this-bound context and beforeEach/afterEach hooks for setup and teardown. Peridot also supports focused and pending specs, which helps during development. The syntax is inspired by RSpec and Jasmine, so teams familiar with those frameworks will find it natural.
Does Peridot support mocking and code coverage?
Mocking is not built into the core runner; it comes via the peridot-doubles plugin. Code coverage depends on Xdebug or phpdbg rather than built-in tooling, so you need those extensions configured in CI. Assertions are also Peridot-specific rather than PHPUnit-compatible, which affects how much existing test code you can reuse.
How extensible is Peridot's event-driven architecture?
Peridot is built around an event emitter core using Evenement, with decoupled reporters, hooks, and plugins that subscribe to lifecycle events such as runner.start and test.passed. That design is genuinely extensible because behavior is added through events rather than hard-wired into the runner. The architectural risk is low; the real risk is that the surrounding ecosystem and maintenance have stalled.
What are the best alternatives to Peridot for Laravel projects?
For Laravel applications, PHPUnit and Pest are the practical alternatives. PHPUnit fits xUnit conventions and Laravel's default tooling, while Pest offers expressive, RSpec-like syntax with active maintenance and first-class Laravel support. If you want spec-style readability without taking on an abandoned runner, Pest is usually the lower-risk choice.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console