refactor: flatten src/AKSRT → src (drop theme-identifier dir)

Move all domain folders from src/AKSRT/{Domain} to src/{Domain}; remap
Composer PSR-4 "AKSRT\\": "src/"; update audit script + README + ADR
paths; remove dead tools/build-psr4-map.php (scanned deleted inc/classes).
This commit is contained in:
2026-08-02 22:06:06 +08:00
parent 56f1a8175f
commit 8c5b1555c9
285 changed files with 26 additions and 3600 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
/**
* @package AKSRT
*/
namespace AKSRT\Core;
defined('ABSPATH') || exit;
class DBMigrator {
use DBMigratorPart2;
use DBMigratorPart3;
use DBMigratorIdentity;
/** Current schema version; changing it re-runs dbDelta. */
const SCHEMA_VERSION = '1.17.0';
const OPT_KEY = 'aksrt_db_schema_version';
/**
* Register hooks.
*/
public static function init(): void {
add_action('after_switch_theme', [self::class, 'maybe_migrate']);
add_action('admin_init', [self::class, 'maybe_migrate']);
}
/**
* Run table schema upgrade when version mismatches.
*/
public static function maybe_migrate(): void {
$current = get_option(self::OPT_KEY, '');
if ($current === self::SCHEMA_VERSION) {
return;
}
self::run();
update_option(self::OPT_KEY, self::SCHEMA_VERSION);
}
}