Month: February 2020

Symfony docker container don’t manage to connect to mariadb container

I’m using docker to run : Symfony image MariaDB image Here is my docker-compose.yaml file : version: ‘2’ services: myapp: image: ‘bitnami/symfony:1’ ports: – ‘8000:8000’ volumes: – ‘.:/app’ environment: – SYMFONY_PROJECT_NAME=backend – MARIADB_HOST=mariadb – MARIADB_PORT_NUMBER=3306 – MARIADB_USER=monty – MARIADB_PASSWORD=monty -…

Accept null value when passing a non existing id parameter with @ParamConverter

Is it possible to return “null” value when passing an non existing “id” in my route ? /** * @Route(“/admin/product/edit/{id}”, name=”product_edit”, methods={“POST”}) * @ParamConverter( * name=”id”, * class=”AppEntityProduct”, * options={“mapping”: {“id”: “id”}} * ) * @param Product $product * @param…

Updated symfony in composer.json, but I get an error when trying to install a new package with "require"

I upgrade Symfony to the 5.0 version. When I run the server, all is right. However, when I use composer (example composer remove tattali/calendar-bundle), I get these errors : C:cmderroadtrip>composer remove tattali/calendar-bundle Dependency “symfony/framework-bundle” is also a root requirement, but…

Database connection issue through docker containers

I have set up a dev environment with Symfony and MariaDB through docker. I’ve taken the bitman/symfony image there : https://hub.docker.com/r/bitnami/symfony This is my docker-compose.yaml version: ‘2’ services: myapp: image: ‘bitnami/symfony:1’ ports: – ‘8000:8000’ volumes: – ‘.:/app’ environment: – SYMFONY_PROJECT_NAME=backend…