Download the PHP package netglue/prismic-cli without Composer

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

PHP Based Prismic CLI Tooling

Build Status

codecov Psalm Type Coverage

Latest Stable Version Total Downloads

This is a development tool based on Symfony Console so require it with --dev - it's meant to be used as part of a build process with a tool like npm-watch or similar.

The primary installation target for this lib is a Mezzio app as it has been built to integrate with the Laminas CLI package.

During installation you should be prompted to inject the config provider(s) if installing as part of a Mezzio app.

laminas/laminas-cli is not required by this lib, so you'll need to require it too if that's what you want.

There's nothing to stop you from using this tool 'stand-alone' - the ./example/example.php should point you in the right direction for this. It's also worth inspecting that example so everything makes sense.

Building Document Model JSON Files

The command primo:build, given some configuration, generates JSON files from PHP sources that you can copy and paste into Prismic.io's custom type editor.

Assuming that you are using a DI container that returns application-wide config as an array using config as a service id, You can drop configuration similar to this in order to have the tool build your types upon invocation.

The lib currently lacks documentation and a decent test suite but there is an annotated example in ./example. When it comes to configuring as part of a Mezzio app, please examine ./src/ConfigProvider.php for more information.

Upload, Download and Diff Document Models Against the Remote Repository

If you have setup the "Custom Types API" and have a valid access token to use it, adding the following to your configuration along with the contents of CustomTypeApiConfigProvider will configure 3 additional commands that will enable you to upload, download and diff changes between your local and remote definitions:

Once configured, you can issue

These tools make use of netglue/prismic-doctype-client, so check that out if you'd like some more information, also link to the Prismic Custom Types API Docs.

Commands that Query a Repository

Theres also some commands for getting information from a repository. These commands are opt-in. During installation there's a config provider called ApiToolsConfigProvider which you can skip if you don't want these tools available.

All of the commands require a configured Api Client, using netglue/prismic-client.

The above mentioned config provider sets up its own factory for the api client, skipping a cache implementation as it's likely that if you are using the tools, you don't want stale information.

Configure the repository somewhere with information similar to:

Currently Available Commands

You can try out these commands on the test repo used for the Prismic/Mezzio integration lib we wrote at netglue/primo by running ./example/api-queries.php

Note: This lib is not a replacement for JS cli tooling provided by Prismic…


All versions of prismic-cli with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2 || ~8.3 || ~8.4
ext-json Version *
netglue/prismic-client Version ^1.10.0
netglue/prismic-doctype-client Version ^1.5.0
php-http/discovery Version ^1.20
psr/container Version ^1.0||^2.0
psr/http-client Version ^1.0
psr/http-client-implementation Version *
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 || ^2.0
sebastian/diff Version ^5.0 || ^6.0
symfony/console Version ^v6.4.13 || ^7.0.0
webmozart/assert Version ^1.11
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-cli contains the following files

Loading the files please wait ....