analogue/factory
A lightweight model factory for Laravel that generates fake Eloquent model instances for testing and seeding, with a fluent API for defining attribute blueprints, sequences, and relationships so you can quickly build realistic test data.
Architecture fit
Analogue is a data-mapper ORM, whereas Laravel's factory system was designed around Eloquent's active-record lifecycle (newInstance, save, model events, mass assignment). This package exists solely to bridge that impedance mismatch: it lets Illuminate\Database\Eloquent\Factory definitions resolve and persist Analogue entities through Analogue's mapper/entity-manager instead of an Eloquent model. Architectural fit is therefore narrow and conditional — it is appropriate only for a Laravel application that has deliberately adopted Analogue as its persistence layer and still relies on Laravel's string-based factory DSL for test and seed data. For any Eloquent-based application, or any application using modern class-based factories, the package adds no value.
Integration feasibility
Integration is a Composer require alongside analogue/analogue and illuminate/database, plus service-provider registration and likely factory-builder substitution. Feasibility is constrained by release vintage: the last release is February 2018, which places it in the Laravel 5.5–5.8 era and pre-dates Laravel 8's class-based factory rewrite. Successful integration depends on pinning a compatible Laravel/PHP matrix and confirming that analogue/analogue itself resolves. Because the package has 1 star and 0 dependents, there is no observable production usage to validate the integration path.
Technical risk
$factory->define(...) with Illuminate\Database\Eloquent\Factories\Factory classes; this package targets the former. It is unlikely to work unmodified on supported Laravel versions.Key questions
Stack fit The only defensible fit is a legacy Laravel monolith (roughly 5.5–5.8, PHP 7.x) that already uses Analogue and has an established factory-based test suite. In a greenfield or modern stack, the correct move is to avoid the package entirely and implement test-data construction directly against Analogue's mapper.
Migration path
Compatibility
Verify Composer constraints for illuminate/database, analogue/analogue, and PHP before committing. Expect a ceiling below Laravel 8 and below PHP 8; test on the oldest and newest versions in the supported matrix. Confirm the package's factory builder correctly handles Analogue's entity manager lifecycle, transaction boundaries, and any timestamp or event behavior the test suite assumes.
Sequencing
Maintenance Effectively zero upstream maintenance. Treat the package as vendored code: fork it into the organization's namespace, pin the fork, and budget for occasional patches when Laravel or Analogue dependencies shift. The maintenance cost is small in absolute terms but non-zero and permanent.
Support There is no vendor, no active maintainer, and no community to escalate to. Internal ownership must be explicit. Incidents will be diagnosed by whichever engineer owns the test infrastructure, which concentrates knowledge risk.
Scaling The package affects test-data generation only, not production runtime, so horizontal scaling is not a concern. The relevant scaling constraints are suite runtime and memory when seeding large datasets through Analogue's entity manager, plus the friction of adding factories as the domain model grows. Watch for per-factory overhead that compounds in large suites.
Failure modes
Ramp-up New engineers will need familiarity with both Analogue's data-mapper patterns and the pre-Laravel-8 string-based factory DSL — a combination that is increasingly rare. Expect onboarding friction and a shrinking hiring pool. Mitigate by documenting the bridge's behavior and keeping the affected surface area small; the smaller the number of factories that depend on it, the cheaper the eventual replacement.
How can I help you explore Laravel packages today?