Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal 9 #120

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: AED
type: drupal8
type: drupal9
docroot: .
php_version: "7.4"
php_version: "8.1"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
Expand All @@ -13,7 +13,7 @@ mysql_version: ""
nfs_mount_enabled: false
mutagen_enabled: false
use_dns_when_possible: true
composer_version: "1"
composer_version: "2"
web_environment: []

# Key features of ddev's config.yaml:
Expand Down
16 changes: 8 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
*.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
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=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
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=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
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=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
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=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
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=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
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=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
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ profiles/contrib
# Ignore configuration files that may contain sensitive information.
.env
sites/*/settings.local.php
sites/*/settings.ddev.php

# Ignore SimpleTest multi-site environment.
sites/simpletest
Expand All @@ -19,6 +20,7 @@ sites/default/files

# NO dbs.
*.sql
*.sql.gz

drush
/.ht.router.php
Expand Down
23 changes: 14 additions & 9 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# 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)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.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)|web\.config|yarn\.lock|package\.json)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
Expand Down Expand Up @@ -32,12 +32,17 @@ AddEncoding gzip svgz
php_value assert.active 0
</IfModule>

# PHP 8, Apache 1 and 2.
<IfModule mod_php.c>
php_value assert.active 0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations.
ExpiresActive On

# Cache all files for 2 weeks after access (A).
# Cache all files and redirects for 2 weeks after access (A).
ExpiresDefault A1209600

<FilesMatch \.php$>
Expand Down Expand Up @@ -116,13 +121,13 @@ AddEncoding gzip svgz
# RewriteBase /

# Redirect common PHP files to their new locations.
RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR]
RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild.php)
RewriteCond %{REQUEST_URI} ^(.*)?/(install\.php) [OR]
RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild\.php)
RewriteCond %{REQUEST_URI} !core
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]
RewriteRule ^core/install\.php core/install.php?rewrite=ok [QSA,L]

# Pass all requests not referring directly to files in the filesystem to
# index.php.
Expand All @@ -138,11 +143,11 @@ AddEncoding gzip svgz
# Allow access to PHP files in /core (like authorize.php or install.php):
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
# 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.
# 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.
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.
# Specifically, disallow autoload.php from being served directly.
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
Expand All @@ -153,12 +158,12 @@ AddEncoding gzip svgz
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA]

# Serve gzip compressed JS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]

