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

Core Laravel Package

apimatic/core

Core library for APIMatic-generated PHP SDKs. It supplies shared request construction, query/header/form/body parameter handling, and common utilities so generated clients stay consistent. Supports PHP 7.2 through 8.4; install with composer require apimatic/core.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What this package actually is. apimatic/core is not a feature library you adopt to solve a business problem. It is the runtime substrate that APIMatic-generated PHP SDKs compile against: request builders and typed parameters, response handlers and deserializers, auth plumbing, a logging layer, and a CoreTestCase base for generated tests. The correct framing for evaluation is therefore not "should we use this?" but "are we, or will we be, consuming APIMatic-generated SDKs — and if so, do we accept this runtime as a transitive dependency we must pin, monitor, and occasionally patch around?"

Architecture fit.

  • Strong fit only in a consumer posture: an external vendor ships an APIMatic-generated PHP SDK, we composer require it, and apimatic/core arrives transitively. It will never be the right choice to hand-author against directly.
  • Weak-to-nil fit if we intend to keep our integration surface behind Laravel's own Http facade. The package owns its transport, its own request/response objects, and its own error model. It does not compose with Laravel middleware, Http::fake(), Http::retry(), or the event system. Every integration becomes an adapter problem.
  • Real (if narrow) fit if we are building our own code generator or internal SDK factory on APIMatic's toolchain, in which case this is effectively mandatory and we inherit its release cadence.

Integration feasibility.

  • Composer-native, PSR-4 autoloaded, MIT licensed, explicitly advertising support for PHP 7.2 through 8.4 — a wide, current matrix that covers Laravel 8 through 12 runtimes without constraint conflict on the language floor.
  • The README exposes a clean conceptual surface: RequestBuilder/Request on the way out, ResponseHandler/Context/ResponseType/ResponseError on the way back, plus discrete parameter classes. This is legible and testable in principle.
  • The presence of a first-class logging configuration layer (ApiLogger, LoggingConfiguration, RequestConfiguration, ResponseConfiguration, LoggerConstants::NON_SENSITIVE_HEADERS) is a genuine operational asset — request/response logging with sensitive-header masking is something teams routinely build badly by hand. This is the single most underrated element of the package.
  • CoreTestCase with body matchers (RawBodyMatcher, KeysAndValuesBodyMatcher, KeysBodyMatcher, NativeBodyMatcher), HeadersMatcher, and StatusCodeMatcher gives us a credible contract-testing primitive for generated SDK behaviour — useful for pinning vendor integration semantics in CI.

Technical risk.

  • Adoption signal is thin. 7 stars and a reported zero dependents is misleading in isolation — the library's real consumer base is generated SDKs that vendor or pin it, not repositories that require it publicly — but it means we cannot lean on community validation, Stack Overflow answers, or third-party write-ups when something breaks. Diagnosis falls to reading source.
  • 0.x versioning. The release history sits at 0.3.x through mid-2024, with recent entries at 0.3.10. Under semver, 0.x permits breaking changes in minor bumps. Our pinning must be exact or ~-constrained with a review gate on every bump.
  • Release data inconsistency. Metadata claims a last release of 2026-08-20 while the changelog evidence ends at 0.3.10 (2024-05-30). This must be reconciled before we rely on "actively maintained" as a risk-mitigation assumption.
  • Single-vendor concentration. APIMatic is the sole maintainer and the sole source of generated SDKs paired with this runtime. If their generator's output diverges from the runtime we've pinned, we are stuck between upgrading the runtime (unvalidated by the SDK) or pinning a stale SDK.
  • Historical bug surface is informative. Recent fixes cover date deserialization (simple-date, negative timezone offsets in RFC3339), multipart boolean quoting, auth re-validation, actual-exception-instead-of-wrapper, and query URL validation after global params. These are exactly the fiddly, correctness-critical edges of API client code, and their presence in the changelog tells us the edges exist and have been reached in production by others.

Key questions.

  1. Which concrete vendor SDK(s), if any, are pulling apimatic/core into our dependency graph, and what version constraint do they declare?
  2. What is the full transitive dependency set — does it bring apimatic/unirest-php, apimatic/jsonmapper, apimatic/core-interfaces, and their own constraints on Guzzle/cURL extensions?
  3. Does the package's HTTP transport satisfy our egress posture (proxy support, TLS verification defaults, timeout configuration, retry semantics)?
  4. Is the 2026-08-20 release date real, and what is the vendor's stated support/security-response commitment?
  5. Does the runtime allow injecting a PSR-18/PSR-7 client, or is the transport closed? This single answer determines whether we can reuse Laravel's HTTP client stack.
  6. Are there any published security advisories, and does the project operate a responsible-disclosure channel?

Integration Approach

Stack fit.

  • Laravel 9/10/11 on PHP 8.1–8.4 is comfortably inside the declared support matrix. No language-level conflict.
  • The friction is architectural, not syntactic: two HTTP stacks in one application. Our observability, retry, circuit-breaking, and rate-limiting investments live on Laravel's client; generated SDK traffic would bypass all of it. That is unacceptable for anything customer-facing.
  • Mitigation: treat the generated SDK as a driven adapter, not a service. Everything above it talks to our own interface.

Migration path.

  1. Spike (days, not weeks). Pull one real APIMatic-generated SDK of a vendor we care about into a throwaway branch. Confirm Composer resolution against our Laravel version, run the generated test suite locally, and inspect the actual HTTP client and timeout defaults.
  2. Isolate. Place the generated SDK in its own namespace — ideally a local path-repository package (packages/vendor-sdk/) rather than dumping generated PHP into app/. Generated code must be treated as third-party, not edited.
  3. Adopt apimatic/core explicitly. Declare it in our root composer.json with an exact pin, even though it arrives transitively. This prevents a silent transitive bump from a vendor SDK update from changing runtime behaviour under us.
  4. Wrap. Define a domain-facing gateway interface (AcmeClient::getShipment() etc.) and implement it with the generated SDK. Register via a service provider bound to the interface. All application code depends on the interface only.
  5. Instrument. Configure LoggingConfiguration/RequestConfiguration/ResponseConfiguration and wire ApiLogger into our existing Monolog channel, with NON_SENSITIVE_HEADERS masking enabled by default. Never let this default to console logging in production.
  6. Contract-test. Use CoreTestCase and the matcher suite to assert wire-level behaviour against recorded fixtures, so a runtime or SDK bump that changes serialization fails CI rather than production.
  7. Cut over. Route real traffic through the gateway, with the legacy path retained behind a feature flag for one release cycle.

Compatibility notes.

  • Exact-pin apimatic/core. 0.3.x gives no semver guarantee across minor bumps; a regenerate-SDK-and-update cycle bundled with a runtime bump is the only safe upgrade unit.
  • Audit the transport against our PHP extensions manifest — expect cURL to be required. Confirm this in the base image before committing.
  • If the transport turns out to be PSR-18 injectable, we can hand it a Laravel-adjacent client and recover much of the observability story. Verify this early; it materially changes the sequencing above.

Sequencing. Spike → transport/injection verdict → exact pin + namespace isolation → gateway adapter → logging wiring → contract tests → flagged cutover. Do not begin with the adapter; the transport verdict can invalidate the design.

Operational Impact

Maintenance.

  • Upgrade cadence is driven by the vendor SDK regeneration cycle, not by our own roadmap. Budget a recurring per-vendor-SDK task: regenerate, diff, run contract tests, bump the pin. Regenerate only when a vendor publishes, and never auto-bump runtime and SDK in the same unattended dependency PR.
  • Generated code must be quarantined from static analysis and style enforcement (or analysed with rulesets tuned for it), else it will dominate our lint debt and mask real findings in hand-written code.
  • The 0.x line means every minor bump is a review event. Treat apimatic/core as a tier-2 dependency requiring owner sign-off.

Support.

  • Effectively single-vendor support. No community corpus to search. Expect to read source for anything non-obvious.
  • Our own support story must never expose the runtime to application teams: the gateway interface is the contract, and the SDK is an implementation detail one developer owns.
  • If a vendor SDK breaks and APIMatic is unresponsive, our remediation options are limited to pinning an older SDK, or forking the runtime (MIT permits it) and carrying a patch. Forking should be a pre-approved contingency, not an improvisation. Name an owner now.

Scaling.

  • The transport is synchronous and blocking. Under Laravel this means long-running generated calls occupy PHP-FPM workers or queue workers for their full duration. Wrap outbound calls in queued jobs with explicit timeouts and bounded concurrency rather than calling inline in request handlers.
  • Confirm the runtime honours an explicit timeout, and set it. A default-unbounded cURL timeout is a classic worker-exhaustion failure mode.
  • Retry and backoff belong in our wrapper, not in the generated code — assume the SDK will not do it correctly for our SLOs.
  • Response deserialization into typed models allocates more than a raw array decode; irrelevant at typical volumes, worth measuring if any endpoint returns large collections.

Failure modes to instrument for.

  • Deserialization failures — enum mismatches, null handling, and date parsing. The changelog's repeated date fixes (simple-date, RFC3339 negative timezones) confirm this is a live edge when a vendor changes format server-side. Alert on deserialization exceptions separately from HTTP errors.
  • Auth validation loops — repeated-validation behaviour was itself a bug fix; ensure auth failures surface as typed errors, not retries.
  • Multipart encoding — boolean quoting and per-part headers have both been patched. If we upload files, put a test on it.
  • Wrapper-exception opacity — older versions wrapped underlying exceptions; 0.3.7 corrected this. Verify our pinned version surfaces the real exception, or every incident triage starts one layer too high.
  • Silent logging — if logging configuration fails open to NullApiLogger, we lose request tracing exactly during the incident that needs it. Assert at boot that the production logger is not the null implementation.

Ramp-up.

  • Application developers should need zero knowledge of apimatic/core. If they do, the adapter boundary has leaked — that is a design review finding.
  • Budget roughly a one-to-two-day learning curve for the one or two engineers who own the integration: the request/parameter model, the response handler and type mapping, auth configuration, and the logging configuration classes. The README's per-class tables are sufficient to get to first call; depth requires reading source.
  • The CoreTestCase matcher suite is the cheapest on-ramp for testing and should be introduced alongside the first adapter, not later.

Overall position. Conditional adoption. Accept the runtime only as a transitive consequence of a vendor SDK we genuinely need, and only behind a gateway with an exact pin, a named owner, contract tests, and a pre-approved fork contingency. Reject any proposal to hand-author application code directly against apimatic/core — the abstractions are built for generated callers, and the observability, retry, and testing ergonomics of the Laravel HTTP client are a materially better default.

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.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table