Skip to content
Commits on Source (4250)
...@@ -12,3 +12,6 @@ indent_size = 2 ...@@ -12,3 +12,6 @@ indent_size = 2
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
[composer.json]
indent_size = 4
core/assets/vendor/**/* core/assets/vendor/**/*
core/modules/locale/tests/locale_test.js core/modules/locale/tests/locale_test.js
core/vendor/**/* vendor/**/*
sites/**/files/**/* sites/**/files/**/*
libraries/**/* libraries/**/*
sites/**/libraries/**/* sites/**/libraries/**/*
profiles/**/libraries/**/* profiles/**/libraries/**/*
**/js_test_files/**/*
{ {
"env": { "extends": "./core/.eslintrc"
"browser": true
},
"globals": {
"Drupal": true,
"drupalSettings": true,
"drupalTranslations": true,
"domready": true,
"jQuery": true,
"_": true,
"matchMedia": true,
"Backbone": true,
"Modernizr": true,
"CKEDITOR": true
},
"rules": {
// Errors.
"block-scoped-var": 2,
"brace-style": [2, "stroustrup", {"allowSingleLine": true}],
"comma-style": [2, "last"],
"eqeqeq": [2, "smart"],
"guard-for-in": 2,
"indent": [2, 2, {"indentSwitchCase": true}],
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"no-implied-eval": 2,
"no-mixed-spaces-and-tabs": 2,
"no-nested-ternary": 2,
"no-reserved-keys": 2,
"no-trailing-spaces": 2,
"no-undef": 2,
"no-undefined": 2,
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
"semi": [2, "always"],
"space-after-keywords": [2, "always", {"checkFunctionKeyword": true}],
"space-before-blocks": [2, "always"],
"space-in-brackets": [2, "never"],
"space-in-parens": [2, "never"],
"spaced-line-comment": [2, "always"],
"strict": 2,
// Warnings.
"max-nested-callbacks": [1, 3],
// Disabled.
"camelcase": 0,
"consistent-return": 0,
"dot-notation": 0,
"new-cap": 0,
"no-alert": 0,
"no-new": 0,
"no-shadow": 0,
"no-underscore-dangle": 0,
"no-use-before-define": 0,
"quotes": 0
}
} }
# Drupal git normalization # Drupal git normalization
# @see http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html # @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
# @see http://drupal.org/node/1542048 # @see https://www.drupal.org/node/1542048
# Normally these settings would be done with macro attributes for improved # Normally these settings would be done with macro attributes for improved
# readability and easier maintenance. However macros can only be defined at the # readability and easier maintenance. However macros can only be defined at the
...@@ -16,27 +16,27 @@ ...@@ -16,27 +16,27 @@
# - Deny applying with `git apply --whitespace=error-all`. # - Deny applying with `git apply --whitespace=error-all`.
# - Fix automatically with `git apply --whitespace=fix`. # - Fix automatically with `git apply --whitespace=fix`.
# Auto-detect text files, ensure they use LF. *.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
* text=auto eol=lf
*.css 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 *.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 *.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 *.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.info text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.install 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 *.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 *.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 *.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 *.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 *.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 *.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 *.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 *.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 *.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 *.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.test text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php *.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 *.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 *.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 *.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
*.gif -text diff *.gif -text diff
*.gz -text diff *.gz -text diff
*.ico -text diff *.ico -text diff
*.jpeg -text diff
*.jpg -text diff *.jpg -text diff
*.png -text diff *.png -text diff
*.phar -text diff *.phar -text diff
*.exe -text diff
*.svgz -text diff
*.ttf -text diff
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Protect files and directories from prying eyes. # Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$"> <FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
<IfModule mod_authz_core.c> <IfModule mod_authz_core.c>
Require all denied Require all denied
</IfModule> </IfModule>
...@@ -15,12 +15,6 @@ ...@@ -15,12 +15,6 @@
# Don't show directory listings for URLs which map to a directory. # Don't show directory listings for URLs which map to a directory.
Options -Indexes Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Set the default handler. # Set the default handler.
DirectoryIndex index.php index.html index.htm DirectoryIndex index.php index.html index.htm
...@@ -28,17 +22,21 @@ DirectoryIndex index.php index.html index.htm ...@@ -28,17 +22,21 @@ DirectoryIndex index.php index.html index.htm
AddType image/svg+xml svg svgz AddType image/svg+xml svg svgz
AddEncoding gzip svgz AddEncoding gzip svgz
# Override PHP settings that cannot be changed at runtime. See # Most of the following PHP settings cannot be changed at runtime. See
# sites/default/default.settings.php and # sites/default/default.settings.php and
# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be # Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
# changed at runtime. # changed at runtime.
# PHP 5, Apache 1 and 2. # PHP 5, Apache 1 and 2.
<IfModule mod_php5.c> <IfModule mod_php5.c>
php_value assert.active 0
php_flag session.auto_start off php_flag session.auto_start off
php_value mbstring.http_input pass php_value mbstring.http_input pass
php_value mbstring.http_output pass php_value mbstring.http_output pass
php_flag mbstring.encoding_translation off php_flag mbstring.encoding_translation off
# PHP 5.6 has deprecated $HTTP_RAW_POST_DATA and produces warnings if this is
# not set.
php_value always_populate_raw_post_data -1
</IfModule> </IfModule>
# Requires mod_expires to be enabled. # Requires mod_expires to be enabled.
...@@ -59,6 +57,14 @@ AddEncoding gzip svgz ...@@ -59,6 +57,14 @@ AddEncoding gzip svgz
</FilesMatch> </FilesMatch>
</IfModule> </IfModule>
# Set a fallback resource if mod_rewrite is not enabled. This allows Drupal to
# work without clean URLs. This requires Apache version >= 2.2.16. If Drupal is
# not accessed by the top level URL (i.e.: http://example.com/drupal/ instead of
# http://example.com/), the path to index.php will need to be adjusted.
<IfModule !mod_rewrite.c>
FallbackResource /index.php
</IfModule>
# Various rewrite rules. # Various rewrite rules.
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
RewriteEngine on RewriteEngine on
...@@ -87,21 +93,21 @@ AddEncoding gzip svgz ...@@ -87,21 +93,21 @@ AddEncoding gzip svgz
# If you do not have mod_rewrite installed, you should remove these # If you do not have mod_rewrite installed, you should remove these
# directories from your webroot or otherwise protect them from being # directories from your webroot or otherwise protect them from being
# downloaded. # downloaded.
RewriteRule "(^|/)\." - [F] RewriteRule "(^|/)\.(?!well-known)" - [F]
# If your site can be accessed both with and without the 'www.' prefix, you # If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred # can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
# #
# To redirect all users to access the site WITH the 'www.' prefix, # To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...) # (http://example.com/foo will be redirected to http://www.example.com/foo)
# uncomment the following: # uncomment the following:
# RewriteCond %{HTTP_HOST} . # RewriteCond %{HTTP_HOST} .
# RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# #
# To redirect all users to access the site WITHOUT the 'www.' prefix, # To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...) # (http://www.example.com/foo will be redirected to http://example.com/foo)
# uncomment the following: # uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301] # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
...@@ -122,6 +128,9 @@ AddEncoding gzip svgz ...@@ -122,6 +128,9 @@ AddEncoding gzip svgz
RewriteCond %{REQUEST_URI} !core RewriteCond %{REQUEST_URI} !core
RewriteRule ^ %1/core/%2 [L,QSA,R=301] RewriteRule ^ %1/core/%2 [L,QSA,R=301]
# Rewrite install.php during installation to see if mod_rewrite is working
RewriteRule ^core/install.php core/install.php?rewrite=ok [QSA,L]
# Pass all requests not referring directly to files in the filesystem to # Pass all requests not referring directly to files in the filesystem to
# index.php. # index.php.
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
...@@ -136,14 +145,14 @@ AddEncoding gzip svgz ...@@ -136,14 +145,14 @@ AddEncoding gzip svgz
# Allow access to PHP files in /core (like authorize.php or install.php): # Allow access to PHP files in /core (like authorize.php or install.php):
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$ RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
# Allow access to test-specific PHP files: # Allow access to test-specific PHP files:
RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php$ RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php
# Allow access to Statistics module's custom front controller. # Allow access to Statistics module's custom front controller.
# Copy and adapt this rule to directly execute PHP files in contributed or # Copy and adapt this rule to directly execute PHP files in contributed or
# custom modules or to run another PHP application in the same directory. # custom modules or to run another PHP application in the same directory.
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$ RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
# Deny access to any other PHP files that do not match the rules above. # Deny access to any other PHP files that do not match the rules above.
# Specifically, disallow autoload.php from being served directly. # Specifically, disallow autoload.php from being served directly.
RewriteRule "^(.+/.*|autoload)\.php$" - [F] RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
# Rules to correctly serve gzip compressed CSS and JS files. # Rules to correctly serve gzip compressed CSS and JS files.
# Requires both mod_rewrite and mod_headers to be enabled. # Requires both mod_rewrite and mod_headers to be enabled.
...@@ -171,8 +180,10 @@ AddEncoding gzip svgz ...@@ -171,8 +180,10 @@ AddEncoding gzip svgz
</IfModule> </IfModule>
</IfModule> </IfModule>
# Add headers to all responses. # Various header fixes.
<IfModule mod_headers.c> <IfModule mod_headers.c>
# Disable content sniffing, since it's an attack vector. # Disable content sniffing, since it's an attack vector.
Header always set X-Content-Type-Options nosniff Header always set X-Content-Type-Options nosniff
# Disable Proxy header, since it's an attack vector.
RequestHeader unset Proxy
</IfModule> </IfModule>
...@@ -14,36 +14,36 @@ ABOUT DRUPAL ...@@ -14,36 +14,36 @@ ABOUT DRUPAL
Drupal is an open source content management platform supporting a variety of Drupal is an open source content management platform supporting a variety of
websites ranging from personal weblogs to large community-driven websites. For websites ranging from personal weblogs to large community-driven websites. For
more information, see the Drupal website at https://drupal.org/, and join the more information, see the Drupal website at https://www.drupal.org, and join
Drupal community at https://drupal.org/community. the Drupal community at https://www.drupal.org/community.
Legal information about Drupal: Legal information about Drupal:
* Know your rights when using Drupal: * Know your rights when using Drupal:
See LICENSE.txt in the "core" directory. See LICENSE.txt in the "core" directory.
* Learn about the Drupal trademark and logo policy: * Learn about the Drupal trademark and logo policy:
http://drupal.com/trademark https://www.drupal.com/trademark
CONFIGURATION AND FEATURES CONFIGURATION AND FEATURES
-------------------------- --------------------------
Drupal core (what you get when you download and extract a drupal-x.y.tar.gz or Drupal core (what you get when you download and extract a drupal-x.y.tar.gz or
drupal-x.y.zip file from https://drupal.org/project/drupal) has what you need to drupal-x.y.zip file from https://www.drupal.org/project/drupal) has what you
get started with your website. It includes several modules (extensions that add need to get started with your website. It includes several modules (extensions
functionality) for common website features, such as managing content, user that add functionality) for common website features, such as managing content,
accounts, image uploading, and search. Core comes with many options that allow user accounts, image uploading, and search. Core comes with many options that
site-specific configuration. In addition to the core modules, there are allow site-specific configuration. In addition to the core modules, there are
thousands of contributed modules (for functionality not included with Drupal thousands of contributed modules (for functionality not included with Drupal
core) available for download. core) available for download.
More about configuration: More about configuration:
* Install, upgrade, and maintain Drupal: * Install, update, and maintain Drupal:
See INSTALL.txt and UPGRADE.txt in the "core" directory. See INSTALL.txt and UPDATE.txt in the "core" directory.
* Learn about how to use Drupal to create your site: * Learn about how to use Drupal to create your site:
https://drupal.org/documentation https://www.drupal.org/documentation
* Follow best practices: * Follow best practices:
https://drupal.org/best-practices https://www.drupal.org/best-practices
* Download contributed modules to /modules to extend Drupal's functionality: * Download contributed modules to /modules to extend Drupal's functionality:
https://drupal.org/project/modules https://www.drupal.org/project/modules
* See also: "Developing for Drupal" for writing your own modules, below. * See also: "Developing for Drupal" for writing your own modules, below.
...@@ -68,11 +68,11 @@ the required extensions separately; place the downloaded profile in the ...@@ -68,11 +68,11 @@ the required extensions separately; place the downloaded profile in the
More about installation profiles and distributions: More about installation profiles and distributions:
* Read about the difference between installation profiles and distributions: * Read about the difference between installation profiles and distributions:
https://drupal.org/node/1089736 https://www.drupal.org/node/1089736
* Download contributed installation profiles and distributions: * Download contributed installation profiles and distributions:
https://drupal.org/project/distributions https://www.drupal.org/project/distributions
* Develop your own installation profile or distribution: * Develop your own installation profile or distribution:
https://drupal.org/developing/distributions https://www.drupal.org/developing/distributions
APPEARANCE APPEARANCE
...@@ -85,9 +85,9 @@ custom theme. ...@@ -85,9 +85,9 @@ custom theme.
More about themes: More about themes:
* Download contributed themes to /themes to modify Drupal's appearance: * Download contributed themes to /themes to modify Drupal's appearance:
https://drupal.org/project/themes https://www.drupal.org/project/themes
* Develop your own theme: * Develop your own theme:
https://drupal.org/documentation/theme https://www.drupal.org/documentation/theme
DEVELOPING FOR DRUPAL DEVELOPING FOR DRUPAL
--------------------- ---------------------
...@@ -108,13 +108,13 @@ when nothing existing comes close to what you need. ...@@ -108,13 +108,13 @@ when nothing existing comes close to what you need.
More about developing: More about developing:
* Search for existing contributed modules: * Search for existing contributed modules:
https://drupal.org/project/modules https://www.drupal.org/project/modules
* Contribute a patch: * Contribute a patch:
https://drupal.org/patch/submit https://www.drupal.org/patch/submit
* Develop your own module: * Develop your own module:
https://drupal.org/developing/modules https://www.drupal.org/developing/modules
* Follow programming best practices: * Follow programming best practices:
https://drupal.org/developing/best-practices https://www.drupal.org/developing/best-practices
* Refer to the API documentation: * Refer to the API documentation:
https://api.drupal.org/api/drupal/8 https://api.drupal.org/api/drupal/8
* Learn from documented Drupal API examples: * Learn from documented Drupal API examples:
......
...@@ -4,11 +4,6 @@ ...@@ -4,11 +4,6 @@
* @file * @file
* Includes the autoloader created by Composer. * Includes the autoloader created by Composer.
* *
* This file can be edited to change the autoloader if you are managing a
* project's dependencies using Composer. If Drupal code requires the
* autoloader, it should always be loaded using this file so that projects
* using Composer continue to work.
*
* @see composer.json * @see composer.json
* @see index.php * @see index.php
* @see core/install.php * @see core/install.php
...@@ -16,4 +11,4 @@ ...@@ -16,4 +11,4 @@
* @see core/modules/statistics/statistics.php * @see core/modules/statistics/statistics.php
*/ */
return require __DIR__ . '/core/vendor/autoload.php'; return require __DIR__ . '/vendor/autoload.php';
{ {
"name": "drupal/drupal", "name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.", "description": "Drupal is an open source content management platform powering millions of websites and applications.",
"type": "project", "type": "project",
"license": "GPL-2.0+", "license": "GPL-2.0+",
"require": { "require": {
"composer/installers": "^1.0.20", "composer/installers": "^1.0.21",
"drupal/core": "~8.0" "wikimedia/composer-merge-plugin": "~1.3"
}, },
"minimum-stability": "dev", "replace": {
"prefer-stable": true, "drupal/core": "~8.2"
"config": { },
"preferred-install": "dist", "minimum-stability": "dev",
"autoloader-suffix": "Drupal8" "prefer-stable": true,
}, "config": {
"extra": { "preferred-install": "dist",
"_readme": [ "autoloader-suffix": "Drupal8"
"By default Drupal loads the autoloader from ./core/vendor/autoload.php.", },
"To change the autoloader you can edit ./autoload.php." "extra": {
] "_readme": [
} "By default Drupal loads the autoloader from ./vendor/autoload.php.",
"To change the autoloader you can edit ./autoload.php."
],
"merge-plugin": {
"include": [
"core/composer.json"
],
"recurse": false,
"replace": false,
"merge-extra": false
}
},
"autoload": {
"psr-4": {
"Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer"
}
},
"scripts": {
"pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
"post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess",
"post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
"post-package-update": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup"
}
} }
This diff is collapsed.
{
"extends": "eslint:recommended",
"env": {
"browser": true
},
"globals": {
"Drupal": true,
"drupalSettings": true,
"drupalTranslations": true,
"domready": true,
"jQuery": true,
"_": true,
"matchMedia": true,
"Backbone": true,
"Modernizr": true,
"CKEDITOR": true
},
"rules": {
// Errors.
"array-bracket-spacing": [2, "never"],
"block-scoped-var": 2,
"brace-style": [2, "stroustrup", {"allowSingleLine": true}],
"comma-dangle": [2, "never"],
"comma-spacing": 2,
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
"curly": [2, "all"],
"eol-last": 2,
"eqeqeq": [2, "smart"],
"guard-for-in": 2,
"indent": [2, 2, {"SwitchCase": 1}],
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"keyword-spacing": [2, {"before": true, "after": true}],
"linebreak-style": [2, "unix"],
"lines-around-comment": [2, {"beforeBlockComment": true, "afterBlockComment": false}],
"new-parens": 2,
"no-array-constructor": 2,
"no-caller": 2,
"no-catch-shadow": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-parens": [2, "functions"],
"no-implied-eval": 2,
"no-iterator": 2,
"no-label-var": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-nested-ternary": 2,
"no-new-func": 2,
"no-new-object": 2,
"no-new-wrappers": 2,
"no-octal-escape": 2,
"no-process-exit": 2,
"no-proto": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-sequences": 2,
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
"no-trailing-spaces": 2,
"no-undef-init": 2,
"no-undefined": 2,
"no-unused-expressions": 2,
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
"no-with": 2,
"object-curly-spacing": [2, "never"],
"one-var": [2, "never"],
"quote-props": [2, "consistent-as-needed"],
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "always"],
"semi-spacing": [2, {"before": false, "after": true}],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"spaced-comment": [2, "always"],
"strict": [2, "function"],
"yoda": [2, "never"],
// Warnings.
"max-nested-callbacks": [1, 3],
"valid-jsdoc": [1, {
"prefer": {
"returns": "return",
"property": "prop"
},
"requireReturn": false
}]
}
}
# SimpleTest breaks with the following files, so avoid adding them.
vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php
vendor/symfony/class-loader/Symfony/Component/ClassLoader/Tests/Fixtures/php5.4/traits.php
vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php
# The resources for the Validator component are not required.
vendor/symfony/validator/Symfony/Component/Validator/Resources
# Symfony Validator depends on Symfony Translation but only requires the
# TranslatorInterface. Thus, we add only the required interface from Symfony
# Translation by ignoring everything except the interface.
vendor/symfony/translation/Symfony/Component/Translation/*
!vendor/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php
# PHPUnit provides some binary dependencies that are already available.
vendor/phpunit/phpunit/build/dependencies
This diff is collapsed.
...@@ -18,16 +18,16 @@ Drupal requires: ...@@ -18,16 +18,16 @@ Drupal requires:
- A web server with PHP support, for example: - A web server with PHP support, for example:
- Apache 2.0 (or greater) (http://httpd.apache.org/). - Apache 2.0 (or greater) (http://httpd.apache.org/).
- Nginx 1.1 (or greater) (http://nginx.com/). - Nginx 1.1 (or greater) (http://nginx.com/).
- PHP 5.4.5 (or greater) (http://php.net/). For better security support its - PHP 5.5.9 (or greater) (http://php.net/). For better security support it is
recommended to update to at least 5.5.21 or 5.6.5. recommended to update to at least 5.5.21 or 5.6.5.
- One of the following databases: - One of the following databases:
- MySQL 5.0.15 (or greater) (http://www.mysql.com/). - MySQL 5.5.3 (or greater) (http://www.mysql.com/).
- MariaDB 5.1.44 (or greater) (https://mariadb.org/). MariaDB is a fully - MariaDB 5.5.20 (or greater) (https://mariadb.org/). MariaDB is a fully
compatible drop-in replacement for MySQL. compatible drop-in replacement for MySQL.
- Percona Server 5.1.70 (or greater) (http://www.percona.com/). Percona - Percona Server 5.5.8 (or greater) (http://www.percona.com/). Percona
Server is a backwards-compatible replacement for MySQL. Server is a backwards-compatible replacement for MySQL.
- PostgreSQL 8.3 (or greater) (http://www.postgresql.org/). - PostgreSQL 9.1.2 (or greater) (http://www.postgresql.org/).
- SQLite 3.4.2 (or greater) (http://www.sqlite.org/). - SQLite 3.7.11 (or greater) (http://www.sqlite.org/).
For more detailed information about Drupal requirements, including a list of For more detailed information about Drupal requirements, including a list of
PHP extensions and configurations that are required, see "System requirements" PHP extensions and configurations that are required, see "System requirements"
...@@ -88,7 +88,20 @@ INSTALLATION ...@@ -88,7 +88,20 @@ INSTALLATION
directory within your web server's document root or your public HTML directory within your web server's document root or your public HTML
directory, continue with this command: directory, continue with this command:
mv drupal-x.y.z/* drupal-x.y.z/.htaccess drupal-x.y.z/.csslintrc drupal-x.y.z/.editorconfig drupal-x.y.z/.eslintignore drupal-x.y.z/.eslintrc /path/to/your/installation mv drupal-x.y.z/* drupal-x.y.z/.htaccess drupal-x.y.z/.csslintrc drupal-x.y.z/.editorconfig drupal-x.y.z/.eslintignore drupal-x.y.z/.eslintrc drupal-x.y.z/.gitattributes /path/to/your/installation
You can also download the latest version of Drupal using Git on the command
line and set up a repository by following the instructions at
https://www.drupal.org/project/drupal/git-instructions for "Setting up
repository for the first time".
Once you have downloaded Drupal successfully, you may install Composer
globally using the instructions at
https://getcomposer.org/doc/00-intro.md#globally
With Composer installed, run the following command from the Drupal web root:
composer install
2. Create the Drupal database. 2. Create the Drupal database.
...@@ -121,60 +134,63 @@ INSTALLATION ...@@ -121,60 +134,63 @@ INSTALLATION
a. Missing files directory. a. Missing files directory.
The install script will attempt to create a file storage directory in The install script will attempt to create a public file storage directory
the default location at sites/default/files (the location of the files in the default location at sites/default/files (the location of the files
directory may be changed after Drupal is installed). directory may be changed after Drupal is installed).
If auto-creation fails, you can make it work by changing permissions on If auto-creation fails, you can create the directory yourself. (If you are
the sites/default directory so that the web server can create the files creating a multisite installation, substitute the correct sites directory
directory within it for you. (If you are creating a multisite for sites/default; see the Multisite Configuration section of this file,
installation, substitute the correct sites directory for sites/default; below.) Sample commands from a Unix/Linux command line:
see the Multisite Configuration section of this file, below.)
For example, on a Unix/Linux command line, you can grant everyone mkdir sites/default/files
chmod a+w sites/default/files
Alternatively, you can make the install script work by changing
permissions on the sites/default directory. The web server can then
create the files directory within it for you.
For example, on a Unix/Linux command line, you can you can grant everyone
(including the web server) permission to write to the sites/default (including the web server) permission to write to the sites/default
directory with this command: directory with this command:
chmod a+w sites/default chmod a+w sites/default
Be sure to set the permissions back after the installation is finished! Then re-run install.php (e.g. by clicking "try again" at the bottom of
Sample command: the Requirements problem page. Once the files directory is created, you
will need to grant everyone (including the web server) permission to
write to it with this command:
chmod go-w sites/default chmod a+w sites/default/files
Alternatively, instead of allowing the web server to create the files Be sure to set the permissions for the default directory back after the
directory for you as described above, you can create it yourself. Sample installation is finished! (Leave the files directory writeable.)
commands from a Unix/Linux command line: Sample command:
mkdir sites/default/files chmod go-w sites/default
chmod a+w sites/default/files
b. Missing settings file. b. Missing settings file.
Drupal will try to automatically create settings.php and services.yml Drupal will try to automatically create a settings.php configuration file,
files, which are normally in the directory sites/default (to avoid which is normally in the directory sites/default (to avoid problems when
problems when upgrading, Drupal is not packaged with this file). If upgrading, Drupal is not packaged with this file). If auto-creation fails,
auto-creation of either file fails, you will need to create the file you will need to create this file yourself, using the file
yourself. Use the template sites/default/default.settings.php or sites/default/default.settings.php as a template.
sites/default/default.services.yml respectively.
For example, on a Unix/Linux command line, you can make a copy of the For example, on a Unix/Linux command line, you can make a copy of the
default.settings.php and default.services.yml files with the commands: default.settings.php file with the command:
cp sites/default/default.settings.php sites/default/settings.php cp sites/default/default.settings.php sites/default/settings.php
cp sites/default/default.services.yml sites/default/services.yml
Next, grant write privileges to the file to everyone (including the web Next, grant write privileges to the file to everyone (including the web
server) with the command: server) with the command:
chmod a+w sites/default/settings.php chmod a+w sites/default/settings.php
chmod a+w sites/default/services.yml
Be sure to set the permissions back after the installation is finished! Be sure to set the permissions back after the installation is finished!
Sample command: Sample command:
chmod go-w sites/default/settings.php chmod go-w sites/default/settings.php
chmod go-w sites/default/services.yml
c. Write permissions after install. c. Write permissions after install.
...@@ -184,7 +200,6 @@ INSTALLATION ...@@ -184,7 +200,6 @@ INSTALLATION
from a Unix/Linux command line: from a Unix/Linux command line:
chmod go-w sites/default/settings.php chmod go-w sites/default/settings.php
chmod go-w sites/default/services.yml
chmod go-w sites/default chmod go-w sites/default
4. Verify that the site is working. 4. Verify that the site is working.
...@@ -197,7 +212,7 @@ INSTALLATION ...@@ -197,7 +212,7 @@ INSTALLATION
5. Change file system storage settings (optional). 5. Change file system storage settings (optional).
The files directory created in step 4 is the default file system path used to The files directory created in step 3 is the default file system path used to
store all uploaded files, as well as some temporary files created by store all uploaded files, as well as some temporary files created by
Drupal. After installation, you can modify the file system path to store Drupal. After installation, you can modify the file system path to store
uploaded files in a different location. uploaded files in a different location.
...@@ -224,11 +239,19 @@ INSTALLATION ...@@ -224,11 +239,19 @@ INSTALLATION
mkdir uploads mkdir uploads
chmod a+w uploads chmod a+w uploads
b. Navigate to Administration > Configuration > Media > File system, and b. Open your settings.php in a plain-text editor, and uncomment (remove the #
enter the desired path. Note that if you want to use private file storage, at the start of line) this line:
you need to first enter the path for private files and save the
configuration, and then change the "Default download method" setting and # $settings['file_public_path'] = 'sites/default/files';
save again.
Enter the desired path and save the file.
If you want to use private file storage, you need to uncomment (remove
the # at the start of line) the following line in settings.php:
# $settings['file_private_path'] = '';
Enter the path for private files and save the file.
Changing the file system path after files have been uploaded may cause Changing the file system path after files have been uploaded may cause
unexpected problems on an existing site. If you modify the file system path unexpected problems on an existing site. If you modify the file system path
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.