ramsey/composer-repl
Interactive REPL for Composer projects. Quickly bootstrap a PHP shell that autoloads your dependencies and project classes, making it easy to explore APIs, test snippets, and debug in the context of your installed packages—without creating a script.
composer require --dev ramsey/composer-repl to install it in your project (dev-only).composer repl (no extra setup required).vendor/autoload.php, giving immediate access to all installed packages and your own classes.monolog/monolog) logs a message or how a custom utility class behaves.new MyService()->handle(...)) without writing and running a .php script.$this state or intermediate values in a service—just paste in a quick variable dump or condition check.composer repl and test it against your current dependency tree to catch version conflicts early.src/) without running composer dump-autoload, the REPL won’t find it—run composer dump-autoload after changes.php://stdin and readline/linenoise; if your CLI environment lacks readline support (e.g., some Windows setups), it falls back to a basic input loop. Consider php -a as a fallback if composer repl fails.composer-repl.php file in your project root. It gets included before the REPL starts—perfect for preloading mocks, constants, or helper functions.ramsey/composer-repl in production—it’s purely a dev tool and may leak sensitive context via interactive execution.How can I help you explore Laravel packages today?