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

Api Modeller Laravel Package

fabricio872/api-modeller

fabricio872/api-modeller is a Laravel/PHP package for defining and generating API models, helping you scaffold consistent resources and speed up backend development. It streamlines model setup so you can focus on building endpoints and business logic.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor, and the premise needs correcting. Despite the framing in the request, this is not a Laravel package. The description — "translating foreign API to Doctrine-like models" — indicates a Symfony/Doctrine-oriented abstraction: plain PHP model objects populated from a remote API's payload, in the idiom of Doctrine entities rather than Eloquent models. There is no service provider, config file, facade, or illuminate/* dependency implied. In a Laravel codebase the library would sit beside Eloquent, not inside it, giving us two competing persistence/model idioms in one repo. That is an architectural smell unless the remote API is genuinely being treated as a read-only system of record with no local persistence.

Integration feasibility — technically trivial, practically unsupported. Composer installation is a non-event. The work is all glue: binding the translator into Laravel's container, wiring our HTTP client (Guzzle/Laravel Http) underneath it, and deciding where models get hydrated and cached. None of that is Laravel-specific, so we would write and own 100% of the integration layer. Budget it as a small internal library, not a dependency install.

Technical risk — high, and concentrated in abandonment. Zero stars, zero dependents, single maintainer, last release June 2022. There is no downstream population to absorb the cost of finding bugs, and no signal that PHP 8.2/8.3 or current Doctrine versions are supported. A four-year-stale composer.json is likely to collide with modern Laravel's illuminate/support and with doctrine/* constraint ranges. There will be no security advisories — not because the code is safe, but because nobody is looking.

Key questions to resolve before any spend:

  • What are the declared PHP and doctrine/* (or symfony/serializer) version constraints, and do they resolve against our Laravel version?
  • Is the mapping declarative (attributes/YAML/annotations) or hand-written mapper classes? This determines whether schema drift is a config change or a code change.
  • Does it own HTTP transport, or accept injected responses? If it owns transport, we inherit its retry/timeout/auth behavior — a non-starter.
  • Is there a test suite, and does it cover nullability, type coercion, and nested payloads?
  • Read-only, or does it attempt write-back to the foreign API?

Integration Approach

Recommended position: do not adopt as a production dependency. Harvest the pattern. The concept — a translation layer that turns a third-party API into typed objects — is sound and worth implementing. The specific artifact is not. Laravel-native equivalents are better maintained and better supported: spatie/laravel-data for typed DTOs with validation and casting, Saloon or Laravel's Http client with macros for the transport, and explicit mapper classes or Attribute casts for hydration.

If the team insists on evaluating it, take this sequence:

  1. Spike (1–2 days). Composer-install into a throwaway Laravel app on our target version. Success criterion is a clean dependency resolution plus one end-to-end model hydration from a mocked payload. If resolution fails, stop — do not negotiate constraints.
  2. Read the source. With no documentation beyond a README, the source is the spec. Confirm the failure semantics before trusting it.
  3. Fork and vendor. Given abandonment, any production use means forking to internal/api-modeller, pinning to our PHP version, and adding coverage for the payload shapes we actually depend on. Treat upstream as dead.
  4. Isolate behind an interface. Define our own ForeignApiModelTranslator contract; the fork implements it. This keeps the swap to laravel-data cheap when we inevitably make it.

Compatibility caveat: if we run laravel-doctrine, constraint conflicts are more likely, not less, since both packages target overlapping Doctrine version ranges. Verify explicitly rather than assuming shared Doctrine means shared constraints.

Operational Impact

Maintenance — we inherit it entirely. No upstream commits since 2022 means no bug fixes, no PHP-version bumps, no dependency updates. Within twelve months the fork diverges enough that re-merging upstream (should it resume) is impractical. Plan for the internal fork to be permanently owned by one team.

Support — zero external. No community, no issue-tracker activity, no Stack Overflow corpus. Every question is answered by reading source. Onboarding cost is front-loaded onto whoever does the spike; ramp-up for everyone after is modest because the API surface is small, but there is no safety net and no way to validate an interpretation against a maintainer.

Scaling — the library is not the bottleneck. Translation is CPU-light in-memory mapping. The real scaling constraints are the foreign API's rate limits, latency, and pagination — none of which this library addresses. There is no built-in caching of translated models, so we must add a cache layer above it or re-fetch constantly. Budget for that explicitly; it is not free.

Failure modes — the dangerous ones are silent.

  • Schema drift: the foreign API adds, renames, or retypes a field; the mapper drops it or coerces it without erroring. Nothing surfaces until a downstream consumer gets nulls.
  • Partial hydration: missing optional fields yielding partially-populated models — indistinguishable from a legitimate empty value.
  • Transport opacity: if the library owns the HTTP call, timeouts and retries behave however it decided; we lose circuit-breaking and observability.
  • Dependency rot: a transitive Doctrine security patch requires a fork bump we must drive ourselves, with no upstream test signal.

Mitigations, non-negotiable if adopted: contract tests against recorded foreign-API payloads in CI; strict validation on every hydrated model so drift fails loudly; a cache layer with explicit TTLs; transport kept outside the library so retry, timeout, and tracing stay in our control.

Verdict: ship-blocking as a direct dependency. The pattern is worth a two-day spike and a roughly one-week internal build using laravel-data plus Saloon. Zero dependents and a two-year-old last release mean the true cost of this package is the fork we would be writing anyway — at which point we should write it against the tools our team already knows.

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.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc