gianarb/psysh-module

Zend Framework 2 psysh integration

Maintainers

Package info

github.com/gianarb/zf2-psysh-module

pkg:composer/gianarb/psysh-module

Statistics

Installs: 3 734

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

0.0.1 2015-03-09 23:30 UTC

This package is auto-updated.

Last update: 2026-03-15 20:33:06 UTC


README

Build Status Dependency Status Code Climate

Integration between psysh and ZF2 The best way to debug your cli command!

Psysh

PsySH is a runtime developer console, interactive debugger and REPL for PHP. Learn more at psysh.org. Check out the Interactive Debugging in PHP talk from OSCON on Presentate.

Installation

composer require gianarb/psysh-module

Example

Your application return a cli command zf-endpoint user list, How can I debug it? In the first step you can set a breakpoint into command action. To build it you can use the psyshservice from your service locator

<?php
eval($this->getServiceLocator()->get("psysh")->breakpoint());

Run this command

vendor/bin/zf2-psysh user list

Now you can type in

ls

This command show all variable into the scope