Search by

Framework-agnostic toolkit for versioned, fingerprinted data seeds

Package info

github.com/wolfcharaa/seeder

pkg:composer/romanfedorskij/seed

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-11-07 22:01 UTC

This package is auto-updated.

Last update: 2026-11-07 22:04:02 UTC


README

Русская версия

A framework-agnostic PHP 8.3+ toolkit for versioned data seeds. It provides attributed seed classes, deterministic dependency planning, composable SHA-256 fingerprints, execution metadata stores, a conservative default runner, PSR-11 composition, and optional Symfony Console commands.

The application still owns the useful work: parsing files, writing domain data, choosing transactions, and configuring infrastructure.

Requirements and installation

The core requires PHP 8.3+, ext-json, and psr/container. Symfony Console and PDO PostgreSQL support are optional. After the repository is registered on Packagist, install the first release with:

composer require romanfedorskij/seed:^0.1

Quick start

Run the maintained example:

composer example

Expected output:

executed country_reference@2026-11-v1 rows=2

The example defines an attributed AbstractSeed, injects an application repository, builds a registry, and executes it through DefaultSeedRunner with JsonExecutionStore. See examples/quick-start.php.

Safety model

id + version is the logical release key; its fingerprint is immutable. An identical successful release is skipped, while the same key with changed code or declared inputs is reported as drift. The default runner preflights the complete graph, runs sequentially, fails fast, requires explicit retry/recovery, and reconciles durable pending work without creating another attempt.

#[SeedSource] fingerprints and audits a file; it never loads or parses it. Declare delegated implementation classes and stable configuration with #[FingerprintClass] and #[FingerprintValue].

Documentation

Development

Run composer check for metadata validation, security audit, executable documentation, Testo, PHPStan, Rector, and PHP-CS-Fixer. composer test:coverage generates var/coverage.xml and enforces the current coverage ratchet. PostgreSQL contract tests run when SEED_TEST_PG_DSN is set.

MIT. See LICENSE.