Big Bytes

Introduction to Drupal 8 and Composer

We’re making a new site based on Drupal 8. This site needs to display addresses, and some quick research leads us to the Address module. However, after downloading and trying to enable Address, we get the following message: Address requires the commerceguys/addressing library.

In the old days a requirement like this would be satisfied by manually downloading and extracting the library into sites/all/libraries/addressing. Nowadays that’s no longer possible, PHP libraries must be installed using Composer. Composer is a tool for managing dependencies on the project level, a project being your site or web application.

Due to its power, more and more modules are choosing to separate pieces of their logic into separate packages that can be used by the wider PHP community. They’re also choosing to depend on other people’s libraries in order to reduce their own workload. There is also no doubt that Composer will replace Drush Make, and make itself the preferred way of assembling sites. Advanced Drupal hosting services like Platform.sh (wink wink) already support it.

How to install composer in Linux?

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

php composer-setup.php
php -r "unlink('composer-setup.php');"
chmod +x composer.phar
mv composer.phar /usr/local/bin/composer
mv composer.phar /usr/bin/composer

Leave a Reply

You may also like:

Corruption Entertainment Law / Legal Lifestyle People Software Technology Telecom

Beware of Mobile Malware / Spyware behind those fancy apps / gadgets!

Corporate governments, security experts and officials remain in support of mass, warrant-less surveillance. But civil libertarians, humane technology companies and others oppose it, noting obvious lack of transparency and espionage to save crooks / cronies. As a cheap smartphone user, you don’t have to worry for Malware / Spyware / Virus, just buy antidotes. You […]

Read More
Corruption Law / Legal Lifestyle Software Startup Technology Telecom

FAANG & Co force-feeding ads & sermons based on big data theft via mobile apps

Chanakya’s political parties were abusing social media marketing for bumper votes and sponsored branding, now the same so-called tech innovation balloons are haunting and fighting back for long-term continuity and its ROI capitalism. Ironic all-round abuse of 99% social slaves

Read More
Health Lifestyle Media / PR People Technology

Coronavirus threat – safety first!

We believe this is a moment to use all of our creative people power to fight for a just, people-centered transition away from the systems behind these crises we face. This is not the moment to protest in the streets, nor the time to gather in-person in large groups for actions and mobilizations.

Read More