Skip to content

Add SerializesModels trait to ScheduleTriggered event#2

Merged
stevebauman merged 2 commits intomasterfrom
copilot/add-serializes-models-trait
May 5, 2026
Merged

Add SerializesModels trait to ScheduleTriggered event#2
stevebauman merged 2 commits intomasterfrom
copilot/add-serializes-models-trait

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

ScheduleTriggered holds an Eloquent Schedule model but was missing SerializesModels, meaning queued listeners would serialize the full model object rather than just its key.

Changes

  • src/Events/ScheduleTriggered.php — added Illuminate\Queue\SerializesModels alongside the existing Dispatchable trait
class ScheduleTriggered
{
    use Dispatchable, SerializesModels;

    public function __construct(
        public Schedule $schedule
    ) {}
}

With this trait, queued listeners receive a fresh model instance reloaded from the database rather than a potentially stale serialized object.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/pestphp/pest-plugin/zipball/9d4b93d7f73d3f9c3189bb22c220fef271cdf568
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/console/zipball/d7d2b64a45a89d607865927b176fa51c33ddbb58
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/polyfill-iconv/zipball/2c5729fd241b4b22f6e4b436bc3354a4f262df57
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/4864388bfbd3001ce88e234fab652acd91fdc57e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/process/zipball/60f19cd3badc8de688421e21e4305eba50f8089a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/u2QWAF /usr/bin/composer install (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/string/zipball/114ac57257d75df748eda23dd003878080b8e688
    • Triggering command: REDACTED, pid is -1 (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add serializes models trait to scheduled event Add SerializesModels trait to ScheduleTriggered event May 4, 2026
Copilot AI requested a review from stevebauman May 4, 2026 23:29
@stevebauman stevebauman marked this pull request as ready for review May 5, 2026 12:59
@stevebauman stevebauman merged commit 604042b into master May 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding serializes models trait to scheduled event

2 participants