# Serve correct content types, and prevent double compression.
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
Cualquiera que tenga un momento puede contribuir. Mira en [https://github.com/AsociacionDrupalES/AED/issues](https://github.com/AsociacionDrupalES/AED/issues) para poder ver todas las tareas pendientes.
Si quieres hacer alguno pidetelo con un comentario, haz un fork del repo y finalmente un PR.

En el directorio "UTIL" dispones de una db y un settings.local.php que ya tiene configurado lo necesario para pillar los files desde la web de producción (imagenes mayormente).
En el directorio "UTIL" dispones de un settings.local.php que ya tiene configurado lo necesario para pillar los files desde la web de producción (imagenes mayormente).

Recuerda personalizar la configuración de settings.local.php para que se pueda conectar correctamente a la db.

Para obtener una copia de la base de datos contacta con la AED.

**¡NO OLVIDES HACER TODO ESTO EN LA RAMA "dev"!**

#### Si tienes dudas sobre cómo contribuir:
Expand Down
38 changes: 28 additions & 10 deletions UTIL/example.settings.local.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
<?php
$databases['default']['default'] = array(
'database' => 'aed',
'username' => 'aed',
'password' => 'aed',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);

// If you are using your own L/M/W-AMP version, otherwise default to "ddev".
// $databases['default']['default'] = array(
// 'database' => 'aed',
// 'username' => 'aed',
// 'password' => 'aed',
// 'prefix' => '',
// 'host' => 'localhost',
// 'port' => '3306',
// 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
// 'driver' => 'mysql',
// );

$config['stage_file_proxy.settings']['origin'] = 'https://asociaciondrupal.es';

// Paypal settings should be set at server level. If you need credentials for
// "sandbox" or "live" environments, contact the AED to get them and put them
// in your "settings.local.php" file, which will override these settings.
$config['paypal_sdk.settings']['environment'] = 'sandbox';
$config['paypal_sdk.settings']['live_client_id'] = 'AED-XXX';
$config['paypal_sdk.settings']['live_client_secret'] = 'AED-XXX';
$config['paypal_sdk.settings']['sandbox_client_id'] = 'AED-XXX';
$config['paypal_sdk.settings']['sandbox_client_secret'] = 'AED-XXX';

// Switfmailer settings. If you need credentials for "sandbox" or "live"
// environments, contact the AED to get them and put them in your
// "settings.local.php" file, which will override these settings.
$config['swiftmailer.transport']['smtp_credentials']['swiftmailer']['username'] = '[email protected]';
$config['swiftmailer.transport']['smtp_credentials']['swiftmailer']['password'] = 'AED-XXX';


//$settings['trusted_host_patterns'] = array(
// '^dev\.asociaciondrupal\.es$',
//);
Expand Down
73 changes: 43 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,38 @@
"type": "project",
"license": "GPL-2.0+",
"require": {
"drupal/core": "^8.9",
"composer/installers": "^1.6",
"drupal/swiftmailer": "^1.0@beta",
"drupal/admin_toolbar": "^1.26",
"drupal/chosen": "^2.7",
"drupal/contact_storage": "^1.0@beta",
"drupal/email_registration": "^1.0@RC",
"drupal/facets": "^1.3",
"drupal/swiftmailer": "^2.0",
"drupal/admin_toolbar": "^3",
"drupal/chosen": "^3.0",
"drupal/contact_storage": "^1.0",
"drupal/email_registration": "^1.0",
"drupal/facets": "^3",
"drupal/field_group": "^3.0",
"drupal/honeypot": "^1.29",
"drupal/honeypot": "^2.0",
"drupal/menu_link_attributes": "^1.0",
"drupal/page_manager": "^4.0@beta",
"drupal/page_manager": "^4.0",
"drupal/pathauto": "^1",
"drupal/search_api": "^1.12",
"drupal/slick_views": "^1.0",
"drupal/search_api": "^1.14",
"drupal/slick_views": "^2.7",
"drupal/video_embed_field": "^2.0",
"drush/drush": "^9.6",
"drupal/config_ignore": "^2.1",
"drupal/field_permissions": "^1.0@RC",
"drush/drush": "^10.0",
"drupal/config_ignore": "^2.0",
"drupal/field_permissions": "^1.0",
"paypal/rest-api-sdk-php": "^1.14",
"drupal/stage_file_proxy": "^1",
"drupal/stage_file_proxy": "^2.1",
"cweagans/composer-patches": "^1.6",
"drupal/google_analytics": "^3.0",
"drupal/google_analytics": "^4",
"drupal/redis": "^1.5",
"drupal/core-composer-scaffold": "^9.3",
"vlucas/phpdotenv": "^5.4"
"drupal/core-composer-scaffold": "^9",
"vlucas/phpdotenv": "^5.4",
"drupal/blazy": "^2.0",
"drupal/slick": "^2.9",
"drupal/config_filter": "^2.0",
"drupal/core-recommended": "^9",
"drupal/core-project-message": "^9",
"drupal/classy": "^1.0",
"drupal/core-vendor-hardening": "^10.1"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -38,7 +44,11 @@
"autoloader-suffix": "Drupal8",
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": true
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-project-message": true,
"drupal/core-vendor-hardening": true
}
},
"extra": {
Expand All @@ -59,11 +69,16 @@
"themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"patches": {
"drupal/swiftmailer": {
"Notice: Undefined index: filter_format :: https://www.drupal.org/project/swiftmailer/issues/2948607": "https://www.drupal.org/files/issues/2948607-2.patch"
"drupal/core": {
"Syslog error": "https://www.drupal.org/files/issues/2023-07-12/3333215-22.patch"
}
},
"drupal-scaffold": {
"locations": {
"web-root": "."
},
"drupal/config_ignore": {
"Support for export filtering via Drush :: https://www.drupal.org/project/config_ignore/issues/2857247": "https://www.drupal.org/files/issues/support_for_export-2857247-12.patch"
"file-mapping": {
"[web-root]/README.md": false
}
}
},
Expand All @@ -76,17 +91,15 @@
]
},
"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"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
]
],
"require-dev": {
"drupal/upgrade_status": "*",
"drupal/core-dev": "^9"
}
}
Loading