Download the PHP package accredifysg/php-json-ld without Composer

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

PHP-JSON-LD

A PHP implementation of the JSON-LD 1.1 specification.

Status: stable. The public API is stable and the project follows Semantic Versioning — breaking changes bump the major version. The package delivers spec-compliant JSON-LD 1.1 Expansion, Compaction, Serialize to RDF (toRdf), Flattening, RDF-to-JSON-LD (fromRdf), and Framing, validated against the official W3C JSON-LD 1.1 test suites — see the compliance matrix for per-algorithm conformance and the CHANGELOG for the enumerated residual blockers.

Goals

Scope (delivered)

Suite numbers from v0.42.0 use the spec-accurate toEqual comparison (object-key order insignificant, array order significant); earlier numbers used a looser comparison and are not directly comparable — see the CHANGELOG.

A frame's {} wildcard cannot be represented in PHP's associative-array model (it decodes the same as []), so the framing API treats an empty frame value as match none and accepts the documented Expansion::FRAME_WILDCARD sentinel for a wildcard.

Installation

Requires PHP 8.2+. You also need a PSR-18 HTTP client + PSR-17 request factory if you use the bundled HttpDocumentLoader (e.g. guzzlehttp/guzzle and guzzlehttp/psr7), or you can implement DocumentLoader yourself to serve @context URLs from wherever you like.

Usage

If you want to serve known contexts from local files (recommended for verifiable credentials), implement Accredify\JsonLd\Contracts\DocumentLoader yourself. See tests/Algorithms/Characterization/Support/BundledContextLoader.php for an example.

Compliance

The package is tested against the official W3C JSON-LD 1.1 test suite, pulled in as a git submodule at tests/w3c/. See tests/W3c/README.md for harness layout and how to run it.

Conformance matrix

Algorithm Spec W3C suite Passing Conformance
Expansion §5.5 385 381 4 documented blockers
Compaction §5.6 246 246 100%
Serialize to RDF (toRdf) §7 467 463 4 documented blockers
Flattening §4.6 58 58 100%
RDF to JSON-LD (fromRdf) §4.9 53 49 4 documented blockers
Framing framing §4 92 89 3 documented blockers

Totals: 1286 / 1301 passing across the six manifests; Compaction and Flattening are fully conformant. The 15 residual non-conformances (4 in expand, 4 in toRdf, 4 in fromRdf, 3 in framing) are mostly negative-test / non-normative / environment limits:

These are carried as an explicit expected-failure allowlist (tests/W3c/KnownBlockers.php) so the conformance suite stays green and gates CI — any new regression, or a listed blocker that starts passing, fails the build. See the CHANGELOG and tests/W3c/README.md for the full release-over-release history.

Counts use the spec-accurate toEqual comparison (object-key order insignificant, array order significant) introduced in v0.42.0; earlier figures used a looser comparison and are not directly comparable.

Characterization fixtures

tests/Algorithms/Characterization/ holds JSON snapshots of the expander's output, generated from running the original accredifysg/verifiable-credentials-php JsonLdProcessor over a set of sample documents. They are NOT a spec-conformance reference — they pin the package's behaviour so that any change to expansion output lands as a reviewable diff.

When a PR changes expansion in a way that updates these fixtures, the update should be reviewed for correctness and paired with any matching change in downstream consumers (e.g. VC's signed-credential test fixtures).

License

MIT © Accredify


All versions of php-json-ld with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^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 accredifysg/php-json-ld contains the following files

Loading the files please wait ...