From d88df39e95f155df139e375d71f9fc4f804bcbd7 Mon Sep 17 00:00:00 2001 From: Lee Mills Date: Sat, 8 Nov 2025 12:50:03 +0000 Subject: [PATCH] chore: remove lando --- .lando.dist.yml | 129 --------------------- .lando/update-solr-config.sh | 21 ---- README_FRONTEND_TOOLING.md | 12 +- assets/composer/settings.lando.php | 174 ----------------------------- assets/composer/settings.php | 3 - composer.json | 5 - 6 files changed, 1 insertion(+), 343 deletions(-) delete mode 100644 .lando.dist.yml delete mode 100755 .lando/update-solr-config.sh delete mode 100644 assets/composer/settings.lando.php diff --git a/.lando.dist.yml b/.lando.dist.yml deleted file mode 100644 index a758236..0000000 --- a/.lando.dist.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: localgov -recipe: drupal10 -config: - webroot: web - php: '8.1' - database: mariadb:10.6 -proxy: - mailhog: - - mail.localgov.lndo.site - adminer: - - adminer.localgov.lndo.site - solr-sitewide: - - 'solr-sitewide.localgov.lndo.site:8983' -services: - appserver: - scanner: - retry: 5 - xdebug: true - build_as_root: - # This disables Xdebug during build, but puts all dependencies in place - # ready for the tooling to enable Xdebug. - - rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload - overrides: - environment: - DRUSH_OPTIONS_ROOT: '/app/web' - DRUSH_OPTIONS_URI: 'https://localgov.lndo.site' - SIMPLETEST_BASE_URL: 'http://localgov.lndo.site' - SIMPLETEST_DB: 'mysql://database:database@database/database' - MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName": "chrome", "goog:chromeOptions": {"args": ["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://chromedriver:9515"]' - BROWSERTEST_OUTPUT_DIRECTORY: '/app/web/sites/simpletest/browser_output' - BROWSERTEST_OUTPUT_BASE_URL: 'http://localgov.lndo.site' - # Support debugging CLI with Xdebug. - PHP_IDE_CONFIG: "serverName=appserver" - XDEBUG_SESSION: "lando" - build: - - mkdir -p web/sites/simpletest/browser_output - database: - creds: - user: database - password: database - database: database - mailhog: - type: mailhog - hogfrom: - - appserver - portforward: true - adminer: - type: compose - services: - image: dehy/adminer - command: '/bin/s6-svscan /etc/services.d' - portforward: true - node: - type: 'node:20' - globals: - gulp-cli: latest - overrides: - ports: - - '3050:3050' - chromedriver: - type: compose - scanner: false - services: - image: drupalci/webdriver-chromedriver:production - ports: - - "9515:9515" - security_opt: - - seccomp:unconfined - command: chromedriver --verbose --allowed-ips= --allowed-origins=* - solr-sitewide: - type: solr:8 - core: sitewide - config: - dir: .lando/solr/localgov_sitewide_solr -tooling: - composer: - service: appserver - cmd: /usr/local/bin/composer - sca: - service: appserver - cmd: 'bash -c "/app/vendor/bin/phpstan analyse -c /app/phpstan.neon /app/web/profiles/contrib/localgov* /app/web/modules/contrib/localgov* /app/web/themes/contrib/localgov*"' - drush: - service: appserver - cmd: '/app/vendor/bin/drush' - phpcs: - service: appserver - cmd: '/app/vendor/bin/phpcs -p' - phix: - service: appserver - cmd: '/app/vendor/bin/phpcbf' - phpstan: - service: appserver - cmd: '/app/vendor/bin/phpstan' - phpunit: - service: appserver - cmd: '/app/vendor/bin/phpunit --testdox' - xdebug-on: - service: appserver - description: Enable Xdebug for Apache. - cmd: rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && docker-php-ext-enable xdebug && /etc/init.d/apache2 reload && echo "Xdebug enabled" - user: root - xdebug-off: - service: appserver - description: Disable Xdebug for Apache. - cmd: rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload && echo "Xdebug disabled" - user: root - gulp: - service: node - node: - service: node - npm: - service: node - yarn: - service: node - update-solr-config: - service: appserver - cmd: /app/.lando/update-solr-config.sh - install-frontend: - service: node - cmd: cd /app/web/core && cp -f /app/web/core/.prettierrc.json /app/web/.prettierrc.json && cp -f /app/web/core/.prettierignore /app/.prettierignore && npm i - eslint-js: - service: node - cmd: /app/web/core/node_modules/eslint/bin/eslint.js --ext .js --resolve-plugins-relative-to=./web/core - eslint-yml: - service: node - cmd: /app/web/core/node_modules/eslint/bin/eslint.js --ext .yml --resolve-plugins-relative-to=./web/core - stylelint: - service: node - cmd: /app/web/core/node_modules/.bin/stylelint --ignore-path /app/web/core/.stylelintignore --config /app/web/core/.stylelintrc.json diff --git a/.lando/update-solr-config.sh b/.lando/update-solr-config.sh deleted file mode 100755 index 981a9ec..0000000 --- a/.lando/update-solr-config.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -## -# Update Lando Solr config. -## - -for SERVER in `drush search-api:server-list --field=ID | grep solr`; do - echo "Fetching Solr config for ${SERVER}." - mkdir -p ".lando/solr/${SERVER}" - drush search-api-solr:get-server-config ${SERVER} "/tmp/${SERVER}.zip" - unzip -qo "/tmp/${SERVER}.zip" -d ".lando/solr/${SERVER}" - rm "/tmp/${SERVER}.zip" - UPDATED=true -done - -if [ "$UPDATED" = true ]; then - echo " -For the new Solr config to be recognized you must restart Lando." -else - echo "No Solr servers found." -fi diff --git a/README_FRONTEND_TOOLING.md b/README_FRONTEND_TOOLING.md index 5e0468e..fcc8aa6 100644 --- a/README_FRONTEND_TOOLING.md +++ b/README_FRONTEND_TOOLING.md @@ -1,7 +1,7 @@ # LocalGov Drupal Frontend Tooling Below details the steps required to run the frontend tooling such as ESLint and -Stylelint with Lando or DDEV. +Stylelint with DDEV. ## Prerequisites @@ -13,7 +13,6 @@ to the correct directory for tooling. This only needs to be done once. ```bash -lando install-frontend ddev install-frontend ``` @@ -22,21 +21,18 @@ ddev install-frontend To run eslint on just .js files, run: ```bash -lando eslint-js web/modules/contrib/[project_name] ddev eslint-js web/modules/contrib/[project_name] ``` E.g. ```bash -lando eslint-js web/modules/contrib/localgov_core ddev eslint-js web/modules/contrib/localgov_core ``` If you wish to fix some of the issues automatically, add the `--fix` flag: ```bash -lando eslint-js --fix web/modules/contrib/[project_name] ddev eslint-js --fix web/modules/contrib/[project_name] ``` @@ -45,21 +41,18 @@ ddev eslint-js --fix web/modules/contrib/[project_name] To run eslint on just .yml files, run: ```bash -lando eslint-yml web/modules/contrib/[project_name] ddev eslint-yml web/modules/contrib/[project_name] ``` E.g. ```bash -lando eslint-yml web/modules/contrib/localgov_core ddev eslint-yml web/modules/contrib/localgov_core ``` If you wish to fix some of the issues automatically, add the `--fix` flag: ```bash -lando eslint-yml --fix web/modules/contrib/[project_name] ddev eslint-yml --fix web/modules/contrib/[project_name] ``` @@ -68,20 +61,17 @@ ddev eslint-yml --fix web/modules/contrib/[project_name] To run stylelint on all css files, run: ```bash -lando stylelint web/modules/contrib/[project_name]/**/*.css ddev stylelint web/modules/contrib/[project_name]/**/*.css ``` E.g. ```bash -lando stylelint web/modules/contrib/localgov_base/**/*.css ddev stylelint web/modules/contrib/localgov_base/**/*.css ``` If you wish to fix some of the issues automatically, add the `--fix` flag: ```bash -lando stylelint --fix web/modules/contrib/[project_name]/**/*.css ddev stylelint --fix web/modules/contrib/[project_name]/**/*.css ``` diff --git a/assets/composer/settings.lando.php b/assets/composer/settings.lando.php deleted file mode 100644 index 1256f2d..0000000 --- a/assets/composer/settings.lando.php +++ /dev/null @@ -1,174 +0,0 @@ - $lando_info['database']['creds']['database'], - 'username' => $lando_info['database']['creds']['user'], - 'password' => $lando_info['database']['creds']['password'], - 'host' => $lando_info['database']['internal_connection']['host'], - 'port' => $lando_info['database']['internal_connection']['port'], - 'driver' => 'mysql', - 'prefix' => '', - 'collation' => 'utf8mb4_general_ci', -); - -/** - * Error reporting. - * - * As a developer it is useful to see all errors. If the site you are working - * on has a lot of notice errors and you aren't able to fix them you can - * suppress them by modifying E_ALL in error_reporting to: - * E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED - */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -/** - * Stage file proxy. - * - * To use stage file proxy you will need the module enabled. Then uncomment - * the config line below and edit the domain to suit. If the domain is behind - * http auth then you can use agile:collective before the @ sign (or whatever - * user/pass combination you need). Change the domain.org part to match the - * domain (usually production, sometimes development) with the images. - */ -// $config['stage_file_proxy.settings']['origin'] = 'http://example.com'; - diff --git a/assets/composer/settings.php b/assets/composer/settings.php index 325e84f..20966f6 100644 --- a/assets/composer/settings.php +++ b/assets/composer/settings.php @@ -754,9 +754,6 @@ if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { include $app_root . '/' . $site_path . '/settings.local.php'; } -elseif (getenv('LANDO_SERVICE_NAME') == 'appserver' && file_exists($app_root . '/' . $site_path . '/settings.lando.php')) { - include $app_root . '/' . $site_path . '/settings.lando.php'; -} // Automatically generated include for settings managed by ddev. $ddev_settings = dirname(__FILE__) . '/settings.ddev.php'; diff --git a/composer.json b/composer.json index 80953bd..9d0e542 100644 --- a/composer.json +++ b/composer.json @@ -65,11 +65,6 @@ "path": "assets/composer/settings.php", "overwrite": false }, - "[web-root]/sites/default/settings.lando.php": { - "mode": "replace", - "path": "assets/composer/settings.lando.php", - "overwrite": false - }, "[web-root]/sites/development.services.yml": "assets/composer/development.services.yml" } },