-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Cookbook] Add warning about Composer dev deps on Heroku #5078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bicpi
commented
Mar 12, 2015
Q | A |
---|---|
Doc fix? | no |
New docs? | no |
Applies to | all |
Fixed tickets | #4217 (partly) |
Be aware that dependencies from ``composer.json`` listed in ``require-dev`` | ||
are never installed during a deploy on Heroku. This may cause problems if your | ||
Symfony environment relies on such packages. For instance, the ``dev`` | ||
environment of the Symfony Standard Edition loads the SensioGeneratorBundle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there actually any use case where you run a Symfony application in dev mode on Heroku?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I was running into this when I first tried to deploy Symfony to Heroku as there was no best practice to set SYMFONY_ENV
=prod
and the solution for solving this issue was to move the SensioGeneratorBundle to Composer's require
list. No wondering if it makes sense to deploy dev
;-) So this caution note may clarifies why things do not work in dev
if someone forgets to set SYMFONY_ENV
=prod
.
On the other hand, if you need some node packages for the prod
build (e.g. to compile assets) you have to move them to the dependencies
list of packages.json
because devDependencies
are not installed. Weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is usefull to have a caution about this, but I think we have to make it a bit shorter. What do you think about:
.. caution::
Be aware that dependencies from ``composer.json`` listed in the ``require-dev``
section are never installed during a deploy on Heroku. This may cause problems if
your Symfony environment relies on such packages. The solution is to move this
packages from ``require-dev`` to the ``require`` section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the short version, no need for details 👍
|
||
Be aware that dependencies from ``composer.json`` listed in the ``require-dev`` | ||
section are never installed during a deploy on Heroku. This may cause problems | ||
if your Symfony environment relies on such packages. The solution is to move this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] move these packages [...]
@bicpi I just left a final minor comment. Can you please also rebase your changes? |
@xabbuh Typo fixed, rebase done. |
Great note - thanks Philipp! |
…u (bicpi) This PR was merged into the 2.3 branch. Discussion ---------- [Cookbook] Add warning about Composer dev deps on Heroku Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | all | Fixed tickets | #4217 (partly) Commits ------- 3320b46 [Cookbook] Add warning about Composer dev deps on Heroku