Commit bfe52773 authored by Aleix Quintana Alsius's avatar Aleix Quintana Alsius

Initial commit as educoop composer project

parent cffca8d5
# Drupal editor configuration normalization
# @see http://editorconfig.org/
# This is the top-most .editorconfig file; do not search in parent directories.
root = true
# All files.
[*]
end_of_line = LF
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[composer.{json,lock}]
indent_size = 4
# Drupal git normalization
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# @see https://www.drupal.org/node/1542048
# Normally these settings would be done with macro attributes for improved
# readability and easier maintenance. However macros can only be defined at the
# repository root directory. Drupal avoids making any assumptions about where it
# is installed.
# Define text file attributes.
# - Treat them as text.
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
# - Detect whitespace errors.
# - Exposed by default in `git diff --color` on the CLI.
# - Validate with `git diff --check`.
# - Deny applying with `git apply --whitespace=error-all`.
# - Fix automatically with `git apply --whitespace=fix`.
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
# Define binary file attributes.
# - Do not treat them as text.
# - Include binary diff in patches instead of "binary files differ."
*.eot -text diff
*.exe -text diff
*.gif -text diff
*.gz -text diff
*.ico -text diff
*.jpeg -text diff
*.jpg -text diff
*.otf -text diff
*.phar -text diff
*.png -text diff
*.svgz -text diff
*.ttf -text diff
*.woff -text diff
*.woff2 -text diff
# Ignore directories generated by Composer
/drush/contrib/
/vendor/
/web/core/
/web/modules/contrib/
/web/themes/contrib/
/web/profiles/contrib/
/web/libraries/
# Ignore sensitive information
/web/sites/*/settings.php
/web/sites/*/settings.local.php
# Ignore Drupal's file directory
/web/sites/*/files/
# Ignore SimpleTest multi-site environment.
/web/sites/simpletest
# Ignore files generated by PhpStorm
/.idea/
# Ignore .env files as they are personal
/.env
# Ignore synced config until ready
/config
# Ignore whole web, as we working by modules not as whole drupal project
/web
This diff is collapsed.
# educoop
# Composer template for Educoop Drupal project
Projecte per posar tasques/incidències globals d'educoop
\ No newline at end of file
If you want to know how to use it as replacement for
[Drush Make](https://github.com/drush-ops/drush/blob/8.x/docs/make.md) visit
the [Documentation on drupal.org](https://www.drupal.org/node/2471553).
## Usage
First you need to [install composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx).
> Note: The instructions below refer to the [global composer installation](https://getcomposer.org/doc/00-intro.md#globally).
You might need to replace `composer` with `php composer.phar` (or similar)
for your setup.
Clone the repository and run:
```
composer install
```
However you also can can start with the drupal recommended-project:
```
composer create-project drupal/recommended-project my_site_name_dir
```
Then diff the recommended-project with this composer.json (specially the requires and the patches)
Then run:
```
composer update
```
With `composer require ...` you can download new dependencies to your
installation.
```
cd some-dir
composer require drupal/devel:~1.0
```
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?
https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies
## Generate composer.json from existing project
With using [the "Composer Generate" drush extension](https://www.drupal.org/project/composer_generate)
you can now generate a basic `composer.json` file from an existing project. Note
that the generated `composer.json` might differ from this project's file.
### 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](https://github.com/cweagans/composer-patches) plugin.
To add a patch to drupal module foobar insert the patches section in the extra
section of composer.json:
```json
"extra": {
"patches": {
"drupal/foobar": {
"Patch description": "URL or local path to patch"
}
}
}
```
### How do I specify a PHP version ?
Currently Drupal 8 supports PHP 5.5.9 as minimum version (see [Drupal 8 PHP requirements](https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements)), however it's possible that a `composer update` will upgrade some package that will then require PHP 7+.
To prevent this you can add this code to specify the PHP version you want to use in the `config` section of `composer.json`:
```json
"config": {
"sort-packages": true,
"platform": {"php": "5.5.9"}
},
```
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "",
"role": ""
}
],
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "composer",
"url": "https://asset-packagist.org"
}
],
"require": {
"drupal/address": "^1.7",
"drupal/address_js_geocoder": "1.x-dev",
"drupal/allowed_formats": "^1.1",
"drupal/avatar_field_formatter": "^1.2",
"drupal/bootstrap_barrio": "^4.22",
"drupal/bootstrap_sass": "^1.9",
"drupal/console": "~1.0",
"drupal/content_export_csv": "^3.0",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drupal/devel": "^2.0",
"drupal/eck": "^1.0",
"drupal/entity": "^1.0",
"drupal/entity_browser": "^2.1",
"drupal/entity_browser_table": "^1.0",
"drupal/entity_reports": "1.x-dev",
"drupal/erd": "^1.0",
"drupal/examples": "1.x-dev",
"drupal/facets": "^1.4",
"drupal/facets_block": "^1.2",
"drupal/field_group": "^3.0",
"drupal/field_group_ajaxified_multipage": "^1.0",
"drupal/filebrowser": "^2.0",
"drupal/flysystem": "^1.0",
"drupal/forms_steps": "^1.0",
"drupal/geocoder": "^3.0",
"drupal/geofield_map": "^2.26",
"drupal/geofield_mapbox_gl": "1.x-dev",
"drupal/group": "^1.0",
"drupal/group_forum": "^1.0",
"drupal/ief_table_view_mode": "^2.1",
"drupal/image_widget_crop": "^2.2",
"drupal/inline_entity_form": "^1.0",
"drupal/licenses_vocabulary": "^1.0",
"drupal/mapbox_gl": "1.x-dev",
"drupal/masquerade": "^2.0",
"drupal/matomo": "^1.9",
"drupal/md_fontello": "^1.2",
"drupal/media_library_edit": "^1.0",
"drupal/menu_per_role": "^1.2",
"drupal/node_view_permissions": "^1.2",
"drupal/oauth2_client": "2.x-dev",
"drupal/schema_metatag": "1.x-dev",
"drupal/search_api": "^1.13",
"drupal/search_api_location": "^1.0",
"drupal/search_api_page": "^1.0",
"drupal/search_api_solr": "^3.7",
"drupal/select2": "^1.1",
"drupal/taxonomy_manager": "^1.0",
"drupal/term_csv_export_import": "^3.0",
"drupal/term_merge": "^1.0",
"drupal/views_bootstrap": "^4.1",
"drupal/views_bulk_edit": "^2.4",
"drupal/views_bulk_operations": "^3.3",
"drupal/workflow_participants": "^2.4",
"drush/drush": "^9.0.0",
"geocoder-php/mapbox-provider": "^0.1",
"geocoder-php/mapquest-provider": "^4.0",
"geocoder-php/nominatim-provider": "^5.0",
"npm-asset/select2": "^4.0",
"symfony/filesystem": "~3.0",
"symfony/finder": "~3.0",
"sysmoh/nextcloud-api-wrapper": "^0.1.1"
},
"require-dev": {
"drupal/core-dev": "^8.8"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"patchLevel": {
"drupal/core": "-p2"
},
"patches": {
},
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library","type:bower-asset","type:npm-asset"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"installer-types": [ "bower-asset", "npm-asset"]
}
}
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
verbose="true"
>
<testsuites>
<testsuite name="drupal-composer-project tests">
<directory>./test/</directory>
</testsuite>
</testsuites>
</phpunit>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment