feat(modules): harden module platform with event constants, validation checks, and CLI improvements
- Add ModuleEvents constants class with all 8 event strings; update dispatch call sites - ValidateCommand: check AuthorizationPolicy container registration (check 20) - ValidateCommand: warn on unknown event_listeners keys (check 21) - make:module --simple flag for minimal manifests - module:deactivate reverse-dependency warning - 12 new PHPUnit tests covering all improvements Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace MintyPHP\Service\Scheduler;
|
||||
|
||||
use MintyPHP\App\Module\ModuleEventDispatcher;
|
||||
use MintyPHP\App\Module\ModuleEvents;
|
||||
use MintyPHP\Domain\Taxonomy\ScheduledJobRunStatus;
|
||||
use MintyPHP\Domain\Taxonomy\ScheduledJobTriggerType;
|
||||
use MintyPHP\Domain\Taxonomy\SchedulerRuntimeResult;
|
||||
@@ -423,7 +424,7 @@ class SchedulerRunService
|
||||
}
|
||||
|
||||
try {
|
||||
$this->eventDispatcher->dispatch('scheduler.job_failed', [
|
||||
$this->eventDispatcher->dispatch(ModuleEvents::SCHEDULER_JOB_FAILED, [
|
||||
'job_id' => (int) ($job['id'] ?? 0),
|
||||
'job_key' => (string) ($job['job_key'] ?? ''),
|
||||
'label' => (string) ($job['label'] ?? ''),
|
||||
|
||||
Reference in New Issue
Block a user