Download the PHP package pritset/pritset-php without Composer

On this page you can find all versions of the php package pritset/pritset-php. 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 pritset-php

Pritset PHP SDK

Official PHP client for managing Pritset DOCX templates and generating PDFs.

Version 0.1.5 targets Pritset SDK contract 1.0.0.

Requirements

Installation

Install version 0.1.5 from Packagist:

For SDK development from a source checkout, add this repository as a Composer path repository.

Create a client

Pritset expects the access token directly in the Authorization header—do not add a Bearer prefix. Credentials are kept private and redacted from normal object debug output. Never commit them or include them in logs.

Generate a PDF

generate() returns a streaming response, so large documents do not need to be buffered in memory.

The underlying PSR-7 stream is also available as $pdf->stream. getContents() and saveToFile() consume from the stream's current position.

Templates

List and inspect

Create and update

Uploads can come from a path, a string, a PHP resource, or a PSR-7 stream:

Download and delete

Validate a template

Template validation uses the same token-and-secret authentication as the other public template operations and is supported by contract 1.0.0.

Webhook generation

Webhook URLs must be absolute HTTP(S) URLs and cannot contain embedded credentials. The SDK sends the URL to Pritset; it does not call the webhook itself.

Raw JSON

Document data may be an array, JsonSerializable object, or already encoded JSON string. Raw strings are validated before a request is sent.

Errors

Transport exceptions intentionally do not retain the original Guzzle exception because it can hold credential-bearing request headers.

Configuration and custom HTTP clients

The injected client implements Guzzle's ClientInterface, which is compatible with PSR-18 request semantics while supporting the multipart and streaming options used by this SDK. Redirects are always disabled to prevent credentials from being forwarded to another origin. HTTPS is required except for explicit localhost, 127.0.0.1, or ::1 development endpoints.

Compatibility

SDK PHP Contract HTTP
0.1.x 8.3–8.5 1.0.0 Guzzle 7 / PSR-7 streams

Pre-1.0 releases may contain API changes between minor versions. Pin an exact minor version in production and review the changelog before upgrading.

Development

The contract hash check, PHPUnit suite, and PHPStan level 8 analysis all run in CI on PHP 8.3, 8.4, and 8.5.

Production test-user lifecycle validation

The opt-in production test validates template upload, listing, details, update, download, direct PDF generation, webhook job submission, deletion, and the final 404 response. It must use a dedicated production test user. The test creates a uniquely named template and removes it in a finally cleanup block. A short configurable delay lets the asynchronous webhook job start before cleanup; this test confirms submission, not delivery to the receiver.

For a local PowerShell run, copy .env.example to .env, fill in the dedicated production test-user credentials and controlled webhook URL, and set both production confirmation flags to true. The .env file is ignored by Git. Then run:

To use a file in another location:

The launcher requires typing RUN-PRODUCTION-TEST before it contacts production. It reads only known Pritset settings, never prints secret values, restores the previous process environment afterward, and requires the raw Pritset access token without a Bearer prefix.

The launcher requires installed Composer dependencies but invokes PHP directly. It selects a readable CA certificate bundle from PRITSET_CA_BUNDLE_PATH, PHP configuration, or Git for Windows and passes it only to the lifecycle process. This avoids changing the machine-wide PHP configuration.

The manual Production test lifecycle GitHub Actions workflow uses the protected production-test environment and requires the same confirmation. Configure PRITSET_ACCESS_TOKEN, PRITSET_SECRET, and PRITSET_WEBHOOK_URL as environment secrets and PRITSET_PRODUCTION_TEST_USER_CONFIRMED=true as an environment variable. Add required reviewers and restrict deployment branches before running it.

The lifecycle may consume production test-user credit and create webhook traffic. A 401 on the first validation request means the credentials were rejected; no template has been created at that point.

License

MIT © Pritset. See LICENSE.


All versions of pritset-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version ^7.9
psr/http-client Version ^1.0
psr/http-message Version ^2.0
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 pritset/pritset-php contains the following files

Loading the files please wait ...