refactor: extract shared code from bin/ scripts and remove legacy scheduler runner
- Extract ModuleManifestLoader for standalone manifest loading (used by module-deactivate and ValidateCommand) - Extract SqlStatementParser, ModuleMigrationRepository, and ModuleMigrationService from bin/module-migrate.php to enforce strict layering (SQL in repository, orchestration in service) - Delete bin/scheduler-run.php (fully superseded by bin/console scheduler:run) - Update docs and test fixtures to reference bin/console Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
24
lib/Repository/Module/ModuleMigrationRepositoryInterface.php
Normal file
24
lib/Repository/Module/ModuleMigrationRepositoryInterface.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Repository\Module;
|
||||
|
||||
/** Contract for module migration tracking: table creation, applied-file queries, and statement execution. */
|
||||
interface ModuleMigrationRepositoryInterface
|
||||
{
|
||||
public function ensureTrackingTable(): void;
|
||||
|
||||
/**
|
||||
* @return array<string, true>
|
||||
*/
|
||||
public function getAppliedFilenames(string $moduleId): array;
|
||||
|
||||
public function recordApplied(string $moduleId, string $filename): void;
|
||||
|
||||
public function beginTransaction(): void;
|
||||
|
||||
public function commit(): void;
|
||||
|
||||
public function rollback(): void;
|
||||
|
||||
public function executeStatement(string $sql): void;
|
||||
}
|
||||
Reference in New Issue
Block a user