PHPackages                             littlegiant/silverstripe-seeder - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. littlegiant/silverstripe-seeder

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

littlegiant/silverstripe-seeder
===============================

Seed data objects for dev

2.1.0(9y ago)205.0k8[3 issues](https://github.com/littlegiant/silverstripe-seeder/issues)2MITPHP

Since Oct 15Pushed 9y ago3 watchersCompare

[ Source](https://github.com/littlegiant/silverstripe-seeder)[ Packagist](https://packagist.org/packages/littlegiant/silverstripe-seeder)[ Docs](http://github.com/Little-Giant/silverstripe-seeder)[ RSS](/packages/littlegiant-silverstripe-seeder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (8)Used By (2)

SilverStripe Seeder
===================

[](#silverstripe-seeder)

Sick of testing pagination by setting page length to 1 and making two data objects? Look no further!

- [Creating providers](https://github.com/Little-Giant/silverstripe-seeder/blob/master/docs/providers.md)

Features
========

[](#features)

- Declarative method of generating test data
- Easy to way to share data dependencies with other developers
- Easy to extend

Installation
============

[](#installation)

Installation via composer

```
composer require littlegiant/silverstripe-seeder
```

How to use
==========

[](#how-to-use)

Add to your configuration

```
Seeder\Seeder:
    create:
        Page:
            count: 100
            fields:
                Title: 'Hello Seeder! {$i}'
        Member: member(test@test.com,password)
```

Change to project root and run

```
(unix)      $ framework/sake seed flush=1
(windows)   > php framework/cli-script.php seed flush=1
```

Command line options
--------------------

[](#command-line-options)

```
framework/sake seed [-k|--key KEY] [-c|--class CLASS] [-f|--force] [flush=1|all]
framework/sake unseed [-k|--key KEY] [flush=1|all]
```

OptionDescription`--force`run the seeder ignoring current records`--key`only (un)seed records matching this key`--class`only seed records for this root class`flush`useful silverstripe CliController arg that flushes configurationProviders
---------

[](#providers)

Providers are a simple way to customise what data is generated. The seeder comes with a bunch of useful providers

ProviderDescriptionExampleValueProviderUse the given value, select variables included`Field: 'this is the value'`DateProviderGenerate a date`Field: date(+3 months)`FakerProviderGenerate data using the php faker library`Field: faker(sentences,3)`FirstObjectProviderReturns the first instance of the class`Parent: first(Page)`RandomObjectProviderReturns a list of random objects for class`Children: random(Page)`HTMLProviderReturns random HTML`Field: html()`ImageProviderReturns an `Image` of a [placehold.it](http://placehold.it) image`Image: image(300,400)`MemberProviderReturns a member with email and password`Member: member(test@test.com,password)`WhereProviderReturns a DataObject with matching field value`Parent: where(Page, URLSegment, i-am-a-parent)`Check here for more information on [creating providers](https://github.com/littlegiant/silverstripe-seeder/blob/master/docs/providers.md)

Example
-------

[](#example)

```
---
Name: seeder
---

Seeder\Seeder:
    create:
        HomePage:
            fields:
                Title: Home
                Content: >
                    This is an awesome paragraph that can welcome your visitors
        Blog:
            fields:
                Title: Magic in a bottle
        Member: member(admin@mysite.com,default admin password)

---
Name: seeder-dev
Only:
    environment: dev
---

Seeder\Seeder:
    create:
        -
            key: Page1
            class: Page
            fields:
                Title: Parent
                URLSegment: i-am-a-parent

        -
            key: Page2
            class: Page
            fields:
                Title: Child
                URLSegment: i-am-a-child
                Parent: where(Page, URLSegment, i-am-a-parent)

        Author:
            count: 10
            fields:
                Name: faker(name)
        BlogTag:
            count: 10
        BlogPost:
            count: 100
            fields:
                Parent: first(blog)
                Author: random()
                Title: 'Blog post {$i}'
                Tags: random(BlogTag,3)
```

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2015 Little Giant Design Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributing
------------

[](#contributing)

Pull requests are welcome

### Code guidelines

[](#code-guidelines)

This project follows the standards defined in:

- [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)
- [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
- [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% 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.

###  Release Activity

Cadence

Every ~123 days

Total

5

Last Release

3374d ago

Major Versions

1.0.2 → 2.0.02015-12-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/a499234983660ff4b31982de5e17e147544b717227fc4f7245070462fd03cbca?d=identicon)[stevie-mayhew](/maintainers/stevie-mayhew)

![](https://www.gravatar.com/avatar/13a1b78f31cdad3eecbe5d11aadc3f5c527f76cde37710ab91dc03c42565f152?d=identicon)[RyanPotter](/maintainers/RyanPotter)

---

Top Contributors

[![stevie-mayhew](https://avatars.githubusercontent.com/u/1953220?v=4)](https://github.com/stevie-mayhew "stevie-mayhew (6 commits)")[![jonom](https://avatars.githubusercontent.com/u/1079425?v=4)](https://github.com/jonom "jonom (4 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (1 commits)")

---

Tags

silverstripeseeddeveloper tool

### Embed Badge

![Health badge](/badges/littlegiant-silverstripe-seeder/health.svg)

```
[![Health](https://phpackages.com/badges/littlegiant-silverstripe-seeder/health.svg)](https://phpackages.com/packages/littlegiant-silverstripe-seeder)
```

###  Alternatives

[sunnysideup/typography

Add a typography test page to your silverstripe website / application.

124.2k3](/packages/sunnysideup-typography)

PHPackages © 2026

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