GoComposer is an all in one solution to update existing Drupal 8 sites to the latest Fully Composer Managed template. It takes the template found in drupal-project and automagically applies it to ypur site.
Just add the GoComposer Plug-in to your project, invoke one command and let this Plug-in do the rest...
The aim of this Plug-in is to morph all drupal 8 installation into a universal defualt template.
Having your Drupal 8 installation modified to this template will simplify future Drupal 8 Core & Contrib Modules updates. It's highly recommended you switch to this template
If you current Project is a Drupal 8 site with one of the following Scenarios, then GoComposer is your one stop solution:
- Scenario 1: You have installed your site initially through Composer using the
- Scenario 2: You have installed your site initially from a
- Scenario 3: You have installed your site using
git clonefrom the
- It's highly recommended to implement this update on your local environment then update your production site
- You have to have access to the bash shell command line to run this Plug-in. On Mac just use
Terminal. On Windows 10, it's recomended to install the Ubuntu Bash shell
gocomposer Command will automate the process of Updating your existing custom site to the latest and greatest Drupal 8 version.
The 'gocomposer' Command will do the following:
Backup Your Existing Site files and Database and place them in the newly created
backupfolder at your Project Root.
Download the latest template from the drupal-project, Place it in a temporary folder
template.composer.jsonwhich is then populated with your existing site dependencies and then save it as your new
composer.jsonfile in your project root
Modify your whole sites folder structure to the new format. Moving the following directories to the new
Contrib Modulesto the latest current version while preserving your existing project dependencies.
Automatically save your Current environment variables to
.envin the Project root outside the
/webdocroot for increased security and future compatibility.
Automatically update your
settings.phpto pull in the Environment Variables from the
.envfile created above. The old
setting.phpfile will be saved as
settings_orig.phpin your project root.
Drupal Scaffoldingfiles such as
robots.txt, etc to the latest version.
Runs final clean up scripts that finalize the modifications including updating your database.
cd path/to/drupal/project/repo composer require webkings-ca/gocomposer:dev-master
cd path/to/drupal/project/repo composer require webkings-ca/gocomposer:dev-master composer gocomposer
Make sure you are in the Drupal root directory of your project, where
.git is located.
# Drupal Root is located in a `~/Sites/Drupal8project` subdirectory. cd ~/Sites/Drupal8project composer require webkings-ca/gocomposer:dev-master composer gocomposer
You can watch a demo for using this Plug-in here
Final Folder Structure
After Running GoComposer your site structure will be:
If you are unable to require
webkings-ca/gocomposerdue to your current Configuration try the following:
# Drupal Root is located in a `~/Sites/Drupal8project` subdirectory. cd ~/Sites/Drupal8project rm -rf vendor composer require webkings-ca/gocomposer:dev-master composer gocomposer
Should you encounter any issues, Create an issue in the issue queue
This project's code base template is taken from composerize-drupal plugin. It has been heavily modified to implement it's current functionality.