Download the PHP package evotodi/seed-bundle without Composer

On this page you can find all versions of the php package evotodi/seed-bundle. 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 seed-bundle

Symfony PhpStorm

Symfony/Doctrine Seed Bundle

Used to load/unload seed data from a doctrine database or anything that needs seeded.

Example would be to load a table with a list of states and abbreviations, or populate the users table with initial admin user(s). Unlike the DoctrineFixturesBundle which is mainly for development this bundle is for seeding a database before the initial push to production.

Installation

Install the package with:

(Optional) Load seeds as services config/services.yaml
In Symfony default services.yaml classes in src/ are loaded as services, so creating a folder src/DataSeeds/ will load the seeds as services.

Building a seed to populate a database

The Seed class is a Command and :

Seed commands

The SeedBundle gives you two default commands and one for each seed you made.
With the previous example, I'd have:

Note: If your seeds do not show up in the command list under seed: then clear the cache

Global seed commands

The global seed:load and seed:unload allow you to run multiple seeds in one command.
The rest of this section will only show seed:load as it works the same as seed:unload.

Global seed name matching

Seed names are matched using webmozarts/glob filtering by turning the seed names into path like strings.
An example would be if you had the following seeds:

And wanted to only load the users in the 'prod' group then call seed:load prod/users/*
Or to load the whole 'prod' group then call seed:load prod/**/*
Or load the 'dev' prices and products along with the 'prod' users then call seed:load dev:prices dev:products prod:users:*

Note: colons and forward slashed are interchangeable because all colons are replaced with forward slashes for filtering.

Please see the readme of webmozarts/glob for more information on glob patterns.

Global seed ordering

Every seed has a getOrder method that is used to sort them. The default value is 0.
Seeds are loaded/unloaded in ascending order.

Caution: Seeds with the same order value are loaded semi-randomly. This is especially a concern when using the --from option.

Example issue of ordering and --from

Seeds:

Calling seed:load --from seed-c will start loading with seed-c but since seed-b and seed-d have the same order one or both may or may not be loaded depending on what order they were loaded into the registry.
It is suggested to use the --debug flag to verify the order of loading or sequentially order your seeds.

Manual seed commands

Calling seed:user load (from example above) will load only the user seed. Conversely, calling seed:user unload will unload it.

Example project

In the example folder is a project that can be used to experiment with the Seed bundle.
It shows how to seed a database or flat file.

Thanks

Thanks to soyuka/SeedBundle

Contributions

Contributions are very welcome!

Please create detailed issues and PRs.

Licence

This package is free software distributed under the terms of the MIT license.

Updates


All versions of seed-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8
symfony/framework-bundle Version ^6.0|^7.0
symfony/console Version ^6.0|^7.0
symfony/finder Version ^6.0|^7.0
doctrine/doctrine-bundle Version ^2.0
doctrine/orm Version ^2.0
symfony/yaml Version ^6.0|^7.0
symfony/doctrine-bridge Version ^6.0|^7.0
webmozart/glob Version ^4.5
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 evotodi/seed-bundle contains the following files

Loading the files please wait ....