Download the PHP package stellarwp/licensing-api-client-wordpress without Composer

On this page you can find all versions of the php package stellarwp/licensing-api-client-wordpress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package licensing-api-client-wordpress

Licensing API Client WordPress

⚠️ This is a read-only repository! For pull requests or issues, see stellarwp/licensing-api-client-monorepo.

WordPress transport and factory integration for the StellarWP Licensing API client.

Installation

Install with composer:

Examples

For end-to-end API cookbook examples, see:

Usage

For a DI52 Provider:

That gives you a base client as a singleton, but resolves the public LicensingClientInterface as a fresh clone with one stable TraceParent applied for the current PHP request.

That is usually what you want for tracing: if one request in your application makes multiple licensing calls, those calls should normally share the same TraceParent so they can be tied together in Axiom as part of the same trace.

[!WARNING] That only works end to end if your own application is also exporting spans to Axiom or another tracing backend. If your application is not instrumented, the licensing request can still carry the propagated traceparent, but Axiom will not be able to look up the true parent span because it never received it.

If an upstream service already gives you a W3C traceparent header, parse that into a TraceParent and use TraceContext when you also need to preserve inbound tracestate. If you only have a generic correlation ID, do not try to stuff that into a TraceParent; keep it as separate application metadata and generate a new TraceParent locally for distributed tracing.

DI52 does not provide a built-in request scope, but in a normal short-lived PHP request this singleton is still effectively request-local.

One simple implementation looks like this:

If you are continuing inbound trace headers instead, build a TraceContext from them and apply that to the cloned client:

The important detail is that AuthState is built from Config::configuredToken, so your configured token only lives in one place:

API errors are thrown as exceptions, so catch the specific cases you care about and fall back to ApiErrorExceptionInterface for the rest:

For a public or unauthenticated client without a Container:

For a trusted source with a configured token:

Status

This package is being developed in the monorepo and published as a read-only split repository.


All versions of licensing-api-client-wordpress with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
stellarwp/licensing-api-client Version ^2.0
nyholm/psr7 Version ^1.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stellarwp/licensing-api-client-wordpress contains the following files

Loading the files please wait ...