-
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Muhammet Şafak edited this page Jun 11, 2026
·
1 revision
| Requirement | Version / Notes |
|---|---|
| PHP | 8.1 or higher |
ext-pdo |
Required |
| PDO driver |
pdo_mysql, pdo_sqlite or pdo_pgsql for your database |
ext-json |
Required (used to read barbarian.json) |
initphp/console |
^2.1 (installed automatically) |
composer require initphp/barbarianThis installs the library and exposes the CLI entry point at
vendor/bin/barbarian.
vendor/bin/barbarian helpYou should see the command listing:
init : Generates a barbarian.json configuration file.
create : Creates a new migration class.
status : Shows the status of each migration.
up : Runs the up() method of the migrations.
down : Runs the down() method of the migrations.
The library itself is autoloaded through Composer's PSR-4 mapping
(InitPHP\Barbarian\ → src/).
Your migration files, however, are discovered by globbing
Migration_*.php inside the configured folder and are required directly —
they do not need to be registered with Composer's autoloader. If your
migration classes declare a namespace, tell Barbarian about it via the
namespace option.
- Quick Start — a five-minute tour.
- Writing Migrations — the migration contract.
-
Configuration — options and
barbarian.json.
initphp/barbarian · MIT License · part of the InitPHP family
Source · Issues · Discussions · Packagist · Contributing · Security Policy
Getting Started
Guide
Reference
Practical Guides
Help