diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7301f4997f3e0ab27fa20e615c990448d0a9edd..168f4532d53c36ae4b8e8653f1fe69112056267a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,18 @@ ################ # GitLabCI template for Drupal projects. # -# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. -# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained. -# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your -# pipelines automatically. However, you can modify this template if you have additional needs for your project. -# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/ +# This template is designed to give any Contrib maintainer everything they need +# to test, without requiring modification. It is also designed to keep up to +# date with Core Development automatically through the use of include files +# that can be centrally maintained. As long as you include the project, ref and +# three files below, any future updates added by the Drupal Association will be +# used in your pipelines automatically. However, you can modify this template +# if you have additional needs for your project. The full documentation is on +# https://project.pages.drupalcode.org/gitlab_templates/ ################ -# For information on alternative values for 'ref' see https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/ -# To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml +# For information on alternative values for 'ref' see: +# https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/ include: - project: $_GITLAB_TEMPLATES_REPO ref: $_GITLAB_TEMPLATES_REF @@ -18,18 +21,31 @@ include: - "/includes/include.drupalci.variables.yml" - "/includes/include.drupalci.workflows.yml" +# Require additional tests to pass. +composer-lint: + allow_failure: false +cspell: + allow_failure: false +phpcs: + allow_failure: false +phpstan: + allow_failure: false +stylelint: + allow_failure: false + ################ -# Pipeline configuration variables are defined with default values and descriptions in the file +# 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 -# Uncomment the lines below if you want to override any of the variables. The following is just an example. +# Uncomment the lines below if you want to override any of the variables. The +# following is just an example. ################ variables: - _CSPELL_WORDS: 'josdejong,jsoneditor,jsonview,quickedit,Swaggest,yesmeck' + _CSPELL_WORDS: 'dawehner,Jesin,josdejong,jsoneditor,jsonview,McKenna,quickedit,Swaggest,yesmeck' OPT_IN_TEST_MAX_PHP: '1' - OPT_IN_TEST_NEXT_MINOR: '1' OPT_IN_TEST_PREVIOUS_MAJOR: '1' OPT_IN_TEST_PREVIOUS_MINOR: '1' -# SKIP_ESLINT: '1' -# OPT_IN_TEST_NEXT_MAJOR: '1' -# _CURL_TEMPLATES_REF: 'main' - + # Disable the next phpstan minor release as it would involve breaking + # compatibility with D9 and < 10.3. + # @see https://www.drupal.org/project/json_field/issues/3450162 + # OPT_IN_TEST_NEXT_MINOR: '1' diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a753f2c0e45f505c499694e93dcc8b1b1e958829..9358d49eedc490442c408ef56166bfc84ff5f880 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,8 @@ JSON Field 8.x-1.x-dev, 2024-xx-xx organized in alphabetical order as per standard coding practices. #3448199 by ptmkenny, DamienMcKenna: Fix library warning method name. #3450101 by DamienMcKenna: Coding standards fixes. +#3450099 by ptmkenny, DamienMcKenna: Require phpcs, composer-lint, cspell, + phpstan and stylelint to pass. JSON Field 8.x-1.3, 2023-08-09 diff --git a/modules/json_field_widget/tests/modules/json_field_widget_test_helper/json_field_widget_test_helper.info.yml b/modules/json_field_widget/tests/modules/json_field_widget_test_helper/json_field_widget_test_helper.info.yml index 7e7b5df416957a685b4836703bb96193f068fdba..6d0308fad8bfa3055a1fab2aaeeb04b870fd73db 100644 --- a/modules/json_field_widget/tests/modules/json_field_widget_test_helper/json_field_widget_test_helper.info.yml +++ b/modules/json_field_widget/tests/modules/json_field_widget_test_helper/json_field_widget_test_helper.info.yml @@ -1,6 +1,6 @@ name: 'JSON Field Widget Test Helper' type: module -description: 'Extra logic to make testing the widgete.' +description: 'Extra logic to make testing the widget.' package: Testing dependencies: - drupal:node diff --git a/modules/json_field_widget/tests/src/Functional/WidgetTest.php b/modules/json_field_widget/tests/src/Functional/WidgetTest.php index 6e1e1bc2c7b38bc9fb7682b11c6c6c08ed13ca85..445e5ee4b54ab82bc6b794ffe4a3382b115d2522 100644 --- a/modules/json_field_widget/tests/src/Functional/WidgetTest.php +++ b/modules/json_field_widget/tests/src/Functional/WidgetTest.php @@ -6,7 +6,7 @@ use Drupal\Component\Serialization\Json; use Drupal\Tests\BrowserTestBase; /** - * Verify that JSON Field widget UI works as expected + * Verify that JSON Field widget UI works as expected. * * @group json_field */ diff --git a/src/JsonFieldRequirements.php b/src/JsonFieldRequirements.php index 1c45d7b22e089013351f5954bf3e642ec4253ca5..c1b8f9e4e60673f9a54bad40b437ce75ea046185 100644 --- a/src/JsonFieldRequirements.php +++ b/src/JsonFieldRequirements.php @@ -72,7 +72,7 @@ class JsonFieldRequirements implements JsonFieldRequirementsInterface { $version_query = 'SHOW server_version'; } elseif ($driver === 'sqlite') { - $version_query = 'select sqlite_version()'; + $version_query = 'select sqlite_version()'; } $driver_version = $this->connection->query($version_query)->fetchCol(); $is_compatible = version_compare($driver_version[0], $minimum_version_required);