apimatic/core-interfaces
Core PHP interfaces used by APIMatic SDK tooling, defining contracts for requests, responses, context, authentication managers, logging, parameter validation, and HTTP client configuration. Supports PHP 7.2–8.2.
This package is an interface library for APIMatic’s PHP SDK ecosystem—not a standalone tool. Start by:
composer require apimatic/core-interfaces to gain type contracts (no executable code).apimatic/core or custom SDKs).HttpClientInterface for custom HTTP clients or AuthInterface for new auth strategies).HttpClientInterface to inject custom HTTP clients (e.g., Symfony HttpClient, Laravel’s Http client wrapper) into APIMatic SDKs without forking the core library.AuthInterface to support OAuth, API keys, or JWT—swap implementations (e.g., ApiKeyAuth, BearerTokenAuth) via DI without touching SDK core.RequestInterface/RequestSetterInterface to inspect/manipulate requests (e.g., inject tracing IDs or rate-limit headers) before execution.ApiLoggerInterface to log requests/responses with context (e.g., correlation IDs, latency), ideal for debugging production integrations.ParamInterface → NonEmptyParamInterface → TypeValidatorInterface to enforce strict validation rules in SDK request builders (e.g., prevent empty strings in required path parameters).@return docblocks as in v0.1.3’s mixed fix).AuthGroup and RequestMethod are classical enums (not BackedEnum), so avoid PHP 8.1+ enum methods like from() or cases().ContextInterface: When troubleshooting flaky API calls, dump ContextInterface—it persists the final request/response pair for post-mortem analysis.^0.1 in composer.json. Though low-dependency (0 dependents), versions must align with apimatic/core and SDKs—mismatched versions cause interface mismatch crashes.ApiLoggerInterface first—many issues (e.g., 401s, misconfigured base URLs) are visible in logged request headers/body without stepping into HTTP clients.How can I help you explore Laravel packages today?