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

Apiwrapper Laravel Package

negartarh/apiwrapper

ApiWrapper is a Laravel/PHP package that simplifies building clients for external APIs. It offers a structured, reusable layer for sending requests and handling responses and errors, keeping integrations clean and consistent across projects.

View on GitHub
Deep Wiki
Context7

negartarh/apiwrapper is a Laravel/PHP package for wrapping API interactions in clean, reusable classes. It helps keep endpoint calls, request setup, and response handling organized so application code stays readable and maintainable.

  • Structured API clients for encapsulating endpoints and requests
  • Consistent response handling across services
  • Laravel-friendly integration with configuration and dependency injection
  • Testable abstractions for mocking API interactions
  • Extensible design for custom headers, auth, and error handling
Frequently asked questions about Apiwrapper
How do I install negartarh/apiwrapper in a Laravel application?
Install it with Composer, for example composer require negartarh/apiwrapper:0.9.1, and let Laravel's package auto-discovery register the service provider for you. There is no application bootstrapping to change beyond publishing the package config file. Check the package's PHP constraint against your runtime before scheduling the work, since Laravel 13 support usually implies PHP 8.2 or newer.
Does negartarh/apiwrapper support Laravel 13?
Yes. Version 0.9.1 explicitly adds Laravel 13 support, and that is the headline change in the release. The release notes do not say whether Laravel 11 and 12 remain supported, so verify the Composer constraints before moving your framework line. Because the package tracks Laravel releases closely, its framework support is effectively gated on the maintainer shipping updates first.
Is version 0.9.x of apiwrapper stable enough to use in production?
Treat it as pre-1.0 software: at 0.9.x, Semantic Versioning still allows breaking changes in the minor position, so a 0.10.0 release can arrive with an incompatible API and no deprecation period. That does not make it unusable, but pin an exact version, wrap the package behind your own interface, and keep its response objects out of your domain layer. Budget review time for every bump.
Should I use a caret constraint like ^0.9 for negartarh/apiwrapper?
No. A caret constraint such as ^0.9 permits 0.10.0, which under 0.x semantics may contain breaking changes. Pin the exact version, for example 0.9.1, and bump it as a reviewed change. If multiple services consume the package, standardize the pinned version centrally so the framework upgrade gate is managed once rather than per team.
How do I publish and customize the apiwrapper configuration file?
The package ships a published config file, which you publish with Laravel's standard vendor:publish Artisan command and then tune per environment. Keep credentials in your .env file rather than committing them to the config. Review the config diff between releases, because pre-1.0 versions may add, rename, or remove keys without a major version bump.
Why does apiwrapper pass the Application instance into getPackageProviders, and is that a breaking change?
Version 0.9.1 changed the provider so the Application instance is passed into getPackageProviders, and the changelog does not state whether the change is additive or a signature replacement. If you subclassed, copied, or overrode the provider from v0.9.0, diff the two versions at source level before upgrading and watch for a signature mismatch. If you rely on plain package auto-discovery, the change should be transparent.
Does apiwrapper replace Guzzle or Laravel's HTTP client?
No. apiwrapper is an adapter that sits at the same architectural layer as Guzzle and Laravel's HTTP client, so it wraps that plumbing rather than replacing it. That keeps coupling low: you can swap it for a hand-rolled client later without touching domain logic, as long as you do not let its response objects leak into your domain layer.
Are there automated tests and a CI matrix for negartarh/apiwrapper?
The 0.9.1 release notes include no test matrix, static analysis results, or CI status, so there is no public evidence of coverage for HTTP behaviour such as retries, timeouts, and error mapping. Ask the maintainer whether such tests exist and whether they run against the Laravel 13 matrix. For a production integration, add your own contract tests against a sandbox endpoint of the API you are wrapping.
Can I use negartarh/apiwrapper outside of Laravel?
It is built as a Laravel package: it plugs in through package auto-discovery and a published config file, so it assumes the Laravel container and service-provider lifecycle. Using it in a plain PHP project would mean recreating that bootstrapping yourself, which defeats the purpose. If you need a framework-agnostic client, use Guzzle or a PSR-18 implementation directly.
What are good alternatives to negartarh/apiwrapper for wrapping external APIs?
Common choices are Laravel's built-in HTTP client with macros or dedicated client classes, Saloon for structured integrations where requests and responses are objects, and Guzzle with service descriptions for heavier SOAP or OpenAPI-style APIs. apiwrapper's pitch is that it is superfast and lightweight with minimal boilerplate. Compare maintenance, test coverage, and versioning policy, since apiwrapper is still pre-1.0 with a single maintainer.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle