Download the PHP package netglue/prismic-client without Composer

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

PHP Api Client for Prismic.io

Stand With Ukraine

Build Status codecov Psalm Type Coverage Latest Stable Version Total Downloads

This is an unofficial PHP client for the Prismic.io headless CMS. In order to keep things simple, this library only supports version 2 of the api, so you'll have to make sure to specify your repository url in the format https://my-repo.prismic.io/api/v2

There is practically zero backwards compatibility with other prismic clients so this is in no way a drop-in replacement. That said, you should find that much of it remains similar.

Features

Limitations

Installation

Install with composer: composer require netglue/prismic-client

You will also require a PSR-18 HTTP client implementation, of which there are many, for example:

To use the curl adapter from php-http, issue a composer require php-http/curl-client

Documentation

Docs are a work in progress and are hosted in a public prismic repository (obviously!)

You can view the docs by cloning the library, cd to the source and issue a composer install followed by a composer serve. This will start up PHP's built-in server on http://127.0.0.1:8080 showing the docs.

Samples & Examples

Take a look around in the ./samples directory; that's where you’ll find the document explorer used for rendering the documentation and examples for setting up hydrating result sets, link resolver implementations and other stuff.

It's worth mentioning that the document explorer also supports previews meaning you can add http://127.0.0.1/preview as a preview target in your Prismic repository and preview live changes.

Tests

Once you have the library cloned and dependencies installed, you can run the unit tests. Smoke tests will be skipped by default, but you can run them against your own content repositories by either writing a configuration file in test/config/config.php (You'll find an example in there too) or by setting a couple of environment variables in order to run smoke tests against a single repo:

Other Clients

The official kit can be found at prismicio/php-kit.

Another, abandoned fork of the official kit can be found at netglue/prismic-php-kit. The reason for abandoning the fork there was the desire to start from a clean slate and make use of the recent PSRs for HTTP factories and clients, completely separate the HTML serialisation process from the content model and provide more flexible ways of hydrating your content model to objects in your domain (Or not as the case may be!).

License

MIT Licensed.


All versions of prismic-client with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1 || ~8.2 || ~8.3 || ~8.4
ext-json Version *
laminas/laminas-escaper Version ^2.9
php-http/discovery Version ^1.18.0
psr/cache Version ^1.0.0 || ^2.0.0 || ^3.0.0
psr/http-client-implementation Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 || ^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 netglue/prismic-client contains the following files

Loading the files please wait ....