https://github.com/gianarb/zf2-psysh-module
Zend Framework 2 and Psysh
https://github.com/gianarb/zf2-psysh-module
Last synced: about 1 year ago
JSON representation
Zend Framework 2 and Psysh
- Host: GitHub
- URL: https://github.com/gianarb/zf2-psysh-module
- Owner: gianarb
- Created: 2015-03-09T21:41:18.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-10T08:04:07.000Z (over 11 years ago)
- Last Synced: 2025-03-28T15:46:20.953Z (over 1 year ago)
- Language: PHP
- Size: 137 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PsyshModule
[](https://travis-ci.org/gianarb/zf2-psysh-module) [](https://www.versioneye.com/user/projects/54fe1c144a10649b1b000031) [](https://codeclimate.com/github/gianarb/zf2-psysh-module)
Integration between [psysh](https://github.com/bobthecow/psysh) and [ZF2](https://github.com/zendframework/zf2)
The best way to debug your cli command!
## Psysh
> PsySH is a runtime developer console, interactive debugger and [REPL](http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) for PHP.
> Learn more at [psysh.org](http://psysh.org/). Check out the [Interactive Debugging in PHP talk from OSCON](https://presentate.com/bobthecow/talks/php-for-pirates) 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 `psysh`service from your service locator
```php
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