Skip to content

My deploy of symfony stopped to work #47257

Answered by derrabus
mklemarczyk asked this question in Q&A
Discussion options

You must be logged in to vote

The expose of composer.json and composer.lock can be seen as a security risk.

Deploying them does not mean exposing them. Those files should not be placed in your webroot. And neither should your framework configuration, your vendor directory or your src folder. In fact, composer.json and composer.lock don't contain any information that could not be reconstructed from the vendor directory, so not deploying them because security is kinda pointless.

That being said, if you still don't want to deploy them, override the getProjectDir() method of your kernel to fix your problem. It's probably a good idea to do so either way.

Replies: 1 suggested answer 1 reply

Comment options

You must be logged in to vote
1 reply
@mklemarczyk
Comment options

Answer selected by lyrixx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #47256 on August 11, 2022 18:07.