Download the PHP package elephentity/codegen-php without Composer

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

elephentity-codegen-php

The PHP builder for Elephentity.

Implemented in Rust. Build a checkout with cargo build --release --locked, or install the executable on PATH with cargo install --path . --locked. The bin/eleph-gen-php checkout launcher uses target/release/eleph-gen-php (or a debug build during development). It never falls back to PHP. Installed Cargo binaries need neither PHP nor Cargo to run.

It reads one JSON request on stdin — the compiled spec, plus the target's configuration — and writes one JSON response on stdout: a path and a body per file. It never touches the filesystem. Signing and writing happen in elephentity-codegen, after this exits.

That fails on the empty schema, which is the point: it should be obvious how.

Installing it

Use "builder": "eleph-gen-php" for a Cargo installation, or the Composer launcher as shown below. Then name it in eleph.json:

namespace and typeNamespace are read and validated here, not upstream. Nothing else in the pipeline knows what they mean.

It depends on nothing of Elephentity's

Not the compiler, not the runtime, not the orchestrator. The IR types in rust/ir.rs are an independent copy, and the runtime classes generated code refers to are strings in rust/runtime.rs rather than imports. That is deliberate: a builder that had to composer require the framework would be a builder no other language could write. The version gate is what holds the copy in step — a mismatch is a refusal, never a silent misread.

Working on it

Rust sources live in rust/. Each builder owns its IR types and version gate; there is no runtime dependency on the compiler or another builder. PHP in src/ and the bin/eleph-gen-php-reference executable is retained as a migration oracle for the existing tests. Production entrypoints run Rust only. PHPStan still checks the reference and acceptance tests at level max.

PHP declarations use php_codegen. The crate owns formatting; there is no compatibility printer. File names, runtime interfaces, method behavior, and class-map structure remain compatible.

php tools/compare-rust.php compares the frozen PHP responses and additional scenarios against the Rust binary using parsed, name-resolved PHP ASTs. This permits formatting, quote style, and trailing-comma differences while checking executable structure.

The golden fixtures

tests/fixtures/golden/*/response.json pins the Rust output. The original PHP responses are preserved as response.reference.json, unchanged, for the independent AST checks. Only the formatting snapshots changed in this migration. The WordPress and WPGraphQL builders retain their original output bytes.

Regenerate generated PHP once after upgrading, and commit the changed signed files. The signer itself is unchanged; formatting changes naturally produce new digests.


All versions of codegen-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
nette/php-generator Version ^4.1
psr/container Version ^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 elephentity/codegen-php contains the following files

Loading the files please wait ...