Managing Files With Composer

Submitted by Mile23 on Sun, 09/12/2021 - 12:37

Did you ever think, "Hey, I should be able to use Composer to move arbitrary files around in my codebase. I wonder why they didn't put that into Composer? Now I have to write a bash script..."?

Well guess what. You don't have to write that bash script.

You can configure Composer to manage files within your codebase. We'll use the Drupal Composer Scaffold plugin to do it. The obvious advantage here (other than not needing a bash script) is that the configuration is stored within composer.json, and thus, also your version control.

How I Updated This Site To Drupal 8.8.0 With Composer

Submitted by Mile23 on Wed, 12/11/2019 - 13:04

Hey, Drupal 8.8.0 has a defined Composer behavior!

That's right, Drupal 8.8.0 is Composer-first. That means you can build it from an official, signed-off-by-maintainers type Composer project template. You can do this:

$ composer create-project drupal/recommended-project:^8.8.0 my_web_directory

This is a big deal because previously you had to use a third-party Composer project template to be able to build a codebase that didn't completely misunderstand you when you subsequently typed:

How Do You Solve A Problem Like Composer?

Submitted by Mile23 on Sun, 09/24/2017 - 19:37

A Diverse Drupal Community Needs Composer

The Drupal community has been trying to come to terms with modern build tools for a while.

We have Drupal core which is managed with Composer, but we also have contrib modules and some of them want to use Composer, too.

The canonical example is Address module. It requires an external PHP library, necessitating the use of Composer to add it to the codebase.

At least, that's the thought.

I Humbly Offer A Drupal 8.1.x Development Process

Submitted by Mile23 on Sun, 11/01/2015 - 21:32

Goals:

Here are some ideals I'd like to see in Drupal core development:

  • There is a process by which the quality of Drupal can improve.
  • Non-coders can participate in planning.
  • Maintainers have a well-understood reason for saying, "No."
  • Everyone can do a better job of estimating their real level of participation in core development.
  • Time is structured such that we respect the time and effort of others.

I want to talk about that last one: Everyone's time and effort is valued.

Drush, The Tool You Love But Hate To Manage

Submitted by Mile23 on Thu, 07/30/2015 - 09:52

You need Drush.

I need Drush to work on Pantheon. Pantheon's documentation states that they only support Drush 5, and since it's not my data I'm managing but my clients', that's what I have to use.

In fact, it's annoying to work with Drush. That is, the magic stuff it does when you use it isn't annoying and is quite useful. But keeping all the versions you need for all the different use-cases is what's quite annoying.