Skip to content
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

Fixed composer installing non prod dependencies #22

Closed
wants to merge 1 commit into from

Conversation

amansilla
Copy link
Contributor

The composer flag --no-dev should be used in order to
avoid installing dependencies not necessaries on a production
environment.

The composer flag --no-dev should be used in order to
avoid installing dependencies not necessaries on a production
environment.
@davidalger
Copy link
Owner

@amansilla Would you agree it would make sense to case the use of this flag such that it's only set if the (currently existing) :magento_deploy_production setting is true (default value)? That way if this is used to deploy to a stage or CI server where phpunit and the like is needed, they can be used if so desired.

Currently an if fetch(:magento_deploy_production) is being used to allow disabling compilation and static asset generation.

davidalger added a commit that referenced this pull request Sep 8, 2016
PR #22

# Conflicts:
#	lib/capistrano/tasks/magento.rake
@davidalger
Copy link
Owner

@amansilla I went ahead and merged this into develop and then added a check for the aforementioned flag. This will be included in the next tagged release, which should be coming shortly.

@davidalger davidalger closed this Sep 8, 2016
@davidalger
Copy link
Owner

davidalger commented Sep 8, 2016

And a note on this… since Magento 2.0 breaks when --no-dev is specified (see magento/magento2#2561) I have implemented a check in commit f4a095e to first install the code, check the version number and then add --no-dev to the set of flags used for deployment. The end result is the same for 2.1 and later installs, but maintains compatibility with 2.0 installs.

davidalger added a commit that referenced this pull request Sep 8, 2016
This is because Magento 2.0 will not function without certain require-dev installed. So to get the best of both worlds, check the version number!!

real: #22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants