All Projects → david-hernandez → composer-tutorial

david-hernandez / composer-tutorial

Licence: other
A walk through of various Composer tasks

Projects that are alternatives of or similar to composer-tutorial

drupal8-composer-template
Project template for Drupal 8 projects with composer | Quick installation via "composer create-project woprrr/drupal8-composer-template:8.3.0"
Stars: ✭ 27 (-32.5%)
Mutual labels:  drupal, drupal-8
DrupalDriver
A collection of drivers for controlling Drupal.
Stars: ✭ 64 (+60%)
Mutual labels:  drupal, drupal-8
shila-drupal-theme
Atomic design and Pattern Lab friendly, component-based, fairly unopinionated starting point for new Drupal themes
Stars: ✭ 81 (+102.5%)
Mutual labels:  drupal, drupal-8
DrupalTwigFood
Useful functions, filters for twig @ Drupal 8
Stars: ✭ 1 (-97.5%)
Mutual labels:  drupal, drupal-8
drupal-jsonapi-params
A package to manage json-api params
Stars: ✭ 42 (+5%)
Mutual labels:  drupal, drupal-8
distros.bid
A saas to create drupal websites in seconds using docker containers.
Stars: ✭ 16 (-60%)
Mutual labels:  drupal, drupal-8
dkan2
Deprecated: please use the 2.x branch of the dkan repo
Stars: ✭ 17 (-57.5%)
Mutual labels:  drupal, drupal-8
gatsby-drupal-kit
A Gatsby V2 starter kit designed to work with a new Drupal 8 site.
Stars: ✭ 23 (-42.5%)
Mutual labels:  drupal, drupal-8
docker-drupal
Docker scaffolding for Drupal 8
Stars: ✭ 41 (+2.5%)
Mutual labels:  drupal, drupal-8
varbase
Built using Drupal 8/9, an enterprise website builder platform that combines powerful editorial features, mobile, lead-generation, SEO, social media integration, and beautiful bespoke designs. Varbase is packed with adaptive functionalities and essential modules.
Stars: ✭ 75 (+87.5%)
Mutual labels:  drupal, drupal-8
drupal-react-image-gallery
Drupal 8 module that provides a dynamic Image Gallery based on the react-image-gallery component.
Stars: ✭ 13 (-67.5%)
Mutual labels:  drupal, drupal-8
fractal-twig-drupal-adapter
Twig template adapter for Fractal with Drupal 8 directives.
Stars: ✭ 13 (-67.5%)
Mutual labels:  drupal, drupal-8
apigee-devportal-kickstart-drupal
A fast demo and starting point for Apigee Developer Portals for Drupal
Stars: ✭ 21 (-47.5%)
Mutual labels:  drupal, drupal-8
drupal8-oop
Tutorial for object-oriented programming fundamentals in PHP
Stars: ✭ 37 (-7.5%)
Mutual labels:  drupal, drupal-8
drupal8-vagrant
Simple Drupal 8 Development Environment
Stars: ✭ 59 (+47.5%)
Mutual labels:  drupal, drupal-8
migrate source example
Example module for Drupal 8 that provides migrations of users, terms, files and nodes from database, JSON resources, CSV and XML files. #migrate
Stars: ✭ 39 (-2.5%)
Mutual labels:  drupal, drupal-8
drupal-composer-init
Initialise a Drupal composer setup
Stars: ✭ 43 (+7.5%)
Mutual labels:  drupal, drupal-8
drupal8-employee-crud-module
No description or website provided.
Stars: ✭ 16 (-60%)
Mutual labels:  drupal, drupal-8
drupal-circleci-behat
Test and deploy Drupal 9 with CircleCI 2.0 and Behat 3
Stars: ✭ 17 (-57.5%)
Mutual labels:  drupal, drupal-8
apigee-api-catalog-drupal
Manage your API catalog within Drupal's content management approach
Stars: ✭ 17 (-57.5%)
Mutual labels:  drupal, drupal-8

Composer Tutorial

A walk through of various Composer tasks.

Composer is a dependency manager for PHP. It downloads public PHP packages (projects, libraries, etc) from Packagist.org.

Each step in this tutorial goes over basic Composer usage. The composer.json files in each directory should be usable, and each directory will have a README file explaining the concepts and commands for that step.

If you find any mistakes, please open an issue or create a pull request. Don't assume I know what I'm doing.™

Background

The steps in this tutorial are based on building a Drupal 8 project with Composer, since that was the original motivation for the tutorial. However, most of what is explained is specific to Composer, not Drupal, so the information should still be relevant to any PHP project. And since the Drupal 8 use-case is more complex than simple "Hello, World!" functionality, it shows some of Composer's possibilities.

Before Starting

You need to have Composer installed. This will vary based on operating system. See the Composer docs for instructions.

https://getcomposer.org/doc/00-intro.md

It is important to note that the PHP version you use can matter. Composer uses whichever version your command line uses. Run php -v to see which version you have. And, be consistent with your project. If your application and web server will use PHP 7, upgrade your command line to use 7, as well.

Using the composer Command

In this tutorial, all commands begin with the composer command. If this does not work for you, you many have to manually setup an alias or move Composer's .phar file. Composer's installation instructions, linked above, walk you through that process.

Terminology

There are two terms that cause some confusion and sometimes are used interchangeably - package and project. In this guide, package refers to anything Composer downloads. A PHP library, project, etc. Project refers to the project you are building.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].