Download the PHP package janalis/biblindex-client without Composer

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

BiblIndex PHP client

PHP Composer Cross Platform CI

PHP client for the BiblIndex API.

Maintainers

Name Email
Pierre Hennequart [email protected]

Documentation

https://www.biblindex.org/api

Installation

As a library in another project

The client is built on the PSR-18/PSR-17 HTTP abstractions: it needs any PSR-18 client and PSR-17 factory implementation alongside it, for example Guzzle:

or Symfony HttpClient with nyholm/psr7:

Installed implementations are auto-detected via php-http/discovery (its composer plugin may prompt once to allow itself and can install a missing implementation for you).

To use a version that hasn't been released to Packagist yet, add the Git repository to your project's composer.json:

For development

Environment variables (example runner only)

Edit .env.local with your configuration, then run the example:

Usage

The client authenticates with the OAuth2 password grant on first use, then refreshes the access token automatically (including a refresh slightly before expiry, and a renew-and-replay when the API answers 401).

With no arguments beyond the credentials, the HTTP client and message factories are discovered from whatever implementation is installed. To control the transport (or in dependency-injection setups), inject them explicitly — any PSR-18 client works:

Reliability

Timeouts are a transport concern: configure them on the injected client, as in the examples above (Guzzle's timeout option, Symfony's HttpClient::create(['timeout' => 10])).

Retries are off by default — pass retries: N to retry GET requests on transient failures (429/5xx responses and PSR-18 network exceptions) with exponential backoff (500 ms doubling; no jitter, Retry-After not consulted). Token requests are never blindly retried; instead, a 401 API response triggers an automatic token renewal (refresh grant, falling back to the password grant) and a single replay of the request.

HTTP error statuses raise the client's own exceptions (PSR-18 clients do not throw on 4xx/5xx): BiblIndex\Client\Exception\ClientErrorException (4xx) and ServerErrorException (5xx), both extending HttpException, which exposes method, url, the PSR-7 response and getStatusCode(). Transport failures surface as the underlying client's PSR-18 Psr\Http\Client\ClientExceptionInterface / NetworkExceptionInterface.

Lazy fetching

API responses are automatically wrapped in lazy proxies that defer network requests until data is actually read:

Hydra metadata properties (hydra:member, hydra:view, hydra:search, hydra:totalItems) are not exposed through the lazy wrappers — collections are returned directly as LazyCollection instances.

Caching ensures the same API resource is never fetched twice within a single response tree.

Lazy vs. full-fetch operations on LazyCollection

Behavior Operations
No fetch count() when hydra:totalItems is known, getLoadedItems(), isEmpty() when an item is already loaded, clear(), isInitialized()
Fetch only the needed pages offsetGet() / get(), offsetExists() / containsKey(), first(), slice($offset, $length) with a non-null length, iteration (page by page as it advances)
Fetch all remaining pages count() when the total is unknown, toArray(), getValues(), map(), filter(), contains(), indexOf(), last(), matching(), slice($offset) without length, and every mutator (add(), set(), remove(), offsetSet(), offsetUnset(), ...)

Using application/json (plain JSON)

Warning: Prefer application/ld+json (the default) whenever the API supports it. The Hydra JSON-LD format provides metadata (hydra:totalItems, hydra:view) that enables an accurate count() without fetching and proper next-page resolution via hydra:next links. With plain application/json, the total item count is unavailable (count() fetches all pages) and pagination falls back to incrementing ?page=N, which may yield empty pages at the end.

Behavior notes

Testing

The suite mocks all HTTP traffic — no network access needed: Symfony's MockHttpClient (bridged through its PSR-18 Psr18Client adapter) backs the main suite, and a Guzzle MockHandler compatibility suite proves the client against a second PSR-18 implementation.

Code quality

Formatting, linting and static analysis are handled by Mago (Symfony coding standard: PSR-12 formatter preset plus the symfony and phpunit linter integrations), configured in mago.toml and enforced by CI:

Publishing a new version

Releases are published to Packagist automatically: every push to main whose CI build (tests + code quality) is green is released as the next patch version by the CI workflow's release job — it tags the next version (starting from v0.0.0), creates a GitHub Release with auto-generated notes and pings the Packagist update API.

Control the release from the commit subject (first line only — the body is ignored so prose can mention the markers):

Marker Effect
(none) patch bump (default)
[release:minor] minor bump (resets patch)
[release:major] major bump (resets minor/patch)
[release:skip] no release for this build

Manual releases still work — composer release:patch (or release:minor / release:major) tags and pushes from your machine, which triggers the tag-driven Release workflow; the automatic job then skips that commit because it is already tagged.

The Packagist ping requires the PACKAGIST_API_TOKEN repository secret (the "safe API token" from your Packagist profile); when it is missing the workflows skip the ping with a warning.

CI and releases run on self-hosted runners managed by ARC (runner scale set biblindex-php-client-runners).

Contributing

This project is open to contributions.

We welcome pull requests following the standard GitHub flow:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Open a pull request

Please ensure your changes are well tested and follow the existing code style.

API Modifications

If you need changes, extensions, or adjustments to the API, please contact the maintainers.


All versions of biblindex-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
doctrine/collections Version ^3.1
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^1.1 || ^2.0
php-http/discovery Version ^1.20
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 janalis/biblindex-client contains the following files

Loading the files please wait ...