diff --git a/.cspell-project-words.txt b/.cspell-project-words.txt index 809f089825152ee0524b4d64ab8c65e040eec8bc..20263a57b723cb5c899da0ac79291cdd96551196 100644 --- a/.cspell-project-words.txt +++ b/.cspell-project-words.txt @@ -12,3 +12,6 @@ triplestore # UK style serialise Serialiser + +# DB schema +varchar diff --git a/.ddev/addon-metadata/ddev-drupal-contrib/manifest.yaml b/.ddev/addon-metadata/ddev-drupal-contrib/manifest.yaml index 2d5ec6edd53dfaae9324cc79754bf43c21c41abb..ed050e84b7ad9957da05726ea7614047f471411c 100644 --- a/.ddev/addon-metadata/ddev-drupal-contrib/manifest.yaml +++ b/.ddev/addon-metadata/ddev-drupal-contrib/manifest.yaml @@ -1,7 +1,7 @@ name: ddev-drupal-contrib repository: ddev/ddev-drupal-contrib -version: 1.0.0-rc22 -install_date: "2024-11-12T16:30:11Z" +version: 1.0.0-rc23 +install_date: "2025-01-08T12:51:57+02:00" project_files: - commands/web/eslint - commands/web/expand-composer-json diff --git a/.ddev/commands/web/eslint b/.ddev/commands/web/eslint index bef2335aba36d9b7153f95bb0fbc3494a49556f3..fb663f663c1fa62a985892f1a8ec537f85813d83 100755 --- a/.ddev/commands/web/eslint +++ b/.ddev/commands/web/eslint @@ -13,8 +13,8 @@ if "$DDEV_DOCROOT/core/node_modules/.bin/eslint" --version >/dev/null ; then test -e .prettierignore || echo '*.yml' > .prettierignore # Change directory to the project root folder cd "$DDEV_DOCROOT/modules/custom/${DDEV_SITENAME//-/_}" || exit - "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core/node_modules/.bin/eslint" --no-error-on-unmatched-pattern --ignore-pattern="*.es6.js" --resolve-plugins-relative-to=$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core --ext=.js,.yml . "$@" + "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core/node_modules/.bin/eslint" --config="../../../core/.eslintrc.passing.json" --no-error-on-unmatched-pattern --ignore-pattern="*.es6.js" --resolve-plugins-relative-to=$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core --ext=.js,.yml . "$@" else - echo "eslint is not available. You may need to 'ddev yarn --cwd $DDEV_DOCROOT/core install'" + echo "eslint is not available. You may need to 'ddev exec \"cd $DDEV_DOCROOT/core && yarn install\"'" exit 1 fi diff --git a/.ddev/commands/web/expand-composer-json b/.ddev/commands/web/expand-composer-json index d24d8a0252e4b795474cf50a2816cef64cc4ff4c..48a8840f6e46df7f3856df101b80924f8aeed400 100755 --- a/.ddev/commands/web/expand-composer-json +++ b/.ddev/commands/web/expand-composer-json @@ -10,5 +10,12 @@ export _WEB_ROOT=$DDEV_DOCROOT cd "$DDEV_COMPOSER_ROOT" || exit curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/expand_composer_json.php +if [[ ! -f composer.json ]]; then + echo "{}" > composer.json + _ddev_drupal_contrib_empty_composer=true +fi php expand_composer_json.php "$DDEV_SITENAME" rm -f expand_composer_json.php +if [ "$_ddev_drupal_contrib_empty_composer" = true ]; then + rm -f composer.json +fi diff --git a/.ddev/commands/web/phpcbf b/.ddev/commands/web/phpcbf index 9c1013ca93deecc49fa6631f9547083c0d819489..756d2b4cbbec274a9913b30238c21f4dedb472dd 100755 --- a/.ddev/commands/web/phpcbf +++ b/.ddev/commands/web/phpcbf @@ -12,4 +12,4 @@ if ! command -v phpcbf >/dev/null; then exit 1 fi test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist -phpcbf -s --report-full --report-summary --report-source web/modules/custom "$@" +phpcbf -s --report-full --report-summary --report-source $DDEV_DOCROOT/modules/custom "$@" diff --git a/.ddev/commands/web/phpcs b/.ddev/commands/web/phpcs index 672888682ac272081d77da40a83a8f009c09f1a6..5df1fa9b147ff5fa225777ae519645a269a4eb3a 100755 --- a/.ddev/commands/web/phpcs +++ b/.ddev/commands/web/phpcs @@ -12,4 +12,4 @@ if ! command -v phpcs >/dev/null; then exit 1 fi test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist -phpcs -s --report-full --report-summary --report-source web/modules/custom --ignore=*/.ddev/* "$@" +phpcs -s --report-full --report-summary --report-source $DDEV_DOCROOT/modules/custom --ignore=*/.ddev/* "$@" diff --git a/.ddev/commands/web/phpstan b/.ddev/commands/web/phpstan index ae151f6c418aac8b0693b866b403eefe6d5b3836..7c73132e7e9e7915494c44d18da0eb4b30839c8c 100755 --- a/.ddev/commands/web/phpstan +++ b/.ddev/commands/web/phpstan @@ -5,7 +5,6 @@ ## Description: Run phpstan inside the web container ## Usage: phpstan [flags] [args] ## Example: "ddev phpstan" or "ddev phpstan -n" -## ProjectTypes: drupal,drupal8,drupal9,drupal10 ## ExecRaw: true if ! command -v phpstan >/dev/null; then @@ -13,6 +12,8 @@ if ! command -v phpstan >/dev/null; then exit 1 fi test -e phpstan.neon || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpstan.neon +# See https://git.drupalcode.org/project/gitlab_templates/-/commit/a107b7f1f79af12e0b09f70be47b68e3f69b4504 +sed -i 's/BASELINE_PLACEHOLDER/phpstan-baseline.neon/g' phpstan.neon # Add an empty baseline file to ensure it exists. test -e phpstan-baseline.neon || touch phpstan-baseline.neon phpstan analyse $DDEV_DOCROOT/modules/custom "$@" diff --git a/.ddev/commands/web/stylelint b/.ddev/commands/web/stylelint index d7d43f46b1e53064522adb5e6a3fc7a3e3bd837e..99d082c3302dceaba7b7fd98764ae8695a454145 100755 --- a/.ddev/commands/web/stylelint +++ b/.ddev/commands/web/stylelint @@ -7,9 +7,11 @@ ## Example: "ddev stylelint" ## ExecRaw: true -if yarn --cwd "$DDEV_DOCROOT/core" stylelint --version >/dev/null ; then - yarn --color --cwd "$DDEV_DOCROOT/core" --config ./.stylelintrc.json stylelint ../modules/custom/**/*.css "$@" +if $DDEV_DOCROOT/core/node_modules/.bin/stylelint --version >/dev/null ; then + # Change directory to the project root folder + cd "$DDEV_DOCROOT/modules/custom/${DDEV_SITENAME//-/_}" || exit + "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core/node_modules/.bin/stylelint" --color --config "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core/.stylelintrc.json" "./**/*.css" "$@" else - echo "stylelint is not available. You may need to 'ddev yarn --cwd $DDEV_DOCROOT/core install'" + echo "stylelint is not available. You may need to 'ddev exec \"cd $DDEV_DOCROOT/core && yarn install\"'" exit 1 fi diff --git a/.ddev/config.contrib.yaml b/.ddev/config.contrib.yaml index aa7838972c255b5aafe6524441be731ff5257dd0..e9e7b24cb9605d6a65660c6ddd4036db96e22952 100644 --- a/.ddev/config.contrib.yaml +++ b/.ddev/config.contrib.yaml @@ -1,8 +1,9 @@ #ddev-generated ## Command provided by https://github.com/ddev/ddev-drupal-contrib web_environment: - # If desired, override to a different version of Drupal core in via the project's DDEV config - - DRUPAL_CORE=^10 + # To change the Drupal core version, see the README: + # https://github.com/ddev/ddev-drupal-contrib/blob/main/README.md#changing-the-drupal-core-version + - DRUPAL_CORE=^11 - SIMPLETEST_DB=mysql://db:db@db/db - SIMPLETEST_BASE_URL=http://web - BROWSERTEST_OUTPUT_DIRECTORY=/tmp diff --git a/.gitignore b/.gitignore index 297bccc51e26166ea2bf7021d6c877044691f18e..5d1c5d51f09ceba3b4b856b2b280f8cff3ffba28 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ /phpcs.xml.dist /phpstan-baseline.neon /phpstan.neon +/recipes/ /vendor/ /web/ diff --git a/tests/src/Kernel/RdfSyncSynchronization.php b/tests/src/Kernel/RdfSyncSynchronizationTest.php similarity index 95% rename from tests/src/Kernel/RdfSyncSynchronization.php rename to tests/src/Kernel/RdfSyncSynchronizationTest.php index e35640c6434a7df4853c8da22244d8a4afc0f997..7185d52c1baa911e8ad854dada182bc007fc3c28 100644 --- a/tests/src/Kernel/RdfSyncSynchronization.php +++ b/tests/src/Kernel/RdfSyncSynchronizationTest.php @@ -10,10 +10,10 @@ use Drupal\Tests\rdf_sync\Traits\RdfSyncTestingDataTrait; use Drupal\rdf_sync\Model\SyncMethod; /** - * @covers \Drupal\rdf_sync\RdfSyncSynchronizer + * @coversDefaultClass \Drupal\rdf_sync\RdfSyncSynchronizer * @group rdf_sync */ -class RdfSyncSynchronization extends KernelTestBase { +class RdfSyncSynchronizationTest extends KernelTestBase { use RdfSyncTestingDataTrait; use RdfSyncTestTrait; @@ -51,7 +51,7 @@ class RdfSyncSynchronization extends KernelTestBase { } /** - * @covers + * @covers ::synchronize * @dataProvider providerConnectorTestCases * * @param string $connectorId