Skip to main content
John Brandenburg

Main navigation

  • Home
  • About Me
  • Tech
  • Voting Rights
    • Close Polling Stations:
    • Reject Absentee Ballots
    • 482,000 de-registered voters in Wisconsin since 2016
    • Deceptive Practices by poll workers
    • Gerrymandering
    • Lack of Early Voting
    • Purge Voters
    • Removing Voting Rights from Former Felons
    • Unreliable Voting Equipment
    • Voter ID Laws
User account menu
  • Log in

Breadcrumb

  1. Home

Converting to a composer-based workflow in D8

By John, 16 June, 2018

I was recently inspired by Jeff Geerling's blog post on the subject of taking a Drupal 8 project, not using composer to managed dependencies, and moving it to doing so. His blog post is a good read.

I wanted to do the same thing, but for more complex code-base. Ultimately, this sounds like a very tedious process. But at least there does seem to be some attempts to make this a more simple one. https://packagist.org/packages/grasmash/composerize-drupal, and https://docs.drupalconsole.com/en/commands/composerize.html. But I decided to try to roll my own instead. 

I give you Composer Converter! Ok, this is just an extremely rough attempt to parse the output of $ drush pml and turn that into a script of a bunch of composer require commands.  

One gotchya is it ending up setting dependencies of sub-modules in your root composer.json (rh_node). This can be especially problematic when later trying to update modules that have some false dependencies set in them.

RSS feed
Powered by Drupal