Download the PHP package elephentity/codegen-tsquid without Composer

On this page you can find all versions of the php package elephentity/codegen-tsquid. 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 codegen-tsquid

This is the source of truth. hsimah-services/elephentity-codegen-tsquid is a read-only mirror of builders/codegen-tsquid/ in hsimah-services/elephentity, kept for Composer and Packagist. Open issues and pull requests on elephentity.

elephentity-codegen-tsquid

Build-time Rust manifest compiler for tsquid's initial route data, with a standalone PHP runtime, and a C# target for Elephentity.Tsquid. Uses the version-1 server manifest introduced in tsquid PR #8.

Configure

Install elephentity/codegen-tsquid as a production Composer dependency: it also provides the Eleph\Tsquid runtime.

In this checkout, build the generator with:

For a Composer installation, pass --manifest-path vendor/elephentity/codegen-tsquid/Cargo.toml to that build command. The deployed app needs PHP and the Composer package, but neither Rust nor the generator executable.

Enable the project integration in spec/project.yml:

Add a target alongside your existing targets in eleph.json:

The manifest path is relative to the target's output directory, or absolute. The example assumes server/eleph.json and a sibling client/. It does not depend on the shell's working directory. The output directory may be absent on the first run.

Generate Relay's persisted queries and tsquid's route manifest first, then run eleph generate. eleph generate --check detects route/query drift. The builder reads the manifest and returns tsquid-manifest.php; the orchestrator signs and writes it. No YAML, TypeScript, or JSON is parsed on application requests.

On the client, declare each route's query and wire readInitialData() and withInitialData() into the Relay environment as described in tsquid's server integration skill. The entrypoint must preload the same operation and variables.

C# (.NET)

The same builder emits C# for Elephentity.Tsquid. Set the target's language to "csharp" and give it a namespace. language is required ("php" or "csharp"); there is no default:

No Composer or PHP is needed: eleph install fetches the binary pinned as name@version. It writes TsquidManifest.cs, whose TsquidManifestFactory.Create() returns the RouteManifest that app.UseElephentityTsquid(...) takes. eleph generate --check detects route/query drift exactly as it does for PHP. The validation (version 1, field kinds, path parameters, query bindings) is shared; only the output differs.

Serve

In the existing HTML GET handler, after establishing the viewer:

The execution callback is application-owned: use the same viewer, authorization, GraphQL validation limits and response format as the normal endpoint. The fourth argument is the persisted ID if your transport needs it. Return data, errors and extensions unchanged; return null or throw on transport failure. Set transport/database timeouts in the executor; this synchronous adapter cannot interrupt a slow callback. examples/serve.php shows a webonyx executor.

The runtime matches all routes, including ssr: false, and inlines only the winning route's query. Invalid URLs, tied routes, client-only routes and execution/encoding failures preserve the shell. GraphQL errors are valid responses and are preserved. It inserts the JSON script before the shell's first script or closing head, escapes <, and returns Cache-Control: private, no-store whenever data is inlined. Apply those headers before emitting HTML; the runtime does not modify global HTTP state. An existing quoted id="tsquid-data" is left alone to prevent duplicate payloads.

Verify

The integration test needs the sibling Elephentity CLI/codegen and GraphQL packages' installed Composer dependencies and a built SQLite generator. It compiles real YAML through the existing describe/generate protocol, loads signed PHP, executes the exact starter query for two viewers, and checks drift and atomic failure. The client check consumes that payload with tsquid's actual runtime. Runtime vectors are copied unchanged from tsquid main commit df1f461 (PR #8); refresh them when the upstream contract changes.

This package doesn't add HTTP routing or session management. Hook it into the handler that already serves your app shell. Only URL-driven route queries are described by the manifest; other queries continue to fetch on the client.


All versions of codegen-tsquid with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
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 elephentity/codegen-tsquid contains the following files

Loading the files please wait ...