bobthecow/psysh

debugging symfony app running in docker container

Closed this issue · 3 comments

Hi,

I'm working on a symfony app running in a docker container (see https://github.com/thecodingmachine/docker-images-php) started like this

services:
    php:
        command: php bin/console server:run 0.0.0.0:8000
        ports:
            - "8000:8000"
        image: thecodingmachine/php:7.2-v1-cli
        volumes:
            - .:/usr/src/app
        depends_on:
            - db

I've installed psysh inside the container and then added \Psy\debug(get_defined_vars(), $this); or eval(\Psy\sh()); in a controller.

But nothing happens in the console where I've started psysh (docker-compose exec php psysh)

Is there something I'm doing wrong ?

PsySH doesn't support web servers, see #121

Oh, I thought PHP's built-in web server was the exception.

It works with PHP’s built in webserver, but you have to be running it as a foreground process in your interactive shell.