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

Mockery Module Laravel Package

codeception/mockery-module

Codeception module that integrates the Mockery mocking framework into your test suite, making it easy to create, use, and verify mock objects in PHP unit and functional tests with minimal setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: codeception/mockery-module is a test-time integration package, not a runtime dependency. It fits only if the organization standardizes on Codeception for functional/acceptance testing in Laravel/PHP projects and needs Mockery-based mocking inside those suites. Laravel’s default testing stack (PHPUnit plus built-in Mockery support) already covers most unit/feature testing needs, so the architectural fit is narrow: use it as a bridge for Codeception suites, not as a core platform dependency. It has no production runtime footprint and does not influence application architecture.

Integration feasibility: Technically straightforward. It is a Composer dev dependency, enabled as a Codeception module and used to create Mockery mocks in tests. Effort is low for teams already using Codeception. The main feasibility question is whether it is still compatible with the target Codeception and PHP versions, given the last release date. Because the package is small and MIT-licensed, a fork or local patch is feasible if upstream is inactive.

Technical risk: The primary risk is maintenance, not code complexity. With 34 stars, 0 dependents, and a last release of 2022-03-28, the package shows low community activity. It may not support newer Codeception releases or PHP 8.2/8.3 without changes. Security risk is low because it is dev-only. The larger risk is test-suite lock-in to an unmaintained adapter. Mitigations include version pinning, a CI compatibility matrix, and a fork-or-replace contingency.

Key questions:

  • Do we actually use Codeception for Laravel/PHP projects, or is PHPUnit/Laravel’s native testing stack sufficient?
  • Which Codeception and PHP versions must be supported?
  • Does Codeception already provide native Mockery integration, making this package redundant?
  • Who owns maintenance if we adopt it and upstream remains inactive?
  • Can we replace it with Laravel’s built-in mocking or a small internal adapter at lower long-term risk?
  • What is the cost of forking and maintaining the module internally?

Integration Approach

Stack fit: Best suited to Laravel/PHP projects that already use Codeception for acceptance or functional tests and need Mockery-style mocks. It is a dev-only dependency and does not affect production deployment. It is a poor fit for teams standardized on PHPUnit, Pest, or Laravel’s built-in test doubles, where native mocking is simpler and better supported.

Migration path: If Codeception is already in use, add the package under require-dev, enable the Mockery module in the relevant Codeception suite configuration, and migrate tests incrementally to use Mockery where isolation is needed. If Codeception is not already in use, do not introduce it solely for this module; adopt Laravel’s native testing tools instead. If replacing manual mocks, migrate one suite at a time and keep the previous approach available during transition.

Compatibility: Validate Composer constraints against the target Codeception major version, PHP version, and Mockery version. The 2022 release date suggests it was tested against PHP 8.0/8.1-era tooling; explicit testing on PHP 8.2/8.3 and Codeception 5 is required. Check whether the module relies on Codeception APIs that have changed. Because it is a thin adapter, incompatibilities may be small and patchable.

Sequencing:

  1. Confirm test-strategy fit: Codeception plus Mockery versus native Laravel/PHPUnit mocking.
  2. Run a short spike in one non-critical Codeception suite on the oldest and newest supported PHP/Codeception versions.
  3. Validate in CI with a version matrix and lockfile.
  4. Document module configuration and Mockery usage patterns.
  5. Decide whether to standardize, fork, or deprecate based on pilot results and maintenance outlook.

Operational Impact

Maintenance: Treat the package as at-risk due to low activity and no recent releases. Assign an internal owner, monitor Codeception/PHP upgrades, and budget for a fork if adoption expands. MIT licensing permits internal maintenance. Because it is dev-only, production maintenance is unaffected.

Support: Community-only support with no vendor SLA. Internal documentation and examples are needed to reduce support burden. Developers already familiar with Mockery and Codeception will need little ramp-up; others will need guidance on both tools and on when mocking is appropriate.

Scaling: Runtime scaling impact is negligible because the package is test-only. Test-suite scaling depends more on Codeception and Mockery usage patterns than on this adapter. Excessive mocking can make suites brittle, so governance around test design matters more than package performance.

Failure modes: Incompatibility with newer Codeception or PHP versions, dependency resolution conflicts, broken tests after upgrades, and test flakiness from improper mocks. Security exposure is limited because the package is not deployed to production. Mitigations include pinned versions, committed lockfiles, CI compatibility checks, a documented fork plan, and a fallback to native Laravel/PHPUnit mocking.

Ramp-up: Low technical ramp-up for teams already using Codeception and Mockery. The main effort is strategic: confirming that Codeception is the right test framework, validating version compatibility, and deciding whether to accept maintenance risk. A TPM should frame adoption as a test-infrastructure decision with a pilot, explicit exit criteria, and a scheduled review date.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource