Download the PHP package antlerslabs/ziggy-db without Composer

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

Ziggy DB

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Total Downloads

Ziggy DB pulls production databases to local development databases through explicit, auditable, read-only guardrails.

The design goal is simple: a production pull should be boring and safe. It should fail loudly instead of doing something questionable.

Status

Implemented:

Planned next:

Requirements

Run ziggy-db:doctor to check the binaries available on the current machine.

Installation

Install the package through Composer:

Publish the configuration:

Testing against a local copy

Ziggy DB is not published yet. Point a real application at this repository with a Composer path repository:

On Windows, enable Developer Mode so Composer can create the symlink. Otherwise Composer copies the package and the application will not see package edits until composer update antlerslabs/ziggy-db runs again.

Then require the development version:

Configuration

Set the source connection name in the package config or environment:

Define mysql_readonly as an ordinary connection in the application's config/database.php. Ziggy DB does not invent a separate credential format; it reuses Laravel database connections.

The published config controls:

Key Purpose
source Source connection name.
target Target connection name. null means the default connection.
tables.only When non-empty, import data only for these tables.
tables.skip Table data that is never imported. skip wins over only.
guardrails.allowed_environments Application environments where pulls may run.
guardrails.require_read_only Abort when source credentials look writable.
guardrails.require_secure_transport Refuse unencrypted remote connections.
guardrails.allowed_hosts Optional source host allowlist.
guardrails.allowed_drivers Drivers Ziggy DB may pull from.
guardrails.require_confirmation Require typing the target database name before import. Reserved for the pull command.
anonymize.enabled Scrub configured columns before promotion.
anonymize.columns table.column map, with * allowed as the table.
audit.enabled Record pulls with source, duration, and outcome.
audit.channel Log channel, or null for the default channel.

Schema is always intended to remain complete. only and skip filter table data, not table structure. A skipped table should still exist locally, but stay empty, so the application boots normally.

Default skipped data includes operational tables:

Guardrails

Every pull starts from a configured Laravel connection. Verification inspects, in this order:

  1. environment
  2. driver
  3. host-allowlist
  4. secure-transport
  5. read-only

MySQL and MariaDB

The read-only guardrail:

Unrecognized grants also fail. A reporting or backup role should not have an opaque privilege path to writes.

Remote MySQL connections must configure PDO SSL attributes. Local connections are exempt.

PostgreSQL

The read-only guardrail:

Remote PostgreSQL connections must use an sslmode of require, verify-ca, or verify-full. Local connections are exempt.

SQLite

SQLite has no database users. The guardrail locks the opened connection with PRAGMA query_only = ON. SQLite is useful for package development and tests, but it is not a production access-control boundary.

Commands

Verify a source

Exit code is zero only when every guardrail passes. The command prints a table naming each guardrail, its result, and explanatory detail.

Check local tooling

This reports whether mysqldump, mysql, pg_dump, psql, sqlite3, and ssh are available.

Planned pull behavior

The future ziggy-db:pull command will support:

Planned behavior:

  1. Run every source guardrail.
  2. Refuse application environments outside the allowlist.
  3. Require explicit confirmation unless --force is used in an allowed non-production context.
  4. Dump with the matching CLI tool:
    • MySQL/MariaDB: mysqldump
    • PostgreSQL: pg_dump
    • SQLite: sqlite3
  5. Import into an isolated staging target.
  6. Apply configured anonymization before promotion.
  7. Promote staging data to the requested target.
  8. Remove staging artifacts.
  9. Write one audit record for the pull.

Initial transfers are intentionally same-engine. CLI dumps cannot reliably move PostgreSQL SQL into MySQL without a row-level pipeline, which is a separate future feature.

Example workflow

  1. Create a read-only production MySQL user.
  2. Grant it only SELECT, plus SHOW VIEW if views are needed.
  3. Add that connection to the application as mysql_readonly.
  4. Require TLS or an SSH path to the server.
  5. Set ZIGGY_DB_SOURCE=mysql_readonly.
  6. Publish and review config/ziggy-db.php.
  7. Run ziggy-db:doctor.
  8. Run ziggy-db:verify.
  9. Fix every failing guardrail before attempting a pull.
  10. Run ziggy-db:pull only in a local environment.

Development

Full validation:

Focused checks:

Manipulate the Testbench workbench application:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Ziggy DB! Please review our contributing guide to get started.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

Ziggy DB is open-sourced software licensed under the MIT license.


All versions of ziggy-db with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/database Version ^12.0||^13.0
illuminate/process Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.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 antlerslabs/ziggy-db contains the following files

Loading the files please wait ...