Commit graph

15 commits

Author SHA1 Message Date
8f2590477c Merge pull request 'DX audit and fix (PHP)' (#10) from agent/dx-audit-and-fix--laravel-php-package into dev
Reviewed-on: #10
2026-03-24 11:35:11 +00:00
Snider
be304e7b1a fix(lifecycle): deduplicate route names from multi-domain registrations
Some checks failed
CI / PHP 8.4 (pull_request) Failing after 2m3s
CI / PHP 8.3 (pull_request) Failing after 2m18s
CI / PHP 8.4 (push) Failing after 2m2s
CI / PHP 8.3 (push) Failing after 2m20s
Publish Composer Package / publish (push) Failing after 10s
When the same route file is registered on multiple domains (e.g.
core.test, hub.core.test, core.localhost), Laravel's route:cache
fails with "Another route has already been assigned name". Add
deduplicateRouteNames() to strip names from duplicate routes,
keeping only the first registration. Extract processViews(),
processLivewire(), and refreshRoutes() helpers to reduce
duplication across fire* methods.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-21 23:19:30 +00:00
Snider
208cb93c95 fix(dx): code style fixes, strict_types, and test repair
All checks were successful
CI / PHP 8.3 (pull_request) Successful in 2m32s
CI / PHP 8.4 (pull_request) Successful in 2m17s
- Remove non-existent src/Core/Service/ from CLAUDE.md L1 packages list
- Fix LifecycleEventsTest: remove dependency on McpToolHandler interface
  (lives in core-mcp, not needed since McpToolsRegistering stores class
  name strings)
- Run Laravel Pint to fix PSR-12 violations across all source and test files
- Add missing declare(strict_types=1) to 18 PHP files (tests, seeders,
  Layout.php, GenerateServiceOgImages.php)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 09:03:50 +00:00
Snider
d02f4361e3 fix(scheduler): skip test directories in ScheduledActionScanner
Some checks failed
CI / PHP 8.4 (push) Failing after 2m1s
CI / PHP 8.3 (push) Failing after 2m8s
Test files inside module Tests/ directories (e.g. app/Mod/Lem/Tests/)
extend Tests\TestCase which isn't available in production without dev
dependencies. The scanner now skips /Tests/ directories and *Test.php
files, and wraps class_exists() in try/catch for defence in depth.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-12 15:45:45 +00:00
Snider
7db3637985 feat(webhook): add CronTrigger scheduled action — replaces 4 Docker cron containers
Some checks failed
CI / PHP 8.3 (push) Failing after 2m9s
CI / PHP 8.4 (push) Failing after 2m14s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:26:58 +00:00
Snider
a1de171871 feat(webhook): add WebhookController — store, verify, fire event, return 200
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:23:32 +00:00
Snider
39ede84d0e feat(webhook): add WebhookCall model, migration, event, verifier interface
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:21:20 +00:00
Snider
a0a0727c88 fix(actions): harden scheduled actions — security allowlists, trait verification, scan safety
- Add ALLOWED_NAMESPACES prefix allowlist to ScheduleServiceProvider
- Add ALLOWED_FREQUENCIES method allowlist (prevents arbitrary method dispatch)
- Verify Action trait on scheduled classes before dispatch
- Move try/catch inside foreach for per-action isolation
- Add empty-scan guard to ScheduleSyncCommand (prevents disabling all rows)
- Consolidate ScheduledActionScanner to single tokenisation pass
- Cast numeric frequency args via ctype_digit() in ScheduledAction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:56:14 +00:00
Snider
3c4011bdcb test(actions): add integration tests for scheduled actions flow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:43:51 +00:00
Snider
633fbeb559 feat(actions): add ScheduleServiceProvider — wires DB-backed actions into scheduler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:42:59 +00:00
Snider
d1598882bb feat(actions): add schedule:sync command — persists #[Scheduled] to database
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:41:17 +00:00
Snider
9ffb756969 feat(actions): add ScheduledActionScanner — discovers #[Scheduled] classes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:25:31 +00:00
Snider
ace48d57c2 feat(actions): add ScheduledAction model and migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:24:20 +00:00
Snider
8d0b2b64ec feat(actions): add #[Scheduled] attribute for Action classes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:23:33 +00:00
Snider
28d004ff61 feat: replace Go CLI with PHP framework
Some checks failed
CI / PHP 8.4 (push) Failing after 1m54s
CI / PHP 8.3 (push) Failing after 1m58s
Go CLI commands moved to core/go-php. This repo now contains
the Laravel modular monolith framework (previously php-framework).

- Remove all Go files (now in core/go-php)
- Add PHP framework: event-driven module loading, lifecycle events
- Composer package: core/php
- core/php-framework remains as-is for backward compat

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 08:49:51 +00:00