All Projects → drupal-composer → Drupal Project

drupal-composer / Drupal Project

Licence: gpl-2.0
🚀 Composer template for Drupal projects. Quick installation via "composer create-project drupal-composer/drupal-project"

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Drupal Project

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 (-98.2%)
Mutual labels:  composer, drupal
Beetbox
Pre-provisioned L*MP stack
Stars: ✭ 94 (-93.74%)
Mutual labels:  drupal, composer
Lightning Project
A Composer-based installer for the Lightning distribution of Drupal 8.
Stars: ✭ 137 (-90.88%)
Mutual labels:  drupal, composer
drupal-dev-docker
An opinionated Drupal development environment based on Docker.
Stars: ✭ 22 (-98.54%)
Mutual labels:  composer, drupal
drevops
💧 + 🐳 + ✓✓✓ + 🤖 + ❤️ Build, Test, Deploy scripts for Drupal using Docker and CI/CD
Stars: ✭ 55 (-96.34%)
Mutual labels:  composer, drupal
terminus-pancakes-plugin
Terminus Plugin to open Pantheon Site Databases in your Favorite SQL Client
Stars: ✭ 22 (-98.54%)
Mutual labels:  composer, drupal
docker-drupal
Docker scaffolding for Drupal 8
Stars: ✭ 41 (-97.27%)
Mutual labels:  composer, drupal
Hookphp
HookPHP基于C扩展搭建内置AI编程的架构系统-支持微服务部署|热插拔业务组件-集成业务模型|权限模型|UI组件库|多模板|多平台|多域名|多终端|多语言-含常驻内存|前后分离|API平台|LUA QQ群:679116380
Stars: ✭ 575 (-61.72%)
Mutual labels:  drupal, composer
Satis Server
🐳 Private, self-hosted Composer/Satis repository with unlimited private and open-source packages and support for Git, Mercurial, and Subversion. HTTP API, HTTPs support, webhook handler, scheduled builds, Slack and HipChat integration.
Stars: ✭ 96 (-93.61%)
Mutual labels:  composer
Docker Satis
Docker image to run Satis (private packagist) with Satisfy User Interface. Crontab and manual build possibility
Stars: ✭ 105 (-93.01%)
Mutual labels:  composer
Algorithm Php
🍭🍭uniting the internal work in a way that is in PHP
Stars: ✭ 1,337 (-10.99%)
Mutual labels:  composer
Thumbnail
Thumbnail for a given video using FFMpeg
Stars: ✭ 96 (-93.61%)
Mutual labels:  composer
Thunder Distribution
A Drupal 8 based platform for professional publishers
Stars: ✭ 107 (-92.88%)
Mutual labels:  drupal
Composer Sample Applications
⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
Stars: ✭ 110 (-92.68%)
Mutual labels:  composer
Wordpress
Automatically updated WordPress composer package
Stars: ✭ 94 (-93.74%)
Mutual labels:  composer
Restler
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API
Stars: ✭ 1,324 (-11.85%)
Mutual labels:  composer
Slightphp
SlightPHP 高效的PHP敏捷开发框架
Stars: ✭ 110 (-92.68%)
Mutual labels:  composer
Webroot Installer
Composer Installer for packages that live in the webroot of a project.
Stars: ✭ 109 (-92.74%)
Mutual labels:  composer
Phpvms
virtual airline management
Stars: ✭ 102 (-93.21%)
Mutual labels:  composer
Linkphp
基于swoole一款高性能多进程常驻内存型全栈框架,内置WebSocket服务器、服务治理PhpRpc功能,不依赖传统的 PHP-FPM,可以用于构建高性能的Web系统、API、中间件、基础服务等等。
Stars: ✭ 101 (-93.28%)
Mutual labels:  composer

Composer template for Drupal projects

CI

This project template provides a starter kit for managing your site dependencies with Composer.

Usage

First you need to install Composer.

Note: The instructions below refer to the global Composer installation. You might need to replace composer with php composer.phar (or similar) for your setup.

After that you can create the project:

composer create-project drupal-composer/drupal-project:9.x-dev some-dir --no-interaction

With composer require ... you can download new dependencies to your installation.

cd some-dir
composer require drupal/devel

The composer create-project command passes ownership of all files to the project that is created. You should create a new Git repository, and commit all files not excluded by the .gitignore file.

What does the template do?

When installing the given composer.json some tasks are taken care of:

  • Drupal will be installed in the web-directory.
  • Autoloader is implemented to use the generated composer autoloader in vendor/autoload.php, instead of the one provided by Drupal (web/vendor/autoload.php).
  • Modules (packages of type drupal-module) will be placed in web/modules/contrib/
  • Theme (packages of type drupal-theme) will be placed in web/themes/contrib/
  • Profiles (packages of type drupal-profile) will be placed in web/profiles/contrib/
  • Creates default writable versions of settings.php and services.yml.
  • Creates web/sites/default/files-directory.
  • Latest version of drush is installed locally for use at vendor/bin/drush.
  • Latest version of DrupalConsole is installed locally for use at vendor/bin/drupal.
  • Creates environment variables based on your .env file. See .env.example.

Updating Drupal Core

This project will attempt to keep all of your Drupal Core files up-to-date; the project drupal/core-composer-scaffold is used to ensure that your scaffold files are updated every time drupal/core is updated. If you customize any of the "scaffolding" files (commonly .htaccess), you may need to merge conflicts if any of your modified files are updated in a new release of Drupal core.

Follow the steps below to update your core files.

  1. Run composer update "drupal/core-*" --with-dependencies to update Drupal Core and its dependencies.
  2. Run git diff to determine if any of the scaffolding files have changed. Review the files for any changes and restore any customizations to .htaccess or robots.txt.
  3. Commit everything all together in a single commit, so web will remain in sync with the core when checking out branches or running git bisect.
  4. In the event that there are non-trivial conflicts in step 2, you may wish to perform these steps on a branch, and use git merge to combine the updated core files with your customized files. This facilitates the use of a three-way merge tool such as kdiff3. This setup is not necessary if your changes are simple; keeping all of your modifications at the beginning or end of the file is a good strategy to keep merges easy.

FAQ

Should I commit the contrib modules I download?

Composer recommends no. They provide argumentation against but also workrounds if a project decides to do it anyway.

Should I commit the scaffolding files?

The Drupal Composer Scaffold plugin can download the scaffold files (like index.php, update.php, …) to the web/ directory of your project. If you have not customized those files you could choose to not check them into your version control system (e.g. git). If that is the case for your project it might be convenient to automatically run the drupal-scaffold plugin after every install or update of your project. You can achieve that by registering @composer drupal:scaffold as post-install and post-update command in your composer.json:

"scripts": {
    "post-install-cmd": [
        "@composer drupal:scaffold",
        "..."
    ],
    "post-update-cmd": [
        "@composer drupal:scaffold",
        "..."
    ]
},

How can I apply patches to downloaded modules?

If you need to apply patches (depending on the project being modified, a pull request is often a better solution), you can do so with the composer-patches plugin.

To add a patch to drupal module foobar insert the patches section in the extra section of composer.json:

"extra": {
    "patches": {
        "drupal/foobar": {
            "Patch description": "URL or local path to patch"
        }
    }
}

How do I specify a PHP version ?

This project supports PHP 7.3 as minimum version (see Environment requirements of Drupal 9), however it's possible that a composer update will upgrade some package that will then require PHP 7.3+.

To prevent this you can add this code to specify the PHP version you want to use in the config section of composer.json:

"config": {
    "sort-packages": true,
    "platform": {
        "php": "7.3.19"
    }
},
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].