php-pm
php-pm copied to clipboard
Unable to bootstrap with Symfony5.1 works on Symfony5.0 (with debug = 0)
Steps to reproduce the issue
- Add ppm to your docker-compose.yml (Symfony5.1) as here (https://github.com/php-pm/php-pm-docker)
- Launch docker (
$ docker-compose up
)
What's the expected result?
- Expect PPM to start normally
What's the actual result?
ppm_1 | /var/www
ppm_1 | +---------------------+-------------------+
ppm_1 | | bridge | HttpKernel |
ppm_1 | | host | 127.0.0.1 |
ppm_1 | | port | 8080 |
ppm_1 | | workers | 8 |
ppm_1 | | app-env | dev |
ppm_1 | | debug | 1 |
ppm_1 | | logging | 1 |
ppm_1 | | static-directory | public/ |
ppm_1 | | bootstrap | symfony |
ppm_1 | | max-requests | 1000 |
ppm_1 | | max-execution-time | 30 |
ppm_1 | | memory-limit | -1 |
ppm_1 | | ttl | 0 |
ppm_1 | | populate-server-var | 1 |
ppm_1 | | socket-path | /ppm/run |
ppm_1 | | pidfile | /ppm/ppm.pid |
ppm_1 | | reload-timeout | 30 |
ppm_1 | | cgi-path | /usr/bin/php-cgi7 |
ppm_1 | +---------------------+-------------------+
ppm_1 | Starting PHP-PM with 8 workers, using StreamSelectLoop ...
ppm_1 | --- Worker 5504 stderr ---
ppm_1 | User Deprecated: Since symfony/dotenv 5.1: Passing a boolean to the constructor of "Symfony\Component\Dotenv\Dotenv" is deprecated, use "Dotenv::usePutenv()".
Stack trace:
Stack trace:
ppm_1 | #0 /var/www/vendor/symfony/http-kernel/Kernel.php(532): Symfony\Component\HttpKernel\Kernel->buildContainer()
ppm_1 | #1 /var/www/vendor/symfony/http-kernel/Kernel.php(131): Symfony\Component\HttpKernel\Kernel->initializeContainer()
ppm_1 | #2 /var/www/vendor/symfony/http-kernel/Kernel.php(191): Symfony\Component\HttpKernel\Kernel->boot()
ppm_1 | #3 /ppm/vendor/php-pm/httpkernel-adapter/Bridges/HttpKernel.php(87): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
ppm_1 | #4 /ppm/vendor/php-pm/php-pm/src/ProcessSlave.php(433): PHPPM\Bridges\HttpKernel->handle(Object(React\Http\Io\ServerRequest))
ppm_1 | #5 /ppm/vendor/php-pm/php-pm/src/ProcessSlave.php(397): PHPPM\ProcessSlave->handleRequest(Object(React\Http\Io\ServerRequest))
ppm_1 | #6 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(49): PHPPM\ProcessSlave->onRequest(Object(React\Http\Io\ServerRequest))
ppm_1 | #7 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(54): React\Http\Io\MiddlewareRunner->call(Object(React\Http\Io\ServerRequest), 3)
ppm_1 | #8 /ppm/vendor/react/http/src/Middleware/RequestBodyParserMiddleware.php(34): React\Http\Io\MiddlewareRunner->React\Http\Io\{closure}(Object(React\Http\Io\ServerRequest))
ppm_1 | #9 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(59): React\Http\Middleware\RequestBodyParserMiddleware->__invoke(Object(React\Http\Io\ServerRequest), Object(Closure))
ppm_1 | #10 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(54): React\Http\Io\MiddlewareRunner->call(Object(React\Http\Io\ServerRequest), 2)
ppm_1 | #11 /ppm/vendor/react/http/src/Middleware/RequestBodyBufferMiddleware.php(44): React\Http\Io\MiddlewareRunner->React\Http\Io\{closure}(Object(React\Http\Io\ServerRequest))
ppm_1 | #12 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(59): React\Http\Middleware\RequestBodyBufferMiddleware->__invoke(Object(React\Http\Io\ServerRequest), Object(Closure))
ppm_1 | #13 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(54): React\Http\Io\MiddlewareRunner->call(Object(React\Http\Io\ServerRequest), 1)
ppm_1 | #14 /ppm/vendor/react/http/src/Middleware/LimitConcurrentRequestsMiddleware.php(91): React\Http\Io\MiddlewareRunner->React\Http\Io\{closure}(Object(React\Http\Io\ServerRequest))
ppm_1 | #15 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(59): React\Http\Middleware\LimitConcurrentRequestsMiddleware->__invoke(Object(React\Http\Io\ServerRequest), Object(Closure))
ppm_1 | #16 /ppm/vendor/react/http/src/Io/MiddlewareRunner.php(40): React\Http\Io\MiddlewareRunner->call(Object(React\Http\Io\ServerRequest), 0)
ppm_1 | #17 /ppm/vendor/react/http/src/StreamingServer.php(188): React\Http\Io\MiddlewareRunner->__invoke(Object(React\Http\Io\ServerRequest))
ppm_1 | #18 /ppm/vendor/react/http/src/StreamingServer.php(116): React\Http\StreamingServer->handleRequest(Object(React\Socket\Connection), Object(React\Http\Io\ServerRequest))
ppm_1 | #19 /ppm/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): React\Http\StreamingServer->React\Http\{closure}(Object(React\Http\Io\ServerRequest), Object(React\Socket\Connection))
ppm_1 | #20 /ppm/vendor/react/http/src/Io/RequestHeaderParser.php(96): Evenement\EventEmitter->emit('headers', Array)
ppm_1 | #21 /ppm/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): React\Http\Io\RequestHeaderParser->React\Http\Io\{closure}('GET / HTTP/1.0\r...')
ppm_1 | #22 /ppm/vendor/react/stream/src/Util.php(71): Evenement\EventEmitter->emit('data', Array)
ppm_1 | #23 /ppm/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): React\Stream\Util::React\Stream\{closure}('GET / HTTP/1.0\r...')
ppm_1 | #24 /ppm/vendor/react/stream/src/DuplexResourceStream.php(193): Evenement\EventEmitter->emit('data', Array)
ppm_1 | #25 /ppm/vendor/react/event-loop/src/StreamSelectLoop.php(245): React\Stream\DuplexResourceStream->handleData(Resource id #101)
ppm_1 | #26 /ppm/vendor/react/event-loop/src/StreamSelectLoop.php(212): React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL)
ppm_1 | #27 /ppm/vendor/php-pm/php-pm/src/ProcessSlave.php(356): React\EventLoop\StreamSelectLoop->run()
ppm_1 | #28 /tmp/dbgJJInoG(36): PHPPM\ProcessSlave->run()
ppm_1 | #29 {main}
ppm_1 | User Deprecated: Since symfony/dotenv 5.1: Passing a boolean to the constructor of "Symfony\Component\Dotenv\Dotenv" is deprecated, use "Dotenv::usePutenv()".
My docker-compose.yml
# ...
services:
# ...
ppm:
image: phppm/nginx
command: --debug=1 --app-env=dev --static-directory=public/ --bootstrap=symfony
volumes:
- ./:/var/www:ro
ports:
- 80:80
PS: It does work on Symfony 5.0 with debug = 0. When debug = 1 here is the error message:
ppm_1 | /var/www
ppm_1 | +---------------------+-------------------+
ppm_1 | | bridge | HttpKernel |
ppm_1 | | host | 127.0.0.1 |
ppm_1 | | port | 8080 |
ppm_1 | | workers | 8 |
ppm_1 | | app-env | dev |
ppm_1 | | debug | 1 |
ppm_1 | | logging | 1 |
ppm_1 | | static-directory | public/ |
ppm_1 | | bootstrap | symfony |
ppm_1 | | max-requests | 1000 |
ppm_1 | | max-execution-time | 30 |
ppm_1 | | memory-limit | -1 |
ppm_1 | | ttl | 0 |
ppm_1 | | populate-server-var | 1 |
ppm_1 | | socket-path | /ppm/run |
ppm_1 | | pidfile | /ppm/ppm.pid |
ppm_1 | | reload-timeout | 30 |
ppm_1 | | cgi-path | /usr/bin/php-cgi7 |
ppm_1 | +---------------------+-------------------+
ppm_1 | Starting PHP-PM with 8 workers, using StreamSelectLoop ...
ppm_1 | --- Worker 5502 stderr ---
ppm_1 | Uncaught Warning: get_class() expects parameter 1 to be object, null given
ppm_1 |
ppm_1 | Application bootstrap failed. We are entering emergency mode now. All offline. Waiting for file changes ...
Hi @Lenny4, that's weird, I use It normally with symfony 5.1. I suspect the problem is that the docker image is quite old...
maybe @andig can help us here. @andig do you know when does the public Docker image get updated?
I see that the image was updated 7 months ago (https://hub.docker.com/r/phppm/ppm/), when we still had no compatibility with SF 5.1
Hi @acasademont , Do you suggest that I build my own image ?
That's what I do, yes, with the "bin/ppm" command it should be fairly easy and probably you also want to bundle other stuff with that docker image. Still, the public images should be updated from time to time :D
Seems I have docker access. Just need to find some time.
this could probably be done through a GH action too so that we don't have to do it manually
Do you have documentation on how to use this bin/ppm ?
Ok I found the documentation : https://github.com/php-pm/php-pm/wiki/Use-without-Docker
this could probably be done through a GH action too so that we don't have to do it manually
Yes, absolutely. I have no idea though how to trigger an action in one repo dpeending on a tagged release in another. Might be easiest to set this up as cron build.
Updated:
VERSION=^2.1 HTTP_VERSION=^2 make
...but still php7, composer1.9
Hi @Lenny4 could you give the Docker image a try again? It should now work on SF 5.1 without problems
@acasademont
$ docker rm -vf $(docker ps -a -q)
$ docker-compose up --build
ppm_1 | /var/www
ppm_1 | +---------------------+-------------------+
ppm_1 | | bridge | HttpKernel |
ppm_1 | | host | 127.0.0.1 |
ppm_1 | | port | 8080 |
ppm_1 | | workers | 8 |
ppm_1 | | app-env | dev |
ppm_1 | | debug | 1 |
ppm_1 | | logging | 1 |
ppm_1 | | static-directory | public/ |
ppm_1 | | bootstrap | symfony |
ppm_1 | | max-requests | 1000 |
ppm_1 | | max-execution-time | 30 |
ppm_1 | | memory-limit | -1 |
ppm_1 | | ttl | 0 |
ppm_1 | | populate-server-var | 1 |
ppm_1 | | socket-path | /ppm/run |
ppm_1 | | pidfile | /ppm/ppm.pid |
ppm_1 | | reload-timeout | 30 |
ppm_1 | | cgi-path | /usr/bin/php-cgi7 |
ppm_1 | +---------------------+-------------------+
ppm_1 | Starting PHP-PM with 8 workers, using StreamSelectLoop ...
ppm_1 | --- Worker 5505 stderr ---
ppm_1 | User Deprecated: Since symfony/dotenv 5.1: Passing a boolean to the constructor of "Symfony\Component\Dotenv\Dotenv" is deprecated, use "Dotenv::usePutenv()".
ppm:
image: phppm/nginx:latest
command: --debug=1 --app-env=dev --static-directory=public/ --bootstrap=symfony
volumes:
- ./:/var/www
ports:
- 7080:80