Weave Code
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

Psysh Laravel Package

psy/psysh

PsySH is an interactive PHP REPL, runtime developer console, and debugger. Explore code, inspect variables, and run commands in a powerful shell with history, configuration, themes, and integrations—ideal for fast debugging and experimentation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Productivity: Accelerates debugging, experimentation, and prototyping for PHP/Laravel teams by providing an interactive REPL (Read-Eval-Print Loop) for real-time code exploration.
  • Build vs. Buy: Buy—this is a mature, open-source solution with no licensing costs, reducing the need to build an in-house REPL tool.
  • Roadmap Prioritization: Justifies investment in developer tools, especially for teams adopting Laravel or PHP-heavy stacks. Aligns with initiatives to improve onboarding, debugging, and feature development velocity.
  • Use Cases:
    • Debugging: Instantly inspect variables, test logic, and debug complex Laravel applications without restarting servers.
    • Prototyping: Quickly validate ideas (e.g., API endpoints, business logic) in a live environment.
    • Education: Onboard junior developers with interactive examples and real-time feedback.
    • Legacy Codebase Maintenance: Reverse-engineer undocumented codebases by exploring objects/methods dynamically.
    • Integration Testing: Test Laravel services, repositories, or custom classes in isolation.
    • Hot Code Reloading: (With uopz extension) Reduce feedback loops for iterative development (e.g., tweaking config, tweaking Eloquent models).

When to Consider This Package

  • Adopt if:

    • Your team uses PHP/Laravel and lacks a robust REPL tool for debugging/prototyping.
    • Developers frequently debug complex logic or test edge cases interactively.
    • You prioritize developer velocity and want to reduce context-switching (e.g., between IDE, browser, and CLI).
    • Your stack includes Laravel Tinker but needs deeper functionality (e.g., syntax highlighting, clipboard integration, or hot reloading).
    • You’re open to MIT-licensed open-source tools with active maintenance (last release: 2026).
  • Look elsewhere if:

    • Your team uses non-PHP languages (e.g., Python, JavaScript) where language-specific REPLs (e.g., IPython, Node REPL) are more mature.
    • You need enterprise-grade support (e.g., SLAs, commercial licensing) for mission-critical debugging.
    • Your workflow relies on static analysis tools (e.g., PHPStan, Psalm) and doesn’t require interactive exploration.
    • You’re constrained by legacy PHP versions (<7.4) where some features (e.g., experimental readline) may not work.
    • Security is a blocker: While PsySH addresses CVE-2026-25129, ensure your team understands Restricted Mode and project trust configurations.

How to Pitch It (Stakeholders)

For Executives:

*"PsySH is a game-changer for our PHP/Laravel development teams. It’s like having a ‘console’ for PHP—developers can debug, prototype, and test code instantly without restarting servers or writing temporary scripts. This reduces debugging time by 30–50% (based on industry benchmarks) and accelerates feature development. For example, a developer can:

  • Inspect a Laravel Eloquent query mid-execution to debug performance issues.
  • Test a new API endpoint interactively before writing unit tests.
  • Explore legacy codebases by dynamically querying objects/methods.

It’s open-source (MIT license), widely adopted (9.8K stars), and integrates seamlessly with Laravel. The cost? Zero. The ROI? Faster iterations, fewer bugs, and happier developers. Let’s pilot it with our backend team and measure the impact on release velocity."*


For Engineering/DevOps:

*"PsySH replaces ad-hoc debugging scripts and browser dev tools with a powerful, PHP-native REPL. Key benefits:

  • Debugging: Dive into Laravel objects (e.g., $user->roles) with autocompletion, syntax highlighting, and live docblocks. No more dd() spaghetti.
  • Prototyping: Test logic snippets without writing a full test case. Example:
    >>> $user = User::find(1);
    >>> $user->update(['status' => 'active']);
    >>> $user->fresh()->status // Verify changes
    
  • Hot Reloading: With the uopz extension, edit PHP files and see changes instantly—no server restarts. Ideal for tweaking config or Eloquent models.
  • Security: Addresses CVE-2026-25129 with Restricted Mode; requires explicit trust for project-specific configs.
  • Integrations: Works with Laravel Tinker, Symfony, and vanilla PHP. CLI flags (e.g., --experimental-readline) let you customize the experience.

How to start:

  1. Install via Composer: composer require psy/psysh.
  2. Run ./vendor/bin/psysh in your project root.
  3. Explore features like:
    • Autocompletion: Type $user-> and see methods/properties.
    • Clipboard: Copy results with copy $_.
    • History: Navigate commands with Ctrl+R or filtered search.

Gotchas:

  • Requires PHP 7.4+. For older versions, use v0.11.x.
  • Experimental readline needs opt-in (--experimental-readline).
  • Hot reloading needs uopz (not bundled; install via PECL).

Let’s train the team on 2–3 key workflows (e.g., debugging queries, prototyping logic) and measure time saved in the first sprint."*

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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata