PHPackages                             fucodo/seed - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. fucodo/seed

ActiveNeos-package[Database &amp; ORM](/categories/database)

fucodo/seed
===========

Command to seed a database and or lateron files with initial data.

0865↑185.7%PHP

Since Jun 22Pushed 1w agoCompare

[ Source](https://github.com/fucodo/seed)[ Packagist](https://packagist.org/packages/fucodo/seed)[ RSS](/packages/fucodo-seed/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

fucodo/seed
===========

[](#fucodoseed)

A tiny seeding helper for Neos Flow applications. It provides a CLI command to initialize a database with a set of SQL files and optional follow‑up commands, orchestrated via Flow settings. This is intended for first‑time bootstrap of an environment (e.g. CI, demo or developer machines).

Features
--------

[](#features)

- Declarative jobs configured in Settings.yaml
- Import ordered SQL files (by numeric keys)
- Optional follow‑up shell/Flow commands after import
- Safe‑guard: skips when your database already contains `flow_doctrine_migrationstatus`

Requirements
------------

[](#requirements)

- PHP compatible with your Neos/Flow version
- Neos Flow (package type `neos-package`)

Installation
------------

[](#installation)

Add the package via Composer (as part of your Flow distribution):

```
composer require fucodo/seed
```

The package key is `fucodo.seed`.

Configuration
-------------

[](#configuration)

Define one or more seeding jobs under `fucodo.seed.jobs`. Each job can

- be enabled/disabled
- list SQL files to import (in order)
- optionally list commands to execute after SQL import

Example minimal configuration (place into `Configuration/Settings.fucodo.seed.yaml` in your distribution or in a package):

```
fucodo:
  seed:
    jobs:
      default:
        enabled: true
        databaseImports:
          100:
            file: 'resource://fucodo.seed/Seed/000-examplefile.sql'
```

Example from a real package using resource URIs and a follow‑up command:

```
fucodo:
  seed:
    jobs:
      default:
        enabled: true
        databaseImports:
          100:
            file: 'resource://SBS.SingleSignOn/Seed/100-basic-structure.sql'
```

Notes:

- Keys (100, 101, 500, …) control the execution order; only their ordering matters.
- A `databaseImports.NNN.enabled: false` flag can be set to skip an entry temporarily.
- Files can be absolute paths or Flow resource URIs (`resource://Vendor.Package/Path/To/File.sql`).
- Files can also be urls, if file\_get\_contents() is allowed to make http requests.
- If a target database already has the table `flow_doctrine_migrationstatus`, the seeding job will abort early and not import again.

Usage
-----

[](#usage)

The package registers a CLI command in Flow. From your distribution root, run:

```
./flow seed:data
```

To run a specific job (defaults to `default`):

```
./flow seed:data --job yourJobName
# or positional in some shells / Flow versions
./flow seed:data yourJobName
```

Exit codes:

- 0: success (or skipped because database looked already initialized)
- 1: job disabled (or other StopCommand condition)

During execution you will see which files are imported. Empty files are reported and skipped.

How it works
------------

[](#how-it-works)

Internally, `SeedCommandController`:

- Creates a Doctrine DBAL connection from `Neos.Flow.persistence.backendOptions`.
- Checks for the presence of the `flow_doctrine_migrationstatus` table.
- Iterates your configured `databaseImports` and runs each file with `executeStatement`.
- Prints a short progress line per step.

Best practices
--------------

[](#best-practices)

- Place seed SQL files in your package under `Resources/Seed/` and refer to them using the Flow `resource://` scheme.
- Keep imports idempotent where possible; the safety check prevents re‑seeding but it is still good to make scripts re‑runnable.
- Use small, ordered files focused on a single concern (schema bootstrap, minimal data, fixtures, …).

Development status
------------------

[](#development-status)

This package is intentionally small. PRs improving documentation and robustness are welcome.

License
-------

[](#license)

MIT (or the same as your project distribution).

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance64

Regular maintenance activity

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c6681704a769ab93a20ba54d94054d0f3f1e81b99341e8cfa29d91f6d8f16fb?d=identicon)[kaystrobach](/maintainers/kaystrobach)

---

Top Contributors

[![kaystrobach](https://avatars.githubusercontent.com/u/1185776?v=4)](https://github.com/kaystrobach "kaystrobach (4 commits)")

### Embed Badge

![Health badge](/badges/fucodo-seed/health.svg)

```
[![Health](https://phpackages.com/badges/fucodo-seed/health.svg)](https://phpackages.com/packages/fucodo-seed)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
