Download the PHP package bear/query-repository-graph without Composer

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

BEAR.QueryRepositoryGraph

Static analysis of the cache graph that BEAR.QueryRepository attributes declare. qr-graph reads the declarations without running the application: what each resource embeds, what each write refreshes and purges, and what an invalidation reaches.

Installation

Usage

Run it from the application root.

People read the picture, impact and snapshot. Tools and AI agents read dump, impact --json and observe: JSONL, described by the JSON Schemas. Each command and its limits are in docs/graph.md. The picture above is php bin/qr-graph dot --dir=demo/src/Resource, run on demo: resource classes that carry their attributes and nothing else.

Reading the picture

grey rounded box a page resource; pages nothing points to, where a request starts, line up on the left
plain text any other resource (app); a host other than self is shown, as in app://blog
second row the scheme and the cache as declared: cacheable, ttl: short, cacheable view, ttl: …, cacheable response, donut cache; nothing when the resource is not cached
black arrow embeds, labelled with the relation (index embeds ranking as ranking)
grey arrow #[DependsOn]
blue arrow a write that refreshes or purges, labelled onPut refresh, onPost purge

Arrows point the way they are declared. Invalidation travels against them: refreshing article reaches ranking through its grey arrow, and index through the black one.

qr-graph html > graph.html writes the cached part of the picture (dot --cached) as one page; the whole graph is qr-graph dot | dot -Tsvg. Click a resource: what invalidates it glows green, the writes that invalidate it blue, and what it invalidates orange, each side counted; the rest dims. Below the picture, a collapsed Warnings section lists the declarations that affect no cache, each with its file:line (a PhpStorm link with --editor=phpstorm), and a collapsed Not drawn after it lists the resources left out.

What a change reaches

Each line is reached from the line above it at one less indent, by the relation in parentheses, and shows its cache. A resource two paths reach is listed once, under a shortest one. app://self/login alone means a change to it reaches nothing.

The snapshot as the source of truth

snapshot writes such a tree for every resource and every write. Keep it in the repository and check it in CI:

The demo keeps CI.

The runtime acts on the declarations; people and agents read and agree on the snapshot; CI keeps the two equal, as composer.lock follows composer.json. A pull request that changes what a write invalidates shows it as a diff of this file. Design the cache before the code the same way:

  1. Write the resource classes with their attributes only, as in demo.
  2. Agree on the picture and the snapshot, and commit the snapshot.
  3. Write the methods. The snapshot does not change.

Only declarations reach the graph. Invalidation written as code, a purge() call or a surrogate key set by hand, never shows in the snapshot, so it cannot produce the tree that was agreed: what the cache does stays declared.


All versions of query-repository-graph with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-tokenizer Version *
composer-runtime-api Version ^2.0
bear/query-repository Version ^1.20.2
bear/resource Version ^1.34.2
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 bear/query-repository-graph contains the following files

Loading the files please wait ...