diff --git a/.ddev/commands/web/stylelint-fix b/.ddev/commands/web/stylelint-fix index 2135e94..4680896 100755 --- a/.ddev/commands/web/stylelint-fix +++ b/.ddev/commands/web/stylelint-fix @@ -4,4 +4,4 @@ ## Usage: stylelint-fix ## Example: "ddev stylelint-fix" -/var/www/html/web/core/node_modules/.bin/stylelint --ignore-path /var/www/html/web/core/.stylelintignore --config /var/www/html/web/core/.stylelintrc.json --fix $* \ No newline at end of file +/var/www/html/web/core/node_modules/.bin/stylelint --ignore-path /var/www/html/web/core/.stylelintignore --config /var/www/html/web/core/.stylelintrc.json $* --fix diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 4064769..61d4277 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -10,7 +10,7 @@ additional_hostnames: [] additional_fqdns: [] database: type: mariadb - version: "10.3" + version: "10.6" nfs_mount_enabled: false mutagen_enabled: false use_dns_when_possible: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c6196b..1a804f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,7 +81,14 @@ jobs: run: composer create-project --stability dev localgovdrupal/localgov-project:${COMPOSER_REF} ./html - name: Obtain all dev dependencies for LocalGov Drupal - run: jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction + run: | + # Installing all localgov dev dependencies doesn't work due to issues with drupal.org packaging. + # jq --raw-output '.packages[] | select(.name | startswith("drupal/localgov*")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction + # Instead just install the dependencies needed for the tests. + composer --working-dir=./html require 'drupal/facets:^2.0' + composer --working-dir=./html require 'drupal/facets_form:^1.3' + composer --working-dir=./html require 'drupal/group:^3.2' + phpcs: name: Coding standards checks diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e12e584 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,23 @@ +################ +# GitLabCI template for Drupal projects. +################ + +include: + - project: $_GITLAB_TEMPLATES_REPO + ref: $_GITLAB_TEMPLATES_REF + file: + - '/includes/include.drupalci.main.yml' + - '/includes/include.drupalci.variables.yml' + - '/includes/include.drupalci.workflows.yml' +# +################ +# Pipeline configuration variables are defined with default values and descriptions in the file +# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml +################ +variables: + SKIP_CSPELL: "1" + OPT_IN_TEST_MAX_PHP: 1 + OPT_IN_TEST_PREVIOUS_MAJOR: 1 + OPT_IN_TEST_NEXT_MAJOR: 1 + + diff --git a/composer.json b/composer.json index 80953bd..00d7b01 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "cweagans/composer-patches": "^1.6", "drupal/core-composer-scaffold": "^10.3", "drupal/core-recommended": "^10.3", - "localgovdrupal/localgov": "^3.0", - "localgovdrupal/localgov_search_solr": "^1.1", + "drupal/localgov": "^3.0", + "drupal/localgov_search_solr": "^1.1", "wikimedia/composer-merge-plugin": "^2.1" }, "require-dev": { @@ -74,12 +74,12 @@ } }, "patches-ignore": { - "localgovdrupal/localgov": { + "drupal/localgov": { "drupal/core": { "Content moderation and Workspaces https://www.drupal.org/project/drupal/issues/3179199#comment-15711680" : "https://www.drupal.org/files/issues/2024-08-11/3179199-3132022-content-moderation-workspaces-query.patch" } }, - "localgovdrupal/localgov_services": { + "drupal/localgov_services": { "drupal/core": { "node_access filters out accessible nodes when node is left joined (1349080)" : "https://git.drupalcode.org/project/drupal/-/commit/c271adb.diff" } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index f825e96..1bb3bc9 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -17,6 +17,7 @@ web/profiles/contrib/localgov/localgov.info.yml + web/modules/contrib/localgov_editoria11y web/modules/contrib/localgov_utilities diff --git a/phpstan.neon b/phpstan.neon index f3e036c..41bf029 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -19,6 +19,11 @@ parameters: allRules: false strictCalls: true + disallowedFunctionCalls: + - + function: 'xdebug_*()' + message: 'do not include in production code' + # Exclude microsite project submodules from phpstan checks on the main project. excludePaths: - web/modules/contrib/localgov_alert_banner/modules/group_alert_banner/*