-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigration.php
More file actions
36 lines (28 loc) · 1011 Bytes
/
Copy pathmigration.php
File metadata and controls
36 lines (28 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* Plugin Name: Database Migration System
* Description: Standalone MU plugin for versioned WordPress database migrations.
* Version: 1.0.0
* Requires at least: 6.9
* Requires PHP: 8.5
* Author: Brian Schaeffner
* License: GPL-2.0-or-later
*/
declare(strict_types=1);
namespace SymPress\WordPress\Migration;
use SymPress\WordPress\Migration\Application\MigrationSystem;
use SymPress\WordPress\Migration\Cli\MigrationBootstrap;
use SymPress\WordPress\Migration\Hook\MigrationCliBootstrap;
use SymPress\WordPress\Migration\Hook\MigrationSystemBootstrap;
if (!defined('ABSPATH')) {
return;
}
if (!class_exists(MigrationBundle::class)) {
require_once __DIR__ . '/vendor/autoload.php';
}
add_action('kernel.add-providers', static function (): void {
});
add_action('muplugins_loaded', static function (): void {
(new MigrationSystemBootstrap(MigrationSystem::getInstance()))->initialize();
(new MigrationCliBootstrap(MigrationBootstrap::getInstance()))->initialize();
}, 5);