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

Behat Orm Context Laravel Package

macpaw/behat-orm-context

Behat ORM Context by MacPaw provides Doctrine ORM-aware Behat contexts for acceptance testing in PHP projects. It helps manage entities, fixtures, and database state, keeping scenarios isolated and readable while reducing boilerplate around test data setup and cleanup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — still poor for a Laravel-first stack, but the objection is now about value, not viability. The package remains a Symfony bundle shipping Behat contexts for Doctrine ORM testing. v2.0.0 changes nothing about the bundle/kernel model, so the auto-wiring value proposition still does not map onto Laravel. Adoption remains conditional on a Laravel service that has deliberately introduced Doctrine ORM (e.g. laravel-doctrine) and accepts Behat as a second BDD layer alongside Pest.

Integration feasibility — materially improved; the hard blocker is gone. The prior assessment identified the symfony/framework-bundle ^6.4 pin as "the real gate," because Laravel 10/11 ship Symfony 7 components. v2.0.0 widens to Symfony 6.4–8, which now spans the Symfony floors of Laravel 10, 11, and 12. Doctrine ORM 2–3 and Behat 3 are also widened. The package stays dev-only with no runtime services. Net: Composer resolution moves from "likely conflict requiring a fork" to "verify, then proceed." This is the single most consequential change in the release and it directly retires the top-listed failure mode.

Technical risk — high, but now concentrated in project maturity rather than compatibility. Code quality signals remain strong (PHPStan max + phpstan-doctrine, PSR-12/Slevomat, Rector, composer dev-checks). Ecosystem signals are unchanged and unaddressed by this release: small repo, single-vendor origin (MacPaw), no security policy or disclosure path documented in the notes, no evidence of multi-maintainer structure. The 2026-03-30 date anomaly from the prior assessment is not resolved by the changelog link alone; treat provenance as unverified until the tag and commit signing are checked. The internal-score (9.2) vs opportunity-score (44.1) divergence persists and continues to look like code hygiene being scored as adoption value.

Release-specific observations.

  • Breaking surface is narrow and cheap: Symfony <6.4 and PHP <8.1 dropped, no public API change. Upgrade cost from v1.2.0 is effectively zero for anyone already on a supported stack; for us it is a non-event because we are not on v1.x.
  • Constraint breadth is a new, mild risk. Supporting Symfony 6.4 through 8 plus Doctrine ORM 2/3 and DBAL 2/4 implies internal branching (notably JSON field handling) across a matrix the upstream test suite cannot fully cover. Our specific combination is likely an under-tested cell.
  • Dev tooling bumps (PHPUnit 10.5/11, PHPCS 4, Rector 2, PHPStan 2, Slevomat 8) are require-dev only and do not reach consumers. They matter only if we vendor the source and run upstream tests in our CI.

Key questions:

  • Is there an actual Doctrine-based service in our portfolio, or is this still being evaluated for an Eloquent-only app? (Unchanged and still decisive.)
  • Does the widened Symfony range actually resolve against our composer.lock, and does any other dependency pin Symfony <6.4?
  • Which Doctrine ORM / DBAL pair do we run, and is that pair represented in upstream CI?
  • What does Behat give us that Pest's dataset/describe features do not, given existing team fluency?
  • Who owns this upstream, and is there a security disclosure path? The release notes do not add one.
  • Is the release tag signed and does the commit history corroborate the stated date?

TPM recommendation: Unchanged in direction, upgraded in confidence — do not adopt for a Laravel-only Eloquent codebase; green-light a scoped spike inside a Doctrine-based subservice. The difference from the prior assessment is that the spike is now cheap to attempt and unlikely to die on Composer.

Integration Approach

Stack fit. Default: no fit. Conditional fit: Laravel app + Doctrine ORM + a genuine Gherkin/QA-owned acceptance-test requirement. The widened constraints make the conditional case reachable on Laravel 10/11/12; they do not create a reason to adopt.

Migration path. Do not replace Pest/PHPUnit. Add as a dev-only dependency in an isolated suite (tests/behat/ or a dedicated behat.yml profile), instantiate contexts manually rather than relying on Symfony bundle registration, and inject the EntityManager explicitly. If bundle service definitions prove necessary, run a minimal Symfony kernel sidecar rather than emulating bundles inside Laravel.

Compatibility. The checks are now verification, not gate-finding:

  1. composer why-not symfony/framework-bundle ">=6.4 <9" against composer.lock — confirm no transitive pin below 6.4 survives.
  2. Confirm our Laravel version's symfony/* floor falls inside 6.4–8 (all current LTS-supported versions do).
  3. Confirm the PHP floor: CI runs ^8.1; upstream's config.platform.php = 8.1.0 remains compatible and conservative.
  4. Record our Doctrine ORM / DBAL pair and check it against the upstream matrix; assume our cell is under-tested and compensate in the spike.

Sequencing.

  1. Discovery (0.5 day, now Composer-and-Doctrine only): confirm Doctrine presence; run the constraint check above. No fork decision required up front.
  2. Spike (2–3 days): one Behat feature against a real Doctrine entity, manually wired, no bundle, on our actual ORM/DBAL combination.
  3. Overlap analysis (1 day): measure duplicate coverage against existing Pest tests; kill the spike if overlap > 30%.
  4. Decision gate: adopt only if the spike proves a gap Pest cannot close and the ownership question (below) has a named internal owner.

The widened constraints remove the prior "fork or pin shared Symfony packages" branch from the sequencing, which is the concrete scheduling win here.

Operational Impact

Maintenance. MIT, no runtime footprint, mature tooling config. If vendored, note that the upstream dev toolchain now requires PHPUnit 10.5/11, PHPCS 4, Rector 2, and PHPStan 2 — align our fork's CI to those versions rather than back-porting. Ownership cost is unchanged: no upstream community to absorb breakage, so we own any fork.

Support. Still no evidence of a security policy, release cadence, or multi-maintainer structure; this release does not add one. Keep the "experimental / vendor-risk" tier. If adopted, pin the exact tag, vendor the source, and document the fork procedure. Reject transitive adoption from another team without review.

Scaling. Test-only. CI remains the only scaling vector: a second runner, second config surface, and Behat's slower execution versus Pest. Budget CI minutes and expect a second class of flaky-test failure modes.

Failure modes.

  • Composer resolution failure on Symfony ^6.4 vs Laravel's Symfony 7 — retired by v2.0.0; replaced by a residual risk that a third-party package pins Symfony <6.4.
  • Under-tested compatibility cell: our specific Symfony × Doctrine ORM × DBAL combination may sit outside upstream CI coverage, particularly the ORM 2/3 and DBAL 2/4 JSON-handling branches.
  • DI mismatch: contexts expecting Symfony services Laravel cannot provide; silent skips masking missing coverage.
  • Mocked EntityManager divergence: upstream tests use a mocked EM, so real unit-of-work behavior may differ from the package's own assumptions.
  • Abandonment: unchanged and now the dominant risk, since compatibility risk has fallen. A composer update at the wrong time breaks the suite with no upstream fix.
  • Provenance: release date and signing still unverified; confirm the tag before pinning.

Ramp-up. Unchanged: Pest fluency does not transfer to Gherkin step definitions, Behat hooks, or Doctrine's identity map and unit-of-work. Expect 1–2 weeks for one engineer to become internal owner, plus ongoing Eloquent↔Doctrine translation overhead. Justified only where a Doctrine service already exists and QA has an explicit Gherkin requirement.

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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings