Symfony Flex is a Composer plugin that helps developers install and manage Symfony applications, from the most simple micro-style projects to the more complex ones with dozens of dependencies. It replaces and improves the Symfony Installer and the Symfony Standard Edition, automating the most common tasks of Symfony applications, like installing and removing bundles and other Composer dependencies. Flex works for Symfony 3.3 and higher.
Questions tagged [symfony-flex]
87 questions
40
votes
1 answer
Symfony Flex: What does symfony.lock file do?
After installing symfony/serializer I recognized that my symfony.lock file got changed:
diff --git a/symfony.lock b/symfony.lock
index ba6e23f..bfc391e 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -301,5 +301,8 @@
},
"symfony/asset": {
…

Chrisissorry
- 1,434
- 2
- 22
- 43
26
votes
5 answers
Symfony 4 - Service removed or inlined though it is public
I'm trying to migrate a SF 3.3 app to SF 4 with its new directory structure and everything.
I'm struggling on this exception:
The "simplethings_entityaudit.reader" service or alias has been removed or inlined when the container was compiled. You…

Ben
- 845
- 1
- 8
- 18
16
votes
1 answer
How write a Symfony Flex recipe for a new bundle?
I tried to find any documentation about using Symfony Flex but so far no luck.
Almost all docs point to installing a bundle that uses symfony Flex, not how to create a bundle that is using it.
I even tried to reverse engineer some of the packages…

HubertNNN
- 1,727
- 1
- 14
- 29
12
votes
4 answers
sh: symfony-cmd: command not found
I have downgraded a Symfony 5.2 app template to use Symfony 4.4 in order to allow the use of some libraries that require an older version of Symfony. The problem is that when I do composer install, I get this error near the end of the…

Mayor of the Plattenbaus
- 974
- 3
- 34
- 69
11
votes
2 answers
Deploying to a production environment with Symfony Flex and --no-dev
I have a couple of large Symfony projects, and have noticed that after updating everything to Symfony 4 (Flex), when our deployment automation runs its normal process of:
composer install --no-dev
We end up with (for example) this:
Symfony…

futureal
- 3,025
- 1
- 22
- 33
10
votes
1 answer
Error with Symfony Flex: You have misconfigured DNS resolver(s)
When I run the command composer install or composer update it shows me the following
The following exception probably indicates you have misconfigured DNS resolver(s)
…

AdamOmv
- 101
- 1
- 1
- 4
9
votes
1 answer
symfony/profiler-pack is being removed right after installation
I have created a project using command composer create-project symfony/website-skeleton my_project_name
I want to install symfony/profiler-pack. Why? Because of that there is no "Debug" tab in the profiler.
I have tried using composer require --dev…

Tarasovych
- 2,228
- 3
- 19
- 51
9
votes
2 answers
How can I retrieve my environment variables in a parameter file in Symfony4 structure?
I did a fresh Symfony installation by using Symfony Flex and the new skeleton belong to the next Symfony 4 directory structure.
I add and configure a first third-party bundle : HWIOAuthBundle. This bundle is used to connect via Twitter using two…

Alexandre Tranchant
- 4,426
- 4
- 43
- 70
8
votes
1 answer
file_put_contents(/root/.composer/cache/repo/https---flex.symfony.com/): failed to open stream: Is a directory error
I build my symfony 4 application with composer install inside docker container.
Composer version 1.10.19
But i got this error.
[ErrorException]
file_put_contents(/root/.composer/cache/repo/https---flex.symfony.com/): failed to open stream: Is a…

rmznbyk 1
- 1,104
- 2
- 13
- 27
8
votes
2 answers
phpstan complains about Doctrine Migrations in Symfony 3.4 with Flex project
I have a project built on Symfony 3.4 with Flex and I've added phpstan to it for static analysis.
It is complaining about not finding my migration classes:
Class DoctrineMigrations\Version20180831185050 was not found while trying to analyse it -…

Radu C
- 1,340
- 13
- 31
7
votes
1 answer
monolog sending old logs
W have web-app, built with symfony-flex. For deployment, I am using capistrano. For logging critical logs, I have configured monolog in this way:
monolog:
handlers:
main:
type: fingers_crossed
action_level:…

kRicha
- 797
- 9
- 27
7
votes
1 answer
Should I keep symfony.lock in my version control?
I'm starting to use Symfony Flex to bootstrap my project and I realized that running composer install for the first time generates a file named symfony.lock for which I could find no documentation.
What does this file do? Should I keep it in my…

Loupax
- 4,728
- 6
- 41
- 68
7
votes
4 answers
More than one application per project repository with Symfony 4
I have three old applications (running on Symfony 2) where each one has been developed in separated git repositories and configured in their respective vhosts:
company.com Company website.
admin.company.com Website administration.
api.company.com…
user8020553
6
votes
6 answers
Symfony 4 Doctrine not working from console [2002] No such file or directory
I´m working with symfony 4 and this error ocurr when runnning doctrine console commands:
In AbstractMySQLDriver.php line 108:
An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory
I think this is because there´s…

Samuel S. Salazar
- 93
- 1
- 1
- 7
5
votes
2 answers
How to generate a private recipe JSON from the contents of a recipe directory?
I've developed a Symfony bundle, and I am trying to create a recipe. Before submitting it to recipes-contrib, I want to test it, so I followed the instructions for private recipes -- not because I want a private recipe (that is, neither the bundle…

Tac Tacelosky
- 3,165
- 3
- 27
- 28