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

Statamic Magic Actions Laravel Package

el-schneider/statamic-magic-actions

Statamic Magic Actions lets you define reusable actions in the control panel and run custom PHP logic on entries and other content. Trigger workflows, bulk updates, and maintenance tasks from configurable action buttons.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Install the package with Composer:
    composer require <vendor>/<package>:^0.2.2
    
  2. Confirm your Prism constraint is compatible. As of v0.2.2 the package supports both Prism 0.99 and 0.100. If another dependency requires Prism 0.100, this release removes the previous ^0.99.0 installation block.
  3. Look first at:
    • composer.json — confirm the package’s Prism constraint uses an OR range such as ^0.99 || ^0.100.
    • The package service provider — check for config publishing, bindings, and auto-discovery.
    • The README and config/ directory — identify the package’s public API and configuration keys.
  4. Run the package’s migrations or publish its config if required:
    php artisan vendor:publish --provider="Vendor\\Package\\PackageServiceProvider"
    
  5. First use case: wire the package into a small Prism-backed flow, such as a queued job or artisan command, and run it against a fake/test provider before using a real LLM provider.

Implementation Patterns

  • Use the package behind an application service. Keep Prism calls inside your own service, job, or action class rather than scattering them through controllers. This makes it easier to swap providers, add retries, and test without hitting external APIs.
  • Pin Prism deliberately. If your application depends on Prism features introduced in 0.100, require ^0.100; if you need to support both, use ^0.99 || ^0.100. Do not rely on ^0.99 alone to pull in 0.100.
  • Test against both supported Prism minors. The package’s own CI now covers 0.99 and 0.100; mirror that in application CI if you support both. A small matrix job is usually enough:
    strategy:
      matrix:
        prism: ['^0.99', '^0.100']
    
  • Use Prism fakes in feature tests. Exercise the package through your application service and assert on prompts, tool calls, and responses without making real provider requests.
  • Queue long-running LLM work. Wrap Prism calls in jobs with timeouts and retries; keep HTTP/controller requests short.
  • Keep provider configuration environment-driven. Bind Prism providers through config and the container so local, staging, and production can use different providers or fake implementations.
  • Adopt the Dependabot widen strategy for Composer updates. The v0.2.2 release notes show Composer updates using widen, which is appropriate for libraries that need to support multiple dependency ranges.

Gotchas and Tips

  • Composer caret ranges pin the minor on 0.x. ^0.99.0 does not allow 0.100; it effectively means >=0.99.0 <0.100.0. Use ^0.99 || ^0.100 or an explicit range when supporting both.
  • Run composer why-not when installation fails. If Composer refuses to install alongside another package, use:
    composer why-not prism-php/prism 0.100
    
    This quickly identifies the package still pinning the older minor.
  • Use --with-all-dependencies when upgrading. If Prism is already locked, a normal composer update may not move it:
    composer update <vendor>/<package> prism-php/prism --with-all-dependencies
    
  • Prism 0.100 may have behavioral differences. Even where the API is compatible, test response handling, streaming, tool calls, and error paths against both minors if you claim support for both.
  • Dependabot configuration can fail silently. The release notes mention an unsupported github-actions cooldown option that disabled all version updates. Validate Dependabot config and check that update PRs are actually being opened after changes.
  • Check the package’s service provider for extension points. Config publishing, container bindings, and macros are the usual places to customize behavior without forking.
  • Keep an eye on future Prism minor releases. Since 0.x minors can introduce breaking changes, review Prism’s changelog before widening the constraint beyond 0.100.
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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route