spiral-packages / database-seeder
The package provides the ability to seed your database with data using seed classes
Installs: 12 815
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 5
Open Issues: 5
Requires
- php: ^8.1
- butschster/entity-faker: ^2.0
- fakerphp/faker: ^1.23
- laminas/laminas-hydrator: ^4.3
- spiral/attributes: ^2.0 || ^3.1.2
- spiral/boot: ^3.8
- spiral/console: ^3.8
- spiral/scaffolder: ^3.8
Requires (Dev)
- cycle/database: ^2.6
- mockery/mockery: ^1.6
- phpunit/phpunit: ^10.3
- spiral/cycle-bridge: ^2.5
- spiral/framework: ^3.8
- spiral/testing: ^2.6
- vimeo/psalm: ^5.15
Suggests
- spiral/cycle-bridge: For easy database and ORM configuration in a test application
- spiral/testing: To use the Spiral\DatabaseSeeder\TestCase class and helpers to test an app with DB
README
When you build apps that use databases, it's really important to make sure your database works right. This means checking if it stores, changes, and gives back data the way it's supposed to. But sometimes, testing databases can be tricky and a bit boring. You might have to write a lot of complicated commands and be very careful about how data is added or removed.
What the package offers
-
Easy Testing: With Spiral, you don't need to deal with complex commands. The tools are simple to use, which means your tests are easier to write and understand.
-
Different Ways to Reset Your Database: After you test something, you need to make your database clean again for the next test. Spiral has different ways to do this, like the Transaction, Migration, Refresh, and SqlFile methods. Each one has its own way of working, so you can choose what fits best for your test.
-
Seeders and Factories: These are like shortcuts to fill your database with test data. This data looks like the real data you would use in your app. You can quickly set up the data you need for testing with these tools.
-
Checking Your Database: After you do something in your database, you want to make sure it worked right. Spiral's tools let you check if the data is there or not, and if your database structure is correct.
It's a great for any developer, no matter how much experience you have. They help make sure your database is doing what it should, which is really important for your app to work well.
Requirements
Make sure that your server is configured with following PHP version and extensions:
- PHP 8.1+
- Spiral framework 3.7+
Documentation, Installation, and Usage Instructions
See the documentation for detailed installation and usage instructions.
License
The MIT License (MIT). Please see License File for more information.