Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Event Machine Laravel Package

tarfin-labs/event-machine

Event Machine is a Laravel package for event-driven architecture, offering a clean, structured API for defining and dispatching domain events, wiring up listeners, and keeping business logic decoupled, testable, and easy to extend.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: This package is a Laravel-native state machine/timer library that integrates through Artisan commands and the Laravel scheduler. The 9.21.0 release fixes a critical scheduler integration defect: MachineTimer::register() now shell-escapes the namespaced class option, matching the existing behavior of MachineScheduler::register(). The fix is internal and does not change the public API or defaults, so architectural fit remains strong for Laravel applications already using Artisan and routes/console.php.
  • Integration feasibility: High. No application code changes are required to adopt the fix. Existing MachineTimer::register() calls and fluent overrides remain unchanged. The practical integration effort is operational: validating that timer machines are actually scheduled, and planning how overdue timers should behave on first deploy.
  • Technical risk: The primary risk is behavioral, not code-level. From 9.3.0 through 9.20.0, registered timer sweeps never ran from the scheduler; they failed silently to /dev/null. On upgrade, every overdue after timer fires on the first sweeps, regardless of age, which can trigger unintended state transitions. An overdue every timer fires once, not once per missed interval. Backlog drains at timers.batch_size (default 100) per timer per sweep. Secondary risk: machine:validate --all will now fail CI for timer machines missing from routes/console.php, which is correct but may block pipelines until schedule entries are added.
  • Key questions: Which timer machines exist, and which have overdue instances? For each, should overdue timers still act, or should instances be moved out of timer state before deployment? What is the current backlog size relative to timers.batch_size, and should batch size be tuned? Is machine:validate --all already part of CI, and who owns fixing failures? How will we monitor sweeps now that the silent-failure path is fixed? Are there timers whose semantics depend on “never having fired” such that a first fire would be unsafe?

Integration Approach

  • Stack fit: Excellent for Laravel/PHP teams already using Artisan, the scheduler, and routes/console.php. The release directly addresses scheduler shell-quoting behavior without introducing new dependencies or configuration formats. It also adds a validation command that aligns with CI and local artisan workflows.
  • Migration path: Upgrade to 9.21.0, then run php artisan machine:validate --all in an artisan context where routes/console.php is loaded. Add any missing machine:process-timers schedule entries named by the validator. Before or immediately after deployment, inspect overdue timer instances and decide whether to let them fire or move them out of timer state. No code changes are required.
  • Compatibility: The fix is backward compatible at the API level; defaults and fluent overrides are unchanged. The behavioral change is that previously non-running sweeps will now run. The validation command introduces a new failure mode for misconfigured schedules, which is intentional but should be treated as a CI compatibility item.
  • Sequencing: First, inventory timer machines and overdue instances. Second, decide backlog policy per machine. Third, add missing schedule registrations and run validation in staging. Fourth, deploy 9.21.0 with a plan for the first sweeps. Fifth, observe backlog drain and confirm expected timer behavior. For large backlogs, consider temporarily reducing risk by moving unsafe instances out of timer state before deploy rather than relying on batch-size tuning alone.

Operational Impact

  • Maintenance: The release removes a silent, long-running failure mode and adds a validation check that makes missing or incorrectly scheduled timer sweeps visible. Ongoing maintenance should include machine:validate --all in CI and periodic review of timer schedule entries. Documentation has been corrected to stop claiming auto-registration, reducing false assumptions.
  • Support: Support burden may spike briefly at upgrade time because overdue timers will fire and validation may fail existing pipelines. Teams should prepare an upgrade guide reference and a clear owner for backlog decisions. The added validator provides actionable findings, including the exact MachineTimer::register() line to add.
  • Scaling: Backlog drain is controlled by timers.batch_size (default 100) per timer per sweep. Large installations with many overdue instances should estimate drain time and decide whether to adjust batch size or manually clear unsafe timer states. Because overdue every timers fire once rather than once per missed interval, burst risk is lower than it might appear, but after timers can still produce a one-time surge.
  • Failure modes: The prior failure mode was silent: unquoted class names were stripped by /bin/sh, causing Class "AppMachinesOrderMachine" not found errors sent to /dev/null. The fix removes that specific failure. Remaining failure modes include missing schedule entries, which the validator now catches, and runtime sweep errors, which should be monitored through scheduler logs rather than discarded. Teams should ensure scheduler output is retained and alerted on.
  • Ramp-up: Low to moderate. Engineers familiar with Laravel scheduling and Artisan can adopt the release quickly. The main ramp-up is conceptual: understanding timer semantics (after vs. every), the consequences of a long-unrunning sweep, and the need to validate schedule registration in the same environment where routes/console.php is loaded. A short runbook covering backlog policy, validation, and sweep monitoring is sufficient.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager