I have a main database, where I have a table with connections to 2 databases (user, password, db name). Each authenticated user has own connections. I put in doctrine config file all connections and add wrapper classes for dynamic connections. Using this answer dynamic connections my connections works. But when I am trying to make migrations or some another command from console for example
php bin/console doctrine:migrations:diff --em=dynamic_connection_em_name_here
I've got an error with session You have to inject into valid context first. How to repair this error when using console commands or may be there is another solution?