Skip to content

Commit

Permalink
Merge branch '2.x' into feature/drupal-10
Browse files Browse the repository at this point in the history
  • Loading branch information
omarlopesino committed Apr 20, 2023
2 parents 1b66ef1 + 07277a5 commit 9023bc2
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 23 deletions.
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ include docker.mk

BEHAT ?= "vendor/bin/behat"
SITE ?= "default"
# Update this with the base drush alias for your site.
# Example, if your site's drush aliases are contained into mysite.site.yml
# then the default site alias will be "mysite"
DEFAULT_SITE_ALIAS ?= "sitename"
FRONTEND_BASE_PATH = "/var/www/html/web/themes/custom"
PROFILE ?= "minimal"
ENVIRONMENT ?= "stg"
Expand Down Expand Up @@ -58,9 +54,9 @@ backstopjs-reference:
backstopjs-test:
docker-compose exec backstopjs backstop test --filter='$(filter-out $@,$(MAKECMDGOALS))'

## init-setup : Prepares the site
.PHONY: init-setup
init-setup:
## setup-init : Prepares the site
.PHONY: setup-init
setup-init:
mkdir -p web/sites/default/files/behat/errors
chmod u+w web/sites/${SITE} -R
cp docker-compose.override.yml.dist docker-compose.override.yml
Expand All @@ -73,7 +69,7 @@ init-setup:
## setup : Prepares the site and installs it using the Drupal configuration files
.PHONY: setup
setup:
make init-setup
make setup-init
docker-compose exec -T php drush @${SITE}.local si ${PROFILE} --existing-config --sites-subdir=${SITE} -y
docker-compose exec -T php drush @${SITE}.local cim -y
docker-compose exec -T php drush @${SITE}.local cr
Expand All @@ -82,7 +78,7 @@ setup:
## setup-from-environment : Prepares the site and loads it with data from the reference site
.PHONY: setup-from-environment
setup-from-environment:
make init-setup
make setup-init
./scripts/reload-local.sh --site=${SITE} --env=${ENVIRONMENT}

## solr-sync : Reload docker Solr cores from local files.
Expand Down
4 changes: 3 additions & 1 deletion behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ default:
- Metadrop\Behat\Context\FileContext
- Metadrop\Behat\Context\FormContext
- Metadrop\Behat\Context\EntityContext
- Metadrop\Behat\Context\LogsContext
- Metadrop\Behat\Context\LogsContext:
parameters:
write_report: true
- Metadrop\Behat\Context\NodeAccessContext
- Metadrop\Behat\Context\ParagraphsContext
- Metadrop\Behat\Context\UIContext:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"drush/drush": "^11.0"
},
"require-dev": {
"metadrop/drupal-dev": "^0.1.12",
"metadrop/drupal-dev": "^0.3",
"metadrop/grumphp-php-compatibility": "master",
"phpcompatibility/php-compatibility": "dev-develop as 9.3.5"
},
Expand Down
6 changes: 1 addition & 5 deletions drush/sites/sitename.site.yml.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
docker:
local:
uri: 'http://example.docker.localhost:8000'
docker:
service: php
exec:
options: --user wodby
root: '/var/www/html'
user: 'wodby'

Expand Down
14 changes: 8 additions & 6 deletions grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ grumphp:
git_hook_variables:
EXEC_GRUMPHP_COMMAND: docker-compose run -e'PHP_ERROR_REPORTING=E_ALL & ~E_DEPRECATED' --rm -T php
extensions:
- GrumphpDrupalCheck\ExtensionLoader
- Metadrop\PhpCompatibilityTask\ExtensionLoader
hooks_dir: ~
hooks_preset: local
Expand Down Expand Up @@ -39,7 +38,6 @@ grumphp:
yamllint: ~
composer: ~
jsonlint: ~
drupalcheck: ~
file_size:
max_size: 2M
ignore_patterns:
Expand All @@ -48,10 +46,6 @@ grumphp:
yamllint: ~
composer: ~
jsonlint: ~
drupalcheck:
deprecations: true
analysis: true
php8: true
phpcpd:
directory:
- ./web/**/custom
Expand Down Expand Up @@ -101,3 +95,11 @@ grumphp:
- inc
- module
- install
phpstan:
autoload_file: ~
configuration: ~
force_patterns: []
ignore_patterns: []
triggered_by: ['php', 'module', 'inc', 'theme', 'install']
memory_limit: "-1"
use_grumphp_paths: true
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
level: 8
paths:
- web/modules/custom
- web/themes/custom
ignoreErrors:
- message: '#.*return type has no value type specified.*#'
- message: '#.*has parameter .* with no type specified#'
- message: '#.*has no return type specified.*#'
- message: '#.*has parameter .* with no value type specified*#'
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,18 @@ Once Composer finalizes the project creation an assistant will be automatically

After the assistant finished, if you have selected to install Drupal your project will be running and the assistant will print the URL to access it.

!!! NOTE
By default, drupal-boilerplate is installed with a minimal profile. If you want to install another profile, you must not install Drupal during the composer create-project installation problem, when the question 'Do you want to install Drupal?' appears.

After that, just install the profile you need with the `drush site-install` command into the PHP container, after the project creation has finished.

Example:

```
drush site-install standard
```

Please note that if you install a profile that implements the hook_install the `make setup` command won't work as it makes a installation from configuration, and those installations requires the hook install to not be present.


## FAQ
Expand Down
1 change: 0 additions & 1 deletion web/sites/default/example.settings.local.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
}

// Config splits.
//$config['config_split.config_split.ci']['status'] = TRUE;
$config['config_split.config_split.local']['status'] = TRUE;
//$config['config_split.config_split.dev']['status'] = TRUE;
//$config['config_split.config_split.stg']['status'] = TRUE;
Expand Down

0 comments on commit 9023bc2

Please sign in to comment.