Download the PHP package shaelz/stage-gate without Composer

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

stage-gate

tests Packagist

A typed import pipeline for PHP: proof, stage, review, approve, publish. The safety layer between "someone uploaded a file" and "the database changed."

Why

Most import features skip straight from "parse the file" to "write the rows." That works until someone re-uploads a file that overlaps with data already in the system, and something gets silently overwritten. The fix isn't a bigger try/catch — it's a pipeline with named stages, an explicit diff-classification step before any write, and a publish step that's all-or-nothing.

This pattern was built once inside a real Laravel app, for importing competition fixtures from Excel. It's been running in production since the 2025/2026 season, and has since been swapped in to replace that app's own hand-rolled diff and publish logic — verified against a real production database dump before the swap went live (see ROADMAP.md for the details). stage-gate is that pattern, pulled out and made generic over what's being imported.

What it does

Five stages, each with an explicit outcome:

  1. Proof — validate the parsed rows against a typed schema. Malformed rows fail here, before anything else runs.
  2. Stage — hold the valid rows in a pending state, not yet visible to the rest of the system.
  3. Review — classify every staged row against what already exists: new, unchanged, updated, overwrite_risk, or removed.
  4. Approve — a human (or a rule) explicitly acknowledges overwrite-risk rows. Nothing classified as overwrite-risk can publish without that acknowledgment.
  5. Publish — returns a plan of writes and an audit entry. Your app executes the plan inside its own transaction: either every approved row lands, or none do.

What it isn't

Not a general ETL framework. It doesn't parse your source files, move data between systems, or schedule jobs — bring your own parser and your own storage. stage-gate isn't a storage layer either: the core never touches a database. Publish::plan() hands back a list of writes and deletes plus an audit entry; your app is what executes them, inside its own transaction. This is deliberate — it's what keeps the core usable outside Laravel, and it's why "the host owns storage" runs through every stage.

Installation

The core (Proof, Stage, Classifier, Approve, Publish) has no dependencies beyond PHP 8.2. The optional Laravel wrapper (StageGate\Laravel\* — a service provider, migrations, Eloquent models, queueable jobs) needs spatie/laravel-package-tools, illuminate/support, and illuminate/database in your app; see the suggest entries in composer.json.

Quick example

Using Laravel? The wrapper gives you an ImportDefinition interface to bundle the schema/field groups/existing-row query/write logic per import type, plus queueable ProofAndStageJob/PublishJob classes — see src/Laravel/.

Status

v0.1.0. The core and Laravel wrapper are built, fully tested, and proven against a real Laravel app's production fixture-import pipeline — both its diff and publish stages are swapped over to this package. See docs/biljartv2-seams.md for the design decisions behind the core (why publish returns a plan instead of touching storage, how overwrite-risk generalizes past one field-group split, and so on).

A written case study, covering that migration in a real production app, is planned once it's run through a real import cycle on this path.

License

MIT — see LICENSE.


All versions of stage-gate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 shaelz/stage-gate contains the following files

Loading the files please wait ...