- Does teamdotblue/psysh-bundle work with Laravel?
- No. It is a Symfony bundle that registers a PsySH console command inside the Symfony kernel and wires the REPL to Symfony's DI container. Laravel does not use Symfony bundles or bundle bootstrapping, so there is no supported place for it to attach. For Laravel, use laravel/tinker, which wraps the same PsySH engine and exposes the Laravel container and Eloquent models.
- What is the difference between psysh-bundle and laravel/tinker?
- Both use the upstream PsySH REPL engine, but the integration layer differs. psysh-bundle is Symfony-specific: it exposes Symfony services, parameters, and the kernel. laravel/tinker is Laravel's first-party wrapper and exposes app bindings, facades, and Eloquent models out of the box. For a Laravel application, Tinker is the functionally equivalent and supported choice.
- How do I install teamdotblue/psysh-bundle?
- In a Symfony project, install it with Composer as a dev dependency, typically composer require --dev teamdotblue/psysh-bundle, then register the bundle in config/bundles.php if Flex does not do it automatically. It is intended for console use in a Symfony kernel, not in Laravel. Check the package's composer.json for PHP and Symfony version constraints before installing.
- Which Symfony and PHP versions does psysh-bundle support?
- The package has dependency constraints tied to the Symfony and PHP versions available when it was last updated, and it is likely to lag current Symfony 6/7 and PHP 8.2+ baselines. Always read its composer.json require and require-dev sections before adopting it. If your project runs PHP 8.2 or newer, verify resolution first; an incompatible constraint range is a forced migration.
- Is it safe to run psysh-bundle in production?
- A REPL is remote code execution by design, so it should never be reachable in production. Treat it as a require-dev dependency, exclude it from production autoloading, and gate any console access behind environment checks and access controls. This is a known, manageable risk, but it is still risk you should not take on for functionality Laravel already provides.
- Is teamdotblue/psysh-bundle actively maintained?
- Maintenance signals are weak: the assessment notes 5 stars, 0 dependents, and a single-maintainer footprint, which suggests a hobby-scale project with a bus factor of one. That does not make it unusable for an existing Symfony service, but it is a poor bet for new strategic adoption. For Laravel, laravel/tinker is first-party and actively maintained.
- How does psysh-bundle expose Symfony services and parameters in the REPL?
- The bundle wires PsySH to the Symfony DI container so you can introspect services, parameters, and the kernel from the interactive shell. That container-aware introspection is its core value proposition, and it depends on Symfony's kernel and bundle model. Laravel has no equivalent attachment point, which is why the bundle's main feature has no place in a Laravel app.
- What should Laravel developers use instead of psysh-bundle?
- Use laravel/tinker. It is first-party, actively maintained, and wraps the same PsySH engine while exposing the Laravel container, facades, and Eloquent models natively. You get a tinker-style shell with no Symfony bundle bootstrapping and no extra integration layer. If you need standalone PsySH behavior, you can also depend on psy/psysh directly with a small custom bootstrap.
- Can I force psysh-bundle to work in Laravel by installing symfony/framework-bundle?
- Technically you could pull in Symfony framework pieces and stand up bundle bootstrapping, but it would be negative value. You would be adding a parallel framework layer solely to reach a REPL that php artisan tinker already provides. That increases dependency surface and maintenance burden without adding capability, so it is not a recommended integration path.
- How do I migrate a Symfony service from psysh-bundle to laravel/tinker?
- In a Symfony service, the exit path is composer remove teamdotblue/psysh-bundle, plus a psy/psysh dev dependency if standalone REPL access is still wanted. For teams moving from Symfony to Laravel, map the mental model: $container->get('service') becomes app('service'), and kernel or service introspection becomes facades, app(), and Eloquent. Budget roughly 0.5 to 1 engineer-day per service for the swap plus documentation, and run a short pairing session to retrain habits.