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

Pho Laravel Package

danielstjules/pho

Pho is a lightweight BDD test framework for PHP inspired by Jasmine. It offers describe/it syntax, expressive expectations, spies, and before/after hooks, making it easy to write readable, behavior-driven specs for PHP projects.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Pho is a standalone BDD runner, not a Laravel package. It ships a vendor/bin/pho binary, discovers *Spec.php files, and provides a Jasmine/Mocha-style describe/it/beforeEach DSL with its own expectation library and reporter stack. There is no service provider, no facade, no PHPUnit bridge, and no awareness of Laravel's testing kernel. That means it cannot reuse TestCase, RefreshDatabase, WithoutMiddleware, HTTP assertion helpers, Bus::fake, Queue::fake, or Laravel's mocking ergonomics without us hand-rolling an equivalent harness.

Integration feasibility. Technically possible, commercially dubious. A pilot would require a custom bootstrap that instantiates Illuminate\Foundation\Application, loads the container, and manually wires database transactions and config — effectively rebuilding a meaningful slice of laravel/framework's testing traits. The larger blocker is dependency resolution: Pho's 2017-era constraints on symfony/console and related components are likely to conflict with the symfony/* versions pinned by Laravel 10/11/12, which would make composer require --dev fail outright or force unacceptable downgrades. This must be proven in a throwaway branch before any commitment.

Technical risk. High. Last release April 2017, zero dependents in the dataset, no security patching, no maintainer responsiveness, and PHP 5.4-era code that has almost certainly not been validated against PHP 8.1+. The risk is not "the tests are flaky" — it is "a dev-only dependency blocks composer install and therefore blocks production deploys." Score of 1.825 and opportunity 0.76 are consistent with a package that is interesting as prior art, not as infrastructure.

Key questions.

  • What is the actual goal: BDD-readable specs, client/stakeholder-facing documentation tests, or escaping PHPUnit? (Pest solves the first and third with none of this risk.)
  • Which PHP and Laravel versions are in scope today and in the next 18 months?
  • Do we require coverage reporting, parallel execution, and IDE integration in CI?
  • Is there budget to fork and own the package if we adopt it?
  • Who is the named internal owner, and what is the exit plan?

Integration Approach

Stack fit. Poor. Laravel's testing story is PHPUnit and Pest; adding Pho creates a second, incompatible test toolchain with a separate assertion vocabulary, separate CI invocation, and separate reporting format. Fit is only defensible for isolated, non-critical executable specifications — for example, documentation-oriented behavioural specs for a domain module that does not touch the HTTP layer or database.

Migration path. Do not migrate existing suites. If the underlying driver is BDD readability, the correct migration is PHPUnit → Pest, which is PHPUnit-compatible, actively maintained, Laravel-first, and preserves existing test files incrementally. If Pho is being considered for a greenfield service, treat it as a spike artifact and time-box it. There is no supported upgrade path from Pho to anything, which is itself the finding.

Compatibility. Assume incompatibility until proven. The verification sequence: create a branch, composer require --dev danielstjules/pho, run composer update --dry-run against the current lockfile, then execute a trivial spec under the target PHP runtime. If Composer reports a symfony/console conflict, stop — that is a terminal finding and the evaluation ends there. Secondary checks: PHP 8.2 dynamic-property deprecations, whether the reporter output can be consumed by our CI, and whether Xdebug coverage can be attached at all.

Sequencing.

  1. Confirm the business objective and the alternative (Pest) in writing.
  2. Dependency-conflict spike on a throwaway branch — one day, hard stop.
  3. If green: build the Laravel bootstrap, author one representative spec covering a real controller or job.
  4. Decision gate: compare against the same test written in Pest on effort, readability, and CI cost.
  5. If adopted (unlikely): encapsulate behind a Composer script and a dedicated CI job, pin the exact version, fork to an internal namespace, and schedule a 6-month review.
  6. If rejected: record the rationale so the question is not reopened.

Operational Impact

Maintenance. Adoption means ownership transfer. Upstream is dormant, so every PHP minor release becomes our problem. Budget for a fork, a compatibility patch cadence, and a documented divergence from the public package. This is a permanent tax on a tool that only affects developer experience — never revenue.

Support. No vendor, no active community, no Stack Overflow corpus of any depth. Knowledge will concentrate in whichever engineer runs the spike, creating single-owner risk. New hires arrive knowing PHPUnit and Pest; Pho syntax is easy but the custom Laravel harness is not, and that harness is exactly the part we would be inventing.

Scaling. No native parallelisation, no first-class coverage integration, no JUnit XML guarantee. As the suite grows, wall-clock time grows linearly and we either accept slower CI or invest in bespoke sharding. Two toolchains also double the surface for CI cache keys, Docker images, and dependency audits.

Failure modes.

  • Highest severity: a PHP or Laravel upgrade makes the dev dependency unresolvable, blocking installs and deploys until someone patches or removes it.
  • High: the hand-rolled bootstrap diverges from Laravel's real test lifecycle, producing green specs that do not reflect production behaviour — false confidence, the worst outcome for a test tool.
  • Medium: suite drift as contributors default to PHPUnit and the Pho specs rot into an unmaintained island.
  • Low: reporter output changes break CI parsing after an unpinned update.

Ramp-up. Syntax ramp-up is under a day for anyone who has seen Jasmine or Jest. Harness ramp-up is the real cost — realistically one to two sprints to get a single pilot spec running faithfully against a booted Laravel application and judged in a decision gate. That is a reasonable price for a spike and an unreasonable price for a production standard.

Recommendation. Do not adopt. Keep the dependency-conflict spike as the only committed work, use the output to justify Pest as the BDD answer, and revisit only if a maintained fork with Laravel integration appears.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin