Close #3457688 Add environment_indicator_navigation sub module
Closes #3457688, I used this .lando.yml
file to quickly test. Note, that it uses Drupal 10.3
name: environment_indicator
recipe: drupal10
config:
php: '8.3'
via: apache:2.4
webroot: web
database: mariadb:10.6
xdebug: false
services:
database:
type: compose
services:
image: mariadb:10.6
command: docker-entrypoint.sh mariadbd
restart: always
ports:
- '3306'
environment:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'true'
MARIADB_DATABASE: drupal10
MYSQL_DATABASE: drupal10
MARIADB_USER: drupal10
MARIADB_PASSWORD: drupal10
appserver:
overrides:
environment:
SIMPLETEST_DB: 'mysql://drupal10:drupal10@database/drupal10'
SIMPLETEST_BASE_URL: 'http://appserver'
volumes:
# Don't share our host working directory as /app. We want /app empty for composer.
- /app
# Instead share our host working directory as a standalone package.
- .:/usr/local/environment_indicator
build:
# Create a new Drupal project and use the module as a non-packagist repository.
- composer create-project --dev drupal/recommended-project:10.3.x /app
- composer config extra.enable-patching true
- composer config extra.composer-exit-on-patch-failure true
- composer config allow-plugins.cweagans/composer-patches true
- composer require cweagans/composer-patches
- composer config minimum-stability dev
- composer config allow-plugins.phpstan/extension-installer true
- composer require --dev drupal/core-dev:^10.3 drush/drush phpspec/prophecy-phpunit:* phpstan/extension-installer mglaman/phpstan-drupal phpstan/phpstan-deprecation-rules drupal/config_inspector
- composer config repositories.localdev path /usr/local/environment_indicator && composer require drupal/environment_indicator:\*@dev && composer require drupal/devel
tooling:
# Provide a command to install Drupal.
install:
service: appserver
cmd:
- /app/vendor/bin/drush --root=/app/web site:install --account-mail=noreply@example.com --account-name=admin --account-pass=admin --db-url=mysql://drupal10:drupal10@database:3306/drupal10 -y --verbose
- /app/vendor/bin/drush en -y environment_indicator environment_indicator_ui environment_indicator_navigation config_inspector devel
- /app/vendor/bin/drush uli -l https://environmentindicator.lndo.site
# Provide Drush tooling to automatically know the Drupal root.
drush:
service: appserver
cmd: /app/vendor/bin/drush --root=/app/web
phpcs:
service: appserver
cmd: /app/vendor/bin/phpcs -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/environment_indicator/modules/environment_indicator_navigation
# Provide PHPCBF tooling to fix coding standards.
phpcbf:
service: appserver
cmd: /app/vendor/bin/phpcbf -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/environment_indicator/modules/environment_indicator_navigation
# Provide phpstan tooling to check for code quality and deprecated code.
phpstan:
service: appserver
cmd: /app/vendor/bin/phpstan analyse --configuration web/modules/contrib/environment_indicator/phpstan.neon web/modules/contrib/environment_indicator/modules/environment_indicator_navigation
# Provide phpunit tooling to run unit tests.
phpunit:
service: appserver
cmd: /app/vendor/bin/phpunit --configuration /app/web/core/phpunit.xml.dist --bootstrap /app/web/core/tests/bootstrap.php /app/web/modules/contrib/environment_indicator/modules/environment_indicator_navigation