From 538785b82124b58bbe20634e4c7f2dae623f1d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4se?= Date: Tue, 24 Dec 2024 14:49:04 +0100 Subject: [PATCH] Update GitHub workflow and fix site install --- .github/workflows/ci.yml | 54 +++ .github/workflows/phpanalysis.yml | 80 ---- composer-manifest.yaml | 5 + composer.json | 3 + composer.lock | 395 +++++++++++++++++- composer.patches.json | 3 + config/.env.ci | 14 + .../drupal-11-compatibility.patch | 12 + phpunit.xml | 42 +- scripts/install-ci.sh | 39 ++ .../questionnaire/questionnaire.install | 19 - .../projects/dummy/projects_dummy.info.yml | 1 + web/sites/default/install.services.yml | 192 +++++++++ 13 files changed, 744 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/phpanalysis.yml create mode 100644 config/.env.ci create mode 100644 patches/devel_mail_logger/drupal-11-compatibility.patch create mode 100644 scripts/install-ci.sh create mode 100755 web/sites/default/install.services.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..de2ed638 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: Tests + +on: + pull_request: + push: + branches: + - main + +jobs: + lint: + name: Linting + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + coverage: none + php-version: 8.3 + - name: Validate Dependencies + run: composer validate + - name: Install Dependencies + uses: ramsey/composer-install@v3 + - name: Check Coding Standards + run: vendor/bin/phpcs --report=summary + - name: Static Code Analysis + run: vendor/bin/phpstan analyze web/modules/custom + + test: + name: Testing + runs-on: ubuntu-latest + needs: lint + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + coverage: no + php-version: 8.3 + - name: Install Dependencies + uses: ramsey/composer-install@v3 + - name: Setup Environment + run: | + sudo systemctl start mysql.service + mysql -uroot -h127.0.0.1 -proot -e 'CREATE DATABASE IF NOT EXISTS db;' + sudo systemctl start apache2.service + - name: Unit & Kernel Tests + run: vendor/bin/phpunit --testsuite unit,kernel --testdox --stop-on-failure + - name: Install Drupal + run: bash scripts/install-ci.sh + - name: Existing Site Tests + run: vendor/bin/phpunit --testsuite existing-site --testdox --stop-on-failure diff --git a/.github/workflows/phpanalysis.yml b/.github/workflows/phpanalysis.yml deleted file mode 100644 index 47c8f6fd..00000000 --- a/.github/workflows/phpanalysis.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: PHP Code Analysis & Tests - -on: - pull_request: - push: - branches: - - main - -jobs: - phpanalysis: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install PHP_CodeSniffer and PHPStan - run: | - composer require --dev dealerdirect/phpcodesniffer-composer-installer - composer require --dev drupal/coder - - - name: Check coding standards - run: | - vendor/bin/phpcs --report=summary - - - name: Static code analysis - run: | - vendor/bin/phpstan analyze web/modules/custom - - phptests: - needs: phpanalysis - runs-on: ubuntu-latest - env: - extensions: gd - key: cache - services: - db: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: root - MYSQL_USER: db - MYSQL_PASSWORD: db - MYSQL_DATABASE: db - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - name: Check out - uses: actions/checkout@v2 - - - name: Set up cache environment - id: extcache - uses: shivammathur/cache-extensions@v1 - with: - php-version: 8.3 - extensions: ${{ env.extensions }} - key: ${{ env.key }} - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.extcache.outputs.dir }} - key: ${{ steps.extcache.outputs.key }} - restore-keys: ${{ steps.extcache.outputs.key }} - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.3 - extensions: ${{ env.extensions }} - coverage: none - - - name: Install dependencies - run: | - sudo apt-get install patch - composer validate - composer install --no-interaction --no-progress - - - name: Run PHPUnit tests - run: | - vendor/bin/phpunit --testsuite unit,kernel diff --git a/composer-manifest.yaml b/composer-manifest.yaml index f1b0e59c..c513ed40 100644 --- a/composer-manifest.yaml +++ b/composer-manifest.yaml @@ -28,9 +28,12 @@ packages: dekor/php-array-table: '2.0' dflydev/dot-access-data: v3.0.3 doctrine/annotations: 2.0.2 + doctrine/common: 3.4.5 doctrine/deprecations: 1.1.4 + doctrine/event-manager: 2.0.1 doctrine/instantiator: 2.0.0 doctrine/lexer: 2.1.1 + doctrine/persistence: 3.4.0 dompdf/php-font-lib: 1.0.1 drupal/admin_toolbar: 3.5.1 drupal/coder: 8.3.26 @@ -43,6 +46,8 @@ packages: drupal/core-project-message: 11.1.0 drupal/core-recommended: 11.1.0 drupal/core-vendor-hardening: 11.1.0 + drupal/devel: 5.3.1 + drupal/devel_mail_logger: 2.0.0 drupal/entity: 1.5.0 drupal/file_mdm: 3.1.0 drupal/filefield_paths: 1.0.0-beta8 diff --git a/composer.json b/composer.json index 50ba004b..59aa4ec0 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,8 @@ "drupal/core-project-message": "^11.1", "drupal/core-recommended": "^11.1", "drupal/core-vendor-hardening": "^11.1", + "drupal/devel": "^5.3", + "drupal/devel_mail_logger": "^2.0", "drupal/entity": "^1.4", "drupal/filefield_paths": "^1.0@beta", "drupal/gin": "^4.0", @@ -134,6 +136,7 @@ }, "drupal-lenient": { "allowed-list": [ + "drupal/devel_mail_logger", "drupal/jsonapi_boost", "drupal/jsonapi_cross_bundles", "drupal/multivalue_form_element", diff --git a/composer.lock b/composer.lock index 36fba5d9..8817e82e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e9ce34aa9689c16f177bab2cd6fe8b0d", + "content-hash": "e80c9d30b9778508e69dfc53824d950f", "packages": [ { "name": "asm89/stack-cors", @@ -1131,6 +1131,97 @@ }, "time": "2024-09-05T10:17:24+00:00" }, + { + "name": "doctrine/common", + "version": "3.4.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "6c8fef961f67b8bc802ce3e32e3ebd1022907286" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/6c8fef961f67b8bc802ce3e32e3ebd1022907286", + "reference": "6c8fef961f67b8bc802ce3e32e3ebd1022907286", + "shasum": "" + }, + "require": { + "doctrine/persistence": "^2.0 || ^3.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0 || ^10.0", + "doctrine/collections": "^1", + "phpstan/phpstan": "^1.4.1", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^6.1", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/common/issues", + "source": "https://github.com/doctrine/common/tree/3.4.5" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", + "type": "tidelift" + } + ], + "time": "2024-10-08T15:53:43+00:00" + }, { "name": "doctrine/deprecations", "version": "1.1.4", @@ -1176,6 +1267,97 @@ }, "time": "2024-12-07T21:18:45+00:00" }, + { + "name": "doctrine/event-manager", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/b680156fa328f1dfd874fd48c7026c41570b9c6e", + "reference": "b680156fa328f1dfd874fd48c7026c41570b9c6e", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^10.5", + "vimeo/psalm": "^5.24" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/2.0.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2024-05-22T20:47:39+00:00" + }, { "name": "doctrine/lexer", "version": "2.1.1", @@ -1254,6 +1436,102 @@ ], "time": "2024-02-05T11:35:39+00:00" }, + { + "name": "doctrine/persistence", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "0ea965320cec355dba75031c1b23d4c78362e3ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/0ea965320cec355dba75031c1b23d4c78362e3ff", + "reference": "0ea965320cec355dba75031c1b23d4c78362e3ff", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1 || ^2", + "php": "^7.2 || ^8.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0" + }, + "conflict": { + "doctrine/common": "<2.10" + }, + "require-dev": { + "doctrine/coding-standard": "^12", + "doctrine/common": "^3.0", + "phpstan/phpstan": "1.12.7", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5.38 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6.0 || ^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Persistence\\": "src/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://www.doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/persistence/issues", + "source": "https://github.com/doctrine/persistence/tree/3.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fpersistence", + "type": "tidelift" + } + ], + "time": "2024-10-30T19:48:12+00:00" + }, { "name": "dompdf/php-font-lib", "version": "1.0.1", @@ -1851,6 +2129,121 @@ }, "time": "2024-11-11T18:39:05+00:00" }, + { + "name": "drupal/devel", + "version": "5.3.1", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/devel.git", + "reference": "5.3.1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/devel-5.3.1.zip", + "reference": "5.3.1", + "shasum": "6a5f13bdf93dc5f7f194b6af847589ae15e37b63" + }, + "require": { + "doctrine/common": "^2.7 || ^3.4", + "drupal/core": "^10.3 || ^11 || ^12", + "php": ">=8.1", + "symfony/var-dumper": "^4 || ^5 || ^6 || ^7" + }, + "conflict": { + "drupal/core": "<10.3", + "drush/drush": "<12.5.1", + "kint-php/kint": "<3" + }, + "require-dev": { + "drush/drush": "^13", + "firephp/firephp-core": "^0.5.3", + "kint-php/kint": "^5.1" + }, + "suggest": { + "kint-php/kint": "Kint provides an informative display of arrays/objects. Useful for debugging and developing." + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "5.3.1", + "datestamp": "1723258446", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "moshe weitzman", + "homepage": "https://www.drupal.org/user/23" + } + ], + "description": "Various blocks, pages, and functions for developers.", + "homepage": "https://www.drupal.org/project/devel", + "support": { + "source": "https://gitlab.com/drupalspoons/devel", + "issues": "https://gitlab.com/drupalspoons/devel/-/issues", + "slack": "https://drupal.slack.com/archives/C012WAW1MH6" + } + }, + { + "name": "drupal/devel_mail_logger", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/devel_mail_logger.git", + "reference": "2.0.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/devel_mail_logger-2.0.0.zip", + "reference": "2.0.0", + "shasum": "05b2879597b0b72e141f82c0836dd599ff6fef6c" + }, + "require": { + "drupal/core": "^8 || ^9 || ^10 || ^11 || ^12", + "php": ">=7.4" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0", + "datestamp": "1685568166", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "sadashiv", + "homepage": "https://www.drupal.org/user/1773304" + }, + { + "name": "uniquename", + "homepage": "https://www.drupal.org/user/532810" + } + ], + "description": "A Custom Mail Interface that logs mail to DB", + "homepage": "https://www.drupal.org/project/devel_mail_logger", + "keywords": [ + "Drupal" + ], + "support": { + "source": "http://cgit.drupalcode.org/devel_mail_logger", + "issues": "https://www.drupal.org/project/issues/devel_mail_logger" + } + }, { "name": "drupal/entity", "version": "1.5.0", diff --git a/composer.patches.json b/composer.patches.json index 41096f80..6d4498c5 100644 --- a/composer.patches.json +++ b/composer.patches.json @@ -10,6 +10,9 @@ "Custom: Hide meta drupal IDs in JSON:API response": "patches/core/custom-hide-meta-drupal-ids-jsonapi.patch", "Custom Issue #3050383: PageCache getCacheId doesnt compare cid of the following subrequests in subrequest queue calls": "patches/core/custom-page-cache-id-doesnt-compare-cid-subrequests.patch" }, + "drupal/devel_mail_logger": { + "Issue #3438288: Drupal 11 Compatibility": "patches/devel_mail_logger/drupal-11-compatibility.patch" + }, "drupal/filefield_paths": { "Custom: Exclude consumer entity type from filefield_paths handling": "patches/filefield_paths/custom-exclude-consumer-entity-type.patch" }, diff --git a/config/.env.ci b/config/.env.ci new file mode 100644 index 00000000..39e64c0a --- /dev/null +++ b/config/.env.ci @@ -0,0 +1,14 @@ +PROJECT_NAME=youvo + +SITE_NAME=youvo.org +SITE_MAIL=hello@youvo.org +ACCOUNT_NAME=admin@youvo.org +ACCOUNT_MAIL=admin@youvo.org +ACCOUNT_PASS=admin + +DB_NAME=db +DB_USER=root +DB_PASSWORD=root +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DRIVER=mysql diff --git a/patches/devel_mail_logger/drupal-11-compatibility.patch b/patches/devel_mail_logger/drupal-11-compatibility.patch new file mode 100644 index 00000000..516e2a8a --- /dev/null +++ b/patches/devel_mail_logger/drupal-11-compatibility.patch @@ -0,0 +1,12 @@ +diff --git a/devel_mail_logger.info.yml b/devel_mail_logger.info.yml +index e224aa18aca6f3d521e584e0b287878468c37f20..2ebc0020ec263a356757a478e0445ce66a6549a1 100644 +--- a/devel_mail_logger.info.yml ++++ b/devel_mail_logger.info.yml +@@ -2,6 +2,6 @@ name: 'Devel Mail Logger' + type: module + description: 'A Custom Mail Interface that logs mail to DB' + package: Development +-core_version_requirement: ^8 || ^9 || ^10 ++core_version_requirement: ^8 || ^9 || ^10 || ^11 + tags: + - developer diff --git a/phpunit.xml b/phpunit.xml index 95478555..c4851b5f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,37 +1,49 @@ + cacheResult="false"> + + - - - + + + - + + - - web/modules/custom + + ./web/modules/custom/*/tests/src/Unit + ./web/modules/custom/*/*/tests/src/Unit + + + ./web/modules/custom/*/tests/src/ExistingSite + ./web/modules/custom/*/*/tests/src/ExistingSite + + + ./web/modules/custom/*/tests/src/Kernel + ./web/modules/custom/*/*/tests/src/Kernel + + + ./web/modules/custom/*/tests/src/Functional + ./web/modules/custom/*/*/tests/src/Functional + - - - web/modules/custom - - + diff --git a/scripts/install-ci.sh b/scripts/install-ci.sh new file mode 100644 index 00000000..aeee91be --- /dev/null +++ b/scripts/install-ci.sh @@ -0,0 +1,39 @@ +#!/bin/bash + + # Exit on error. + set -e + + # Get variables. + set -a; source config/.env.ci; set +a + echo "Variables loaded ..." + + # Reset settings. + cd web/sites || exit + chmod -R 0755 default + cd default || exit + if test -f "settings.php"; then + sudo chmod 0777 settings.php + rm settings.php + fi + if test -f "services.yml"; then + sudo chmod 0777 services.yml + rm services.yml + fi + cp install.settings.php settings.php + cp install.services.yml services.yml + echo "Settings reset ..." + + # Install Drupal. + cd ../../.. + vendor/bin/drush si --yes --existing-config \ + --locale=en \ + --db-url="${DB_DRIVER}"://"${DB_USER}":"${DB_PASSWORD}"@"${DB_HOST}":"${DB_PORT}"/"${DB_NAME}" \ + --site-name="${SITE_NAME}" \ + --site-mail="${SITE_MAIL}" \ + --account-name="${ACCOUNT_NAME}" \ + --account-mail="${ACCOUNT_MAIL}" \ + --account-pass="${ACCOUNT_PASS}" + + # Rebuild Cache. + echo "Rebuild cache ..." + vendor/bin/drush cr > /dev/null 2>&1 diff --git a/web/modules/custom/academy/questionnaire/questionnaire.install b/web/modules/custom/academy/questionnaire/questionnaire.install index 55e2d927..bb3aa5a1 100644 --- a/web/modules/custom/academy/questionnaire/questionnaire.install +++ b/web/modules/custom/academy/questionnaire/questionnaire.install @@ -11,29 +11,10 @@ use Drupal\Core\Entity\EntityStorageException; use Drupal\Core\Utility\Error; use Drupal\paragraphs\Entity\ParagraphType; -/** - * Implements hook_install(). - */ -function questionnaire_install(): void { - // Add questionnaire target bundle to paragraph reference in lecture entity. - $config = \Drupal::configFactory()->getEditable('field.field.lecture.lecture.paragraphs'); - $current_types = $config->get('settings.handler_settings.target_bundles'); - $current_types['questionnaire'] = 'questionnaire'; - $config->set('settings.handler_settings.target_bundles', $current_types); - $config->save(TRUE); -} - /** * Implements hook_uninstall(). */ function questionnaire_uninstall(): void { - // Remove questionnaire target bundle to paragraph reference in lecture - // entity. - $config = \Drupal::configFactory()->getEditable('field.field.lecture.lecture.paragraphs'); - $current_types = $config->get('settings.handler_settings.target_bundles'); - unset($current_types['questionnaire']); - $config->set('settings.handler_settings.target_bundles', $current_types); - $config->save(TRUE); // Remove config entity for questionnaire paragraph type. try { diff --git a/web/modules/custom/projects/projects/dummy/projects_dummy.info.yml b/web/modules/custom/projects/projects/dummy/projects_dummy.info.yml index 7338d01d..abe074c0 100644 --- a/web/modules/custom/projects/projects/dummy/projects_dummy.info.yml +++ b/web/modules/custom/projects/projects/dummy/projects_dummy.info.yml @@ -6,6 +6,7 @@ package: Projects core_version_requirement: '^10.3 || ^11' dependencies: + - creatives_dummy:creatives_dummy - drupal:file - drupal:user - organizations_dummy:organizations_dummy diff --git a/web/sites/default/install.services.yml b/web/sites/default/install.services.yml new file mode 100755 index 00000000..2fa45ba3 --- /dev/null +++ b/web/sites/default/install.services.yml @@ -0,0 +1,192 @@ +parameters: + jsonapi_obscurity.prefix: '' + session.storage.options: + # Default ini options for sessions. + # + # Some distributions of Linux (most notably Debian) ship their PHP + # installations with garbage collection (gc) disabled. Since Drupal depends + # on PHP's garbage collection for clearing sessions, ensure that garbage + # collection occurs by using the most common settings. + # @default 1 + gc_probability: 1 + # @default 100 + gc_divisor: 100 + # + # Set session lifetime (in seconds), i.e. the grace period for session + # data. Sessions are deleted by the session garbage collector after one + # session lifetime has elapsed since the user's last visit. When a session + # is deleted, authenticated users are logged out, and the contents of the + # user's session is discarded. + # @default 200000 + gc_maxlifetime: 200000 + # + # Set session cookie lifetime (in seconds), i.e. the time from the session + # is created to the cookie expires, i.e. when the browser is expected to + # discard the cookie. The value 0 means "until the browser is closed". + # @default 2000000 + cookie_lifetime: 2000000 + # + # Drupal automatically generates a unique session cookie name based on the + # full domain name used to access the site. This mechanism is sufficient + # for most use-cases, including multi-site deployments. However, if it is + # desired that a session can be reused across different subdomains, the + # cookie domain needs to be set to the shared base domain. Doing so assures + # that users remain logged in as they cross between various subdomains. + # To maximize compatibility and normalize the behavior across user agents, + # the cookie domain should start with a dot. + # + # @default none + # cookie_domain: '.example.com' + # + # Set the session ID string length. The length can be between 22 to 256. The + # PHP recommended value is 48. See + # https://www.php.net/manual/session.security.ini.php for more information. + # This value should be kept in sync with + # \Drupal\Core\Session\SessionConfiguration::__construct() + # @default 48 + sid_length: 48 + # + # Set the number of bits in encoded session ID character. The possible + # values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-", + # ","). The PHP recommended value is 6. See + # https://www.php.net/manual/session.security.ini.php for more information. + # This value should be kept in sync with + # \Drupal\Core\Session\SessionConfiguration::__construct() + # @default 6 + sid_bits_per_character: 6 + twig.config: + # Twig debugging: + # + # When debugging is enabled: + # - The markup of each Twig template is surrounded by HTML comments that + # contain theming information, such as template file name suggestions. + # - Note that this debugging markup will cause automated tests that directly + # check rendered HTML to fail. When running automated tests, 'debug' + # should be set to FALSE. + # - The dump() function can be used in Twig templates to output information + # about template variables. + # - Twig templates are automatically recompiled whenever the source code + # changes (see auto_reload below). + # + # For more information about debugging Twig templates, see + # https://www.drupal.org/node/1906392. + # + # Enabling Twig debugging is not recommended in production environments. + # @default false + debug: false + # Twig auto-reload: + # + # Automatically recompile Twig templates whenever the source code changes. + # If you don't provide a value for auto_reload, it will be determined + # based on the value of debug. + # + # Enabling auto-reload is not recommended in production environments. + # @default null + auto_reload: null + # Twig cache: + # + # By default, Twig templates will be compiled and stored in the filesystem + # to increase performance. Disabling the Twig cache will recompile the + # templates from source each time they are used. In most cases the + # auto_reload setting above should be enabled rather than disabling the + # Twig cache. + # + # Disabling the Twig cache is not recommended in production environments. + # @default true + cache: true + renderer.config: + # Renderer required cache contexts: + # + # The Renderer will automatically associate these cache contexts with every + # render array, hence varying every render array by these cache contexts. + # + # @default ['languages:language_interface', 'theme', 'user.permissions'] + required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions'] + # Renderer automatic placeholdering conditions: + # + # Drupal allows portions of the page to be automatically deferred when + # rendering to improve cache performance. That is especially helpful for + # cache contexts that vary widely, such as the active user. On some sites + # those may be different, however, such as sites with only a handful of + # users. If you know what the high-cardinality cache contexts are for your + # site, specify those here. If you're not sure, the defaults are fairly safe + # in general. + # + # For more information about rendering optimizations see + # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing + auto_placeholder_conditions: + # Max-age at or below which caching is not considered worthwhile. + # + # Disable by setting to -1. + # + # @default 0 + max-age: 0 + # Cache contexts with a high cardinality. + # + # Disable by setting to []. + # + # @default ['session', 'user'] + contexts: ['session', 'user'] + # Tags with a high invalidation frequency. + # + # Disable by setting to []. + # + # @default [] + tags: [] + # Cacheability debugging: + # + # Responses with cacheability metadata (CacheableResponseInterface instances) + # get X-Drupal-Cache-Tags, X-Drupal-Cache-Contexts and X-Drupal-Cache-Max-Age + # headers. + # + # For more information about debugging cacheable responses, see + # https://www.drupal.org/developing/api/8/response/cacheable-response-interface + # + # Enabling cacheability debugging is not recommended in production + # environments. + # @default false + http.response.debug_cacheability_headers: false + factory.keyvalue: {} + # Default key/value storage service to use. + # @default keyvalue.database + # default: keyvalue.database + # Collection-specific overrides. + # state: keyvalue.database + factory.keyvalue.expirable: {} + # Default key/value expirable storage service to use. + # @default keyvalue.database.expirable + # default: keyvalue.database.expirable + # Allowed protocols for URL generation. + filter_protocols: + - http + - https + - ftp + - news + - nntp + - tel + - telnet + - mailto + - irc + - ssh + - sftp + - webcal + - rtsp + + # Configure Cross-Site HTTP requests (CORS). + # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS + # for more information about the topic in general. + # Note: By default the configuration is disabled. + cors.config: + enabled: false + # Specify allowed headers, like 'x-allowed-header'. + allowedHeaders: [] + # Specify allowed request methods, specify ['*'] to allow all possible ones. + allowedMethods: [] + # Configure requests allowed from specific origins. + allowedOrigins: ['*'] + # Sets the Access-Control-Expose-Headers header. + exposedHeaders: false + # Sets the Access-Control-Max-Age header. + maxAge: false + # Sets the Access-Control-Allow-Credentials header. + supportsCredentials: false